$NetBSD: patch-af,v 1.5 2005/08/10 16:50:18 he Exp $ --- xv.h.orig 2005-07-29 15:52:23.000000000 +0200 +++ xv.h @@ -137,9 +137,7 @@ #endif -#if defined(__FreeBSD__) -# include -#endif +#include /* include files */ @@ -158,7 +156,7 @@ #ifndef VMS # include # ifndef __NetBSD__ -# if !(defined __GLIBC__ && __GLIBC__ >= 2) +# if !(defined(BSD) && (BSD >= 199103)) && !(defined __GLIBC__ && __GLIBC__ >= 2) extern int errno; /* SHOULD be in errno.h, but often isn't */ extern char *sys_errlist[]; /* this too... */ # endif @@ -170,7 +168,7 @@ #ifdef VMS # define ERRSTR(x) strerror(x, vaxc$errno) #else -# if defined(__BEOS__) || defined(__linux__) /* or all modern/glibc systems? */ +# if defined(__BEOS__) || defined(__linux__) || defined(__INTERIX) /* or all modern/glibc systems? */ # define ERRSTR(x) strerror(x) # else # define ERRSTR(x) sys_errlist[x] @@ -345,7 +343,11 @@ #endif #ifndef S_IRWUSR -# define S_IRWUSR (S_IRUSR|__S_IWRITE) +# ifdef __S_IWRITE +# define S_IRWUSR (S_IRUSR|__S_IWRITE) +# else +# define S_IRWUSR (S_IRUSR|S_IWUSR) +# endif #endif #ifndef MAXPATHLEN