1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It contains system-dependent header code.
4 * Created by: Greg Hudson
7 * $Author: warmenhoven $
8 * $Zephyr: /mit/zephyr/src/include/zephyr/RCS/zephyr_conf.h,v 1.8 90/12/21 17:40:40 raeburn Exp $
10 * Copyright (c) 1988,1991 by the Massachusetts Institute of Technology.
11 * For copying and distribution information, see the file
25 #include <sys/types.h>
27 #include <sys/param.h>
36 char *malloc(), *realloc();
38 char *getenv(), *strerror(), *ctime(), *strcpy();
40 ZEPHYR_INT32
random();
45 #define random lrand48
46 #define srandom srand48
54 extern char *sys_errlist
[];
55 # define strerror(x) (sys_errlist[(x)])
64 # define strrchr rindex
66 char *strchr(), *strrchr();
68 # define memcpy(d, s, n) bcopy ((s), (d), (n))
72 # define memmove(d, s, n) bcopy ((s), (d), (n))
76 /* Exit status handling and wait(). */
77 #ifdef HAVE_SYS_WAIT_H
78 # include <sys/wait.h>
81 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
84 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
87 #ifdef HAVE_SYS_CDEFS_H
88 #include <sys/cdefs.h>
91 /* Because we have public header files (and our prototypes need to agree with
92 * those header files, use __STDC__ to guess whether the compiler can handle
93 * stdarg, const, and prototypes. */
96 # define VA_START(ap, last) va_start(ap, last)
101 # include <varargs.h>
102 # define VA_START(ap, last) va_start(ap)
111 /* A decent syslog */
112 #define OPENLOG(str, opts, facility) openlog(str, opts, facility)
114 /* Probably a 4.2-type syslog */
115 #define OPENLOG(str, opts, facility) openlog(str, opts)
124 # define TEMP_DIRECTORY _PATH_VARTMP
126 # define TEMP_DIRECTORY FOUND_TMP
132 # ifdef HAVE_SYS_FILE_H
133 # include <sys/file.h>
137 #ifdef HAVE_GETHOSTID
138 ZEPHYR_INT32
gethostid();
143 #define STDIN_FILENO 0
144 #define STDOUT_FILENO 1
145 #define STDERR_FILENO 2
148 #ifdef HAVE_TERMIOS_H
149 # include <termios.h>
151 # ifdef HAVE_SYS_FILIO_H
152 # include <sys/filio.h>
157 # ifdef HAVE_SYS_IOCTL_H
158 # include <sys/ioctl.h>
163 /* Kerberos compatibility. */
164 #ifdef ZEPHYR_USES_KERBEROS
166 # include <krb_err.h>
168 # ifndef HAVE_KRB_GET_ERR_TEXT
169 # define krb_get_err_text(n) krb_err_txt[n]
171 # ifndef HAVE_KRB_LOG
176 #ifdef HAVE_SYS_UIO_H
177 # include <sys/uio.h>
180 #ifdef HAVE_SYS_UTSNAME_H
181 # include <sys/utsname.h>
184 #ifdef HAVE_SYS_SELECT_H
185 # include <sys/select.h>
188 #ifdef HAVE_SYS_MSGBUF_H
189 #include <sys/msgbuf.h>
193 #define MSG_BSIZE BUFSIZ
196 #endif /* __SYSDEP_H__ */