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