port to xorg-server 1.10: -- Log Message: apply https://cgit.freedesktop.org/xorg/xserver/commit/?id=d7ac755f0b618eb1259d93c8a16ec6e39a18627c Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624 Provide the function definition for systems that don't have it. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> and https://cgit.freedesktop.org/xorg/xserver/commit/?id=5c44169caed811e59a65ba346de1cadb46d266ec os: Squash missing declaration warning for timingsafe_memcmp timingsafe_memcmp.c:21:1: warning: no previous prototype for `timingsafe_memcmp' [-Wmissing-prototypes] timingsafe_memcmp(const void *b1, const void *b2, size_t len) Signed-off-by: Adam Jackson <ajax@redhat.com> --diff -r1.1.1.1 -r1.2 xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in
(mrg)
--- xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in 2016/06/09 09:08:00 1.1.1.1
+++ xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in 2017/03/08 07:31:42 1.2
@@ -1,452 +1,455 @@ | @@ -1,452 +1,455 @@ | |||
1 | /* dix-config.h.in: not at all generated. -*- c -*- */ | 1 | /* dix-config.h.in: not at all generated. -*- c -*- */ | |
2 | 2 | |||
3 | #ifndef _DIX_CONFIG_H_ | 3 | #ifndef _DIX_CONFIG_H_ | |
4 | #define _DIX_CONFIG_H_ | 4 | #define _DIX_CONFIG_H_ | |
5 | 5 | |||
6 | /* Support BigRequests extension */ | 6 | /* Support BigRequests extension */ | |
7 | #undef BIGREQS | 7 | #undef BIGREQS | |
8 | 8 | |||
9 | /* Builder address */ | 9 | /* Builder address */ | |
10 | #undef BUILDERADDR | 10 | #undef BUILDERADDR | |
11 | 11 | |||
12 | /* Operating System Name */ | 12 | /* Operating System Name */ | |
13 | #undef OSNAME | 13 | #undef OSNAME | |
14 | 14 | |||
15 | /* Operating System Vendor */ | 15 | /* Operating System Vendor */ | |
16 | #undef OSVENDOR | 16 | #undef OSVENDOR | |
17 | 17 | |||
18 | /* Builder string */ | 18 | /* Builder string */ | |
19 | #undef BUILDERSTRING | 19 | #undef BUILDERSTRING | |
20 | 20 | |||
21 | /* Default font path */ | 21 | /* Default font path */ | |
22 | #undef COMPILEDDEFAULTFONTPATH | 22 | #undef COMPILEDDEFAULTFONTPATH | |
23 | 23 | |||
24 | /* Miscellaneous server configuration files path */ | 24 | /* Miscellaneous server configuration files path */ | |
25 | #undef SERVER_MISC_CONFIG_PATH | 25 | #undef SERVER_MISC_CONFIG_PATH | |
26 | 26 | |||
27 | /* Support Composite Extension */ | 27 | /* Support Composite Extension */ | |
28 | #undef COMPOSITE | 28 | #undef COMPOSITE | |
29 | 29 | |||
30 | /* Support Damage extension */ | 30 | /* Support Damage extension */ | |
31 | #undef DAMAGE | 31 | #undef DAMAGE | |
32 | 32 | |||
33 | /* Build for darwin with Quartz support */ | 33 | /* Build for darwin with Quartz support */ | |
34 | #undef DARWIN_WITH_QUARTZ | 34 | #undef DARWIN_WITH_QUARTZ | |
35 | 35 | |||
36 | /* Use OsVendorVErrorF */ | 36 | /* Use OsVendorVErrorF */ | |
37 | #undef DDXOSVERRORF | 37 | #undef DDXOSVERRORF | |
38 | 38 | |||
39 | /* Use ddxBeforeReset */ | 39 | /* Use ddxBeforeReset */ | |
40 | #undef DDXBEFORERESET | 40 | #undef DDXBEFORERESET | |
41 | 41 | |||
42 | /* Build DPMS extension */ | 42 | /* Build DPMS extension */ | |
43 | #undef DPMSExtension | 43 | #undef DPMSExtension | |
44 | 44 | |||
45 | /* Build GLX extension */ | 45 | /* Build GLX extension */ | |
46 | #undef GLXEXT | 46 | #undef GLXEXT | |
47 | 47 | |||
48 | /* Build GLX DRI loader */ | 48 | /* Build GLX DRI loader */ | |
49 | #undef GLX_DRI | 49 | #undef GLX_DRI | |
50 | 50 | |||
51 | /* Path to DRI drivers */ | 51 | /* Path to DRI drivers */ | |
52 | #undef DRI_DRIVER_PATH | 52 | #undef DRI_DRIVER_PATH | |
53 | 53 | |||
54 | /* Support XDM-AUTH*-1 */ | 54 | /* Support XDM-AUTH*-1 */ | |
55 | #undef HASXDMAUTH | 55 | #undef HASXDMAUTH | |
56 | 56 | |||
57 | /* Define to 1 if you have the `getdtablesize' function. */ | 57 | /* Define to 1 if you have the `getdtablesize' function. */ | |
58 | #undef HAS_GETDTABLESIZE | 58 | #undef HAS_GETDTABLESIZE | |
59 | 59 | |||
60 | /* Define to 1 if you have the `getifaddrs' function. */ | 60 | /* Define to 1 if you have the `getifaddrs' function. */ | |
61 | #undef HAS_GETIFADDRS | 61 | #undef HAS_GETIFADDRS | |
62 | 62 | |||
63 | /* Define to 1 if you have the `getpeereid' function. */ | 63 | /* Define to 1 if you have the `getpeereid' function. */ | |
64 | #undef HAS_GETPEEREID | 64 | #undef HAS_GETPEEREID | |
65 | 65 | |||
66 | /* Define to 1 if you have the `getpeerucred' function. */ | 66 | /* Define to 1 if you have the `getpeerucred' function. */ | |
67 | #undef HAS_GETPEERUCRED | 67 | #undef HAS_GETPEERUCRED | |
68 | 68 | |||
69 | /* Define to 1 if you have the `mmap' function. */ | 69 | /* Define to 1 if you have the `mmap' function. */ | |
70 | #undef HAS_MMAP | 70 | #undef HAS_MMAP | |
71 | 71 | |||
72 | /* Support SHM */ | 72 | /* Support SHM */ | |
73 | #undef HAS_SHM | 73 | #undef HAS_SHM | |
74 | 74 | |||
75 | /* Have the 'strlcpy' function */ | 75 | /* Have the 'strlcpy' function */ | |
76 | #undef HAS_STRLCPY | 76 | #undef HAS_STRLCPY | |
77 | 77 | |||
78 | /* Define to 1 if you have the <asm/mtrr.h> header file. */ | 78 | /* Define to 1 if you have the <asm/mtrr.h> header file. */ | |
79 | #undef HAVE_ASM_MTRR_H | 79 | #undef HAVE_ASM_MTRR_H | |
80 | 80 | |||
81 | /* Has backtrace support */ | 81 | /* Has backtrace support */ | |
82 | #undef HAVE_BACKTRACE | 82 | #undef HAVE_BACKTRACE | |
83 | 83 | |||
84 | /* Define to 1 if you have the <byteswap.h> header file. */ | 84 | /* Define to 1 if you have the <byteswap.h> header file. */ | |
85 | #undef HAVE_BYTESWAP_H | 85 | #undef HAVE_BYTESWAP_H | |
86 | 86 | |||
87 | /* Define to 1 if you have cbrt */ | 87 | /* Define to 1 if you have cbrt */ | |
88 | #undef HAVE_CBRT | 88 | #undef HAVE_CBRT | |
89 | 89 | |||
90 | /* Define to 1 if you have the <dbm.h> header file. */ | 90 | /* Define to 1 if you have the <dbm.h> header file. */ | |
91 | #undef HAVE_DBM_H | 91 | #undef HAVE_DBM_H | |
92 | 92 | |||
93 | /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. | 93 | /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. | |
94 | */ | 94 | */ | |
95 | #undef HAVE_DIRENT_H | 95 | #undef HAVE_DIRENT_H | |
96 | 96 | |||
97 | /* Define to 1 if you have the <dlfcn.h> header file. */ | 97 | /* Define to 1 if you have the <dlfcn.h> header file. */ | |
98 | #undef HAVE_DLFCN_H | 98 | #undef HAVE_DLFCN_H | |
99 | 99 | |||
100 | /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ | 100 | /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ | |
101 | #undef HAVE_DOPRNT | 101 | #undef HAVE_DOPRNT | |
102 | 102 | |||
103 | /* Have execinfo.h */ | 103 | /* Have execinfo.h */ | |
104 | #undef HAVE_EXECINFO_H | 104 | #undef HAVE_EXECINFO_H | |
105 | 105 | |||
106 | /* Define to 1 if you have the <fcntl.h> header file. */ | 106 | /* Define to 1 if you have the <fcntl.h> header file. */ | |
107 | #undef HAVE_FCNTL_H | 107 | #undef HAVE_FCNTL_H | |
108 | 108 | |||
109 | /* Define to 1 if you have the `geteuid' function. */ | 109 | /* Define to 1 if you have the `geteuid' function. */ | |
110 | #undef HAVE_GETEUID | 110 | #undef HAVE_GETEUID | |
111 | 111 | |||
112 | /* Define to 1 if you have the `getisax' function. */ | 112 | /* Define to 1 if you have the `getisax' function. */ | |
113 | #undef HAVE_GETISAX | 113 | #undef HAVE_GETISAX | |
114 | 114 | |||
115 | /* Define to 1 if you have the `getuid' function. */ | 115 | /* Define to 1 if you have the `getuid' function. */ | |
116 | #undef HAVE_GETUID | 116 | #undef HAVE_GETUID | |
117 | 117 | |||
118 | /* Define to 1 if you have the `getzoneid' function. */ | 118 | /* Define to 1 if you have the `getzoneid' function. */ | |
119 | #undef HAVE_GETZONEID | 119 | #undef HAVE_GETZONEID | |
120 | 120 | |||
121 | /* Define to 1 if you have the <inttypes.h> header file. */ | 121 | /* Define to 1 if you have the <inttypes.h> header file. */ | |
122 | #undef HAVE_INTTYPES_H | 122 | #undef HAVE_INTTYPES_H | |
123 | 123 | |||
124 | /* Have Quartz */ | 124 | /* Have Quartz */ | |
125 | #undef XQUARTZ | 125 | #undef XQUARTZ | |
126 | 126 | |||
127 | /* Support application updating through sparkle. */ | 127 | /* Support application updating through sparkle. */ | |
128 | #undef XQUARTZ_SPARKLE | 128 | #undef XQUARTZ_SPARKLE | |
129 | 129 | |||
130 | /* Prefix to use for launchd identifiers */ | 130 | /* Prefix to use for launchd identifiers */ | |
131 | #undef LAUNCHD_ID_PREFIX | 131 | #undef LAUNCHD_ID_PREFIX | |
132 | 132 | |||
133 | /* Build a standalone xpbproxy */ | 133 | /* Build a standalone xpbproxy */ | |
134 | #undef STANDALONE_XPBPROXY | 134 | #undef STANDALONE_XPBPROXY | |
135 | 135 | |||
136 | /* Define to 1 if you have the `m' library (-lm). */ | 136 | /* Define to 1 if you have the `m' library (-lm). */ | |
137 | #undef HAVE_LIBM | 137 | #undef HAVE_LIBM | |
138 | 138 | |||
139 | /* Define to 1 if you have the `link' function. */ | 139 | /* Define to 1 if you have the `link' function. */ | |
140 | #undef HAVE_LINK | 140 | #undef HAVE_LINK | |
141 | 141 | |||
142 | /* Define to 1 if you have the <linux/agpgart.h> header file. */ | 142 | /* Define to 1 if you have the <linux/agpgart.h> header file. */ | |
143 | #undef HAVE_LINUX_AGPGART_H | 143 | #undef HAVE_LINUX_AGPGART_H | |
144 | 144 | |||
145 | /* Define to 1 if you have the <linux/apm_bios.h> header file. */ | 145 | /* Define to 1 if you have the <linux/apm_bios.h> header file. */ | |
146 | #undef HAVE_LINUX_APM_BIOS_H | 146 | #undef HAVE_LINUX_APM_BIOS_H | |
147 | 147 | |||
148 | /* Define to 1 if you have the <linux/fb.h> header file. */ | 148 | /* Define to 1 if you have the <linux/fb.h> header file. */ | |
149 | #undef HAVE_LINUX_FB_H | 149 | #undef HAVE_LINUX_FB_H | |
150 | 150 | |||
151 | /* Define to 1 if you have the `mkstemp' function. */ | 151 | /* Define to 1 if you have the `mkstemp' function. */ | |
152 | #undef HAVE_MKSTEMP | 152 | #undef HAVE_MKSTEMP | |
153 | 153 | |||
154 | /* Define to 1 if you have the <ndbm.h> header file. */ | 154 | /* Define to 1 if you have the <ndbm.h> header file. */ | |
155 | #undef HAVE_NDBM_H | 155 | #undef HAVE_NDBM_H | |
156 | 156 | |||
157 | /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ | 157 | /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ | |
158 | #undef HAVE_NDIR_H | 158 | #undef HAVE_NDIR_H | |
159 | 159 | |||
160 | /* Define to 1 if you have the <rpcsvc/dbm.h> header file. */ | 160 | /* Define to 1 if you have the <rpcsvc/dbm.h> header file. */ | |
161 | #undef HAVE_RPCSVC_DBM_H | 161 | #undef HAVE_RPCSVC_DBM_H | |
162 | 162 | |||
163 | /* Define to use libc SHA1 functions */ | 163 | /* Define to use libc SHA1 functions */ | |
164 | #undef HAVE_SHA1_IN_LIBC | 164 | #undef HAVE_SHA1_IN_LIBC | |
165 | 165 | |||
166 | /* Define to use CommonCrypto SHA1 functions */ | 166 | /* Define to use CommonCrypto SHA1 functions */ | |
167 | #undef HAVE_SHA1_IN_COMMONCRYPTO | 167 | #undef HAVE_SHA1_IN_COMMONCRYPTO | |
168 | 168 | |||
169 | /* Define to use libmd SHA1 functions */ | 169 | /* Define to use libmd SHA1 functions */ | |
170 | #undef HAVE_SHA1_IN_LIBMD | 170 | #undef HAVE_SHA1_IN_LIBMD | |
171 | 171 | |||
172 | /* Define to use libgcrypt SHA1 functions */ | 172 | /* Define to use libgcrypt SHA1 functions */ | |
173 | #undef HAVE_SHA1_IN_LIBGCRYPT | 173 | #undef HAVE_SHA1_IN_LIBGCRYPT | |
174 | 174 | |||
175 | /* Define to use libsha1 for SHA1 */ | 175 | /* Define to use libsha1 for SHA1 */ | |
176 | #undef HAVE_SHA1_IN_LIBSHA1 | 176 | #undef HAVE_SHA1_IN_LIBSHA1 | |
177 | 177 | |||
178 | /* Define to 1 if you have the `shmctl64' function. */ | 178 | /* Define to 1 if you have the `shmctl64' function. */ | |
179 | #undef HAVE_SHMCTL64 | 179 | #undef HAVE_SHMCTL64 | |
180 | 180 | |||
181 | /* Define to 1 if you have the <stdint.h> header file. */ | 181 | /* Define to 1 if you have the <stdint.h> header file. */ | |
182 | #undef HAVE_STDINT_H | 182 | #undef HAVE_STDINT_H | |
183 | 183 | |||
184 | /* Define to 1 if you have the <stdlib.h> header file. */ | 184 | /* Define to 1 if you have the <stdlib.h> header file. */ | |
185 | #undef HAVE_STDLIB_H | 185 | #undef HAVE_STDLIB_H | |
186 | 186 | |||
187 | /* Define to 1 if you have the `strchr' function. */ | 187 | /* Define to 1 if you have the `strchr' function. */ | |
188 | #undef HAVE_STRCHR | 188 | #undef HAVE_STRCHR | |
189 | 189 | |||
190 | /* Define to 1 if you have the <strings.h> header file. */ | 190 | /* Define to 1 if you have the <strings.h> header file. */ | |
191 | #undef HAVE_STRINGS_H | 191 | #undef HAVE_STRINGS_H | |
192 | 192 | |||
193 | /* Define to 1 if you have the <string.h> header file. */ | 193 | /* Define to 1 if you have the <string.h> header file. */ | |
194 | #undef HAVE_STRING_H | 194 | #undef HAVE_STRING_H | |
195 | 195 | |||
196 | /* Define to 1 if you have the `strrchr' function. */ | 196 | /* Define to 1 if you have the `strrchr' function. */ | |
197 | #undef HAVE_STRRCHR | 197 | #undef HAVE_STRRCHR | |
198 | 198 | |||
199 | /* Define to 1 if you have the `strtol' function. */ | 199 | /* Define to 1 if you have the `strtol' function. */ | |
200 | #undef HAVE_STRTOL | 200 | #undef HAVE_STRTOL | |
201 | 201 | |||
202 | /* Define to 1 if SYSV IPC is available */ | 202 | /* Define to 1 if SYSV IPC is available */ | |
203 | #undef HAVE_SYSV_IPC | 203 | #undef HAVE_SYSV_IPC | |
204 | 204 | |||
205 | /* Define to 1 if you have the <sys/agpio.h> header file. */ | 205 | /* Define to 1 if you have the <sys/agpio.h> header file. */ | |
206 | #undef HAVE_SYS_AGPIO_H | 206 | #undef HAVE_SYS_AGPIO_H | |
207 | 207 | |||
208 | /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. | 208 | /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. | |
209 | */ | 209 | */ | |
210 | #undef HAVE_SYS_DIR_H | 210 | #undef HAVE_SYS_DIR_H | |
211 | 211 | |||
212 | /* Define to 1 if you have the <sys/io.h> header file. */ | 212 | /* Define to 1 if you have the <sys/io.h> header file. */ | |
213 | #undef HAVE_SYS_IO_H | 213 | #undef HAVE_SYS_IO_H | |
214 | 214 | |||
215 | /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. | 215 | /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. | |
216 | */ | 216 | */ | |
217 | #undef HAVE_SYS_NDIR_H | 217 | #undef HAVE_SYS_NDIR_H | |
218 | 218 | |||
219 | /* Define to 1 if you have the <sys/stat.h> header file. */ | 219 | /* Define to 1 if you have the <sys/stat.h> header file. */ | |
220 | #undef HAVE_SYS_STAT_H | 220 | #undef HAVE_SYS_STAT_H | |
221 | 221 | |||
222 | /* Define to 1 if you have the <sys/types.h> header file. */ | 222 | /* Define to 1 if you have the <sys/types.h> header file. */ | |
223 | #undef HAVE_SYS_TYPES_H | 223 | #undef HAVE_SYS_TYPES_H | |
224 | 224 | |||
225 | /* Define to 1 if you have the <sys/utsname.h> header file. */ | 225 | /* Define to 1 if you have the <sys/utsname.h> header file. */ | |
226 | #undef HAVE_SYS_UTSNAME_H | 226 | #undef HAVE_SYS_UTSNAME_H | |
227 | 227 | |||
228 | /* Define to 1 if you have the <sys/vm86.h> header file. */ | 228 | /* Define to 1 if you have the <sys/vm86.h> header file. */ | |
229 | #undef HAVE_SYS_VM86_H | 229 | #undef HAVE_SYS_VM86_H | |
230 | 230 | |||
231 | /* Define to 1 if you have the `timingsafe_memcmp' function. */ | |||
232 | #undef HAVE_TIMINGSAFE_MEMCMP | |||
233 | ||||
231 | /* Define to 1 if you have the <tslib.h> header file. */ | 234 | /* Define to 1 if you have the <tslib.h> header file. */ | |
232 | #undef HAVE_TSLIB_H | 235 | #undef HAVE_TSLIB_H | |
233 | 236 | |||
234 | /* Define to 1 if you have the <unistd.h> header file. */ | 237 | /* Define to 1 if you have the <unistd.h> header file. */ | |
235 | #undef HAVE_UNISTD_H | 238 | #undef HAVE_UNISTD_H | |
236 | 239 | |||
237 | /* Define to 1 if you have the <fnmatch.h> header file. */ | 240 | /* Define to 1 if you have the <fnmatch.h> header file. */ | |
238 | #undef HAVE_FNMATCH_H | 241 | #undef HAVE_FNMATCH_H | |
239 | 242 | |||
240 | /* Have /dev/urandom */ | 243 | /* Have /dev/urandom */ | |
241 | #undef HAVE_URANDOM | 244 | #undef HAVE_URANDOM | |
242 | 245 | |||
243 | /* Define to 1 if you have the `vprintf' function. */ | 246 | /* Define to 1 if you have the `vprintf' function. */ | |
244 | #undef HAVE_VPRINTF | 247 | #undef HAVE_VPRINTF | |
245 | 248 | |||
246 | /* Define to 1 if you have the `vasprintf' function. */ | 249 | /* Define to 1 if you have the `vasprintf' function. */ | |
247 | #undef HAVE_VASPRINTF | 250 | #undef HAVE_VASPRINTF | |
248 | 251 | |||
249 | /* Support IPv6 for TCP connections */ | 252 | /* Support IPv6 for TCP connections */ | |
250 | #undef IPv6 | 253 | #undef IPv6 | |
251 | 254 | |||
252 | /* Support os-specific local connections */ | 255 | /* Support os-specific local connections */ | |
253 | #undef LOCALCONN | 256 | #undef LOCALCONN | |
254 | 257 | |||
255 | /* Support MIT-SHM Extension */ | 258 | /* Support MIT-SHM Extension */ | |
256 | #undef MITSHM | 259 | #undef MITSHM | |
257 | 260 | |||
258 | /* Enable some debugging code */ | 261 | /* Enable some debugging code */ | |
259 | #undef DEBUG | 262 | #undef DEBUG | |
260 | 263 | |||
261 | /* Name of package */ | 264 | /* Name of package */ | |
262 | #undef PACKAGE | 265 | #undef PACKAGE | |
263 | 266 | |||
264 | /* Internal define for Xinerama */ | 267 | /* Internal define for Xinerama */ | |
265 | #undef PANORAMIX | 268 | #undef PANORAMIX | |
266 | 269 | |||
267 | /* Overall prefix */ | 270 | /* Overall prefix */ | |
268 | #undef PROJECTROOT | 271 | #undef PROJECTROOT | |
269 | 272 | |||
270 | /* Support RANDR extension */ | 273 | /* Support RANDR extension */ | |
271 | #undef RANDR | 274 | #undef RANDR | |
272 | 275 | |||
273 | /* Support Record extension */ | 276 | /* Support Record extension */ | |
274 | #undef XRECORD | 277 | #undef XRECORD | |
275 | 278 | |||
276 | /* Support RENDER extension */ | 279 | /* Support RENDER extension */ | |
277 | #undef RENDER | 280 | #undef RENDER | |
278 | 281 | |||
279 | /* Support X resource extension */ | 282 | /* Support X resource extension */ | |
280 | #undef RES | 283 | #undef RES | |
281 | 284 | |||
282 | /* Support MIT-SCREEN-SAVER extension */ | 285 | /* Support MIT-SCREEN-SAVER extension */ | |
283 | #undef SCREENSAVER | 286 | #undef SCREENSAVER | |
284 | 287 | |||
285 | /* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */ | 288 | /* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */ | |
286 | #undef SECURE_RPC | 289 | #undef SECURE_RPC | |
287 | 290 | |||
288 | /* Support SHAPE extension */ | 291 | /* Support SHAPE extension */ | |
289 | #undef SHAPE | 292 | #undef SHAPE | |
290 | 293 | |||
291 | /* Define to 1 on systems derived from System V Release 4 */ | 294 | /* Define to 1 on systems derived from System V Release 4 */ | |
292 | #undef SVR4 | 295 | #undef SVR4 | |
293 | 296 | |||
294 | /* Support TCP socket connections */ | 297 | /* Support TCP socket connections */ | |
295 | #undef TCPCONN | 298 | #undef TCPCONN | |
296 | 299 | |||
297 | /* Enable touchscreen support */ | 300 | /* Enable touchscreen support */ | |
298 | #undef TOUCHSCREEN | 301 | #undef TOUCHSCREEN | |
299 | 302 | |||
300 | /* Support tslib touchscreen abstraction library */ | 303 | /* Support tslib touchscreen abstraction library */ | |
301 | #undef TSLIB | 304 | #undef TSLIB | |
302 | 305 | |||
303 | /* Support UNIX socket connections */ | 306 | /* Support UNIX socket connections */ | |
304 | #undef UNIXCONN | 307 | #undef UNIXCONN | |
305 | 308 | |||
306 | /* Define to use byteswap macros from <sys/endian.h> */ | 309 | /* Define to use byteswap macros from <sys/endian.h> */ | |
307 | #undef USE_SYS_ENDIAN_H | 310 | #undef USE_SYS_ENDIAN_H | |
308 | 311 | |||
309 | /* unaligned word accesses behave as expected */ | 312 | /* unaligned word accesses behave as expected */ | |
310 | #undef WORKING_UNALIGNED_INT | 313 | #undef WORKING_UNALIGNED_INT | |
311 | 314 | |||
312 | /* Build X string registry */ | 315 | /* Build X string registry */ | |
313 | #undef XREGISTRY | 316 | #undef XREGISTRY | |
314 | 317 | |||
315 | /* Build X-ACE extension */ | 318 | /* Build X-ACE extension */ | |
316 | #undef XACE | 319 | #undef XACE | |
317 | 320 | |||
318 | /* Build SELinux extension */ | 321 | /* Build SELinux extension */ | |
319 | #undef XSELINUX | 322 | #undef XSELINUX | |
320 | 323 | |||
321 | /* Support XCMisc extension */ | 324 | /* Support XCMisc extension */ | |
322 | #undef XCMISC | 325 | #undef XCMISC | |
323 | 326 | |||
324 | /* Build Security extension */ | 327 | /* Build Security extension */ | |
325 | #undef XCSECURITY | 328 | #undef XCSECURITY | |
326 | 329 | |||
327 | /* Support Xdmcp */ | 330 | /* Support Xdmcp */ | |
328 | #undef XDMCP | 331 | #undef XDMCP | |
329 | 332 | |||
330 | /* Build XFree86 BigFont extension */ | 333 | /* Build XFree86 BigFont extension */ | |
331 | #undef XF86BIGFONT | 334 | #undef XF86BIGFONT | |
332 | 335 | |||
333 | /* Support XFree86 Video Mode extension */ | 336 | /* Support XFree86 Video Mode extension */ | |
334 | #undef XF86VIDMODE | 337 | #undef XF86VIDMODE | |
335 | 338 | |||
336 | /* Support XFixes extension */ | 339 | /* Support XFixes extension */ | |
337 | #undef XFIXES | 340 | #undef XFIXES | |
338 | 341 | |||
339 | /* Build XDGA support */ | 342 | /* Build XDGA support */ | |
340 | #undef XFreeXDGA | 343 | #undef XFreeXDGA | |
341 | 344 | |||
342 | /* Support Xinerama extension */ | 345 | /* Support Xinerama extension */ | |
343 | #undef XINERAMA | 346 | #undef XINERAMA | |
344 | 347 | |||
345 | /* Vendor release */ | 348 | /* Vendor release */ | |
346 | #undef XORG_RELEASE | 349 | #undef XORG_RELEASE | |
347 | 350 | |||
348 | /* Current Xorg version */ | 351 | /* Current Xorg version */ | |
349 | #undef XORG_VERSION_CURRENT | 352 | #undef XORG_VERSION_CURRENT | |
350 | 353 | |||
351 | /* Xorg release date */ | 354 | /* Xorg release date */ | |
352 | #undef XORG_DATE | 355 | #undef XORG_DATE | |
353 | 356 | |||
354 | /* Build Xv Extension */ | 357 | /* Build Xv Extension */ | |
355 | #undef XvExtension | 358 | #undef XvExtension | |
356 | 359 | |||
357 | /* Build XvMC Extension */ | 360 | /* Build XvMC Extension */ | |
358 | #undef XvMCExtension | 361 | #undef XvMCExtension | |
359 | 362 | |||
360 | /* Support XSync extension */ | 363 | /* Support XSync extension */ | |
361 | #undef XSYNC | 364 | #undef XSYNC | |
362 | 365 | |||
363 | /* Support XTest extension */ | 366 | /* Support XTest extension */ | |
364 | #undef XTEST | 367 | #undef XTEST | |
365 | 368 | |||
366 | /* Support Xv extension */ | 369 | /* Support Xv extension */ | |
367 | #undef XV | 370 | #undef XV | |
368 | 371 | |||
369 | /* Support DRI extension */ | 372 | /* Support DRI extension */ | |
370 | #undef XF86DRI | 373 | #undef XF86DRI | |
371 | 374 | |||
372 | /* Build DRI2 extension */ | 375 | /* Build DRI2 extension */ | |
373 | #undef DRI2 | 376 | #undef DRI2 | |
374 | 377 | |||
375 | /* Build DBE support */ | 378 | /* Build DBE support */ | |
376 | #undef DBE | 379 | #undef DBE | |
377 | 380 | |||
378 | /* Vendor name */ | 381 | /* Vendor name */ | |
379 | #undef XVENDORNAME | 382 | #undef XVENDORNAME | |
380 | 383 | |||
381 | /* Enable GNU and other extensions to the C environment for GLIBC */ | 384 | /* Enable GNU and other extensions to the C environment for GLIBC */ | |
382 | #undef _GNU_SOURCE | 385 | #undef _GNU_SOURCE | |
383 | 386 | |||
384 | /* Define to empty if `const' does not conform to ANSI C. */ | 387 | /* Define to empty if `const' does not conform to ANSI C. */ | |
385 | #undef const | 388 | #undef const | |
386 | 389 | |||
387 | /* Define to `int' if <sys/types.h> does not define. */ | 390 | /* Define to `int' if <sys/types.h> does not define. */ | |
388 | #undef pid_t | 391 | #undef pid_t | |
389 | 392 | |||
390 | /* Build Rootless code */ | 393 | /* Build Rootless code */ | |
391 | #undef ROOTLESS | 394 | #undef ROOTLESS | |
392 | 395 | |||
393 | /* Define to 1 if unsigned long is 64 bits. */ | 396 | /* Define to 1 if unsigned long is 64 bits. */ | |
394 | #undef _XSERVER64 | 397 | #undef _XSERVER64 | |
395 | 398 | |||
396 | /* System is BSD-like */ | 399 | /* System is BSD-like */ | |
397 | #undef CSRG_BASED | 400 | #undef CSRG_BASED | |
398 | 401 | |||
399 | /* Define to 1 if `struct sockaddr_in' has a `sin_len' member */ | 402 | /* Define to 1 if `struct sockaddr_in' has a `sin_len' member */ | |
400 | #undef BSD44SOCKETS | 403 | #undef BSD44SOCKETS | |
401 | 404 | |||
402 | /* Support D-Bus */ | 405 | /* Support D-Bus */ | |
403 | #undef HAVE_DBUS | 406 | #undef HAVE_DBUS | |
404 | 407 | |||
405 | /* Use libudev for input hotplug */ | 408 | /* Use libudev for input hotplug */ | |
406 | #undef CONFIG_UDEV | 409 | #undef CONFIG_UDEV | |
407 | 410 | |||
408 | /* Use D-Bus for input hotplug */ | 411 | /* Use D-Bus for input hotplug */ | |
409 | #undef CONFIG_NEED_DBUS | 412 | #undef CONFIG_NEED_DBUS | |
410 | 413 | |||
411 | /* Support the D-Bus hotplug API */ | 414 | /* Support the D-Bus hotplug API */ | |
412 | #undef CONFIG_DBUS_API | 415 | #undef CONFIG_DBUS_API | |
413 | 416 | |||
414 | /* Support HAL for hotplug */ | 417 | /* Support HAL for hotplug */ | |
415 | #undef CONFIG_HAL | 418 | #undef CONFIG_HAL | |
416 | 419 | |||
417 | /* Have a monotonic clock from clock_gettime() */ | 420 | /* Have a monotonic clock from clock_gettime() */ | |
418 | #undef MONOTONIC_CLOCK | 421 | #undef MONOTONIC_CLOCK | |
419 | 422 | |||
420 | /* Define to 1 if the DTrace Xserver provider probes should be built in */ | 423 | /* Define to 1 if the DTrace Xserver provider probes should be built in */ | |
421 | #undef XSERVER_DTRACE | 424 | #undef XSERVER_DTRACE | |
422 | 425 | |||
423 | /* Define to 16-bit byteswap macro */ | 426 | /* Define to 16-bit byteswap macro */ | |
424 | #undef bswap_16 | 427 | #undef bswap_16 | |
425 | 428 | |||
426 | /* Define to 32-bit byteswap macro */ | 429 | /* Define to 32-bit byteswap macro */ | |
427 | #undef bswap_32 | 430 | #undef bswap_32 | |
428 | 431 | |||
429 | /* Define to 64-bit byteswap macro */ | 432 | /* Define to 64-bit byteswap macro */ | |
430 | #undef bswap_64 | 433 | #undef bswap_64 | |
431 | 434 | |||
432 | /* Need the strcasecmp function. */ | 435 | /* Need the strcasecmp function. */ | |
433 | #undef NEED_STRCASECMP | 436 | #undef NEED_STRCASECMP | |
434 | 437 | |||
435 | /* Need the strncasecmp function. */ | 438 | /* Need the strncasecmp function. */ | |
436 | #undef NEED_STRNCASECMP | 439 | #undef NEED_STRNCASECMP | |
437 | 440 | |||
438 | /* Need the strcasestr function. */ | 441 | /* Need the strcasestr function. */ | |
439 | #undef NEED_STRCASESTR | 442 | #undef NEED_STRCASESTR | |
440 | 443 | |||
441 | /* Define to 1 if you have the `ffs' function. */ | 444 | /* Define to 1 if you have the `ffs' function. */ | |
442 | #undef HAVE_FFS | 445 | #undef HAVE_FFS | |
443 | 446 | |||
444 | /* If the compiler supports a TLS storage class define it to that here */ | 447 | /* If the compiler supports a TLS storage class define it to that here */ | |
445 | #undef TLS | 448 | #undef TLS | |
446 | 449 | |||
447 | /* Correctly set _XSERVER64 for OSX fat binaries */ | 450 | /* Correctly set _XSERVER64 for OSX fat binaries */ | |
448 | #ifdef __APPLE__ | 451 | #ifdef __APPLE__ | |
449 | #include "dix-config-apple-verbatim.h" | 452 | #include "dix-config-apple-verbatim.h" | |
450 | #endif | 453 | #endif | |
451 | 454 | |||
452 | #endif /* _DIX_CONFIG_H_ */ | 455 | #endif /* _DIX_CONFIG_H_ */ |
--- xsrc/external/mit/xorg-server.old/dist/include/os.h 2016/06/09 09:08:00 1.1.1.1
+++ xsrc/external/mit/xorg-server.old/dist/include/os.h 2017/03/08 07:31:42 1.2
@@ -1,550 +1,555 @@ | @@ -1,550 +1,555 @@ | |||
1 | /*********************************************************** | 1 | /*********************************************************** | |
2 | 2 | |||
3 | Copyright 1987, 1998 The Open Group | 3 | Copyright 1987, 1998 The Open Group | |
4 | 4 | |||
5 | Permission to use, copy, modify, distribute, and sell this software and its | 5 | Permission to use, copy, modify, distribute, and sell this software and its | |
6 | documentation for any purpose is hereby granted without fee, provided that | 6 | documentation for any purpose is hereby granted without fee, provided that | |
7 | the above copyright notice appear in all copies and that both that | 7 | the above copyright notice appear in all copies and that both that | |
8 | copyright notice and this permission notice appear in supporting | 8 | copyright notice and this permission notice appear in supporting | |
9 | documentation. | 9 | documentation. | |
10 | 10 | |||
11 | The above copyright notice and this permission notice shall be included in | 11 | The above copyright notice and this permission notice shall be included in | |
12 | all copies or substantial portions of the Software. | 12 | all copies or substantial portions of the Software. | |
13 | 13 | |||
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | 17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |
18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | 18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |
19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
20 | 20 | |||
21 | Except as contained in this notice, the name of The Open Group shall not be | 21 | Except as contained in this notice, the name of The Open Group shall not be | |
22 | used in advertising or otherwise to promote the sale, use or other dealings | 22 | used in advertising or otherwise to promote the sale, use or other dealings | |
23 | in this Software without prior written authorization from The Open Group. | 23 | in this Software without prior written authorization from The Open Group. | |
24 | 24 | |||
25 | 25 | |||
26 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. | 26 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. | |
27 | 27 | |||
28 | All Rights Reserved | 28 | All Rights Reserved | |
29 | 29 | |||
30 | Permission to use, copy, modify, and distribute this software and its | 30 | Permission to use, copy, modify, and distribute this software and its | |
31 | documentation for any purpose and without fee is hereby granted, | 31 | documentation for any purpose and without fee is hereby granted, | |
32 | provided that the above copyright notice appear in all copies and that | 32 | provided that the above copyright notice appear in all copies and that | |
33 | both that copyright notice and this permission notice appear in | 33 | both that copyright notice and this permission notice appear in | |
34 | supporting documentation, and that the name of Digital not be | 34 | supporting documentation, and that the name of Digital not be | |
35 | used in advertising or publicity pertaining to distribution of the | 35 | used in advertising or publicity pertaining to distribution of the | |
36 | software without specific, written prior permission. | 36 | software without specific, written prior permission. | |
37 | 37 | |||
38 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | 38 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | |
39 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | 39 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | |
40 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | 40 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | |
41 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | 41 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
42 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | 42 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
43 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | 43 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
44 | SOFTWARE. | 44 | SOFTWARE. | |
45 | 45 | |||
46 | ******************************************************************/ | 46 | ******************************************************************/ | |
47 | 47 | |||
48 | 48 | |||
49 | #ifndef OS_H | 49 | #ifndef OS_H | |
50 | #define OS_H | 50 | #define OS_H | |
51 | 51 | |||
52 | #include "misc.h" | 52 | #include "misc.h" | |
53 | #include <stdarg.h> | 53 | #include <stdarg.h> | |
54 | #include <string.h> | 54 | #include <string.h> | |
55 | 55 | |||
56 | #define SCREEN_SAVER_ON 0 | 56 | #define SCREEN_SAVER_ON 0 | |
57 | #define SCREEN_SAVER_OFF 1 | 57 | #define SCREEN_SAVER_OFF 1 | |
58 | #define SCREEN_SAVER_FORCER 2 | 58 | #define SCREEN_SAVER_FORCER 2 | |
59 | #define SCREEN_SAVER_CYCLE 3 | 59 | #define SCREEN_SAVER_CYCLE 3 | |
60 | 60 | |||
61 | #ifndef MAX_REQUEST_SIZE | 61 | #ifndef MAX_REQUEST_SIZE | |
62 | #define MAX_REQUEST_SIZE 65535 | 62 | #define MAX_REQUEST_SIZE 65535 | |
63 | #endif | 63 | #endif | |
64 | #ifndef MAX_BIG_REQUEST_SIZE | 64 | #ifndef MAX_BIG_REQUEST_SIZE | |
65 | #define MAX_BIG_REQUEST_SIZE 4194303 | 65 | #define MAX_BIG_REQUEST_SIZE 4194303 | |
66 | #endif | 66 | #endif | |
67 | 67 | |||
68 | typedef struct _FontPathRec *FontPathPtr; | 68 | typedef struct _FontPathRec *FontPathPtr; | |
69 | typedef struct _NewClientRec *NewClientPtr; | 69 | typedef struct _NewClientRec *NewClientPtr; | |
70 | 70 | |||
71 | #ifndef xalloc | 71 | #ifndef xalloc | |
72 | #define xnfalloc(size) XNFalloc((unsigned long)(size)) | 72 | #define xnfalloc(size) XNFalloc((unsigned long)(size)) | |
73 | #define xnfcalloc(_num, _size) XNFcalloc((unsigned long)(_num)*(unsigned long)(_size)) | 73 | #define xnfcalloc(_num, _size) XNFcalloc((unsigned long)(_num)*(unsigned long)(_size)) | |
74 | #define xnfrealloc(ptr, size) XNFrealloc((pointer)(ptr), (unsigned long)(size)) | 74 | #define xnfrealloc(ptr, size) XNFrealloc((pointer)(ptr), (unsigned long)(size)) | |
75 | 75 | |||
76 | #define xalloc(size) Xalloc((unsigned long)(size)) | 76 | #define xalloc(size) Xalloc((unsigned long)(size)) | |
77 | #define xcalloc(_num, _size) Xcalloc((unsigned long)(_num)*(unsigned long)(_size)) | 77 | #define xcalloc(_num, _size) Xcalloc((unsigned long)(_num)*(unsigned long)(_size)) | |
78 | #define xrealloc(ptr, size) Xrealloc((pointer)(ptr), (unsigned long)(size)) | 78 | #define xrealloc(ptr, size) Xrealloc((pointer)(ptr), (unsigned long)(size)) | |
79 | #define xfree(ptr) Xfree((pointer)(ptr)) | 79 | #define xfree(ptr) Xfree((pointer)(ptr)) | |
80 | #define xstrdup(s) Xstrdup(s) | 80 | #define xstrdup(s) Xstrdup(s) | |
81 | #define xnfstrdup(s) XNFstrdup(s) | 81 | #define xnfstrdup(s) XNFstrdup(s) | |
82 | #endif | 82 | #endif | |
83 | 83 | |||
84 | #include <stdio.h> | 84 | #include <stdio.h> | |
85 | #include <stdarg.h> | 85 | #include <stdarg.h> | |
86 | #include <string.h> | 86 | #include <string.h> | |
87 | #include <strings.h> | 87 | #include <strings.h> | |
88 | 88 | |||
89 | 89 | |||
90 | #ifdef DDXBEFORERESET | 90 | #ifdef DDXBEFORERESET | |
91 | extern void ddxBeforeReset (void); | 91 | extern void ddxBeforeReset (void); | |
92 | #endif | 92 | #endif | |
93 | 93 | |||
94 | #ifdef DDXOSVERRORF | 94 | #ifdef DDXOSVERRORF | |
95 | extern _X_EXPORT void (*OsVendorVErrorFProc)(const char *, va_list args); | 95 | extern _X_EXPORT void (*OsVendorVErrorFProc)(const char *, va_list args); | |
96 | #endif | 96 | #endif | |
97 | 97 | |||
98 | extern _X_EXPORT int WaitForSomething( | 98 | extern _X_EXPORT int WaitForSomething( | |
99 | int* /*pClientsReady*/ | 99 | int* /*pClientsReady*/ | |
100 | ); | 100 | ); | |
101 | 101 | |||
102 | extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client*/); | 102 | extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client*/); | |
103 | 103 | |||
104 | extern _X_EXPORT Bool InsertFakeRequest( | 104 | extern _X_EXPORT Bool InsertFakeRequest( | |
105 | ClientPtr /*client*/, | 105 | ClientPtr /*client*/, | |
106 | char* /*data*/, | 106 | char* /*data*/, | |
107 | int /*count*/); | 107 | int /*count*/); | |
108 | 108 | |||
109 | extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client*/); | 109 | extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client*/); | |
110 | 110 | |||
111 | extern _X_EXPORT void FlushAllOutput(void); | 111 | extern _X_EXPORT void FlushAllOutput(void); | |
112 | 112 | |||
113 | extern _X_EXPORT void FlushIfCriticalOutputPending(void); | 113 | extern _X_EXPORT void FlushIfCriticalOutputPending(void); | |
114 | 114 | |||
115 | extern _X_EXPORT void SetCriticalOutputPending(void); | 115 | extern _X_EXPORT void SetCriticalOutputPending(void); | |
116 | 116 | |||
117 | extern _X_EXPORT int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/); | 117 | extern _X_EXPORT int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/); | |
118 | 118 | |||
119 | extern _X_EXPORT void ResetOsBuffers(void); | 119 | extern _X_EXPORT void ResetOsBuffers(void); | |
120 | 120 | |||
121 | extern _X_EXPORT void InitConnectionLimits(void); | 121 | extern _X_EXPORT void InitConnectionLimits(void); | |
122 | 122 | |||
123 | extern _X_EXPORT void NotifyParentProcess(void); | 123 | extern _X_EXPORT void NotifyParentProcess(void); | |
124 | 124 | |||
125 | extern _X_EXPORT void CreateWellKnownSockets(void); | 125 | extern _X_EXPORT void CreateWellKnownSockets(void); | |
126 | 126 | |||
127 | extern _X_EXPORT void ResetWellKnownSockets(void); | 127 | extern _X_EXPORT void ResetWellKnownSockets(void); | |
128 | 128 | |||
129 | extern _X_EXPORT void CloseWellKnownConnections(void); | 129 | extern _X_EXPORT void CloseWellKnownConnections(void); | |
130 | 130 | |||
131 | extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client*/); | 131 | extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client*/); | |
132 | 132 | |||
133 | extern _X_EXPORT char *ClientAuthorized( | 133 | extern _X_EXPORT char *ClientAuthorized( | |
134 | ClientPtr /*client*/, | 134 | ClientPtr /*client*/, | |
135 | unsigned int /*proto_n*/, | 135 | unsigned int /*proto_n*/, | |
136 | char* /*auth_proto*/, | 136 | char* /*auth_proto*/, | |
137 | unsigned int /*string_n*/, | 137 | unsigned int /*string_n*/, | |
138 | char* /*auth_string*/); | 138 | char* /*auth_string*/); | |
139 | 139 | |||
140 | extern _X_EXPORT Bool EstablishNewConnections( | 140 | extern _X_EXPORT Bool EstablishNewConnections( | |
141 | ClientPtr /*clientUnused*/, | 141 | ClientPtr /*clientUnused*/, | |
142 | pointer /*closure*/); | 142 | pointer /*closure*/); | |
143 | 143 | |||
144 | extern _X_EXPORT void CheckConnections(void); | 144 | extern _X_EXPORT void CheckConnections(void); | |
145 | 145 | |||
146 | extern _X_EXPORT void CloseDownConnection(ClientPtr /*client*/); | 146 | extern _X_EXPORT void CloseDownConnection(ClientPtr /*client*/); | |
147 | 147 | |||
148 | extern _X_EXPORT void AddGeneralSocket(int /*fd*/); | 148 | extern _X_EXPORT void AddGeneralSocket(int /*fd*/); | |
149 | 149 | |||
150 | extern _X_EXPORT void RemoveGeneralSocket(int /*fd*/); | 150 | extern _X_EXPORT void RemoveGeneralSocket(int /*fd*/); | |
151 | 151 | |||
152 | extern _X_EXPORT void AddEnabledDevice(int /*fd*/); | 152 | extern _X_EXPORT void AddEnabledDevice(int /*fd*/); | |
153 | 153 | |||
154 | extern _X_EXPORT void RemoveEnabledDevice(int /*fd*/); | 154 | extern _X_EXPORT void RemoveEnabledDevice(int /*fd*/); | |
155 | 155 | |||
156 | extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client*/); | 156 | extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client*/); | |
157 | 157 | |||
158 | extern _X_EXPORT void ListenToAllClients(void); | 158 | extern _X_EXPORT void ListenToAllClients(void); | |
159 | 159 | |||
160 | extern _X_EXPORT void IgnoreClient(ClientPtr /*client*/); | 160 | extern _X_EXPORT void IgnoreClient(ClientPtr /*client*/); | |
161 | 161 | |||
162 | extern _X_EXPORT void AttendClient(ClientPtr /*client*/); | 162 | extern _X_EXPORT void AttendClient(ClientPtr /*client*/); | |
163 | 163 | |||
164 | extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client*/); | 164 | extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client*/); | |
165 | 165 | |||
166 | extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client*/); | 166 | extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client*/); | |
167 | 167 | |||
168 | #ifdef XQUARTZ | 168 | #ifdef XQUARTZ | |
169 | extern void ListenOnOpenFD(int /* fd */, int /* noxauth */); | 169 | extern void ListenOnOpenFD(int /* fd */, int /* noxauth */); | |
170 | #endif | 170 | #endif | |
171 | 171 | |||
172 | extern _X_EXPORT CARD32 GetTimeInMillis(void); | 172 | extern _X_EXPORT CARD32 GetTimeInMillis(void); | |
173 | 173 | |||
174 | extern _X_EXPORT void AdjustWaitForDelay( | 174 | extern _X_EXPORT void AdjustWaitForDelay( | |
175 | pointer /*waitTime*/, | 175 | pointer /*waitTime*/, | |
176 | unsigned long /*newdelay*/); | 176 | unsigned long /*newdelay*/); | |
177 | 177 | |||
178 | typedef struct _OsTimerRec *OsTimerPtr; | 178 | typedef struct _OsTimerRec *OsTimerPtr; | |
179 | 179 | |||
180 | typedef CARD32 (*OsTimerCallback)( | 180 | typedef CARD32 (*OsTimerCallback)( | |
181 | OsTimerPtr /* timer */, | 181 | OsTimerPtr /* timer */, | |
182 | CARD32 /* time */, | 182 | CARD32 /* time */, | |
183 | pointer /* arg */); | 183 | pointer /* arg */); | |
184 | 184 | |||
185 | extern _X_EXPORT void TimerInit(void); | 185 | extern _X_EXPORT void TimerInit(void); | |
186 | 186 | |||
187 | extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */); | 187 | extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */); | |
188 | 188 | |||
189 | #define TimerAbsolute (1<<0) | 189 | #define TimerAbsolute (1<<0) | |
190 | #define TimerForceOld (1<<1) | 190 | #define TimerForceOld (1<<1) | |
191 | 191 | |||
192 | extern _X_EXPORT OsTimerPtr TimerSet( | 192 | extern _X_EXPORT OsTimerPtr TimerSet( | |
193 | OsTimerPtr /* timer */, | 193 | OsTimerPtr /* timer */, | |
194 | int /* flags */, | 194 | int /* flags */, | |
195 | CARD32 /* millis */, | 195 | CARD32 /* millis */, | |
196 | OsTimerCallback /* func */, | 196 | OsTimerCallback /* func */, | |
197 | pointer /* arg */); | 197 | pointer /* arg */); | |
198 | 198 | |||
199 | extern _X_EXPORT void TimerCheck(void); | 199 | extern _X_EXPORT void TimerCheck(void); | |
200 | extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */); | 200 | extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */); | |
201 | extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */); | 201 | extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */); | |
202 | 202 | |||
203 | extern _X_EXPORT void SetScreenSaverTimer(void); | 203 | extern _X_EXPORT void SetScreenSaverTimer(void); | |
204 | extern _X_EXPORT void FreeScreenSaverTimer(void); | 204 | extern _X_EXPORT void FreeScreenSaverTimer(void); | |
205 | 205 | |||
206 | extern _X_EXPORT void AutoResetServer(int /*sig*/); | 206 | extern _X_EXPORT void AutoResetServer(int /*sig*/); | |
207 | 207 | |||
208 | extern _X_EXPORT void GiveUp(int /*sig*/); | 208 | extern _X_EXPORT void GiveUp(int /*sig*/); | |
209 | 209 | |||
210 | extern _X_EXPORT void UseMsg(void); | 210 | extern _X_EXPORT void UseMsg(void); | |
211 | 211 | |||
212 | extern _X_EXPORT void ProcessCommandLine(int /*argc*/, char* /*argv*/[]); | 212 | extern _X_EXPORT void ProcessCommandLine(int /*argc*/, char* /*argv*/[]); | |
213 | 213 | |||
214 | extern _X_EXPORT int set_font_authorizations( | 214 | extern _X_EXPORT int set_font_authorizations( | |
215 | char ** /* authorizations */, | 215 | char ** /* authorizations */, | |
216 | int * /*authlen */, | 216 | int * /*authlen */, | |
217 | pointer /* client */); | 217 | pointer /* client */); | |
218 | 218 | |||
219 | #ifndef _HAVE_XALLOC_DECLS | 219 | #ifndef _HAVE_XALLOC_DECLS | |
220 | #define _HAVE_XALLOC_DECLS | 220 | #define _HAVE_XALLOC_DECLS | |
221 | 221 | |||
222 | /* | 222 | /* | |
223 | * These causes all sorts of warnings->errors in the xsrc build. | 223 | * These causes all sorts of warnings->errors in the xsrc build. | |
224 | */ | 224 | */ | |
225 | #ifdef __NetBSD__ | 225 | #ifdef __NetBSD__ | |
226 | #undef _X_DEPRECATED | 226 | #undef _X_DEPRECATED | |
227 | #define _X_DEPRECATED | 227 | #define _X_DEPRECATED | |
228 | #endif | 228 | #endif | |
229 | 229 | |||
230 | /* | 230 | /* | |
231 | * Use malloc(3) instead. | 231 | * Use malloc(3) instead. | |
232 | */ | 232 | */ | |
233 | extern _X_EXPORT void *Xalloc(unsigned long /*amount*/) _X_DEPRECATED; | 233 | extern _X_EXPORT void *Xalloc(unsigned long /*amount*/) _X_DEPRECATED; | |
234 | /* | 234 | /* | |
235 | * Use calloc(3) instead | 235 | * Use calloc(3) instead | |
236 | */ | 236 | */ | |
237 | extern _X_EXPORT void *Xcalloc(unsigned long /*amount*/) _X_DEPRECATED; | 237 | extern _X_EXPORT void *Xcalloc(unsigned long /*amount*/) _X_DEPRECATED; | |
238 | /* | 238 | /* | |
239 | * Use realloc(3) instead | 239 | * Use realloc(3) instead | |
240 | */ | 240 | */ | |
241 | extern _X_EXPORT void *Xrealloc(void * /*ptr*/, unsigned long /*amount*/) | 241 | extern _X_EXPORT void *Xrealloc(void * /*ptr*/, unsigned long /*amount*/) | |
242 | _X_DEPRECATED; | 242 | _X_DEPRECATED; | |
243 | /* | 243 | /* | |
244 | * Use free(3) instead | 244 | * Use free(3) instead | |
245 | */ | 245 | */ | |
246 | extern _X_EXPORT void Xfree(void * /*ptr*/) _X_DEPRECATED; | 246 | extern _X_EXPORT void Xfree(void * /*ptr*/) _X_DEPRECATED; | |
247 | 247 | |||
248 | #endif | 248 | #endif | |
249 | 249 | |||
250 | /* | 250 | /* | |
251 | * This function malloc(3)s buffer, terminating the server if there is not | 251 | * This function malloc(3)s buffer, terminating the server if there is not | |
252 | * enough memory. | 252 | * enough memory. | |
253 | */ | 253 | */ | |
254 | extern _X_EXPORT void *XNFalloc(unsigned long /*amount*/); | 254 | extern _X_EXPORT void *XNFalloc(unsigned long /*amount*/); | |
255 | /* | 255 | /* | |
256 | * This function calloc(3)s buffer, terminating the server if there is not | 256 | * This function calloc(3)s buffer, terminating the server if there is not | |
257 | * enough memory. | 257 | * enough memory. | |
258 | */ | 258 | */ | |
259 | extern _X_EXPORT void *XNFcalloc(unsigned long /*amount*/); | 259 | extern _X_EXPORT void *XNFcalloc(unsigned long /*amount*/); | |
260 | /* | 260 | /* | |
261 | * This function realloc(3)s passed buffer, terminating the server if there is | 261 | * This function realloc(3)s passed buffer, terminating the server if there is | |
262 | * not enough memory. | 262 | * not enough memory. | |
263 | */ | 263 | */ | |
264 | extern _X_EXPORT void *XNFrealloc(void * /*ptr*/, unsigned long /*amount*/); | 264 | extern _X_EXPORT void *XNFrealloc(void * /*ptr*/, unsigned long /*amount*/); | |
265 | 265 | |||
266 | /* | 266 | /* | |
267 | * This function strdup(3)s passed string. The only difference from the library | 267 | * This function strdup(3)s passed string. The only difference from the library | |
268 | * function that it is safe to pass NULL, as NULL will be returned. | 268 | * function that it is safe to pass NULL, as NULL will be returned. | |
269 | */ | 269 | */ | |
270 | extern _X_EXPORT char *Xstrdup(const char *s); | 270 | extern _X_EXPORT char *Xstrdup(const char *s); | |
271 | 271 | |||
272 | /* | 272 | /* | |
273 | * This function strdup(3)s passed string, terminating the server if there is | 273 | * This function strdup(3)s passed string, terminating the server if there is | |
274 | * not enough memory. If NULL is passed to this function, NULL is returned. | 274 | * not enough memory. If NULL is passed to this function, NULL is returned. | |
275 | */ | 275 | */ | |
276 | extern _X_EXPORT char *XNFstrdup(const char *s); | 276 | extern _X_EXPORT char *XNFstrdup(const char *s); | |
277 | 277 | |||
278 | /* Include new X*asprintf API */ | 278 | /* Include new X*asprintf API */ | |
279 | #include "Xprintf.h" | 279 | #include "Xprintf.h" | |
280 | 280 | |||
281 | /* Older api deprecated in favor of the asprintf versions */ | 281 | /* Older api deprecated in favor of the asprintf versions */ | |
282 | extern _X_EXPORT char *Xprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_DEPRECATED; | 282 | extern _X_EXPORT char *Xprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_DEPRECATED; | |
283 | extern _X_EXPORT char *Xvprintf(const char *fmt, va_list va)_X_ATTRIBUTE_PRINTF(1,0) _X_DEPRECATED; | 283 | extern _X_EXPORT char *Xvprintf(const char *fmt, va_list va)_X_ATTRIBUTE_PRINTF(1,0) _X_DEPRECATED; | |
284 | extern _X_EXPORT char *XNFprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_DEPRECATED; | 284 | extern _X_EXPORT char *XNFprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_DEPRECATED; | |
285 | extern _X_EXPORT char *XNFvprintf(const char *fmt, va_list va)_X_ATTRIBUTE_PRINTF(1,0) _X_DEPRECATED; | 285 | extern _X_EXPORT char *XNFvprintf(const char *fmt, va_list va)_X_ATTRIBUTE_PRINTF(1,0) _X_DEPRECATED; | |
286 | 286 | |||
287 | typedef void (*OsSigHandlerPtr)(int /* sig */); | 287 | typedef void (*OsSigHandlerPtr)(int /* sig */); | |
288 | typedef int (*OsSigWrapperPtr)(int /* sig */); | 288 | typedef int (*OsSigWrapperPtr)(int /* sig */); | |
289 | 289 | |||
290 | extern _X_EXPORT OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */); | 290 | extern _X_EXPORT OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */); | |
291 | extern _X_EXPORT OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newWrap); | 291 | extern _X_EXPORT OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newWrap); | |
292 | 292 | |||
293 | extern _X_EXPORT int auditTrailLevel; | 293 | extern _X_EXPORT int auditTrailLevel; | |
294 | 294 | |||
295 | extern _X_EXPORT void LockServer(void); | 295 | extern _X_EXPORT void LockServer(void); | |
296 | extern _X_EXPORT void UnlockServer(void); | 296 | extern _X_EXPORT void UnlockServer(void); | |
297 | 297 | |||
298 | extern _X_EXPORT int OsLookupColor( | 298 | extern _X_EXPORT int OsLookupColor( | |
299 | int /*screen*/, | 299 | int /*screen*/, | |
300 | char * /*name*/, | 300 | char * /*name*/, | |
301 | unsigned /*len*/, | 301 | unsigned /*len*/, | |
302 | unsigned short * /*pred*/, | 302 | unsigned short * /*pred*/, | |
303 | unsigned short * /*pgreen*/, | 303 | unsigned short * /*pgreen*/, | |
304 | unsigned short * /*pblue*/); | 304 | unsigned short * /*pblue*/); | |
305 | 305 | |||
306 | extern _X_EXPORT void OsInit(void); | 306 | extern _X_EXPORT void OsInit(void); | |
307 | 307 | |||
308 | extern _X_EXPORT void OsCleanup(Bool); | 308 | extern _X_EXPORT void OsCleanup(Bool); | |
309 | 309 | |||
310 | extern _X_EXPORT void OsVendorFatalError(void); | 310 | extern _X_EXPORT void OsVendorFatalError(void); | |
311 | 311 | |||
312 | extern _X_EXPORT void OsVendorInit(void); | 312 | extern _X_EXPORT void OsVendorInit(void); | |
313 | 313 | |||
314 | extern _X_EXPORT void OsBlockSignals (void); | 314 | extern _X_EXPORT void OsBlockSignals (void); | |
315 | 315 | |||
316 | extern _X_EXPORT void OsReleaseSignals (void); | 316 | extern _X_EXPORT void OsReleaseSignals (void); | |
317 | 317 | |||
318 | extern _X_EXPORT void OsAbort (void) _X_NORETURN; | 318 | extern _X_EXPORT void OsAbort (void) _X_NORETURN; | |
319 | 319 | |||
320 | #if !defined(WIN32) | 320 | #if !defined(WIN32) | |
321 | extern _X_EXPORT int System(char *); | 321 | extern _X_EXPORT int System(char *); | |
322 | extern _X_EXPORT pointer Popen(char *, char *); | 322 | extern _X_EXPORT pointer Popen(char *, char *); | |
323 | extern _X_EXPORT int Pclose(pointer); | 323 | extern _X_EXPORT int Pclose(pointer); | |
324 | extern _X_EXPORT pointer Fopen(char *, char *); | 324 | extern _X_EXPORT pointer Fopen(char *, char *); | |
325 | extern _X_EXPORT int Fclose(pointer); | 325 | extern _X_EXPORT int Fclose(pointer); | |
326 | #else | 326 | #else | |
327 | #define System(a) system(a) | 327 | #define System(a) system(a) | |
328 | #define Popen(a,b) popen(a,b) | 328 | #define Popen(a,b) popen(a,b) | |
329 | #define Pclose(a) pclose(a) | 329 | #define Pclose(a) pclose(a) | |
330 | #define Fopen(a,b) fopen(a,b) | 330 | #define Fopen(a,b) fopen(a,b) | |
331 | #define Fclose(a) fclose(a) | 331 | #define Fclose(a) fclose(a) | |
332 | #endif | 332 | #endif | |
333 | 333 | |||
334 | extern _X_EXPORT void CheckUserParameters(int argc, char **argv, char **envp); | 334 | extern _X_EXPORT void CheckUserParameters(int argc, char **argv, char **envp); | |
335 | extern _X_EXPORT void CheckUserAuthorization(void); | 335 | extern _X_EXPORT void CheckUserAuthorization(void); | |
336 | 336 | |||
337 | extern _X_EXPORT int AddHost( | 337 | extern _X_EXPORT int AddHost( | |
338 | ClientPtr /*client*/, | 338 | ClientPtr /*client*/, | |
339 | int /*family*/, | 339 | int /*family*/, | |
340 | unsigned /*length*/, | 340 | unsigned /*length*/, | |
341 | const void */*pAddr*/); | 341 | const void */*pAddr*/); | |
342 | 342 | |||
343 | extern _X_EXPORT Bool ForEachHostInFamily ( | 343 | extern _X_EXPORT Bool ForEachHostInFamily ( | |
344 | int /*family*/, | 344 | int /*family*/, | |
345 | Bool (* /*func*/ )( | 345 | Bool (* /*func*/ )( | |
346 | unsigned char * /* addr */, | 346 | unsigned char * /* addr */, | |
347 | short /* len */, | 347 | short /* len */, | |
348 | pointer /* closure */), | 348 | pointer /* closure */), | |
349 | pointer /*closure*/); | 349 | pointer /*closure*/); | |
350 | 350 | |||
351 | extern _X_EXPORT int RemoveHost( | 351 | extern _X_EXPORT int RemoveHost( | |
352 | ClientPtr /*client*/, | 352 | ClientPtr /*client*/, | |
353 | int /*family*/, | 353 | int /*family*/, | |
354 | unsigned /*length*/, | 354 | unsigned /*length*/, | |
355 | pointer /*pAddr*/); | 355 | pointer /*pAddr*/); | |
356 | 356 | |||
357 | extern _X_EXPORT int GetHosts( | 357 | extern _X_EXPORT int GetHosts( | |
358 | pointer * /*data*/, | 358 | pointer * /*data*/, | |
359 | int * /*pnHosts*/, | 359 | int * /*pnHosts*/, | |
360 | int * /*pLen*/, | 360 | int * /*pLen*/, | |
361 | BOOL * /*pEnabled*/); | 361 | BOOL * /*pEnabled*/); | |
362 | 362 | |||
363 | typedef struct sockaddr * sockaddrPtr; | 363 | typedef struct sockaddr * sockaddrPtr; | |
364 | 364 | |||
365 | extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client); | 365 | extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client); | |
366 | 366 | |||
367 | extern _X_EXPORT int LocalClient(ClientPtr /* client */); | 367 | extern _X_EXPORT int LocalClient(ClientPtr /* client */); | |
368 | 368 | |||
369 | extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *); | 369 | extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *); | |
370 | 370 | |||
371 | #define LCC_UID_SET (1 << 0) | 371 | #define LCC_UID_SET (1 << 0) | |
372 | #define LCC_GID_SET (1 << 1) | 372 | #define LCC_GID_SET (1 << 1) | |
373 | #define LCC_PID_SET (1 << 2) | 373 | #define LCC_PID_SET (1 << 2) | |
374 | #define LCC_ZID_SET (1 << 3) | 374 | #define LCC_ZID_SET (1 << 3) | |
375 | 375 | |||
376 | typedef struct { | 376 | typedef struct { | |
377 | int fieldsSet; /* Bit mask of fields set */ | 377 | int fieldsSet; /* Bit mask of fields set */ | |
378 | int euid; /* Effective uid */ | 378 | int euid; /* Effective uid */ | |
379 | int egid; /* Primary effective group id */ | 379 | int egid; /* Primary effective group id */ | |
380 | int nSuppGids; /* Number of supplementary group ids */ | 380 | int nSuppGids; /* Number of supplementary group ids */ | |
381 | int *pSuppGids; /* Array of supplementary group ids */ | 381 | int *pSuppGids; /* Array of supplementary group ids */ | |
382 | int pid; /* Process id */ | 382 | int pid; /* Process id */ | |
383 | int zoneid; /* Only set on Solaris 10 & later */ | 383 | int zoneid; /* Only set on Solaris 10 & later */ | |
384 | } LocalClientCredRec; | 384 | } LocalClientCredRec; | |
385 | 385 | |||
386 | extern _X_EXPORT int GetLocalClientCreds(ClientPtr, LocalClientCredRec **); | 386 | extern _X_EXPORT int GetLocalClientCreds(ClientPtr, LocalClientCredRec **); | |
387 | extern _X_EXPORT void FreeLocalClientCreds(LocalClientCredRec *); | 387 | extern _X_EXPORT void FreeLocalClientCreds(LocalClientCredRec *); | |
388 | 388 | |||
389 | extern _X_EXPORT int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/); | 389 | extern _X_EXPORT int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/); | |
390 | 390 | |||
391 | extern _X_EXPORT int GetAccessControl(void); | 391 | extern _X_EXPORT int GetAccessControl(void); | |
392 | 392 | |||
393 | 393 | |||
394 | extern _X_EXPORT void AddLocalHosts(void); | 394 | extern _X_EXPORT void AddLocalHosts(void); | |
395 | 395 | |||
396 | extern _X_EXPORT void ResetHosts(char *display); | 396 | extern _X_EXPORT void ResetHosts(char *display); | |
397 | 397 | |||
398 | extern _X_EXPORT void EnableLocalHost(void); | 398 | extern _X_EXPORT void EnableLocalHost(void); | |
399 | 399 | |||
400 | extern _X_EXPORT void DisableLocalHost(void); | 400 | extern _X_EXPORT void DisableLocalHost(void); | |
401 | 401 | |||
402 | extern _X_EXPORT void AccessUsingXdmcp(void); | 402 | extern _X_EXPORT void AccessUsingXdmcp(void); | |
403 | 403 | |||
404 | extern _X_EXPORT void DefineSelf(int /*fd*/); | 404 | extern _X_EXPORT void DefineSelf(int /*fd*/); | |
405 | 405 | |||
406 | #if XDMCP | 406 | #if XDMCP | |
407 | extern _X_EXPORT void AugmentSelf(pointer /*from*/, int /*len*/); | 407 | extern _X_EXPORT void AugmentSelf(pointer /*from*/, int /*len*/); | |
408 | 408 | |||
409 | extern _X_EXPORT void RegisterAuthorizations(void); | 409 | extern _X_EXPORT void RegisterAuthorizations(void); | |
410 | #endif | 410 | #endif | |
411 | 411 | |||
412 | extern _X_EXPORT void InitAuthorization(char * /*filename*/); | 412 | extern _X_EXPORT void InitAuthorization(char * /*filename*/); | |
413 | 413 | |||
414 | /* extern int LoadAuthorization(void); */ | 414 | /* extern int LoadAuthorization(void); */ | |
415 | 415 | |||
416 | extern _X_EXPORT int AuthorizationFromID ( | 416 | extern _X_EXPORT int AuthorizationFromID ( | |
417 | XID id, | 417 | XID id, | |
418 | unsigned short *name_lenp, | 418 | unsigned short *name_lenp, | |
419 | char **namep, | 419 | char **namep, | |
420 | unsigned short *data_lenp, | 420 | unsigned short *data_lenp, | |
421 | char **datap); | 421 | char **datap); | |
422 | 422 | |||
423 | extern _X_EXPORT XID CheckAuthorization( | 423 | extern _X_EXPORT XID CheckAuthorization( | |
424 | unsigned int /*namelength*/, | 424 | unsigned int /*namelength*/, | |
425 | const char * /*name*/, | 425 | const char * /*name*/, | |
426 | unsigned int /*datalength*/, | 426 | unsigned int /*datalength*/, | |
427 | const char * /*data*/, | 427 | const char * /*data*/, | |
428 | ClientPtr /*client*/, | 428 | ClientPtr /*client*/, | |
429 | char ** /*reason*/ | 429 | char ** /*reason*/ | |
430 | ); | 430 | ); | |
431 | 431 | |||
432 | extern _X_EXPORT void ResetAuthorization(void); | 432 | extern _X_EXPORT void ResetAuthorization(void); | |
433 | 433 | |||
434 | extern _X_EXPORT int RemoveAuthorization ( | 434 | extern _X_EXPORT int RemoveAuthorization ( | |
435 | unsigned short name_length, | 435 | unsigned short name_length, | |
436 | const char *name, | 436 | const char *name, | |
437 | unsigned short data_length, | 437 | unsigned short data_length, | |
438 | const char *data); | 438 | const char *data); | |
439 | 439 | |||
440 | extern _X_EXPORT int AddAuthorization( | 440 | extern _X_EXPORT int AddAuthorization( | |
441 | unsigned int /*name_length*/, | 441 | unsigned int /*name_length*/, | |
442 | const char * /*name*/, | 442 | const char * /*name*/, | |
443 | unsigned int /*data_length*/, | 443 | unsigned int /*data_length*/, | |
444 | char * /*data*/); | 444 | char * /*data*/); | |
445 | 445 | |||
446 | #ifdef XCSECURITY | 446 | #ifdef XCSECURITY | |
447 | extern _X_EXPORT XID GenerateAuthorization( | 447 | extern _X_EXPORT XID GenerateAuthorization( | |
448 | unsigned int /* name_length */, | 448 | unsigned int /* name_length */, | |
449 | const char * /* name */, | 449 | const char * /* name */, | |
450 | unsigned int /* data_length */, | 450 | unsigned int /* data_length */, | |
451 | const char * /* data */, | 451 | const char * /* data */, | |
452 | unsigned int * /* data_length_return */, | 452 | unsigned int * /* data_length_return */, | |
453 | char ** /* data_return */); | 453 | char ** /* data_return */); | |
454 | #endif | 454 | #endif | |
455 | 455 | |||
456 | extern _X_EXPORT int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/); | 456 | extern _X_EXPORT int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/); | |
457 | 457 | |||
458 | extern _X_EXPORT void ddxUseMsg(void); | 458 | extern _X_EXPORT void ddxUseMsg(void); | |
459 | 459 | |||
460 | /* stuff for ReplyCallback */ | 460 | /* stuff for ReplyCallback */ | |
461 | extern _X_EXPORT CallbackListPtr ReplyCallback; | 461 | extern _X_EXPORT CallbackListPtr ReplyCallback; | |
462 | typedef struct { | 462 | typedef struct { | |
463 | ClientPtr client; | 463 | ClientPtr client; | |
464 | const void *replyData; | 464 | const void *replyData; | |
465 | unsigned long dataLenBytes; | 465 | unsigned long dataLenBytes; | |
466 | unsigned long bytesRemaining; | 466 | unsigned long bytesRemaining; | |
467 | Bool startOfReply; | 467 | Bool startOfReply; | |
468 | } ReplyInfoRec; | 468 | } ReplyInfoRec; | |
469 | 469 | |||
470 | /* stuff for FlushCallback */ | 470 | /* stuff for FlushCallback */ | |
471 | extern _X_EXPORT CallbackListPtr FlushCallback; | 471 | extern _X_EXPORT CallbackListPtr FlushCallback; | |
472 | 472 | |||
473 | extern _X_EXPORT void AbortDDX(void); | 473 | extern _X_EXPORT void AbortDDX(void); | |
474 | extern _X_EXPORT void ddxGiveUp(void); | 474 | extern _X_EXPORT void ddxGiveUp(void); | |
475 | extern _X_EXPORT int TimeSinceLastInputEvent(void); | 475 | extern _X_EXPORT int TimeSinceLastInputEvent(void); | |
476 | 476 | |||
477 | /* strcasecmp.c */ | 477 | /* strcasecmp.c */ | |
478 | #if NEED_STRCASECMP | 478 | #if NEED_STRCASECMP | |
479 | #define strcasecmp xstrcasecmp | 479 | #define strcasecmp xstrcasecmp | |
480 | extern _X_EXPORT int xstrcasecmp(const char *s1, const char *s2); | 480 | extern _X_EXPORT int xstrcasecmp(const char *s1, const char *s2); | |
481 | #endif | 481 | #endif | |
482 | 482 | |||
483 | #if NEED_STRNCASECMP | 483 | #if NEED_STRNCASECMP | |
484 | #define strncasecmp xstrncasecmp | 484 | #define strncasecmp xstrncasecmp | |
485 | extern _X_EXPORT int xstrncasecmp(const char *s1, const char *s2, size_t n); | 485 | extern _X_EXPORT int xstrncasecmp(const char *s1, const char *s2, size_t n); | |
486 | #endif | 486 | #endif | |
487 | 487 | |||
488 | #if NEED_STRCASESTR | 488 | #if NEED_STRCASESTR | |
489 | #define strcasestr xstrcasestr | 489 | #define strcasestr xstrcasestr | |
490 | extern _X_EXPORT char *xstrcasestr(const char *s, const char *find); | 490 | extern _X_EXPORT char *xstrcasestr(const char *s, const char *find); | |
491 | #endif | 491 | #endif | |
492 | 492 | |||
493 | #ifndef HAS_STRLCPY | 493 | #ifndef HAS_STRLCPY | |
494 | extern _X_EXPORT size_t strlcpy(char *dst, const char *src, size_t siz); | 494 | extern _X_EXPORT size_t strlcpy(char *dst, const char *src, size_t siz); | |
495 | extern _X_EXPORT size_t strlcat(char *dst, const char *src, size_t siz); | 495 | extern _X_EXPORT size_t strlcat(char *dst, const char *src, size_t siz); | |
496 | #endif | 496 | #endif | |
497 | 497 | |||
498 | #ifndef HAVE_TIMINGSAFE_MEMCMP | |||
499 | extern _X_EXPORT int | |||
500 | timingsafe_memcmp(const void *b1, const void *b2, size_t len); | |||
501 | #endif | |||
502 | ||||
498 | /* Logging. */ | 503 | /* Logging. */ | |
499 | typedef enum _LogParameter { | 504 | typedef enum _LogParameter { | |
500 | XLOG_FLUSH, | 505 | XLOG_FLUSH, | |
501 | XLOG_SYNC, | 506 | XLOG_SYNC, | |
502 | XLOG_VERBOSITY, | 507 | XLOG_VERBOSITY, | |
503 | XLOG_FILE_VERBOSITY | 508 | XLOG_FILE_VERBOSITY | |
504 | } LogParameter; | 509 | } LogParameter; | |
505 | 510 | |||
506 | /* Flags for log messages. */ | 511 | /* Flags for log messages. */ | |
507 | typedef enum { | 512 | typedef enum { | |
508 | X_PROBED, /* Value was probed */ | 513 | X_PROBED, /* Value was probed */ | |
509 | X_CONFIG, /* Value was given in the config file */ | 514 | X_CONFIG, /* Value was given in the config file */ | |
510 | X_DEFAULT, /* Value is a default */ | 515 | X_DEFAULT, /* Value is a default */ | |
511 | X_CMDLINE, /* Value was given on the command line */ | 516 | X_CMDLINE, /* Value was given on the command line */ | |
512 | X_NOTICE, /* Notice */ | 517 | X_NOTICE, /* Notice */ | |
513 | X_ERROR, /* Error message */ | 518 | X_ERROR, /* Error message */ | |
514 | X_WARNING, /* Warning message */ | 519 | X_WARNING, /* Warning message */ | |
515 | X_INFO, /* Informational message */ | 520 | X_INFO, /* Informational message */ | |
516 | X_NONE, /* No prefix */ | 521 | X_NONE, /* No prefix */ | |
517 | X_NOT_IMPLEMENTED, /* Not implemented */ | 522 | X_NOT_IMPLEMENTED, /* Not implemented */ | |
518 | X_UNKNOWN = -1 /* unknown -- this must always be last */ | 523 | X_UNKNOWN = -1 /* unknown -- this must always be last */ | |
519 | } MessageType; | 524 | } MessageType; | |
520 | 525 | |||
521 | extern _X_EXPORT const char *LogInit(const char *fname, const char *backup); | 526 | extern _X_EXPORT const char *LogInit(const char *fname, const char *backup); | |
522 | extern _X_EXPORT void LogClose(void); | 527 | extern _X_EXPORT void LogClose(void); | |
523 | extern _X_EXPORT Bool LogSetParameter(LogParameter param, int value); | 528 | extern _X_EXPORT Bool LogSetParameter(LogParameter param, int value); | |
524 | extern _X_EXPORT void LogVWrite(int verb, const char *f, va_list args); | 529 | extern _X_EXPORT void LogVWrite(int verb, const char *f, va_list args); | |
525 | extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _X_ATTRIBUTE_PRINTF(2,3); | 530 | extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _X_ATTRIBUTE_PRINTF(2,3); | |
526 | extern _X_EXPORT void LogVMessageVerb(MessageType type, int verb, const char *format, | 531 | extern _X_EXPORT void LogVMessageVerb(MessageType type, int verb, const char *format, | |
527 | va_list args); | 532 | va_list args); | |
528 | extern _X_EXPORT void LogMessageVerb(MessageType type, int verb, const char *format, | 533 | extern _X_EXPORT void LogMessageVerb(MessageType type, int verb, const char *format, | |
529 | ...) _X_ATTRIBUTE_PRINTF(3,4); | 534 | ...) _X_ATTRIBUTE_PRINTF(3,4); | |
530 | extern _X_EXPORT void LogMessage(MessageType type, const char *format, ...) | 535 | extern _X_EXPORT void LogMessage(MessageType type, const char *format, ...) | |
531 | _X_ATTRIBUTE_PRINTF(2,3); | 536 | _X_ATTRIBUTE_PRINTF(2,3); | |
532 | extern _X_EXPORT void FreeAuditTimer(void); | 537 | extern _X_EXPORT void FreeAuditTimer(void); | |
533 | extern _X_EXPORT void AuditF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2); | 538 | extern _X_EXPORT void AuditF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2); | |
534 | extern _X_EXPORT void VAuditF(const char *f, va_list args); | 539 | extern _X_EXPORT void VAuditF(const char *f, va_list args); | |
535 | extern _X_EXPORT void FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN; | 540 | extern _X_EXPORT void FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN; | |
536 | 541 | |||
537 | #ifdef DEBUG | 542 | #ifdef DEBUG | |
538 | #define DebugF ErrorF | 543 | #define DebugF ErrorF | |
539 | #else | 544 | #else | |
540 | #define DebugF(...) /* */ | 545 | #define DebugF(...) /* */ | |
541 | #endif | 546 | #endif | |
542 | 547 | |||
543 | extern _X_EXPORT void VErrorF(const char *f, va_list args); | 548 | extern _X_EXPORT void VErrorF(const char *f, va_list args); | |
544 | extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2); | 549 | extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2); | |
545 | extern _X_EXPORT void Error(const char *str); | 550 | extern _X_EXPORT void Error(const char *str); | |
546 | extern _X_EXPORT void LogPrintMarkers(void); | 551 | extern _X_EXPORT void LogPrintMarkers(void); | |
547 | 552 | |||
548 | extern _X_EXPORT void xorg_backtrace(void); | 553 | extern _X_EXPORT void xorg_backtrace(void); | |
549 | 554 | |||
550 | #endif /* OS_H */ | 555 | #endif /* OS_H */ |
--- xsrc/external/mit/xorg-server.old/dist/os/mitauth.c 2017/03/08 07:18:47 1.2
+++ xsrc/external/mit/xorg-server.old/dist/os/mitauth.c 2017/03/08 07:31:42 1.3
@@ -1,182 +1,182 @@ | @@ -1,182 +1,182 @@ | |||
1 | /* | 1 | /* | |
2 | 2 | |||
3 | Copyright 1988, 1998 The Open Group | 3 | Copyright 1988, 1998 The Open Group | |
4 | 4 | |||
5 | Permission to use, copy, modify, distribute, and sell this software and its | 5 | Permission to use, copy, modify, distribute, and sell this software and its | |
6 | documentation for any purpose is hereby granted without fee, provided that | 6 | documentation for any purpose is hereby granted without fee, provided that | |
7 | the above copyright notice appear in all copies and that both that | 7 | the above copyright notice appear in all copies and that both that | |
8 | copyright notice and this permission notice appear in supporting | 8 | copyright notice and this permission notice appear in supporting | |
9 | documentation. | 9 | documentation. | |
10 | 10 | |||
11 | The above copyright notice and this permission notice shall be included | 11 | The above copyright notice and this permission notice shall be included | |
12 | in all copies or substantial portions of the Software. | 12 | in all copies or substantial portions of the Software. | |
13 | 13 | |||
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
17 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR | 17 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR | |
18 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | 18 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | |
19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | 19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
20 | OTHER DEALINGS IN THE SOFTWARE. | 20 | OTHER DEALINGS IN THE SOFTWARE. | |
21 | 21 | |||
22 | Except as contained in this notice, the name of The Open Group shall | 22 | Except as contained in this notice, the name of The Open Group shall | |
23 | not be used in advertising or otherwise to promote the sale, use or | 23 | not be used in advertising or otherwise to promote the sale, use or | |
24 | other dealings in this Software without prior written authorization | 24 | other dealings in this Software without prior written authorization | |
25 | from The Open Group. | 25 | from The Open Group. | |
26 | 26 | |||
27 | */ | 27 | */ | |
28 | 28 | |||
29 | /* | 29 | /* | |
30 | * MIT-MAGIC-COOKIE-1 authorization scheme | 30 | * MIT-MAGIC-COOKIE-1 authorization scheme | |
31 | * Author: Keith Packard, MIT X Consortium | 31 | * Author: Keith Packard, MIT X Consortium | |
32 | */ | 32 | */ | |
33 | 33 | |||
34 | #ifdef HAVE_DIX_CONFIG_H | 34 | #ifdef HAVE_DIX_CONFIG_H | |
35 | #include <dix-config.h> | 35 | #include <dix-config.h> | |
36 | #endif | 36 | #endif | |
37 | 37 | |||
38 | #include <X11/X.h> | 38 | #include <X11/X.h> | |
39 | #include "os.h" | 39 | #include "os.h" | |
40 | #include "osdep.h" | 40 | #include "osdep.h" | |
41 | #include "dixstruct.h" | 41 | #include "dixstruct.h" | |
42 | 42 | |||
43 | static struct auth { | 43 | static struct auth { | |
44 | struct auth *next; | 44 | struct auth *next; | |
45 | unsigned short len; | 45 | unsigned short len; | |
46 | char *data; | 46 | char *data; | |
47 | XID id; | 47 | XID id; | |
48 | } *mit_auth; | 48 | } *mit_auth; | |
49 | 49 | |||
50 | int | 50 | int | |
51 | MitAddCookie ( | 51 | MitAddCookie ( | |
52 | unsigned short data_length, | 52 | unsigned short data_length, | |
53 | const char *data, | 53 | const char *data, | |
54 | XID id) | 54 | XID id) | |
55 | { | 55 | { | |
56 | struct auth *new; | 56 | struct auth *new; | |
57 | 57 | |||
58 | new = malloc(sizeof (struct auth)); | 58 | new = malloc(sizeof (struct auth)); | |
59 | if (!new) | 59 | if (!new) | |
60 | return 0; | 60 | return 0; | |
61 | new->data = malloc((unsigned) data_length); | 61 | new->data = malloc((unsigned) data_length); | |
62 | if (!new->data) { | 62 | if (!new->data) { | |
63 | free(new); | 63 | free(new); | |
64 | return 0; | 64 | return 0; | |
65 | } | 65 | } | |
66 | new->next = mit_auth; | 66 | new->next = mit_auth; | |
67 | mit_auth = new; | 67 | mit_auth = new; | |
68 | memmove(new->data, data, (int) data_length); | 68 | memmove(new->data, data, (int) data_length); | |
69 | new->len = data_length; | 69 | new->len = data_length; | |
70 | new->id = id; | 70 | new->id = id; | |
71 | return 1; | 71 | return 1; | |
72 | } | 72 | } | |
73 | 73 | |||
74 | XID | 74 | XID | |
75 | MitCheckCookie ( | 75 | MitCheckCookie ( | |
76 | unsigned short data_length, | 76 | unsigned short data_length, | |
77 | const char *data, | 77 | const char *data, | |
78 | ClientPtr client, | 78 | ClientPtr client, | |
79 | char **reason) | 79 | char **reason) | |
80 | { | 80 | { | |
81 | struct auth *auth; | 81 | struct auth *auth; | |
82 | 82 | |||
83 | for (auth = mit_auth; auth; auth=auth->next) { | 83 | for (auth = mit_auth; auth; auth=auth->next) { | |
84 | if (data_length == auth->len && | 84 | if (data_length == auth->len && | |
85 | memcmp (data, auth->data, (int) data_length) == 0) | 85 | timingsafe_memcmp(data, auth->data, (int) data_length) == 0) | |
86 | return auth->id; | 86 | return auth->id; | |
87 | } | 87 | } | |
88 | *reason = "Invalid MIT-MAGIC-COOKIE-1 key"; | 88 | *reason = "Invalid MIT-MAGIC-COOKIE-1 key"; | |
89 | return (XID) -1; | 89 | return (XID) -1; | |
90 | } | 90 | } | |
91 | 91 | |||
92 | int | 92 | int | |
93 | MitResetCookie (void) | 93 | MitResetCookie (void) | |
94 | { | 94 | { | |
95 | struct auth *auth, *next; | 95 | struct auth *auth, *next; | |
96 | 96 | |||
97 | for (auth = mit_auth; auth; auth=next) { | 97 | for (auth = mit_auth; auth; auth=next) { | |
98 | next = auth->next; | 98 | next = auth->next; | |
99 | free(auth->data); | 99 | free(auth->data); | |
100 | free(auth); | 100 | free(auth); | |
101 | } | 101 | } | |
102 | mit_auth = 0; | 102 | mit_auth = 0; | |
103 | return 0; | 103 | return 0; | |
104 | } | 104 | } | |
105 | 105 | |||
106 | int | 106 | int | |
107 | MitFromID ( | 107 | MitFromID ( | |
108 | XID id, | 108 | XID id, | |
109 | unsigned short *data_lenp, | 109 | unsigned short *data_lenp, | |
110 | char **datap) | 110 | char **datap) | |
111 | { | 111 | { | |
112 | struct auth *auth; | 112 | struct auth *auth; | |
113 | 113 | |||
114 | for (auth = mit_auth; auth; auth=auth->next) { | 114 | for (auth = mit_auth; auth; auth=auth->next) { | |
115 | if (id == auth->id) { | 115 | if (id == auth->id) { | |
116 | *data_lenp = auth->len; | 116 | *data_lenp = auth->len; | |
117 | *datap = auth->data; | 117 | *datap = auth->data; | |
118 | return 1; | 118 | return 1; | |
119 | } | 119 | } | |
120 | } | 120 | } | |
121 | return 0; | 121 | return 0; | |
122 | } | 122 | } | |
123 | 123 | |||
124 | int | 124 | int | |
125 | MitRemoveCookie ( | 125 | MitRemoveCookie ( | |
126 | unsigned short data_length, | 126 | unsigned short data_length, | |
127 | const char *data) | 127 | const char *data) | |
128 | { | 128 | { | |
129 | struct auth *auth, *prev; | 129 | struct auth *auth, *prev; | |
130 | 130 | |||
131 | prev = 0; | 131 | prev = 0; | |
132 | for (auth = mit_auth; auth; prev = auth, auth=auth->next) { | 132 | for (auth = mit_auth; auth; prev = auth, auth=auth->next) { | |
133 | if (data_length == auth->len && | 133 | if (data_length == auth->len && | |
134 | memcmp (data, auth->data, data_length) == 0) | 134 | memcmp (data, auth->data, data_length) == 0) | |
135 | { | 135 | { | |
136 | if (prev) | 136 | if (prev) | |
137 | prev->next = auth->next; | 137 | prev->next = auth->next; | |
138 | else | 138 | else | |
139 | mit_auth = auth->next; | 139 | mit_auth = auth->next; | |
140 | free(auth->data); | 140 | free(auth->data); | |
141 | free(auth); | 141 | free(auth); | |
142 | return 1; | 142 | return 1; | |
143 | } | 143 | } | |
144 | } | 144 | } | |
145 | return 0; | 145 | return 0; | |
146 | } | 146 | } | |
147 | 147 | |||
148 | #ifdef XCSECURITY | 148 | #ifdef XCSECURITY | |
149 | 149 | |||
150 | static char cookie[16]; /* 128 bits */ | 150 | static char cookie[16]; /* 128 bits */ | |
151 | 151 | |||
152 | XID | 152 | XID | |
153 | MitGenerateCookie ( | 153 | MitGenerateCookie ( | |
154 | unsigned data_length, | 154 | unsigned data_length, | |
155 | const char *data, | 155 | const char *data, | |
156 | XID id, | 156 | XID id, | |
157 | unsigned *data_length_return, | 157 | unsigned *data_length_return, | |
158 | char **data_return) | 158 | char **data_return) | |
159 | { | 159 | { | |
160 | int i = 0; | 160 | int i = 0; | |
161 | int status; | 161 | int status; | |
162 | 162 | |||
163 | while (data_length--) | 163 | while (data_length--) | |
164 | { | 164 | { | |
165 | cookie[i++] += *data++; | 165 | cookie[i++] += *data++; | |
166 | if (i >= sizeof (cookie)) i = 0; | 166 | if (i >= sizeof (cookie)) i = 0; | |
167 | } | 167 | } | |
168 | GenerateRandomData(sizeof (cookie), cookie); | 168 | GenerateRandomData(sizeof (cookie), cookie); | |
169 | status = MitAddCookie(sizeof (cookie), cookie, id); | 169 | status = MitAddCookie(sizeof (cookie), cookie, id); | |
170 | if (!status) | 170 | if (!status) | |
171 | { | 171 | { | |
172 | id = -1; | 172 | id = -1; | |
173 | } | 173 | } | |
174 | else | 174 | else | |
175 | { | 175 | { | |
176 | *data_return = cookie; | 176 | *data_return = cookie; | |
177 | *data_length_return = sizeof (cookie); | 177 | *data_length_return = sizeof (cookie); | |
178 | } | 178 | } | |
179 | return id; | 179 | return id; | |
180 | } | 180 | } | |
181 | 181 | |||
182 | #endif /* XCSECURITY */ | 182 | #endif /* XCSECURITY */ |
/*
* Copyright (c) 2014 Google Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <limits.h>
#include <string.h>
#include <X11/Xfuncproto.h>
#include <dix-config.h>
#include "os.h"
int
timingsafe_memcmp(const void *b1, const void *b2, size_t len)
{
const unsigned char *p1 = b1, *p2 = b2;
size_t i;
int res = 0, done = 0;
for (i = 0; i < len; i++) {
/* lt is -1 if p1[i] < p2[i]; else 0. */
int lt = (p1[i] - p2[i]) >> CHAR_BIT;
/* gt is -1 if p1[i] > p2[i]; else 0. */
int gt = (p2[i] - p1[i]) >> CHAR_BIT;
/* cmp is 1 if p1[i] > p2[i]; -1 if p1[i] < p2[i]; else 0. */
int cmp = lt - gt;
/* set res = cmp if !done. */
res |= cmp & ~done;
/* set done if p1[i] != p2[i]. */
done |= lt | gt;
}
return (res);
}
--- xsrc/external/mit/xorg-server.old/include/dix-config.h 2016/09/21 22:11:16 1.2
+++ xsrc/external/mit/xorg-server.old/include/dix-config.h 2017/03/08 07:31:42 1.3
@@ -1,459 +1,462 @@ | @@ -1,459 +1,462 @@ | |||
1 | /* include/dix-config.h. Generated from dix-config.h.in by configure. */ | 1 | /* include/dix-config.h. Generated from dix-config.h.in by configure. */ | |
2 | /* dix-config.h.in: not at all generated. -*- c -*- */ | 2 | /* dix-config.h.in: not at all generated. -*- c -*- */ | |
3 | 3 | |||
4 | #ifndef _DIX_CONFIG_H_ | 4 | #ifndef _DIX_CONFIG_H_ | |
5 | #define _DIX_CONFIG_H_ | 5 | #define _DIX_CONFIG_H_ | |
6 | 6 | |||
7 | /* Support BigRequests extension */ | 7 | /* Support BigRequests extension */ | |
8 | #define BIGREQS 1 | 8 | #define BIGREQS 1 | |
9 | 9 | |||
10 | /* Builder address */ | 10 | /* Builder address */ | |
11 | /* #define BUILDERADDR "xorg@lists.freedesktop.org" */ | 11 | /* #define BUILDERADDR "xorg@lists.freedesktop.org" */ | |
12 | 12 | |||
13 | /* Operating System Name */ | 13 | /* Operating System Name */ | |
14 | /* #define OSNAME "NetBSD 5.99.40 amd64" */ | 14 | /* #define OSNAME "NetBSD 5.99.40 amd64" */ | |
15 | 15 | |||
16 | /* Operating System Vendor */ | 16 | /* Operating System Vendor */ | |
17 | /* #define OSVENDOR "" */ | 17 | /* #define OSVENDOR "" */ | |
18 | 18 | |||
19 | /* Builder string */ | 19 | /* Builder string */ | |
20 | #define BUILDERSTRING "" | 20 | #define BUILDERSTRING "" | |
21 | 21 | |||
22 | /* Default font path */ | 22 | /* Default font path */ | |
23 | /* #define COMPILEDDEFAULTFONTPATH "/usr/local/lib/X11/fonts/misc/,/usr/local/lib/X11/fonts/TTF/,/usr/local/lib/X11/fonts/OTF,/usr/local/lib/X11/fonts/Type1/,/usr/local/lib/X11/fonts/100dpi/,/usr/local/lib/X11/fonts/75dpi/" */ | 23 | /* #define COMPILEDDEFAULTFONTPATH "/usr/local/lib/X11/fonts/misc/,/usr/local/lib/X11/fonts/TTF/,/usr/local/lib/X11/fonts/OTF,/usr/local/lib/X11/fonts/Type1/,/usr/local/lib/X11/fonts/100dpi/,/usr/local/lib/X11/fonts/75dpi/" */ | |
24 | 24 | |||
25 | /* Miscellaneous server configuration files path */ | 25 | /* Miscellaneous server configuration files path */ | |
26 | #define SERVER_MISC_CONFIG_PATH "/usr/X11R7/lib/xorg" | 26 | #define SERVER_MISC_CONFIG_PATH "/usr/X11R7/lib/xorg" | |
27 | 27 | |||
28 | /* Support Composite Extension */ | 28 | /* Support Composite Extension */ | |
29 | #define COMPOSITE 1 | 29 | #define COMPOSITE 1 | |
30 | 30 | |||
31 | /* Support Damage extension */ | 31 | /* Support Damage extension */ | |
32 | #define DAMAGE 1 | 32 | #define DAMAGE 1 | |
33 | 33 | |||
34 | /* Build for darwin with Quartz support */ | 34 | /* Build for darwin with Quartz support */ | |
35 | /* #undef DARWIN_WITH_QUARTZ */ | 35 | /* #undef DARWIN_WITH_QUARTZ */ | |
36 | 36 | |||
37 | /* Use OsVendorVErrorF */ | 37 | /* Use OsVendorVErrorF */ | |
38 | /* #undef DDXOSVERRORF */ | 38 | /* #undef DDXOSVERRORF */ | |
39 | 39 | |||
40 | /* Use ddxBeforeReset */ | 40 | /* Use ddxBeforeReset */ | |
41 | /* #undef DDXBEFORERESET */ | 41 | /* #undef DDXBEFORERESET */ | |
42 | 42 | |||
43 | /* Build DPMS extension */ | 43 | /* Build DPMS extension */ | |
44 | #define DPMSExtension 1 | 44 | #define DPMSExtension 1 | |
45 | 45 | |||
46 | /* Build GLX extension */ | 46 | /* Build GLX extension */ | |
47 | #define GLXEXT 1 | 47 | #define GLXEXT 1 | |
48 | 48 | |||
49 | /* Build GLX DRI loader */ | 49 | /* Build GLX DRI loader */ | |
50 | /* #undef GLX_DRI */ | 50 | /* #undef GLX_DRI */ | |
51 | 51 | |||
52 | /* Path to DRI drivers */ | 52 | /* Path to DRI drivers */ | |
53 | #define DRI_DRIVER_PATH "/usr/X11R7/lib/modules/dri" | 53 | #define DRI_DRIVER_PATH "/usr/X11R7/lib/modules/dri" | |
54 | 54 | |||
55 | /* Support XDM-AUTH*-1 */ | 55 | /* Support XDM-AUTH*-1 */ | |
56 | #define HASXDMAUTH 1 | 56 | #define HASXDMAUTH 1 | |
57 | 57 | |||
58 | /* Define to 1 if you have the `getdtablesize' function. */ | 58 | /* Define to 1 if you have the `getdtablesize' function. */ | |
59 | #define HAS_GETDTABLESIZE 1 | 59 | #define HAS_GETDTABLESIZE 1 | |
60 | 60 | |||
61 | /* Define to 1 if you have the `getifaddrs' function. */ | 61 | /* Define to 1 if you have the `getifaddrs' function. */ | |
62 | #define HAS_GETIFADDRS 1 | 62 | #define HAS_GETIFADDRS 1 | |
63 | 63 | |||
64 | /* Define to 1 if you have the `getpeereid' function. */ | 64 | /* Define to 1 if you have the `getpeereid' function. */ | |
65 | #define HAS_GETPEEREID 1 | 65 | #define HAS_GETPEEREID 1 | |
66 | 66 | |||
67 | /* Define to 1 if you have the `getpeerucred' function. */ | 67 | /* Define to 1 if you have the `getpeerucred' function. */ | |
68 | /* #undef HAS_GETPEERUCRED */ | 68 | /* #undef HAS_GETPEERUCRED */ | |
69 | 69 | |||
70 | /* Define to 1 if you have the `mmap' function. */ | 70 | /* Define to 1 if you have the `mmap' function. */ | |
71 | #define HAS_MMAP 1 | 71 | #define HAS_MMAP 1 | |
72 | 72 | |||
73 | /* Support SHM */ | 73 | /* Support SHM */ | |
74 | #define HAS_SHM 1 | 74 | #define HAS_SHM 1 | |
75 | 75 | |||
76 | /* Have the 'strlcpy' function */ | 76 | /* Have the 'strlcpy' function */ | |
77 | #define HAS_STRLCPY 1 | 77 | #define HAS_STRLCPY 1 | |
78 | 78 | |||
79 | /* Define to 1 if you have the <asm/mtrr.h> header file. */ | 79 | /* Define to 1 if you have the <asm/mtrr.h> header file. */ | |
80 | /* #undef HAVE_ASM_MTRR_H */ | 80 | /* #undef HAVE_ASM_MTRR_H */ | |
81 | 81 | |||
82 | /* Has backtrace support */ | 82 | /* Has backtrace support */ | |
83 | /* #undef HAVE_BACKTRACE */ | 83 | /* #undef HAVE_BACKTRACE */ | |
84 | 84 | |||
85 | /* Define to 1 if you have the <byteswap.h> header file. */ | 85 | /* Define to 1 if you have the <byteswap.h> header file. */ | |
86 | /* #undef HAVE_BYTESWAP_H */ | 86 | /* #undef HAVE_BYTESWAP_H */ | |
87 | 87 | |||
88 | /* Define to 1 if you have cbrt */ | 88 | /* Define to 1 if you have cbrt */ | |
89 | #define HAVE_CBRT 1 | 89 | #define HAVE_CBRT 1 | |
90 | 90 | |||
91 | /* Define to 1 if you have the <dbm.h> header file. */ | 91 | /* Define to 1 if you have the <dbm.h> header file. */ | |
92 | /* #undef HAVE_DBM_H */ | 92 | /* #undef HAVE_DBM_H */ | |
93 | 93 | |||
94 | /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. | 94 | /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. | |
95 | */ | 95 | */ | |
96 | #define HAVE_DIRENT_H 1 | 96 | #define HAVE_DIRENT_H 1 | |
97 | 97 | |||
98 | /* Define to 1 if you have the <dlfcn.h> header file. */ | 98 | /* Define to 1 if you have the <dlfcn.h> header file. */ | |
99 | #define HAVE_DLFCN_H 1 | 99 | #define HAVE_DLFCN_H 1 | |
100 | 100 | |||
101 | /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ | 101 | /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ | |
102 | /* #undef HAVE_DOPRNT */ | 102 | /* #undef HAVE_DOPRNT */ | |
103 | 103 | |||
104 | /* Have execinfo.h */ | 104 | /* Have execinfo.h */ | |
105 | /* #undef HAVE_EXECINFO_H */ | 105 | /* #undef HAVE_EXECINFO_H */ | |
106 | 106 | |||
107 | /* Define to 1 if you have the <fcntl.h> header file. */ | 107 | /* Define to 1 if you have the <fcntl.h> header file. */ | |
108 | #define HAVE_FCNTL_H 1 | 108 | #define HAVE_FCNTL_H 1 | |
109 | 109 | |||
110 | /* Define to 1 if you have the `geteuid' function. */ | 110 | /* Define to 1 if you have the `geteuid' function. */ | |
111 | #define HAVE_GETEUID 1 | 111 | #define HAVE_GETEUID 1 | |
112 | 112 | |||
113 | /* Define to 1 if you have the `getisax' function. */ | 113 | /* Define to 1 if you have the `getisax' function. */ | |
114 | /* #undef HAVE_GETISAX */ | 114 | /* #undef HAVE_GETISAX */ | |
115 | 115 | |||
116 | /* Define to 1 if you have the `getuid' function. */ | 116 | /* Define to 1 if you have the `getuid' function. */ | |
117 | #define HAVE_GETUID 1 | 117 | #define HAVE_GETUID 1 | |
118 | 118 | |||
119 | /* Define to 1 if you have the `getzoneid' function. */ | 119 | /* Define to 1 if you have the `getzoneid' function. */ | |
120 | /* #undef HAVE_GETZONEID */ | 120 | /* #undef HAVE_GETZONEID */ | |
121 | 121 | |||
122 | /* Define to 1 if you have the <inttypes.h> header file. */ | 122 | /* Define to 1 if you have the <inttypes.h> header file. */ | |
123 | #define HAVE_INTTYPES_H 1 | 123 | #define HAVE_INTTYPES_H 1 | |
124 | 124 | |||
125 | /* Have Quartz */ | 125 | /* Have Quartz */ | |
126 | /* #undef XQUARTZ */ | 126 | /* #undef XQUARTZ */ | |
127 | 127 | |||
128 | /* Support application updating through sparkle. */ | 128 | /* Support application updating through sparkle. */ | |
129 | /* #undef XQUARTZ_SPARKLE */ | 129 | /* #undef XQUARTZ_SPARKLE */ | |
130 | 130 | |||
131 | /* Prefix to use for launchd identifiers */ | 131 | /* Prefix to use for launchd identifiers */ | |
132 | #define LAUNCHD_ID_PREFIX "org.x" | 132 | #define LAUNCHD_ID_PREFIX "org.x" | |
133 | 133 | |||
134 | /* Build a standalone xpbproxy */ | 134 | /* Build a standalone xpbproxy */ | |
135 | /* #undef STANDALONE_XPBPROXY */ | 135 | /* #undef STANDALONE_XPBPROXY */ | |
136 | 136 | |||
137 | /* Define to 1 if you have the `m' library (-lm). */ | 137 | /* Define to 1 if you have the `m' library (-lm). */ | |
138 | #define HAVE_LIBM 1 | 138 | #define HAVE_LIBM 1 | |
139 | 139 | |||
140 | /* Define to 1 if you have the `link' function. */ | 140 | /* Define to 1 if you have the `link' function. */ | |
141 | #define HAVE_LINK 1 | 141 | #define HAVE_LINK 1 | |
142 | 142 | |||
143 | /* Define to 1 if you have the <linux/agpgart.h> header file. */ | 143 | /* Define to 1 if you have the <linux/agpgart.h> header file. */ | |
144 | /* #undef HAVE_LINUX_AGPGART_H */ | 144 | /* #undef HAVE_LINUX_AGPGART_H */ | |
145 | 145 | |||
146 | /* Define to 1 if you have the <linux/apm_bios.h> header file. */ | 146 | /* Define to 1 if you have the <linux/apm_bios.h> header file. */ | |
147 | /* #undef HAVE_LINUX_APM_BIOS_H */ | 147 | /* #undef HAVE_LINUX_APM_BIOS_H */ | |
148 | 148 | |||
149 | /* Define to 1 if you have the <linux/fb.h> header file. */ | 149 | /* Define to 1 if you have the <linux/fb.h> header file. */ | |
150 | /* #undef HAVE_LINUX_FB_H */ | 150 | /* #undef HAVE_LINUX_FB_H */ | |
151 | 151 | |||
152 | /* Define to 1 if you have the `mkstemp' function. */ | 152 | /* Define to 1 if you have the `mkstemp' function. */ | |
153 | #define HAVE_MKSTEMP 1 | 153 | #define HAVE_MKSTEMP 1 | |
154 | 154 | |||
155 | /* Define to 1 if you have the <ndbm.h> header file. */ | 155 | /* Define to 1 if you have the <ndbm.h> header file. */ | |
156 | #define HAVE_NDBM_H 1 | 156 | #define HAVE_NDBM_H 1 | |
157 | 157 | |||
158 | /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ | 158 | /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ | |
159 | /* #undef HAVE_NDIR_H */ | 159 | /* #undef HAVE_NDIR_H */ | |
160 | 160 | |||
161 | /* Define to 1 if you have the <rpcsvc/dbm.h> header file. */ | 161 | /* Define to 1 if you have the <rpcsvc/dbm.h> header file. */ | |
162 | /* #undef HAVE_RPCSVC_DBM_H */ | 162 | /* #undef HAVE_RPCSVC_DBM_H */ | |
163 | 163 | |||
164 | /* Define to use libc SHA1 functions */ | 164 | /* Define to use libc SHA1 functions */ | |
165 | #define HAVE_SHA1_IN_LIBC 1 | 165 | #define HAVE_SHA1_IN_LIBC 1 | |
166 | 166 | |||
167 | /* Define to use CommonCrypto SHA1 functions */ | 167 | /* Define to use CommonCrypto SHA1 functions */ | |
168 | /* #undef HAVE_SHA1_IN_COMMONCRYPTO */ | 168 | /* #undef HAVE_SHA1_IN_COMMONCRYPTO */ | |
169 | 169 | |||
170 | /* Define to use libmd SHA1 functions */ | 170 | /* Define to use libmd SHA1 functions */ | |
171 | /* #undef HAVE_SHA1_IN_LIBMD */ | 171 | /* #undef HAVE_SHA1_IN_LIBMD */ | |
172 | 172 | |||
173 | /* Define to use libgcrypt SHA1 functions */ | 173 | /* Define to use libgcrypt SHA1 functions */ | |
174 | /* #undef HAVE_SHA1_IN_LIBGCRYPT */ | 174 | /* #undef HAVE_SHA1_IN_LIBGCRYPT */ | |
175 | 175 | |||
176 | /* Define to use libsha1 for SHA1 */ | 176 | /* Define to use libsha1 for SHA1 */ | |
177 | /* #undef HAVE_SHA1_IN_LIBSHA1 */ | 177 | /* #undef HAVE_SHA1_IN_LIBSHA1 */ | |
178 | 178 | |||
179 | /* Define to 1 if you have the `shmctl64' function. */ | 179 | /* Define to 1 if you have the `shmctl64' function. */ | |
180 | /* #undef HAVE_SHMCTL64 */ | 180 | /* #undef HAVE_SHMCTL64 */ | |
181 | 181 | |||
182 | /* Define to 1 if you have the <stdint.h> header file. */ | 182 | /* Define to 1 if you have the <stdint.h> header file. */ | |
183 | #define HAVE_STDINT_H 1 | 183 | #define HAVE_STDINT_H 1 | |
184 | 184 | |||
185 | /* Define to 1 if you have the <stdlib.h> header file. */ | 185 | /* Define to 1 if you have the <stdlib.h> header file. */ | |
186 | #define HAVE_STDLIB_H 1 | 186 | #define HAVE_STDLIB_H 1 | |
187 | 187 | |||
188 | /* Define to 1 if you have the `strchr' function. */ | 188 | /* Define to 1 if you have the `strchr' function. */ | |
189 | #define HAVE_STRCHR 1 | 189 | #define HAVE_STRCHR 1 | |
190 | 190 | |||
191 | /* Define to 1 if you have the <strings.h> header file. */ | 191 | /* Define to 1 if you have the <strings.h> header file. */ | |
192 | #define HAVE_STRINGS_H 1 | 192 | #define HAVE_STRINGS_H 1 | |
193 | 193 | |||
194 | /* Define to 1 if you have the <string.h> header file. */ | 194 | /* Define to 1 if you have the <string.h> header file. */ | |
195 | #define HAVE_STRING_H 1 | 195 | #define HAVE_STRING_H 1 | |
196 | 196 | |||
197 | /* Define to 1 if you have the `strrchr' function. */ | 197 | /* Define to 1 if you have the `strrchr' function. */ | |
198 | #define HAVE_STRRCHR 1 | 198 | #define HAVE_STRRCHR 1 | |
199 | 199 | |||
200 | /* Define to 1 if you have the `strtol' function. */ | 200 | /* Define to 1 if you have the `strtol' function. */ | |
201 | #define HAVE_STRTOL 1 | 201 | #define HAVE_STRTOL 1 | |
202 | 202 | |||
203 | /* Define to 1 if SYSV IPC is available */ | 203 | /* Define to 1 if SYSV IPC is available */ | |
204 | #define HAVE_SYSV_IPC 1 | 204 | #define HAVE_SYSV_IPC 1 | |
205 | 205 | |||
206 | /* Define to 1 if you have the <sys/agpio.h> header file. */ | 206 | /* Define to 1 if you have the <sys/agpio.h> header file. */ | |
207 | #define HAVE_SYS_AGPIO_H 1 | 207 | #define HAVE_SYS_AGPIO_H 1 | |
208 | 208 | |||
209 | /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. | 209 | /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. | |
210 | */ | 210 | */ | |
211 | /* #undef HAVE_SYS_DIR_H */ | 211 | /* #undef HAVE_SYS_DIR_H */ | |
212 | 212 | |||
213 | /* Define to 1 if you have the <sys/io.h> header file. */ | 213 | /* Define to 1 if you have the <sys/io.h> header file. */ | |
214 | /* #undef HAVE_SYS_IO_H */ | 214 | /* #undef HAVE_SYS_IO_H */ | |
215 | 215 | |||
216 | /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. | 216 | /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. | |
217 | */ | 217 | */ | |
218 | /* #undef HAVE_SYS_NDIR_H */ | 218 | /* #undef HAVE_SYS_NDIR_H */ | |
219 | 219 | |||
220 | /* Define to 1 if you have the <sys/stat.h> header file. */ | 220 | /* Define to 1 if you have the <sys/stat.h> header file. */ | |
221 | #define HAVE_SYS_STAT_H 1 | 221 | #define HAVE_SYS_STAT_H 1 | |
222 | 222 | |||
223 | /* Define to 1 if you have the <sys/types.h> header file. */ | 223 | /* Define to 1 if you have the <sys/types.h> header file. */ | |
224 | #define HAVE_SYS_TYPES_H 1 | 224 | #define HAVE_SYS_TYPES_H 1 | |
225 | 225 | |||
226 | /* Define to 1 if you have the <sys/utsname.h> header file. */ | 226 | /* Define to 1 if you have the <sys/utsname.h> header file. */ | |
227 | #define HAVE_SYS_UTSNAME_H 1 | 227 | #define HAVE_SYS_UTSNAME_H 1 | |
228 | 228 | |||
229 | /* Define to 1 if you have the <sys/vm86.h> header file. */ | 229 | /* Define to 1 if you have the <sys/vm86.h> header file. */ | |
230 | /* #undef HAVE_SYS_VM86_H */ | 230 | /* #undef HAVE_SYS_VM86_H */ | |
231 | 231 | |||
232 | /* Define to 1 if you have the `timingsafe_memcmp' function. */ | |||
233 | /* #undef HAVE_TIMINGSAFE_MEMCMP */ | |||
234 | ||||
232 | /* Define to 1 if you have the <tslib.h> header file. */ | 235 | /* Define to 1 if you have the <tslib.h> header file. */ | |
233 | /* #undef HAVE_TSLIB_H */ | 236 | /* #undef HAVE_TSLIB_H */ | |
234 | 237 | |||
235 | /* Define to 1 if you have the <unistd.h> header file. */ | 238 | /* Define to 1 if you have the <unistd.h> header file. */ | |
236 | #define HAVE_UNISTD_H 1 | 239 | #define HAVE_UNISTD_H 1 | |
237 | 240 | |||
238 | /* Define to 1 if you have the <fnmatch.h> header file. */ | 241 | /* Define to 1 if you have the <fnmatch.h> header file. */ | |
239 | #define HAVE_FNMATCH_H 1 | 242 | #define HAVE_FNMATCH_H 1 | |
240 | 243 | |||
241 | /* Have /dev/urandom */ | 244 | /* Have /dev/urandom */ | |
242 | /* #undef HAVE_URANDOM */ | 245 | /* #undef HAVE_URANDOM */ | |
243 | 246 | |||
244 | /* Define to 1 if you have the `vprintf' function. */ | 247 | /* Define to 1 if you have the `vprintf' function. */ | |
245 | #define HAVE_VPRINTF 1 | 248 | #define HAVE_VPRINTF 1 | |
246 | 249 | |||
247 | /* Define to 1 if you have the `vasprintf' function. */ | 250 | /* Define to 1 if you have the `vasprintf' function. */ | |
248 | #define HAVE_VASPRINTF 1 | 251 | #define HAVE_VASPRINTF 1 | |
249 | 252 | |||
250 | /* Support IPv6 for TCP connections */ | 253 | /* Support IPv6 for TCP connections */ | |
251 | #ifndef __NetBSD__ /* Defined by the build */ | 254 | #ifndef __NetBSD__ /* Defined by the build */ | |
252 | # define IPv6 1 | 255 | # define IPv6 1 | |
253 | #endif | 256 | #endif | |
254 | 257 | |||
255 | /* Support os-specific local connections */ | 258 | /* Support os-specific local connections */ | |
256 | /* #undef LOCALCONN */ | 259 | /* #undef LOCALCONN */ | |
257 | 260 | |||
258 | /* Support MIT-SHM Extension */ | 261 | /* Support MIT-SHM Extension */ | |
259 | #define MITSHM 1 | 262 | #define MITSHM 1 | |
260 | 263 | |||
261 | /* Enable some debugging code */ | 264 | /* Enable some debugging code */ | |
262 | /* #undef DEBUG */ | 265 | /* #undef DEBUG */ | |
263 | 266 | |||
264 | /* Name of package */ | 267 | /* Name of package */ | |
265 | #ifndef PACKAGE | 268 | #ifndef PACKAGE | |
266 | #define PACKAGE "xorg-server" | 269 | #define PACKAGE "xorg-server" | |
267 | #endif | 270 | #endif | |
268 | 271 | |||
269 | /* Internal define for Xinerama */ | 272 | /* Internal define for Xinerama */ | |
270 | #define PANORAMIX 1 | 273 | #define PANORAMIX 1 | |
271 | 274 | |||
272 | /* Overall prefix */ | 275 | /* Overall prefix */ | |
273 | /* #define PROJECTROOT "/usr/local" */ | 276 | /* #define PROJECTROOT "/usr/local" */ | |
274 | 277 | |||
275 | /* Support RANDR extension */ | 278 | /* Support RANDR extension */ | |
276 | #define RANDR 1 | 279 | #define RANDR 1 | |
277 | 280 | |||
278 | /* Support Record extension */ | 281 | /* Support Record extension */ | |
279 | #define XRECORD 1 | 282 | #define XRECORD 1 | |
280 | 283 | |||
281 | /* Support RENDER extension */ | 284 | /* Support RENDER extension */ | |
282 | #define RENDER 1 | 285 | #define RENDER 1 | |
283 | 286 | |||
284 | /* Support X resource extension */ | 287 | /* Support X resource extension */ | |
285 | #define RES 1 | 288 | #define RES 1 | |
286 | 289 | |||
287 | /* Support MIT-SCREEN-SAVER extension */ | 290 | /* Support MIT-SCREEN-SAVER extension */ | |
288 | #define SCREENSAVER 1 | 291 | #define SCREENSAVER 1 | |
289 | 292 | |||
290 | /* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */ | 293 | /* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */ | |
291 | /* #undef SECURE_RPC */ | 294 | /* #undef SECURE_RPC */ | |
292 | 295 | |||
293 | /* Support SHAPE extension */ | 296 | /* Support SHAPE extension */ | |
294 | #define SHAPE 1 | 297 | #define SHAPE 1 | |
295 | 298 | |||
296 | /* Define to 1 on systems derived from System V Release 4 */ | 299 | /* Define to 1 on systems derived from System V Release 4 */ | |
297 | /* #undef SVR4 */ | 300 | /* #undef SVR4 */ | |
298 | 301 | |||
299 | /* Support TCP socket connections */ | 302 | /* Support TCP socket connections */ | |
300 | #define TCPCONN 1 | 303 | #define TCPCONN 1 | |
301 | 304 | |||
302 | /* Enable touchscreen support */ | 305 | /* Enable touchscreen support */ | |
303 | /* #undef TOUCHSCREEN */ | 306 | /* #undef TOUCHSCREEN */ | |
304 | 307 | |||
305 | /* Support tslib touchscreen abstraction library */ | 308 | /* Support tslib touchscreen abstraction library */ | |
306 | /* #undef TSLIB */ | 309 | /* #undef TSLIB */ | |
307 | 310 | |||
308 | /* Support UNIX socket connections */ | 311 | /* Support UNIX socket connections */ | |
309 | #define UNIXCONN 1 | 312 | #define UNIXCONN 1 | |
310 | 313 | |||
311 | /* Define to use byteswap macros from <sys/endian.h> */ | 314 | /* Define to use byteswap macros from <sys/endian.h> */ | |
312 | #define USE_SYS_ENDIAN_H 1 | 315 | #define USE_SYS_ENDIAN_H 1 | |
313 | 316 | |||
314 | /* unaligned word accesses behave as expected */ | 317 | /* unaligned word accesses behave as expected */ | |
315 | /* #undef WORKING_UNALIGNED_INT */ | 318 | /* #undef WORKING_UNALIGNED_INT */ | |
316 | 319 | |||
317 | /* Build X string registry */ | 320 | /* Build X string registry */ | |
318 | #define XREGISTRY 1 | 321 | #define XREGISTRY 1 | |
319 | 322 | |||
320 | /* Build X-ACE extension */ | 323 | /* Build X-ACE extension */ | |
321 | #define XACE 1 | 324 | #define XACE 1 | |
322 | 325 | |||
323 | /* Build SELinux extension */ | 326 | /* Build SELinux extension */ | |
324 | /* #undef XSELINUX */ | 327 | /* #undef XSELINUX */ | |
325 | 328 | |||
326 | /* Support XCMisc extension */ | 329 | /* Support XCMisc extension */ | |
327 | #define XCMISC 1 | 330 | #define XCMISC 1 | |
328 | 331 | |||
329 | /* Build Security extension */ | 332 | /* Build Security extension */ | |
330 | /* #undef XCSECURITY */ | 333 | /* #undef XCSECURITY */ | |
331 | 334 | |||
332 | /* Support Xdmcp */ | 335 | /* Support Xdmcp */ | |
333 | #define XDMCP 1 | 336 | #define XDMCP 1 | |
334 | 337 | |||
335 | /* Build XFree86 BigFont extension */ | 338 | /* Build XFree86 BigFont extension */ | |
336 | /* #undef XF86BIGFONT */ | 339 | /* #undef XF86BIGFONT */ | |
337 | 340 | |||
338 | /* Support XFree86 Video Mode extension */ | 341 | /* Support XFree86 Video Mode extension */ | |
339 | #define XF86VIDMODE 1 | 342 | #define XF86VIDMODE 1 | |
340 | 343 | |||
341 | /* Support XFixes extension */ | 344 | /* Support XFixes extension */ | |
342 | #define XFIXES 1 | 345 | #define XFIXES 1 | |
343 | 346 | |||
344 | /* Build XDGA support */ | 347 | /* Build XDGA support */ | |
345 | #define XFreeXDGA 1 | 348 | #define XFreeXDGA 1 | |
346 | 349 | |||
347 | /* Support Xinerama extension */ | 350 | /* Support Xinerama extension */ | |
348 | #define XINERAMA 1 | 351 | #define XINERAMA 1 | |
349 | 352 | |||
350 | /* Vendor release */ | 353 | /* Vendor release */ | |
351 | /* #undef XORG_RELEASE */ | 354 | /* #undef XORG_RELEASE */ | |
352 | 355 | |||
353 | /* Current Xorg version */ | 356 | /* Current Xorg version */ | |
354 | #define XORG_VERSION_CURRENT (((1) * 10000000) + ((10) * 100000) + ((6) * 1000) + 0) | 357 | #define XORG_VERSION_CURRENT (((1) * 10000000) + ((10) * 100000) + ((6) * 1000) + 0) | |
355 | 358 | |||
356 | /* Xorg release date */ | 359 | /* Xorg release date */ | |
357 | #define XORG_DATE "2011-07-08" | 360 | #define XORG_DATE "2011-07-08" | |
358 | 361 | |||
359 | /* Build Xv Extension */ | 362 | /* Build Xv Extension */ | |
360 | #define XvExtension 1 | 363 | #define XvExtension 1 | |
361 | 364 | |||
362 | /* Build XvMC Extension */ | 365 | /* Build XvMC Extension */ | |
363 | #define XvMCExtension 1 | 366 | #define XvMCExtension 1 | |
364 | 367 | |||
365 | /* Support XSync extension */ | 368 | /* Support XSync extension */ | |
366 | #define XSYNC 1 | 369 | #define XSYNC 1 | |
367 | 370 | |||
368 | /* Support XTest extension */ | 371 | /* Support XTest extension */ | |
369 | #define XTEST 1 | 372 | #define XTEST 1 | |
370 | 373 | |||
371 | /* Support Xv extension */ | 374 | /* Support Xv extension */ | |
372 | #define XV 1 | 375 | #define XV 1 | |
373 | 376 | |||
374 | /* Support DRI extension */ | 377 | /* Support DRI extension */ | |
375 | #define XF86DRI 1 | 378 | #define XF86DRI 1 | |
376 | 379 | |||
377 | /* Build DRI2 extension */ | 380 | /* Build DRI2 extension */ | |
378 | #define DRI2 1 | 381 | #define DRI2 1 | |
379 | 382 | |||
380 | /* Build DBE support */ | 383 | /* Build DBE support */ | |
381 | #define DBE 1 | 384 | #define DBE 1 | |
382 | 385 | |||
383 | /* Vendor name */ | 386 | /* Vendor name */ | |
384 | #define XVENDORNAME "The X.Org Foundation" | 387 | #define XVENDORNAME "The X.Org Foundation" | |
385 | 388 | |||
386 | /* Enable GNU and other extensions to the C environment for GLIBC */ | 389 | /* Enable GNU and other extensions to the C environment for GLIBC */ | |
387 | /* #undef _GNU_SOURCE */ | 390 | /* #undef _GNU_SOURCE */ | |
388 | 391 | |||
389 | /* Define to empty if `const' does not conform to ANSI C. */ | 392 | /* Define to empty if `const' does not conform to ANSI C. */ | |
390 | /* #undef const */ | 393 | /* #undef const */ | |
391 | 394 | |||
392 | /* Define to `int' if <sys/types.h> does not define. */ | 395 | /* Define to `int' if <sys/types.h> does not define. */ | |
393 | /* #undef pid_t */ | 396 | /* #undef pid_t */ | |
394 | 397 | |||
395 | /* Build Rootless code */ | 398 | /* Build Rootless code */ | |
396 | /* #undef ROOTLESS */ | 399 | /* #undef ROOTLESS */ | |
397 | 400 | |||
398 | /* Define to 1 if unsigned long is 64 bits. */ | 401 | /* Define to 1 if unsigned long is 64 bits. */ | |
399 | #ifdef _LP64 | 402 | #ifdef _LP64 | |
400 | #define _XSERVER64 1 | 403 | #define _XSERVER64 1 | |
401 | #endif | 404 | #endif | |
402 | 405 | |||
403 | /* System is BSD-like */ | 406 | /* System is BSD-like */ | |
404 | #define CSRG_BASED 1 | 407 | #define CSRG_BASED 1 | |
405 | 408 | |||
406 | /* Define to 1 if `struct sockaddr_in' has a `sin_len' member */ | 409 | /* Define to 1 if `struct sockaddr_in' has a `sin_len' member */ | |
407 | #define BSD44SOCKETS 1 | 410 | #define BSD44SOCKETS 1 | |
408 | 411 | |||
409 | /* Support D-Bus */ | 412 | /* Support D-Bus */ | |
410 | /* #undef HAVE_DBUS */ | 413 | /* #undef HAVE_DBUS */ | |
411 | 414 | |||
412 | /* Use libudev for input hotplug */ | 415 | /* Use libudev for input hotplug */ | |
413 | /* #undef CONFIG_UDEV */ | 416 | /* #undef CONFIG_UDEV */ | |
414 | 417 | |||
415 | /* Use D-Bus for input hotplug */ | 418 | /* Use D-Bus for input hotplug */ | |
416 | /* #undef CONFIG_NEED_DBUS */ | 419 | /* #undef CONFIG_NEED_DBUS */ | |
417 | 420 | |||
418 | /* Support the D-Bus hotplug API */ | 421 | /* Support the D-Bus hotplug API */ | |
419 | /* #undef CONFIG_DBUS_API */ | 422 | /* #undef CONFIG_DBUS_API */ | |
420 | 423 | |||
421 | /* Support HAL for hotplug */ | 424 | /* Support HAL for hotplug */ | |
422 | /* #undef CONFIG_HAL */ | 425 | /* #undef CONFIG_HAL */ | |
423 | 426 | |||
424 | /* Have a monotonic clock from clock_gettime() */ | 427 | /* Have a monotonic clock from clock_gettime() */ | |
425 | #define MONOTONIC_CLOCK 1 | 428 | #define MONOTONIC_CLOCK 1 | |
426 | 429 | |||
427 | /* Define to 1 if the DTrace Xserver provider probes should be built in */ | 430 | /* Define to 1 if the DTrace Xserver provider probes should be built in */ | |
428 | /* #undef XSERVER_DTRACE */ | 431 | /* #undef XSERVER_DTRACE */ | |
429 | 432 | |||
430 | /* Define to 16-bit byteswap macro */ | 433 | /* Define to 16-bit byteswap macro */ | |
431 | #define bswap_16 bswap16 | 434 | #define bswap_16 bswap16 | |
432 | 435 | |||
433 | /* Define to 32-bit byteswap macro */ | 436 | /* Define to 32-bit byteswap macro */ | |
434 | #define bswap_32 bswap32 | 437 | #define bswap_32 bswap32 | |
435 | 438 | |||
436 | /* Define to 64-bit byteswap macro */ | 439 | /* Define to 64-bit byteswap macro */ | |
437 | #define bswap_64 bswap64 | 440 | #define bswap_64 bswap64 | |
438 | 441 | |||
439 | /* Need the strcasecmp function. */ | 442 | /* Need the strcasecmp function. */ | |
440 | /* #undef NEED_STRCASECMP */ | 443 | /* #undef NEED_STRCASECMP */ | |
441 | 444 | |||
442 | /* Need the strncasecmp function. */ | 445 | /* Need the strncasecmp function. */ | |
443 | /* #undef NEED_STRNCASECMP */ | 446 | /* #undef NEED_STRNCASECMP */ | |
444 | 447 | |||
445 | /* Need the strcasestr function. */ | 448 | /* Need the strcasestr function. */ | |
446 | /* #undef NEED_STRCASESTR */ | 449 | /* #undef NEED_STRCASESTR */ | |
447 | 450 | |||
448 | /* Define to 1 if you have the `ffs' function. */ | 451 | /* Define to 1 if you have the `ffs' function. */ | |
449 | #define HAVE_FFS 1 | 452 | #define HAVE_FFS 1 | |
450 | 453 | |||
451 | /* If the compiler supports a TLS storage class define it to that here */ | 454 | /* If the compiler supports a TLS storage class define it to that here */ | |
452 | /* #undef TLS */ | 455 | /* #undef TLS */ | |
453 | 456 | |||
454 | /* Correctly set _XSERVER64 for OSX fat binaries */ | 457 | /* Correctly set _XSERVER64 for OSX fat binaries */ | |
455 | #ifdef __APPLE__ | 458 | #ifdef __APPLE__ | |
456 | #include "dix-config-apple-verbatim.h" | 459 | #include "dix-config-apple-verbatim.h" | |
457 | #endif | 460 | #endif | |
458 | 461 | |||
459 | #endif /* _DIX_CONFIG_H_ */ | 462 | #endif /* _DIX_CONFIG_H_ */ |