Mon, 16 Sep 2019 19:50:39 -0400
zephyr: Remove support for compilers without __STDC__.
| 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 | ||
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38048
diff
changeset
|
11 | #ifndef PURPLE_ZEPHYR_SYSDEP_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38048
diff
changeset
|
12 | #define PURPLE_ZEPHYR_SYSDEP_H |
| 2086 | 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 | /* Strings. */ | |
|
38047
312be70f9de6
Remove AC_HEADER_STDC and related C89 tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37229
diff
changeset
|
32 | #include <string.h> |
| 2086 | 33 | |
| 34 | /* Exit status handling and wait(). */ | |
| 35 | #ifdef HAVE_SYS_WAIT_H | |
| 36 | # include <sys/wait.h> | |
| 37 | #endif | |
| 38 | #ifndef WEXITSTATUS | |
| 39 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
| 40 | #endif | |
| 41 | #ifndef WIFEXITED | |
| 42 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
| 43 | #endif | |
| 44 | ||
| 45 | #ifdef HAVE_SYS_CDEFS_H | |
| 46 | #include <sys/cdefs.h> | |
| 47 | #endif | |
| 48 | ||
|
39829
ce056c64e426
zephyr: Remove support for compilers without __STDC__.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39819
diff
changeset
|
49 | #include <stdarg.h> |
| 2086 | 50 | |
| 51 | /* openlog(). */ | |
| 52 | #ifdef LOG_AUTH | |
| 53 | /* A decent syslog */ | |
| 54 | #define OPENLOG(str, opts, facility) openlog(str, opts, facility) | |
| 55 | #else | |
| 56 | /* Probably a 4.2-type syslog */ | |
| 57 | #define OPENLOG(str, opts, facility) openlog(str, opts) | |
| 58 | #endif | |
| 59 | ||
| 60 | #ifdef HAVE_FCNTL_H | |
| 61 | # include <fcntl.h> | |
| 62 | #endif | |
| 63 | ||
| 64 | #ifdef HAVE_PATHS_H | |
| 65 | # include <paths.h> | |
| 66 | # define TEMP_DIRECTORY _PATH_VARTMP | |
| 67 | #else | |
| 68 | # define TEMP_DIRECTORY FOUND_TMP | |
| 69 | #endif | |
| 70 | ||
| 71 | #ifdef HAVE_UNISTD_H | |
| 72 | # include <unistd.h> | |
| 73 | #else | |
| 74 | # ifdef HAVE_SYS_FILE_H | |
| 75 | # include <sys/file.h> | |
| 76 | # endif | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
77 | uid_t getuid(void); |
|
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
78 | char *ttyname(void); |
| 2086 | 79 | #ifdef HAVE_GETHOSTID |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
80 | ZEPHYR_INT32 gethostid(void); |
| 2086 | 81 | #endif |
| 82 | #endif | |
| 83 | ||
| 84 | #ifndef STDIN_FILENO | |
| 85 | #define STDIN_FILENO 0 | |
| 86 | #define STDOUT_FILENO 1 | |
| 87 | #define STDERR_FILENO 2 | |
| 88 | #endif | |
| 89 | ||
| 90 | #ifdef HAVE_TERMIOS_H | |
| 91 | # include <termios.h> | |
| 92 | #else | |
| 93 | # ifdef HAVE_SYS_FILIO_H | |
| 94 | # include <sys/filio.h> | |
| 95 | # else | |
| 96 | # ifdef HAVE_SGTTY_H | |
| 97 | # include <sgtty.h> | |
| 98 | # endif | |
| 99 | # ifdef HAVE_SYS_IOCTL_H | |
| 100 | # include <sys/ioctl.h> | |
| 101 | # endif | |
| 102 | # endif | |
| 103 | #endif | |
| 104 | ||
| 105 | /* Kerberos compatibility. */ | |
| 106 | #ifdef ZEPHYR_USES_KERBEROS | |
| 107 | # include <krb.h> | |
| 10867 | 108 | #ifdef WIN32 |
| 109 | ||
| 110 | #else | |
| 2086 | 111 | # include <krb_err.h> |
| 10867 | 112 | #endif /* WIN32 */ |
| 2086 | 113 | # include <des.h> |
| 10867 | 114 | #ifndef WIN32 |
| 2086 | 115 | # ifndef HAVE_KRB_GET_ERR_TEXT |
| 116 | # define krb_get_err_text(n) krb_err_txt[n] | |
| 117 | # endif | |
| 10867 | 118 | #endif /* WIN32 */ |
| 2086 | 119 | # ifndef HAVE_KRB_LOG |
| 120 | # define krb_log log | |
| 121 | # endif | |
| 10867 | 122 | #endif /* ZEPHYR_USES_KERBEROS */ |
| 2086 | 123 | |
| 124 | #ifdef HAVE_SYS_UIO_H | |
| 125 | # include <sys/uio.h> | |
| 126 | #endif | |
| 127 | ||
| 128 | #ifdef HAVE_SYS_UTSNAME_H | |
| 129 | # include <sys/utsname.h> | |
| 130 | #endif | |
| 131 | ||
| 132 | #ifdef HAVE_SYS_SELECT_H | |
| 133 | # include <sys/select.h> | |
| 134 | #endif | |
| 135 | ||
| 136 | #ifdef HAVE_SYS_MSGBUF_H | |
| 137 | #include <sys/msgbuf.h> | |
| 138 | #endif | |
| 139 | ||
| 140 | #ifndef MSG_BSIZE | |
| 141 | #define MSG_BSIZE BUFSIZ | |
| 142 | #endif | |
| 143 | ||
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38048
diff
changeset
|
144 | #endif /* PURPLE_ZEPHYR_SYSDEP_H */ |