Tue, 10 Sep 2019 00:06:36 -0400
Standardize all protocol header guard macros.
These are all basically standardized replacements on the file path,
removing 'lib' and '/protocols/', replacing invalid characters by
underscore, and then converting to upper case.
This avoids a lot of reserved identifier usage.
| 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 | ||
| 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. */ | |
| 52 | #ifdef __STDC__ | |
| 53 | # include <stdarg.h> | |
| 54 | # define VA_START(ap, last) va_start(ap, last) | |
| 55 | # ifndef __P | |
| 56 | # define __P(x) x | |
| 57 | # endif | |
| 58 | #else | |
| 59 | # include <varargs.h> | |
| 60 | # define VA_START(ap, last) va_start(ap) | |
| 61 | # define const | |
| 62 | # ifndef __P | |
| 63 | # define __P(x) () | |
| 64 | # endif | |
| 65 | #endif | |
| 66 | ||
| 67 | /* openlog(). */ | |
| 68 | #ifdef LOG_AUTH | |
| 69 | /* A decent syslog */ | |
| 70 | #define OPENLOG(str, opts, facility) openlog(str, opts, facility) | |
| 71 | #else | |
| 72 | /* Probably a 4.2-type syslog */ | |
| 73 | #define OPENLOG(str, opts, facility) openlog(str, opts) | |
| 74 | #endif | |
| 75 | ||
| 76 | #ifdef HAVE_FCNTL_H | |
| 77 | # include <fcntl.h> | |
| 78 | #endif | |
| 79 | ||
| 80 | #ifdef HAVE_PATHS_H | |
| 81 | # include <paths.h> | |
| 82 | # define TEMP_DIRECTORY _PATH_VARTMP | |
| 83 | #else | |
| 84 | # define TEMP_DIRECTORY FOUND_TMP | |
| 85 | #endif | |
| 86 | ||
| 87 | #ifdef HAVE_UNISTD_H | |
| 88 | # include <unistd.h> | |
| 89 | #else | |
| 90 | # ifdef HAVE_SYS_FILE_H | |
| 91 | # include <sys/file.h> | |
| 92 | # endif | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
93 | uid_t getuid(void); |
|
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
94 | char *ttyname(void); |
| 2086 | 95 | #ifdef HAVE_GETHOSTID |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11107
diff
changeset
|
96 | ZEPHYR_INT32 gethostid(void); |
| 2086 | 97 | #endif |
| 98 | #endif | |
| 99 | ||
| 100 | #ifndef STDIN_FILENO | |
| 101 | #define STDIN_FILENO 0 | |
| 102 | #define STDOUT_FILENO 1 | |
| 103 | #define STDERR_FILENO 2 | |
| 104 | #endif | |
| 105 | ||
| 106 | #ifdef HAVE_TERMIOS_H | |
| 107 | # include <termios.h> | |
| 108 | #else | |
| 109 | # ifdef HAVE_SYS_FILIO_H | |
| 110 | # include <sys/filio.h> | |
| 111 | # else | |
| 112 | # ifdef HAVE_SGTTY_H | |
| 113 | # include <sgtty.h> | |
| 114 | # endif | |
| 115 | # ifdef HAVE_SYS_IOCTL_H | |
| 116 | # include <sys/ioctl.h> | |
| 117 | # endif | |
| 118 | # endif | |
| 119 | #endif | |
| 120 | ||
| 121 | /* Kerberos compatibility. */ | |
| 122 | #ifdef ZEPHYR_USES_KERBEROS | |
| 123 | # include <krb.h> | |
| 10867 | 124 | #ifdef WIN32 |
| 125 | ||
| 126 | #else | |
| 2086 | 127 | # include <krb_err.h> |
| 10867 | 128 | #endif /* WIN32 */ |
| 2086 | 129 | # include <des.h> |
| 10867 | 130 | #ifndef WIN32 |
| 2086 | 131 | # ifndef HAVE_KRB_GET_ERR_TEXT |
| 132 | # define krb_get_err_text(n) krb_err_txt[n] | |
| 133 | # endif | |
| 10867 | 134 | #endif /* WIN32 */ |
| 2086 | 135 | # ifndef HAVE_KRB_LOG |
| 136 | # define krb_log log | |
| 137 | # endif | |
| 10867 | 138 | #endif /* ZEPHYR_USES_KERBEROS */ |
| 2086 | 139 | |
| 140 | #ifdef HAVE_SYS_UIO_H | |
| 141 | # include <sys/uio.h> | |
| 142 | #endif | |
| 143 | ||
| 144 | #ifdef HAVE_SYS_UTSNAME_H | |
| 145 | # include <sys/utsname.h> | |
| 146 | #endif | |
| 147 | ||
| 148 | #ifdef HAVE_SYS_SELECT_H | |
| 149 | # include <sys/select.h> | |
| 150 | #endif | |
| 151 | ||
| 152 | #ifdef HAVE_SYS_MSGBUF_H | |
| 153 | #include <sys/msgbuf.h> | |
| 154 | #endif | |
| 155 | ||
| 156 | #ifndef MSG_BSIZE | |
| 157 | #define MSG_BSIZE BUFSIZ | |
| 158 | #endif | |
| 159 | ||
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38048
diff
changeset
|
160 | #endif /* PURPLE_ZEPHYR_SYSDEP_H */ |