1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It contains system-dependent header code.
4 * Created by: Greg Hudson
6 * Copyright (c) 1988,1991 by the Massachusetts Institute of Technology.
7 * For copying and distribution information, see the file
11 #ifndef PURPLE_ZEPHYR_SYSDEP_H
12 #define PURPLE_ZEPHYR_SYSDEP_H
24 #include <sys/types.h>
26 #include <sys/param.h>
34 /* Exit status handling and wait(). */
35 #ifdef HAVE_SYS_WAIT_H
36 # include <sys/wait.h>
39 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
42 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
45 #ifdef HAVE_SYS_CDEFS_H
46 #include <sys/cdefs.h>
49 /* Because we have public header files (and our prototypes need to agree with
50 * those header files, use __STDC__ to guess whether the compiler can handle
51 * stdarg, const, and prototypes. */
54 # define VA_START(ap, last) va_start(ap, last)
60 # define VA_START(ap, last) va_start(ap)
70 #define OPENLOG(str, opts, facility) openlog(str, opts, facility)
72 /* Probably a 4.2-type syslog */
73 #define OPENLOG(str, opts, facility) openlog(str, opts)
82 # define TEMP_DIRECTORY _PATH_VARTMP
84 # define TEMP_DIRECTORY FOUND_TMP
90 # ifdef HAVE_SYS_FILE_H
91 # include <sys/file.h>
96 ZEPHYR_INT32
gethostid(void);
101 #define STDIN_FILENO 0
102 #define STDOUT_FILENO 1
103 #define STDERR_FILENO 2
106 #ifdef HAVE_TERMIOS_H
107 # include <termios.h>
109 # ifdef HAVE_SYS_FILIO_H
110 # include <sys/filio.h>
115 # ifdef HAVE_SYS_IOCTL_H
116 # include <sys/ioctl.h>
121 /* Kerberos compatibility. */
122 #ifdef ZEPHYR_USES_KERBEROS
127 # include <krb_err.h>
131 # ifndef HAVE_KRB_GET_ERR_TEXT
132 # define krb_get_err_text(n) krb_err_txt[n]
135 # ifndef HAVE_KRB_LOG
138 #endif /* ZEPHYR_USES_KERBEROS */
140 #ifdef HAVE_SYS_UIO_H
141 # include <sys/uio.h>
144 #ifdef HAVE_SYS_UTSNAME_H
145 # include <sys/utsname.h>
148 #ifdef HAVE_SYS_SELECT_H
149 # include <sys/select.h>
152 #ifdef HAVE_SYS_MSGBUF_H
153 #include <sys/msgbuf.h>
157 #define MSG_BSIZE BUFSIZ
160 #endif /* PURPLE_ZEPHYR_SYSDEP_H */