Sun, 28 Aug 2016 20:43:17 -0400
Remove AC_HEADER_STDC and related C89 tests.
AC_HEADER_STDC is obsolescent because all current systems have
conforming header files. As we also claim to depend on C89, there's
no need to check for any headers defined in that standard.
| 2086 | 1 | /* This file is part of the Project Athena Zephyr Notification System. |
| 2 | * It contains system-dependent header code. | |
| 3 | * | |
| 4 | * Created by: Greg Hudson | |
| 5 | * | |
| 6 | * Copyright (c) 1988,1991 by the Massachusetts Institute of Technology. | |
| 7 | * For copying and distribution information, see the file | |
|
31293
169eeb43b52c
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
8 | * "mit-copyright.h". |
| 2086 | 9 | */ |
| 10 | ||
| 11 | #ifndef __SYSDEP_H__ | |
| 12 | #define __SYSDEP_H__ | |
| 13 | ||
| 14 | #include <config.h> | |
| 15 | #include <stdio.h> | |
| 16 | #include <errno.h> | |
| 17 | #include <ctype.h> | |
| 18 | #include <time.h> | |
| 19 | #include <signal.h> | |
| 10867 | 20 | #ifndef WIN32 |
| 2086 | 21 | #include <syslog.h> |
| 10867 | 22 | #endif |
| 23 | ||
| 2086 | 24 | #include <sys/types.h> |
| 25 | #include <sys/stat.h> | |
| 26 | #include <sys/param.h> | |
| 27 | #include <sys/time.h> | |
| 28 | ||
|
38047
312be70f9de6
Remove AC_HEADER_STDC and related C89 tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37229
diff
changeset
|
29 | #include <stdlib.h> |
| 2086 | 30 | |
| 31 | #ifndef HAVE_STRERROR | |
| 32 | extern char *sys_errlist[]; | |
| 33 | # define strerror(x) (sys_errlist[(x)]) | |
| 34 | #endif | |
| 35 | ||
| 36 | /* Strings. */ | |
|
38047
312be70f9de6
Remove AC_HEADER_STDC and related C89 tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37229
diff
changeset
|
37 | #include <string.h> |
| 2086 | 38 | |
| 39 | /* Exit status handling and wait(). */ | |
| 40 | #ifdef HAVE_SYS_WAIT_H | |
| 41 | # include <sys/wait.h> | |
| 42 | #endif | |
| 43 | #ifndef WEXITSTATUS | |
| 44 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
| 45 | #endif | |
| 46 | #ifndef WIFEXITED | |
| 47 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
| 48 | #endif | |
| 49 | ||
| 50 | #ifdef HAVE_SYS_CDEFS_H | |
| 51 | #include <sys/cdefs.h> | |
| 52 | #endif | |
| 53 | ||
| 54 | /* Because we have public header files (and our prototypes need to agree with | |
| 55 | * those header files, use __STDC__ to guess whether the compiler can handle | |
| 56 | * stdarg, const, and prototypes. */ | |
| 57 | #ifdef __STDC__ | |
| 58 | # include <stdarg.h> | |
| 59 | # define VA_START(ap, last) va_start(ap, last) | |
| 60 | # ifndef __P | |
| 61 | # define __P(x) x | |
| 62 | # endif | |
| 63 | #else | |
| 64 | # include <varargs.h> | |
| 65 | # define VA_START(ap, last) va_start(ap) | |
| 66 | # define const | |
| 67 | # ifndef __P | |
| 68 | # define __P(x) () | |
| 69 | # endif | |
| 70 | #endif | |
| 71 | ||
| 72 | /* openlog(). */ | |
| 73 | #ifdef LOG_AUTH | |
| 74 | /* A decent syslog */ | |
| 75 | #define OPENLOG(str, opts, facility) openlog(str, opts, facility) | |
| 76 | #else | |
| 77 | /* Probably a 4.2-type syslog */ | |
| 78 | #define OPENLOG(str, opts, facility) openlog(str, opts) | |
| 79 | #endif | |
| 80 | ||
| 81 | #ifdef HAVE_FCNTL_H | |
| 82 | # include <fcntl.h> | |
| 83 | #endif | |
| 84 | ||
| 85 | #ifdef HAVE_PATHS_H | |
| 86 | # include <paths.h> | |
| 87 | # define TEMP_DIRECTORY _PATH_VARTMP | |
| 88 | #else | |
| 89 | # define TEMP_DIRECTORY FOUND_TMP | |
| 90 | #endif | |
| 91 | ||
| 92 | #ifdef HAVE_UNISTD_H | |
| 93 | # include <unistd.h> | |
| 94 | #else | |
| 95 | # ifdef HAVE_SYS_FILE_H | |
| 96 | # include <sys/file.h> | |
| 97 | # endif | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
98 | uid_t getuid(void); |
|
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
99 | char *ttyname(void); |
| 2086 | 100 | #ifdef HAVE_GETHOSTID |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
101 | ZEPHYR_INT32 gethostid(void); |
| 2086 | 102 | #endif |
| 103 | #endif | |
| 104 | ||
| 105 | #ifndef STDIN_FILENO | |
| 106 | #define STDIN_FILENO 0 | |
| 107 | #define STDOUT_FILENO 1 | |
| 108 | #define STDERR_FILENO 2 | |
| 109 | #endif | |
| 110 | ||
| 111 | #ifdef HAVE_TERMIOS_H | |
| 112 | # include <termios.h> | |
| 113 | #else | |
| 114 | # ifdef HAVE_SYS_FILIO_H | |
| 115 | # include <sys/filio.h> | |
| 116 | # else | |
| 117 | # ifdef HAVE_SGTTY_H | |
| 118 | # include <sgtty.h> | |
| 119 | # endif | |
| 120 | # ifdef HAVE_SYS_IOCTL_H | |
| 121 | # include <sys/ioctl.h> | |
| 122 | # endif | |
| 123 | # endif | |
| 124 | #endif | |
| 125 | ||
| 126 | /* Kerberos compatibility. */ | |
| 127 | #ifdef ZEPHYR_USES_KERBEROS | |
| 128 | # include <krb.h> | |
| 10867 | 129 | #ifdef WIN32 |
| 130 | ||
| 131 | #else | |
| 2086 | 132 | # include <krb_err.h> |
| 10867 | 133 | #endif /* WIN32 */ |
| 2086 | 134 | # include <des.h> |
| 10867 | 135 | #ifndef WIN32 |
| 2086 | 136 | # ifndef HAVE_KRB_GET_ERR_TEXT |
| 137 | # define krb_get_err_text(n) krb_err_txt[n] | |
| 138 | # endif | |
| 10867 | 139 | #endif /* WIN32 */ |
| 2086 | 140 | # ifndef HAVE_KRB_LOG |
| 141 | # define krb_log log | |
| 142 | # endif | |
| 10867 | 143 | #endif /* ZEPHYR_USES_KERBEROS */ |
| 2086 | 144 | |
| 145 | #ifdef HAVE_SYS_UIO_H | |
| 146 | # include <sys/uio.h> | |
| 147 | #endif | |
| 148 | ||
| 149 | #ifdef HAVE_SYS_UTSNAME_H | |
| 150 | # include <sys/utsname.h> | |
| 151 | #endif | |
| 152 | ||
| 153 | #ifdef HAVE_SYS_SELECT_H | |
| 154 | # include <sys/select.h> | |
| 155 | #endif | |
| 156 | ||
| 157 | #ifdef HAVE_SYS_MSGBUF_H | |
| 158 | #include <sys/msgbuf.h> | |
| 159 | #endif | |
| 160 | ||
| 161 | #ifndef MSG_BSIZE | |
| 162 | #define MSG_BSIZE BUFSIZ | |
| 163 | #endif | |
| 164 | ||
| 165 | #endif /* __SYSDEP_H__ */ | |
| 166 |