| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | $NetBSD: patch-af,v 1.8 2011/01/23 23:58:01 dholland Exp $ | | 1 | $NetBSD: patch-af,v 1.9 2011/02/14 20:37:40 wiz Exp $ |
2 | | | 2 | |
3 | Config fixups. | | 3 | Config fixups. |
4 | - don't declare errno and sys_errlist | | 4 | - don't declare errno and sys_errlist |
5 | - use strerror | | 5 | - use strerror |
6 | - use getcwd, not getwd | | 6 | - use getcwd, not getwd |
7 | | | 7 | |
8 | --- xv.h.orig 2011-01-23 23:25:49.000000000 +0000 | | 8 | --- xv.h.orig 2011-01-23 23:25:49.000000000 +0000 |
9 | +++ xv.h | | 9 | +++ xv.h |
10 | @@ -138,9 +138,7 @@ | | 10 | @@ -138,9 +138,7 @@ |
11 | #endif | | 11 | #endif |
12 | | | 12 | |
13 | | | 13 | |
14 | -#if defined(__FreeBSD__) | | 14 | -#if defined(__FreeBSD__) |
| @@ -22,27 +22,27 @@ Config fixups. | | | @@ -22,27 +22,27 @@ Config fixups. |
22 | #ifndef VMS | | 22 | #ifndef VMS |
23 | # include <errno.h> | | 23 | # include <errno.h> |
24 | # ifndef __NetBSD__ | | 24 | # ifndef __NetBSD__ |
25 | -# if !(defined __GLIBC__ && __GLIBC__ >= 2) | | 25 | -# if !(defined __GLIBC__ && __GLIBC__ >= 2) |
26 | +# if !(defined(BSD) && (BSD >= 199103)) && !(defined __GLIBC__ && __GLIBC__ >= 2) | | 26 | +# if !(defined(BSD) && (BSD >= 199103)) && !(defined __GLIBC__ && __GLIBC__ >= 2) |
27 | extern int errno; /* SHOULD be in errno.h, but often isn't */ | | 27 | extern int errno; /* SHOULD be in errno.h, but often isn't */ |
28 | extern char *sys_errlist[]; /* this too... */ | | 28 | extern char *sys_errlist[]; /* this too... */ |
29 | # endif | | 29 | # endif |
30 | @@ -171,7 +169,7 @@ | | 30 | @@ -171,7 +169,7 @@ |
31 | #ifdef VMS | | 31 | #ifdef VMS |
32 | # define ERRSTR(x) strerror(x, vaxc$errno) | | 32 | # define ERRSTR(x) strerror(x, vaxc$errno) |
33 | #else | | 33 | #else |
34 | -# if defined(__BEOS__) || defined(__linux__) /* or all modern/glibc systems? */ | | 34 | -# if defined(__BEOS__) || defined(__linux__) /* or all modern/glibc systems? */ |
35 | +# if defined(__BEOS__) || defined(__linux__) || defined(__INTERIX) /* or all modern/glibc systems? */ | | 35 | +# if defined(__BEOS__) || defined(__linux__) || defined(__INTERIX) || defined(__sun) /* or all modern/glibc systems? */ |
36 | # define ERRSTR(x) strerror(x) | | 36 | # define ERRSTR(x) strerror(x) |
37 | # else | | 37 | # else |
38 | # define ERRSTR(x) sys_errlist[x] | | 38 | # define ERRSTR(x) sys_errlist[x] |
39 | @@ -207,7 +205,9 @@ | | 39 | @@ -207,7 +205,9 @@ |
40 | # if defined(hp300) || defined(hp800) || defined(NeXT) | | 40 | # if defined(hp300) || defined(hp800) || defined(NeXT) |
41 | # include <sys/malloc.h> /* it's in "sys" on HPs and NeXT */ | | 41 | # include <sys/malloc.h> /* it's in "sys" on HPs and NeXT */ |
42 | # else | | 42 | # else |
43 | -# include <malloc.h> | | 43 | -# include <malloc.h> |
44 | +# ifndef __DARWIN__ | | 44 | +# ifndef __DARWIN__ |
45 | +# include <malloc.h> | | 45 | +# include <malloc.h> |
46 | +# endif | | 46 | +# endif |
47 | # endif | | 47 | # endif |
48 | #endif | | 48 | #endif |