Commit | Line | Data |
---|---|---|
693d8207 GR |
1 | /* Copyright 1993,1994 by Paul Vixie |
2 | * All rights reserved | |
3 | * | |
4 | * Distribute freely, except: don't remove my name from the source or | |
5 | * documentation (don't take credit for my work), mark your changes (don't | |
6 | * get me blamed for your possible bugs), don't alter or remove this | |
7 | * notice. May be sold if buildable source is provided to buyer. No | |
8 | * warrantee of any kind, express or implied, is included with this | |
9 | * software; use at your own risk, responsibility for damages (if any) to | |
10 | * anyone resulting from the use of this software rests entirely with the | |
11 | * user. | |
12 | * | |
13 | * Send bug reports, bug fixes, enhancements, requests, flames, etc., and | |
14 | * I'll try to keep a version up to date. I can be reached as follows: | |
15 | * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul | |
16 | */ | |
17 | ||
18 | /* | |
19 | * From Id: compat.h,v 1.8 1994/01/15 20:43:43 vixie Exp | |
20 | * $Header: $ | |
21 | */ | |
22 | ||
23 | #ifndef __P | |
24 | # ifdef __STDC__ | |
25 | # define __P(x) x | |
26 | # else | |
27 | # define __P(x) () | |
28 | # define const | |
29 | # endif | |
30 | #endif | |
31 | ||
32 | #if defined(UNIXPC) || defined(unixpc) | |
33 | # define UNIXPC 1 | |
34 | # define ATT 1 | |
35 | #endif | |
36 | ||
37 | #if defined(hpux) || defined(_hpux) || defined(__hpux) | |
38 | # define HPUX 1 | |
39 | # define seteuid(e) setresuid(-1,e,-1) | |
40 | # define setreuid(r,e) setresuid(r,e,-1) | |
41 | #endif | |
42 | ||
43 | #if defined(_IBMR2) | |
44 | # define AIX 1 | |
45 | #endif | |
46 | ||
47 | #if defined(__convex__) | |
48 | # define CONVEX 1 | |
49 | #endif | |
50 | ||
51 | #if defined(sgi) || defined(_sgi) || defined(__sgi) | |
52 | # define IRIX 1 | |
53 | /* IRIX 4 hdrs are broken: one cannot #include both <stdio.h> | |
54 | * and <stdlib.h> because they disagree on system(), perror(). | |
55 | * Therefore we must zap the "const" keyword BEFORE including | |
56 | * either of them. | |
57 | */ | |
58 | # define const | |
59 | #endif | |
60 | ||
61 | #if defined(_UNICOS) | |
62 | # define UNICOS 1 | |
63 | #endif | |
64 | ||
65 | #ifndef POSIX | |
66 | # if (BSD >= 199103) || defined(__linux) || defined(ultrix) || defined(AIX) ||\ | |
67 | defined(HPUX) || defined(CONVEX) || defined(IRIX) | |
68 | # define POSIX | |
69 | # endif | |
70 | #endif | |
71 | ||
72 | #ifndef BSD | |
73 | # if defined(ultrix) | |
74 | # define BSD 198902 | |
75 | # endif | |
76 | #endif | |
77 | ||
78 | /*****************************************************************/ | |
79 | ||
80 | #if !defined(BSD) && !defined(HPUX) && !defined(CONVEX) && !defined(__linux) | |
81 | # define NEED_VFORK | |
82 | #endif | |
83 | ||
84 | #if (!defined(BSD) || (BSD < 198902)) && !defined(__linux) && \ | |
85 | !defined(IRIX) && !defined(NeXT) && !defined(HPUX) | |
86 | # define NEED_STRCASECMP | |
87 | #endif | |
88 | ||
89 | #if (!defined(BSD) || (BSD < 198911)) && !defined(__linux) &&\ | |
90 | !defined(IRIX) && !defined(UNICOS) && !defined(HPUX) | |
91 | # define NEED_STRDUP | |
92 | #endif | |
93 | ||
94 | #if (!defined(BSD) || (BSD < 198911)) && !defined(POSIX) && !defined(NeXT) | |
95 | # define NEED_STRERROR | |
96 | #endif | |
97 | ||
98 | #if defined(HPUX) || defined(AIX) || defined(UNIXPC) | |
99 | # define NEED_FLOCK | |
100 | #endif | |
101 | ||
102 | #ifndef POSIX | |
103 | # define NEED_SETSID | |
104 | #endif | |
105 | ||
106 | #if (defined(POSIX) && !defined(BSD)) && !defined(__linux) | |
107 | # define NEED_GETDTABLESIZE | |
108 | #endif | |
109 | ||
110 | #if (BSD >= 199103) | |
111 | # define HAVE_SAVED_UIDS | |
112 | #endif | |
113 | ||
114 | #if !defined(ATT) && !defined(__linux) && !defined(IRIX) && !defined(UNICOS) | |
115 | # define USE_SIGCHLD | |
116 | #endif | |
117 | ||
118 | #if !defined(AIX) && !defined(UNICOS) | |
119 | # define SYS_TIME_H 1 | |
120 | #else | |
121 | # define SYS_TIME_H 0 | |
122 | #endif | |
123 | ||
124 | #if defined(BSD) && !defined(POSIX) | |
125 | # define USE_UTIMES | |
126 | #endif | |
127 | ||
128 | #if defined(AIX) || defined(HPUX) || defined(IRIX) | |
129 | # define NEED_SETENV | |
130 | #endif | |
131 | ||
132 | #if !defined(UNICOS) && !defined(UNIXPC) | |
133 | # define HAS_FCHOWN | |
134 | #endif | |
135 | ||
136 | #if !defined(UNICOS) && !defined(UNIXPC) | |
137 | # define HAS_FCHMOD | |
138 | #endif |