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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
$NetBSD: patch-ab,v 1.4 1998/08/07 11:10:54 agc Exp $
--- includes.h.orig Sat Jun 13 03:44:19 1998
+++ includes.h Wed Jun 17 15:03:22 1998
@@ -198,7 +198,7 @@
#include <pwdadj.h>
#endif
-#if defined(SHADOW_PWD) && !defined(NETBSD) && !defined(FreeBSD) && !defined(CONVEX) && !defined(__OpenBSD__)
+#if defined(SHADOW_PWD) && !defined(CONVEX)
#include <shadow.h>
#endif
@@ -510,23 +510,21 @@
#endif
-#ifdef NETBSD
-#ifdef NetBSD1_3
-#include <string.h>
+#ifdef __NetBSD__
+#include <dirent.h>
+#include <strings.h>
+#include <netinet/tcp.h>
#ifdef ALLOW_CHANGE_PASSWORD
#include <termios.h>
#endif /* ALLOW_CHANGE_PASSWORD */
-#else /* NetBSD1_3 */
-#include <strings.h>
-#endif /* NetBSD1_3 */
-#include <netinet/tcp.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-/* you may not need this */
-#define NO_GETSPNAM
#define SIGNAL_CAST (void (*)())
-#define USE_DIRECT
-#define REPLACE_INNETGR
+#define HAVE_BZERO
+#define HAVE_PATHCONF
+#define HAVE_GETGRNAM 1
+#define HAVE_GETTIMEOFDAY
+#define HAVE_MEMMOVE
+#define USE_GETCWD
+#define USE_SETSID
#endif
--- interface.c.orig Tue May 5 01:27:35 1998
+++ interface.c Wed Jun 17 14:57:01 1998
@@ -161,7 +161,7 @@
}
}
}
-#elif defined(__FreeBSD__) || defined(NETBSD) || defined(AMIGA) || defined(_AIX41) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(AMIGA) || defined(_AIX41) || defined(__OpenBSD__)
ifc.ifc_len = sizeof(buff);
ifc.ifc_buf = buff;
if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) {
--- quotas.c.orig Wed May 13 03:46:55 1998
+++ quotas.c Wed Jun 17 14:57:01 1998
@@ -548,7 +548,7 @@
#else
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#include <ufs/ufs/quota.h>
#include <machine/param.h>
#elif AIX
@@ -558,7 +558,7 @@
#define dqb_curfiles dqb_curinodes
#define dqb_fhardlimit dqb_ihardlimit
#define dqb_fsoftlimit dqb_isoftlimit
-#else /* !__FreeBSD__ && !AIX && !__OpenBSD__ */
+#else /* !__FreeBSD__ && !AIX && !__OpenBSD__ && !__NetBSD__ */
#include <sys/quota.h>
#include <devnm.h>
#endif
@@ -571,7 +571,7 @@
uid_t euser_id;
int r;
struct dqblk D;
-#if !defined(__FreeBSD__) && !defined(AIX) && !defined(__OpenBSD__)
+#if !defined(__FreeBSD__) && !defined(AIX) && !defined(__OpenBSD__) && !defined(__NetBSD__)
char dev_disk[256];
struct stat S;
/* find the block device file */
@@ -593,7 +593,7 @@
DEBUG(5,("Unable to reset uid to %d\n", user_id));
}
#else /* USE_SETRES */
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
{
/* FreeBSD patches from Marty Moll <martym@arbor.edu> */
uid_t user_id;
@@ -617,17 +617,17 @@
/* AIX has both USER and GROUP quotas:
Get the USER quota (ohnielse@fysik.dtu.dk) */
r= quotactl(path,QCMD(Q_GETQUOTA,USRQUOTA),euser_id,(char *) &D);
-#else /* !__FreeBSD__ && !AIX && !__OpenBSD__ */
+#else /* !__FreeBSD__ && !AIX && !__OpenBSD__ && !__NetBSD__ */
r=quotactl(Q_GETQUOTA, dev_disk, euser_id, &D);
-#endif /* !__FreeBSD__ && !AIX && !__OpenBSD__ */
+#endif /* !__FreeBSD__ && !AIX && !__OpenBSD__ && !__NetBSD__ */
#endif /* USE_SETRES */
/* Use softlimit to determine disk space, except when it has been exceeded */
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
*bsize = DEV_BSIZE;
-#else /* !__FreeBSD__ && !__OpenBSD__ */
+#else /* !__FreeBSD__ && !__OpenBSD__ && !__NetBSD__ */
*bsize = 1024;
-#endif /*!__FreeBSD__ && !__OpenBSD__ */
+#endif /*!__FreeBSD__ && !__OpenBSD__ && !__NetBSD__ */
if (r)
{
@@ -643,7 +643,7 @@
return(False);
/* Use softlimit to determine disk space, except when it has been exceeded */
if ((D.dqb_curblocks>D.dqb_bsoftlimit)
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
||((D.dqb_curfiles>D.dqb_fsoftlimit) && (D.dqb_fsoftlimit != 0))
#endif
) {
--- util.c.orig Sat Jun 13 03:44:21 1998
+++ util.c Wed Jun 17 14:57:01 1998
@@ -3614,7 +3614,7 @@
bzero((char *)&sock,sizeof(sock));
memcpy((char *)&sock.sin_addr,(char *)hp->h_addr, hp->h_length);
-#if defined(__FreeBSD__) || defined(NETBSD) || defined(__OpenBSD__) /* XXX not the right ifdef */
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) /* XXX not the right ifdef */
sock.sin_len = sizeof(sock);
#endif
sock.sin_port = htons( port );
|