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