summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_install/patches/patch-ae
blob: 015d3f685e23eb406f05076171b9332bf4e8354d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$NetBSD: patch-ae,v 1.4 2002/09/23 12:57:27 abs Exp $

--- lib/lib.h.orig	Thu Aug  1 09:46:31 2002
+++ lib/lib.h	Mon Sep 23 13:50:19 2002
@@ -40,6 +40,10 @@
 
 #include "path.h"
 
+#if defined(__NetBSD__) && (__NetBSD_Version__ < 104000300)
+size_t strlcpy(char *, const char *, size_t);
+#endif
+
 /* Macros */
 #define SUCCESS	(0)
 #define	FAIL	(-1)
@@ -109,10 +113,11 @@
 #define	PKG_PATTERN_MAX	FILENAME_MAX	/* max length of pattern, including nul */
 #define	PKG_SUFFIX_MAX	10	/* max length of suffix, including nul */
 
-/* This should only happen on 1.3 and 1.3.1, not 1.3.2 and up */
+/* For NetBSD 1.3.1 and earlier, and some non NetBSD systems */
 #ifndef TAILQ_FIRST
 #define TAILQ_FIRST(head)               ((head)->tqh_first)
 #define TAILQ_NEXT(elm, field)          ((elm)->field.tqe_next)
+#define TAILQ_HEAD_INITIALIZER(head)	{ NULL, &(head).tqh_first }
 #endif
 
 
@@ -281,6 +286,10 @@
 /* For all */
 int     pkg_perform(lpkg_head_t *);
 
+#ifdef FGETLN_MISSING
+char   *fgetln(FILE *, size_t *);
+#endif
+
 /* Externs */
 extern Boolean Verbose;
 extern Boolean Fake;