1 /* Copyright 1993,1994 by Paul Vixie
6 * Copyright (c) 1997 by Internet Software Consortium
8 * Permission to use, copy, modify, and distribute this software for any
9 * purpose with or without fee is hereby granted, provided that the above
10 * copyright notice and this permission notice appear in all copies.
12 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
13 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
14 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
15 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
18 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 /* reorder these #include's at your peril */
24 #include <sys/param.h>
25 #include <sys/types.h>
28 #include <sys/fcntl.h>
32 #include <bitstring.h>
55 #if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(AIX)
59 #if !defined(_PATH_SENDMAIL)
60 # define _PATH_SENDMAIL "/usr/lib/sendmail"
63 #if defined(__bsdi__) && (_BSDI_VERSION > 199510)
64 #include <login_cap.h>
67 #define DIR_T struct dirent
73 #ifndef TZNAME_ALREADY_DEFINED
74 extern char *tzname[2];
76 #define TZONE(tm) tzname[(tm).tm_isdst]
84 # define HAVE_SAVED_UIDS
87 #define MY_UID(pw) getuid()
88 #define MY_GID(pw) getgid()
90 #if !defined(AIX) && !defined(UNICOS)
96 /* getopt() isn't part of POSIX. some systems define it in <stdlib.h> anyway.
97 * of those that do, some complain that our definition is different and some
98 * do not. to add to the misery and confusion, some systems define getopt()
99 * in ways that we cannot predict or comprehend, yet do not define the adjunct
100 * external variables needed for the interface.
102 #if (!defined(BSD) || (BSD < 198911))
103 int getopt(int, char * const *, const char *);
106 #if (!defined(BSD) || (BSD < 199103))
108 extern int optind, opterr, optopt;
111 /* digital unix needs this but does not give us a way to identify it.
113 extern int flock(int, int);
115 /* not all systems who provice flock() provide these definitions.