Remove the rest of the __P macros in src/usr.sbin
[dragonfly.git] / usr.sbin / cron / cron / compat.h
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  * $FreeBSD: src/usr.sbin/cron/cron/compat.h,v 1.5 1999/08/28 01:15:49 peter Exp $
20  * $DragonFly: src/usr.sbin/cron/cron/compat.h,v 1.3 2003/11/06 19:46:42 eirikn Exp $
21  */
22
23 #if defined(UNIXPC) || defined(unixpc)
24 # define UNIXPC 1
25 # define ATT 1
26 #endif
27
28 #if defined(hpux) || defined(_hpux) || defined(__hpux)
29 # define HPUX 1
30 # define seteuid(e) setresuid(-1,e,-1)
31 # define setreuid(r,e)  setresuid(r,e,-1)
32 #endif
33
34 #if defined(_IBMR2)
35 # define AIX 1
36 #endif
37
38 #if defined(__convex__)
39 # define CONVEX 1
40 #endif
41
42 #if defined(sgi) || defined(_sgi) || defined(__sgi)
43 # define IRIX 1
44 /* IRIX 4 hdrs are broken: one cannot #include both <stdio.h>
45  * and <stdlib.h> because they disagree on system(), perror().
46  * Therefore we must zap the "const" keyword BEFORE including
47  * either of them.
48  */
49 # define const
50 #endif
51
52 #if defined(_UNICOS)
53 # define UNICOS 1
54 #endif
55
56 #ifndef POSIX
57 # if (BSD >= 199103) || defined(__linux) || defined(ultrix) || defined(AIX) ||\
58         defined(HPUX) || defined(CONVEX) || defined(IRIX)
59 #  define POSIX
60 # endif
61 #endif
62
63 #ifndef BSD
64 # if defined(ultrix)
65 #  define BSD 198902
66 # endif
67 #endif
68
69 /*****************************************************************/
70
71 #if !defined(BSD) && !defined(HPUX) && !defined(CONVEX) && !defined(__linux)
72 # define NEED_VFORK
73 #endif
74
75 #if (!defined(BSD) || (BSD < 198902)) && !defined(__linux) && \
76         !defined(IRIX) && !defined(NeXT) && !defined(HPUX)
77 # define NEED_STRCASECMP
78 #endif
79
80 #if (!defined(BSD) || (BSD < 198911)) && !defined(__linux) &&\
81         !defined(IRIX) && !defined(UNICOS) && !defined(HPUX)
82 # define NEED_STRDUP
83 #endif
84
85 #if (!defined(BSD) || (BSD < 198911)) && !defined(POSIX) && !defined(NeXT)
86 # define NEED_STRERROR
87 #endif
88
89 #if defined(HPUX) || defined(AIX) || defined(UNIXPC)
90 # define NEED_FLOCK
91 #endif
92
93 #ifndef POSIX
94 # define NEED_SETSID
95 #endif
96
97 #if (defined(POSIX) && !defined(BSD)) && !defined(__linux)
98 # define NEED_GETDTABLESIZE
99 #endif
100
101 #ifdef POSIX
102 #include <unistd.h>
103 #ifdef _POSIX_SAVED_IDS
104 # define HAVE_SAVED_UIDS
105 #endif
106 #endif
107
108 #if !defined(ATT) && !defined(__linux) && !defined(IRIX) && !defined(UNICOS)
109 # define USE_SIGCHLD
110 #endif
111
112 #if !defined(AIX) && !defined(UNICOS)
113 # define SYS_TIME_H 1
114 #else
115 # define SYS_TIME_H 0
116 #endif
117
118 #if defined(BSD) && !defined(POSIX)
119 # define USE_UTIMES
120 #endif
121
122 #if defined(AIX) || defined(HPUX) || defined(IRIX)
123 # define NEED_SETENV
124 #endif
125
126 #if !defined(UNICOS) && !defined(UNIXPC)
127 # define HAS_FCHOWN
128 #endif
129
130 #if !defined(UNICOS) && !defined(UNIXPC)
131 # define HAS_FCHMOD
132 #endif