blob: f28b366a5486b2a981ded24c62497d6473dfbee0 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
$NetBSD: patch-af,v 1.6 2006/03/15 19:27:31 minskim Exp $
--- xv.h.orig 2006-03-15 11:00:24.000000000 -0800
+++ xv.h
@@ -137,9 +137,7 @@
#endif
-#if defined(__FreeBSD__)
-# include <sys/param.h>
-#endif
+#include <sys/param.h>
/* include files */
@@ -158,7 +156,7 @@
#ifndef VMS
# include <errno.h>
# 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]
@@ -215,7 +213,9 @@
# if defined(hp300) || defined(hp800) || defined(NeXT)
# include <sys/malloc.h> /* it's in 'sys' on HPs and NeXT */
# else
-# include <malloc.h>
+# ifndef __DARWIN__
+# include <malloc.h>
+# endif
# endif
# endif
#endif /* !VMS */
@@ -345,7 +345,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
|