libpurple/protocols/zephyr/sysdep.h

changeset 39830
c6fc1928c22c
parent 39829
ce056c64e426
child 40165
6bb197792c6d
equal deleted inserted replaced
39829:ce056c64e426 39830:c6fc1928c22c
33 33
34 /* Exit status handling and wait(). */ 34 /* Exit status handling and wait(). */
35 #ifdef HAVE_SYS_WAIT_H 35 #ifdef HAVE_SYS_WAIT_H
36 # include <sys/wait.h> 36 # include <sys/wait.h>
37 #endif 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 38
45 #ifdef HAVE_SYS_CDEFS_H 39 #ifdef HAVE_SYS_CDEFS_H
46 #include <sys/cdefs.h> 40 #include <sys/cdefs.h>
47 #endif 41 #endif
48 42
49 #include <stdarg.h> 43 #include <stdarg.h>
50 44
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 45 #ifdef HAVE_FCNTL_H
61 # include <fcntl.h> 46 # 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 47 #endif
70 48
71 #ifdef HAVE_UNISTD_H 49 #ifdef HAVE_UNISTD_H
72 # include <unistd.h> 50 # include <unistd.h>
73 #else 51 #else
74 # ifdef HAVE_SYS_FILE_H 52 # ifdef HAVE_SYS_FILE_H
75 # include <sys/file.h> 53 # include <sys/file.h>
76 # endif 54 # endif
77 uid_t getuid(void); 55 uid_t getuid(void);
78 char *ttyname(void); 56 char *ttyname(void);
79 #ifdef HAVE_GETHOSTID
80 ZEPHYR_INT32 gethostid(void);
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 57 #endif
89 58
90 #ifdef HAVE_TERMIOS_H 59 #ifdef HAVE_TERMIOS_H
91 # include <termios.h> 60 # include <termios.h>
92 #else 61 #else
103 #endif 72 #endif
104 73
105 /* Kerberos compatibility. */ 74 /* Kerberos compatibility. */
106 #ifdef ZEPHYR_USES_KERBEROS 75 #ifdef ZEPHYR_USES_KERBEROS
107 # include <krb.h> 76 # include <krb.h>
108 #ifdef WIN32 77 # ifndef WIN32
109 78 # include <krb_err.h>
110 #else 79 # ifndef HAVE_KRB_GET_ERR_TEXT
111 # include <krb_err.h> 80 # define krb_get_err_text(n) krb_err_txt[n]
112 #endif /* WIN32 */ 81 # endif
82 # endif /* WIN32 */
113 # include <des.h> 83 # include <des.h>
114 #ifndef WIN32
115 # ifndef HAVE_KRB_GET_ERR_TEXT
116 # define krb_get_err_text(n) krb_err_txt[n]
117 # endif
118 #endif /* WIN32 */
119 # ifndef HAVE_KRB_LOG 84 # ifndef HAVE_KRB_LOG
120 # define krb_log log 85 # define krb_log log
121 # endif 86 # endif
122 #endif /* ZEPHYR_USES_KERBEROS */ 87 #endif /* ZEPHYR_USES_KERBEROS */
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 88
132 #ifdef HAVE_SYS_SELECT_H 89 #ifdef HAVE_SYS_SELECT_H
133 # include <sys/select.h> 90 # include <sys/select.h>
134 #endif 91 #endif
135 92
136 #ifdef HAVE_SYS_MSGBUF_H 93 #ifdef HAVE_SYS_MSGBUF_H
137 #include <sys/msgbuf.h> 94 #include <sys/msgbuf.h>
138 #endif 95 #endif
139 96
140 #ifndef MSG_BSIZE
141 #define MSG_BSIZE BUFSIZ
142 #endif
143
144 #endif /* PURPLE_ZEPHYR_SYSDEP_H */ 97 #endif /* PURPLE_ZEPHYR_SYSDEP_H */

mercurial