Commit state of repository at time of OOPSLA 2015 submission.
[satcheck.git] / clang / test / apr_1_unannotated.c
1 /* Adapted from the sources of the Apache Portable Runtime library version 1.5.1:\r
2  * https://apr.apache.org/\r
3  */\r
4 \r
5 /* BOUND 5 */\r
6 # 1 "main1.c"\r
7 # 1 "<built-in>" 1\r
8 # 1 "<built-in>" 3\r
9 # 312 "<built-in>" 3\r
10 # 1 "<command line>" 1\r
11 # 1 "<built-in>" 2\r
12 # 1 "main1.c" 2\r
13 \r
14 # 1 "/usr/include/assert.h" 1 3 4\r
15 # 35 "/usr/include/assert.h" 3 4\r
16 # 1 "/usr/include/features.h" 1 3 4\r
17 # 352 "/usr/include/features.h" 3 4\r
18 # 1 "/usr/include/stdc-predef.h" 1 3 4\r
19 # 353 "/usr/include/features.h" 2 3 4\r
20 # 374 "/usr/include/features.h" 3 4\r
21 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4\r
22 # 385 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4\r
23 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
24 # 386 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4\r
25 # 375 "/usr/include/features.h" 2 3 4\r
26 # 398 "/usr/include/features.h" 3 4\r
27 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4\r
28 # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4\r
29 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4\r
30 # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4\r
31 # 399 "/usr/include/features.h" 2 3 4\r
32 # 36 "/usr/include/assert.h" 2 3 4\r
33 # 69 "/usr/include/assert.h" 3 4\r
34 extern void __assert_fail (const char *__assertion, const char *__file,\r
35       unsigned int __line, const char *__function)\r
36      __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
37 \r
38 \r
39 extern void __assert_perror_fail (int __errnum, const char *__file,\r
40       unsigned int __line, const char *__function)\r
41      __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
42 \r
43 \r
44 \r
45 \r
46 extern void __assert (const char *__assertion, const char *__file, int __line)\r
47      __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
48 # 3 "main1.c" 2\r
49 \r
50 \r
51 \r
52 \r
53 # 1 "./../test/abts.h" 1\r
54 # 21 "./../test/abts.h"\r
55 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 1 3\r
56 # 30 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 3\r
57 typedef __builtin_va_list va_list;\r
58 # 50 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 3\r
59 typedef __builtin_va_list __gnuc_va_list;\r
60 # 22 "./../test/abts.h" 2\r
61 # 1 "/usr/include/stdio.h" 1 3 4\r
62 # 33 "/usr/include/stdio.h" 3 4\r
63 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
64 # 58 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 3 4\r
65 typedef long unsigned int size_t;\r
66 # 34 "/usr/include/stdio.h" 2 3 4\r
67 \r
68 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4\r
69 # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4\r
70 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
71 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4\r
72 \r
73 \r
74 typedef unsigned char __u_char;\r
75 typedef unsigned short int __u_short;\r
76 typedef unsigned int __u_int;\r
77 typedef unsigned long int __u_long;\r
78 \r
79 \r
80 typedef signed char __int8_t;\r
81 typedef unsigned char __uint8_t;\r
82 typedef signed short int __int16_t;\r
83 typedef unsigned short int __uint16_t;\r
84 typedef signed int __int32_t;\r
85 typedef unsigned int __uint32_t;\r
86 \r
87 typedef signed long int __int64_t;\r
88 typedef unsigned long int __uint64_t;\r
89 \r
90 \r
91 \r
92 \r
93 \r
94 \r
95 \r
96 typedef long int __quad_t;\r
97 typedef unsigned long int __u_quad_t;\r
98 # 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4\r
99 # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4\r
100 # 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4\r
101 \r
102 \r
103 typedef unsigned long int __dev_t;\r
104 typedef unsigned int __uid_t;\r
105 typedef unsigned int __gid_t;\r
106 typedef unsigned long int __ino_t;\r
107 typedef unsigned long int __ino64_t;\r
108 typedef unsigned int __mode_t;\r
109 typedef unsigned long int __nlink_t;\r
110 typedef long int __off_t;\r
111 typedef long int __off64_t;\r
112 typedef int __pid_t;\r
113 typedef struct { int __val[2]; } __fsid_t;\r
114 typedef long int __clock_t;\r
115 typedef unsigned long int __rlim_t;\r
116 typedef unsigned long int __rlim64_t;\r
117 typedef unsigned int __id_t;\r
118 typedef long int __time_t;\r
119 typedef unsigned int __useconds_t;\r
120 typedef long int __suseconds_t;\r
121 \r
122 typedef int __daddr_t;\r
123 typedef int __key_t;\r
124 \r
125 \r
126 typedef int __clockid_t;\r
127 \r
128 \r
129 typedef void * __timer_t;\r
130 \r
131 \r
132 typedef long int __blksize_t;\r
133 \r
134 \r
135 \r
136 \r
137 typedef long int __blkcnt_t;\r
138 typedef long int __blkcnt64_t;\r
139 \r
140 \r
141 typedef unsigned long int __fsblkcnt_t;\r
142 typedef unsigned long int __fsblkcnt64_t;\r
143 \r
144 \r
145 typedef unsigned long int __fsfilcnt_t;\r
146 typedef unsigned long int __fsfilcnt64_t;\r
147 \r
148 \r
149 typedef long int __fsword_t;\r
150 \r
151 typedef long int __ssize_t;\r
152 \r
153 \r
154 typedef long int __syscall_slong_t;\r
155 \r
156 typedef unsigned long int __syscall_ulong_t;\r
157 \r
158 \r
159 \r
160 typedef __off64_t __loff_t;\r
161 typedef __quad_t *__qaddr_t;\r
162 typedef char *__caddr_t;\r
163 \r
164 \r
165 typedef long int __intptr_t;\r
166 \r
167 \r
168 typedef unsigned int __socklen_t;\r
169 # 36 "/usr/include/stdio.h" 2 3 4\r
170 \r
171 \r
172 \r
173 \r
174 \r
175 \r
176 \r
177 \r
178 struct _IO_FILE;\r
179 \r
180 \r
181 \r
182 typedef struct _IO_FILE FILE;\r
183 # 64 "/usr/include/stdio.h" 3 4\r
184 typedef struct _IO_FILE __FILE;\r
185 # 74 "/usr/include/stdio.h" 3 4\r
186 # 1 "/usr/include/libio.h" 1 3 4\r
187 # 31 "/usr/include/libio.h" 3 4\r
188 # 1 "/usr/include/_G_config.h" 1 3 4\r
189 # 15 "/usr/include/_G_config.h" 3 4\r
190 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
191 # 16 "/usr/include/_G_config.h" 2 3 4\r
192 \r
193 \r
194 \r
195 \r
196 # 1 "/usr/include/wchar.h" 1 3 4\r
197 # 82 "/usr/include/wchar.h" 3 4\r
198 typedef struct\r
199 {\r
200   int __count;\r
201   union\r
202   {\r
203 \r
204     unsigned int __wch;\r
205 \r
206 \r
207 \r
208     char __wchb[4];\r
209   } __value;\r
210 } __mbstate_t;\r
211 # 21 "/usr/include/_G_config.h" 2 3 4\r
212 typedef struct\r
213 {\r
214   __off_t __pos;\r
215   __mbstate_t __state;\r
216 } _G_fpos_t;\r
217 typedef struct\r
218 {\r
219   __off64_t __pos;\r
220   __mbstate_t __state;\r
221 } _G_fpos64_t;\r
222 # 32 "/usr/include/libio.h" 2 3 4\r
223 # 144 "/usr/include/libio.h" 3 4\r
224 struct _IO_jump_t; struct _IO_FILE;\r
225 # 154 "/usr/include/libio.h" 3 4\r
226 typedef void _IO_lock_t;\r
227 \r
228 \r
229 \r
230 \r
231 \r
232 struct _IO_marker {\r
233   struct _IO_marker *_next;\r
234   struct _IO_FILE *_sbuf;\r
235 \r
236 \r
237 \r
238   int _pos;\r
239 # 177 "/usr/include/libio.h" 3 4\r
240 };\r
241 \r
242 \r
243 enum __codecvt_result\r
244 {\r
245   __codecvt_ok,\r
246   __codecvt_partial,\r
247   __codecvt_error,\r
248   __codecvt_noconv\r
249 };\r
250 # 245 "/usr/include/libio.h" 3 4\r
251 struct _IO_FILE {\r
252   int _flags;\r
253 \r
254 \r
255 \r
256 \r
257   char* _IO_read_ptr;\r
258   char* _IO_read_end;\r
259   char* _IO_read_base;\r
260   char* _IO_write_base;\r
261   char* _IO_write_ptr;\r
262   char* _IO_write_end;\r
263   char* _IO_buf_base;\r
264   char* _IO_buf_end;\r
265 \r
266   char *_IO_save_base;\r
267   char *_IO_backup_base;\r
268   char *_IO_save_end;\r
269 \r
270   struct _IO_marker *_markers;\r
271 \r
272   struct _IO_FILE *_chain;\r
273 \r
274   int _fileno;\r
275 \r
276 \r
277 \r
278   int _flags2;\r
279 \r
280   __off_t _old_offset;\r
281 \r
282 \r
283 \r
284   unsigned short _cur_column;\r
285   signed char _vtable_offset;\r
286   char _shortbuf[1];\r
287 \r
288 \r
289 \r
290   _IO_lock_t *_lock;\r
291 # 293 "/usr/include/libio.h" 3 4\r
292   __off64_t _offset;\r
293 # 302 "/usr/include/libio.h" 3 4\r
294   void *__pad1;\r
295   void *__pad2;\r
296   void *__pad3;\r
297   void *__pad4;\r
298   size_t __pad5;\r
299 \r
300   int _mode;\r
301 \r
302   char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];\r
303 \r
304 };\r
305 \r
306 \r
307 typedef struct _IO_FILE _IO_FILE;\r
308 \r
309 \r
310 struct _IO_FILE_plus;\r
311 \r
312 extern struct _IO_FILE_plus _IO_2_1_stdin_;\r
313 extern struct _IO_FILE_plus _IO_2_1_stdout_;\r
314 extern struct _IO_FILE_plus _IO_2_1_stderr_;\r
315 # 338 "/usr/include/libio.h" 3 4\r
316 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);\r
317 \r
318 \r
319 \r
320 \r
321 \r
322 \r
323 \r
324 typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,\r
325      size_t __n);\r
326 \r
327 \r
328 \r
329 \r
330 \r
331 \r
332 \r
333 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);\r
334 \r
335 \r
336 typedef int __io_close_fn (void *__cookie);\r
337 # 390 "/usr/include/libio.h" 3 4\r
338 extern int __underflow (_IO_FILE *);\r
339 extern int __uflow (_IO_FILE *);\r
340 extern int __overflow (_IO_FILE *, int);\r
341 # 434 "/usr/include/libio.h" 3 4\r
342 extern int _IO_getc (_IO_FILE *__fp);\r
343 extern int _IO_putc (int __c, _IO_FILE *__fp);\r
344 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ ));\r
345 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ ));\r
346 \r
347 extern int _IO_peekc_locked (_IO_FILE *__fp);\r
348 \r
349 \r
350 \r
351 \r
352 \r
353 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
354 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
355 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
356 # 464 "/usr/include/libio.h" 3 4\r
357 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,\r
358    __gnuc_va_list, int *__restrict);\r
359 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,\r
360     __gnuc_va_list);\r
361 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);\r
362 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);\r
363 \r
364 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);\r
365 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);\r
366 \r
367 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
368 # 75 "/usr/include/stdio.h" 2 3 4\r
369 \r
370 \r
371 \r
372 \r
373 typedef __gnuc_va_list va_list;\r
374 # 90 "/usr/include/stdio.h" 3 4\r
375 typedef __off_t off_t;\r
376 # 102 "/usr/include/stdio.h" 3 4\r
377 typedef __ssize_t ssize_t;\r
378 \r
379 \r
380 \r
381 \r
382 \r
383 \r
384 \r
385 typedef _G_fpos_t fpos_t;\r
386 # 164 "/usr/include/stdio.h" 3 4\r
387 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4\r
388 # 165 "/usr/include/stdio.h" 2 3 4\r
389 \r
390 \r
391 \r
392 extern struct _IO_FILE *stdin;\r
393 extern struct _IO_FILE *stdout;\r
394 extern struct _IO_FILE *stderr;\r
395 \r
396 \r
397 \r
398 \r
399 \r
400 \r
401 \r
402 extern int remove (const char *__filename) __attribute__ ((__nothrow__ ));\r
403 \r
404 extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ ));\r
405 \r
406 \r
407 \r
408 \r
409 extern int renameat (int __oldfd, const char *__old, int __newfd,\r
410        const char *__new) __attribute__ ((__nothrow__ ));\r
411 # 195 "/usr/include/stdio.h" 3 4\r
412 extern FILE *tmpfile (void) ;\r
413 # 209 "/usr/include/stdio.h" 3 4\r
414 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ )) ;\r
415 \r
416 \r
417 \r
418 \r
419 \r
420 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ )) ;\r
421 # 227 "/usr/include/stdio.h" 3 4\r
422 extern char *tempnam (const char *__dir, const char *__pfx)\r
423      __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
424 # 237 "/usr/include/stdio.h" 3 4\r
425 extern int fclose (FILE *__stream);\r
426 \r
427 \r
428 \r
429 \r
430 extern int fflush (FILE *__stream);\r
431 # 252 "/usr/include/stdio.h" 3 4\r
432 extern int fflush_unlocked (FILE *__stream);\r
433 # 272 "/usr/include/stdio.h" 3 4\r
434 extern FILE *fopen (const char *__restrict __filename,\r
435       const char *__restrict __modes) ;\r
436 \r
437 \r
438 \r
439 \r
440 extern FILE *freopen (const char *__restrict __filename,\r
441         const char *__restrict __modes,\r
442         FILE *__restrict __stream) ;\r
443 # 306 "/usr/include/stdio.h" 3 4\r
444 extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ )) ;\r
445 # 319 "/usr/include/stdio.h" 3 4\r
446 extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)\r
447   __attribute__ ((__nothrow__ )) ;\r
448 \r
449 \r
450 \r
451 \r
452 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ )) ;\r
453 \r
454 \r
455 \r
456 \r
457 \r
458 \r
459 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
460 \r
461 \r
462 \r
463 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,\r
464       int __modes, size_t __n) __attribute__ ((__nothrow__ ));\r
465 \r
466 \r
467 \r
468 \r
469 \r
470 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,\r
471          size_t __size) __attribute__ ((__nothrow__ ));\r
472 \r
473 \r
474 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ ));\r
475 # 356 "/usr/include/stdio.h" 3 4\r
476 extern int fprintf (FILE *__restrict __stream,\r
477       const char *__restrict __format, ...);\r
478 \r
479 \r
480 \r
481 \r
482 extern int printf (const char *__restrict __format, ...);\r
483 \r
484 extern int sprintf (char *__restrict __s,\r
485       const char *__restrict __format, ...) __attribute__ ((__nothrow__));\r
486 \r
487 \r
488 \r
489 \r
490 \r
491 extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,\r
492        __gnuc_va_list __arg);\r
493 \r
494 \r
495 \r
496 \r
497 extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);\r
498 \r
499 extern int vsprintf (char *__restrict __s, const char *__restrict __format,\r
500        __gnuc_va_list __arg) __attribute__ ((__nothrow__));\r
501 \r
502 \r
503 \r
504 \r
505 \r
506 extern int snprintf (char *__restrict __s, size_t __maxlen,\r
507        const char *__restrict __format, ...)\r
508      __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));\r
509 \r
510 extern int vsnprintf (char *__restrict __s, size_t __maxlen,\r
511         const char *__restrict __format, __gnuc_va_list __arg)\r
512      __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));\r
513 # 412 "/usr/include/stdio.h" 3 4\r
514 extern int vdprintf (int __fd, const char *__restrict __fmt,\r
515        __gnuc_va_list __arg)\r
516      __attribute__ ((__format__ (__printf__, 2, 0)));\r
517 extern int dprintf (int __fd, const char *__restrict __fmt, ...)\r
518      __attribute__ ((__format__ (__printf__, 2, 3)));\r
519 # 425 "/usr/include/stdio.h" 3 4\r
520 extern int fscanf (FILE *__restrict __stream,\r
521      const char *__restrict __format, ...) ;\r
522 \r
523 \r
524 \r
525 \r
526 extern int scanf (const char *__restrict __format, ...) ;\r
527 \r
528 extern int sscanf (const char *__restrict __s,\r
529      const char *__restrict __format, ...) __attribute__ ((__nothrow__ ));\r
530 # 443 "/usr/include/stdio.h" 3 4\r
531 extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") ;\r
532 \r
533 \r
534 extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") ;\r
535 \r
536 extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ ));\r
537 # 471 "/usr/include/stdio.h" 3 4\r
538 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,\r
539       __gnuc_va_list __arg)\r
540      __attribute__ ((__format__ (__scanf__, 2, 0))) ;\r
541 \r
542 \r
543 \r
544 \r
545 \r
546 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)\r
547      __attribute__ ((__format__ (__scanf__, 1, 0))) ;\r
548 \r
549 \r
550 extern int vsscanf (const char *__restrict __s,\r
551       const char *__restrict __format, __gnuc_va_list __arg)\r
552      __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__scanf__, 2, 0)));\r
553 # 494 "/usr/include/stdio.h" 3 4\r
554 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")\r
555 \r
556 \r
557 \r
558      __attribute__ ((__format__ (__scanf__, 2, 0))) ;\r
559 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")\r
560 \r
561      __attribute__ ((__format__ (__scanf__, 1, 0))) ;\r
562 extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ ))\r
563 \r
564 \r
565 \r
566      __attribute__ ((__format__ (__scanf__, 2, 0)));\r
567 # 531 "/usr/include/stdio.h" 3 4\r
568 extern int fgetc (FILE *__stream);\r
569 extern int getc (FILE *__stream);\r
570 \r
571 \r
572 \r
573 \r
574 \r
575 extern int getchar (void);\r
576 # 550 "/usr/include/stdio.h" 3 4\r
577 extern int getc_unlocked (FILE *__stream);\r
578 extern int getchar_unlocked (void);\r
579 # 561 "/usr/include/stdio.h" 3 4\r
580 extern int fgetc_unlocked (FILE *__stream);\r
581 # 573 "/usr/include/stdio.h" 3 4\r
582 extern int fputc (int __c, FILE *__stream);\r
583 extern int putc (int __c, FILE *__stream);\r
584 \r
585 \r
586 \r
587 \r
588 \r
589 extern int putchar (int __c);\r
590 # 594 "/usr/include/stdio.h" 3 4\r
591 extern int fputc_unlocked (int __c, FILE *__stream);\r
592 \r
593 \r
594 \r
595 \r
596 \r
597 \r
598 \r
599 extern int putc_unlocked (int __c, FILE *__stream);\r
600 extern int putchar_unlocked (int __c);\r
601 \r
602 \r
603 \r
604 \r
605 \r
606 \r
607 extern int getw (FILE *__stream);\r
608 \r
609 \r
610 extern int putw (int __w, FILE *__stream);\r
611 # 622 "/usr/include/stdio.h" 3 4\r
612 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)\r
613           ;\r
614 # 638 "/usr/include/stdio.h" 3 4\r
615 extern char *gets (char *__s) __attribute__ ((__deprecated__));\r
616 # 665 "/usr/include/stdio.h" 3 4\r
617 extern __ssize_t __getdelim (char **__restrict __lineptr,\r
618           size_t *__restrict __n, int __delimiter,\r
619           FILE *__restrict __stream) ;\r
620 extern __ssize_t getdelim (char **__restrict __lineptr,\r
621         size_t *__restrict __n, int __delimiter,\r
622         FILE *__restrict __stream) ;\r
623 \r
624 \r
625 \r
626 \r
627 \r
628 \r
629 \r
630 extern __ssize_t getline (char **__restrict __lineptr,\r
631        size_t *__restrict __n,\r
632        FILE *__restrict __stream) ;\r
633 # 689 "/usr/include/stdio.h" 3 4\r
634 extern int fputs (const char *__restrict __s, FILE *__restrict __stream);\r
635 \r
636 \r
637 \r
638 \r
639 \r
640 extern int puts (const char *__s);\r
641 \r
642 \r
643 \r
644 \r
645 \r
646 \r
647 extern int ungetc (int __c, FILE *__stream);\r
648 \r
649 \r
650 \r
651 \r
652 \r
653 \r
654 extern size_t fread (void *__restrict __ptr, size_t __size,\r
655        size_t __n, FILE *__restrict __stream) ;\r
656 \r
657 \r
658 \r
659 \r
660 extern size_t fwrite (const void *__restrict __ptr, size_t __size,\r
661         size_t __n, FILE *__restrict __s);\r
662 # 737 "/usr/include/stdio.h" 3 4\r
663 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,\r
664          size_t __n, FILE *__restrict __stream) ;\r
665 extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,\r
666           size_t __n, FILE *__restrict __stream);\r
667 # 749 "/usr/include/stdio.h" 3 4\r
668 extern int fseek (FILE *__stream, long int __off, int __whence);\r
669 \r
670 \r
671 \r
672 \r
673 extern long int ftell (FILE *__stream) ;\r
674 \r
675 \r
676 \r
677 \r
678 extern void rewind (FILE *__stream);\r
679 # 773 "/usr/include/stdio.h" 3 4\r
680 extern int fseeko (FILE *__stream, __off_t __off, int __whence);\r
681 \r
682 \r
683 \r
684 \r
685 extern __off_t ftello (FILE *__stream) ;\r
686 # 798 "/usr/include/stdio.h" 3 4\r
687 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);\r
688 \r
689 \r
690 \r
691 \r
692 extern int fsetpos (FILE *__stream, const fpos_t *__pos);\r
693 # 826 "/usr/include/stdio.h" 3 4\r
694 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ ));\r
695 \r
696 extern int feof (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
697 \r
698 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
699 \r
700 \r
701 \r
702 \r
703 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ ));\r
704 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
705 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
706 # 846 "/usr/include/stdio.h" 3 4\r
707 extern void perror (const char *__s);\r
708 \r
709 \r
710 \r
711 \r
712 \r
713 \r
714 \r
715 # 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4\r
716 # 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4\r
717 extern int sys_nerr;\r
718 extern const char *const sys_errlist[];\r
719 # 854 "/usr/include/stdio.h" 2 3 4\r
720 \r
721 \r
722 \r
723 \r
724 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
725 \r
726 \r
727 \r
728 \r
729 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
730 # 873 "/usr/include/stdio.h" 3 4\r
731 extern FILE *popen (const char *__command, const char *__modes) ;\r
732 \r
733 \r
734 \r
735 \r
736 \r
737 extern int pclose (FILE *__stream);\r
738 \r
739 \r
740 \r
741 \r
742 \r
743 extern char *ctermid (char *__s) __attribute__ ((__nothrow__ ));\r
744 # 913 "/usr/include/stdio.h" 3 4\r
745 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ ));\r
746 \r
747 \r
748 \r
749 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
750 \r
751 \r
752 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ ));\r
753 # 23 "./../test/abts.h" 2\r
754 # 1 "/usr/include/stdlib.h" 1 3 4\r
755 # 32 "/usr/include/stdlib.h" 3 4\r
756 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
757 # 86 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 3 4\r
758 typedef int wchar_t;\r
759 # 33 "/usr/include/stdlib.h" 2 3 4\r
760 \r
761 \r
762 \r
763 \r
764 \r
765 \r
766 \r
767 \r
768 # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4\r
769 # 50 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4\r
770 typedef enum\r
771 {\r
772   P_ALL,\r
773   P_PID,\r
774   P_PGID\r
775 } idtype_t;\r
776 # 42 "/usr/include/stdlib.h" 2 3 4\r
777 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4\r
778 # 64 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4\r
779 # 1 "/usr/include/endian.h" 1 3 4\r
780 # 36 "/usr/include/endian.h" 3 4\r
781 # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4\r
782 # 37 "/usr/include/endian.h" 2 3 4\r
783 # 60 "/usr/include/endian.h" 3 4\r
784 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4\r
785 # 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4\r
786 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
787 # 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4\r
788 \r
789 \r
790 \r
791 \r
792 \r
793 \r
794 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4\r
795 # 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4\r
796 # 61 "/usr/include/endian.h" 2 3 4\r
797 # 65 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 2 3 4\r
798 \r
799 union wait\r
800   {\r
801     int w_status;\r
802     struct\r
803       {\r
804 \r
805  unsigned int __w_termsig:7;\r
806  unsigned int __w_coredump:1;\r
807  unsigned int __w_retcode:8;\r
808  unsigned int:16;\r
809 \r
810 \r
811 \r
812 \r
813 \r
814 \r
815 \r
816       } __wait_terminated;\r
817     struct\r
818       {\r
819 \r
820  unsigned int __w_stopval:8;\r
821  unsigned int __w_stopsig:8;\r
822  unsigned int:16;\r
823 \r
824 \r
825 \r
826 \r
827 \r
828 \r
829       } __wait_stopped;\r
830   };\r
831 # 43 "/usr/include/stdlib.h" 2 3 4\r
832 # 67 "/usr/include/stdlib.h" 3 4\r
833 typedef union\r
834   {\r
835     union wait *__uptr;\r
836     int *__iptr;\r
837   } __WAIT_STATUS __attribute__ ((__transparent_union__));\r
838 # 97 "/usr/include/stdlib.h" 3 4\r
839 typedef struct\r
840   {\r
841     int quot;\r
842     int rem;\r
843   } div_t;\r
844 \r
845 \r
846 \r
847 typedef struct\r
848   {\r
849     long int quot;\r
850     long int rem;\r
851   } ldiv_t;\r
852 \r
853 \r
854 \r
855 \r
856 \r
857 \r
858 \r
859 __extension__ typedef struct\r
860   {\r
861     long long int quot;\r
862     long long int rem;\r
863   } lldiv_t;\r
864 # 139 "/usr/include/stdlib.h" 3 4\r
865 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ )) ;\r
866 \r
867 \r
868 \r
869 \r
870 extern double atof (const char *__nptr)\r
871      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
872 \r
873 extern int atoi (const char *__nptr)\r
874      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
875 \r
876 extern long int atol (const char *__nptr)\r
877      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
878 \r
879 \r
880 \r
881 \r
882 \r
883 __extension__ extern long long int atoll (const char *__nptr)\r
884      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
885 \r
886 \r
887 \r
888 \r
889 \r
890 extern double strtod (const char *__restrict __nptr,\r
891         char **__restrict __endptr)\r
892      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
893 \r
894 \r
895 \r
896 \r
897 \r
898 extern float strtof (const char *__restrict __nptr,\r
899        char **__restrict __endptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
900 \r
901 extern long double strtold (const char *__restrict __nptr,\r
902        char **__restrict __endptr)\r
903      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
904 \r
905 \r
906 \r
907 \r
908 \r
909 extern long int strtol (const char *__restrict __nptr,\r
910    char **__restrict __endptr, int __base)\r
911      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
912 \r
913 extern unsigned long int strtoul (const char *__restrict __nptr,\r
914       char **__restrict __endptr, int __base)\r
915      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
916 \r
917 \r
918 \r
919 \r
920 __extension__\r
921 extern long long int strtoq (const char *__restrict __nptr,\r
922         char **__restrict __endptr, int __base)\r
923      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
924 \r
925 __extension__\r
926 extern unsigned long long int strtouq (const char *__restrict __nptr,\r
927            char **__restrict __endptr, int __base)\r
928      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
929 \r
930 \r
931 \r
932 \r
933 \r
934 __extension__\r
935 extern long long int strtoll (const char *__restrict __nptr,\r
936          char **__restrict __endptr, int __base)\r
937      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
938 \r
939 __extension__\r
940 extern unsigned long long int strtoull (const char *__restrict __nptr,\r
941      char **__restrict __endptr, int __base)\r
942      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
943 # 305 "/usr/include/stdlib.h" 3 4\r
944 extern char *l64a (long int __n) __attribute__ ((__nothrow__ )) ;\r
945 \r
946 \r
947 extern long int a64l (const char *__s)\r
948      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
949 \r
950 \r
951 \r
952 \r
953 \r
954 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4\r
955 # 33 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
956 typedef __u_char u_char;\r
957 typedef __u_short u_short;\r
958 typedef __u_int u_int;\r
959 typedef __u_long u_long;\r
960 typedef __quad_t quad_t;\r
961 typedef __u_quad_t u_quad_t;\r
962 typedef __fsid_t fsid_t;\r
963 \r
964 \r
965 \r
966 \r
967 typedef __loff_t loff_t;\r
968 \r
969 \r
970 \r
971 typedef __ino_t ino_t;\r
972 # 60 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
973 typedef __dev_t dev_t;\r
974 \r
975 \r
976 \r
977 \r
978 typedef __gid_t gid_t;\r
979 \r
980 \r
981 \r
982 \r
983 typedef __mode_t mode_t;\r
984 \r
985 \r
986 \r
987 \r
988 typedef __nlink_t nlink_t;\r
989 \r
990 \r
991 \r
992 \r
993 typedef __uid_t uid_t;\r
994 # 98 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
995 typedef __pid_t pid_t;\r
996 \r
997 \r
998 \r
999 \r
1000 \r
1001 typedef __id_t id_t;\r
1002 # 115 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1003 typedef __daddr_t daddr_t;\r
1004 typedef __caddr_t caddr_t;\r
1005 \r
1006 \r
1007 \r
1008 \r
1009 \r
1010 typedef __key_t key_t;\r
1011 # 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1012 # 1 "/usr/include/time.h" 1 3 4\r
1013 # 59 "/usr/include/time.h" 3 4\r
1014 typedef __clock_t clock_t;\r
1015 # 75 "/usr/include/time.h" 3 4\r
1016 typedef __time_t time_t;\r
1017 # 91 "/usr/include/time.h" 3 4\r
1018 typedef __clockid_t clockid_t;\r
1019 # 103 "/usr/include/time.h" 3 4\r
1020 typedef __timer_t timer_t;\r
1021 # 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1022 # 146 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1023 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
1024 # 147 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1025 \r
1026 \r
1027 \r
1028 typedef unsigned long int ulong;\r
1029 typedef unsigned short int ushort;\r
1030 typedef unsigned int uint;\r
1031 # 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1032 typedef int int8_t __attribute__ ((__mode__ (__QI__)));\r
1033 typedef int int16_t __attribute__ ((__mode__ (__HI__)));\r
1034 typedef int int32_t __attribute__ ((__mode__ (__SI__)));\r
1035 typedef int int64_t __attribute__ ((__mode__ (__DI__)));\r
1036 \r
1037 \r
1038 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));\r
1039 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));\r
1040 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));\r
1041 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));\r
1042 \r
1043 typedef int register_t __attribute__ ((__mode__ (__word__)));\r
1044 # 219 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1045 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4\r
1046 # 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
1047 # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4\r
1048 # 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4\r
1049 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
1050 # 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4\r
1051 # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
1052 \r
1053 \r
1054 # 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4\r
1055 # 22 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4\r
1056 typedef int __sig_atomic_t;\r
1057 \r
1058 \r
1059 \r
1060 \r
1061 typedef struct\r
1062   {\r
1063     unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];\r
1064   } __sigset_t;\r
1065 # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
1066 \r
1067 \r
1068 \r
1069 typedef __sigset_t sigset_t;\r
1070 \r
1071 \r
1072 \r
1073 \r
1074 \r
1075 \r
1076 # 1 "/usr/include/time.h" 1 3 4\r
1077 # 120 "/usr/include/time.h" 3 4\r
1078 struct timespec\r
1079   {\r
1080     __time_t tv_sec;\r
1081     __syscall_slong_t tv_nsec;\r
1082   };\r
1083 # 44 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
1084 \r
1085 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
1086 # 30 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4\r
1087 struct timeval\r
1088   {\r
1089     __time_t tv_sec;\r
1090     __suseconds_t tv_usec;\r
1091   };\r
1092 # 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
1093 \r
1094 \r
1095 typedef __suseconds_t suseconds_t;\r
1096 \r
1097 \r
1098 \r
1099 \r
1100 \r
1101 typedef long int __fd_mask;\r
1102 # 64 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
1103 typedef struct\r
1104   {\r
1105 \r
1106 \r
1107 \r
1108 \r
1109 \r
1110 \r
1111     __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];\r
1112 \r
1113 \r
1114   } fd_set;\r
1115 \r
1116 \r
1117 \r
1118 \r
1119 \r
1120 \r
1121 typedef __fd_mask fd_mask;\r
1122 # 106 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
1123 extern int select (int __nfds, fd_set *__restrict __readfds,\r
1124      fd_set *__restrict __writefds,\r
1125      fd_set *__restrict __exceptfds,\r
1126      struct timeval *__restrict __timeout);\r
1127 # 118 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
1128 extern int pselect (int __nfds, fd_set *__restrict __readfds,\r
1129       fd_set *__restrict __writefds,\r
1130       fd_set *__restrict __exceptfds,\r
1131       const struct timespec *__restrict __timeout,\r
1132       const __sigset_t *__restrict __sigmask);\r
1133 # 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1134 \r
1135 \r
1136 # 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4\r
1137 # 26 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4\r
1138 __extension__\r
1139 extern unsigned int gnu_dev_major (unsigned long long int __dev)\r
1140      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
1141 __extension__\r
1142 extern unsigned int gnu_dev_minor (unsigned long long int __dev)\r
1143      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
1144 __extension__\r
1145 extern unsigned long long int gnu_dev_makedev (unsigned int __major,\r
1146             unsigned int __minor)\r
1147      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
1148 # 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1149 \r
1150 \r
1151 \r
1152 \r
1153 \r
1154 typedef __blksize_t blksize_t;\r
1155 \r
1156 \r
1157 \r
1158 \r
1159 \r
1160 \r
1161 typedef __blkcnt_t blkcnt_t;\r
1162 \r
1163 \r
1164 \r
1165 typedef __fsblkcnt_t fsblkcnt_t;\r
1166 \r
1167 \r
1168 \r
1169 typedef __fsfilcnt_t fsfilcnt_t;\r
1170 # 270 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1171 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4\r
1172 # 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1173 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
1174 # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4\r
1175 # 60 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1176 typedef unsigned long int pthread_t;\r
1177 \r
1178 \r
1179 union pthread_attr_t\r
1180 {\r
1181   char __size[56];\r
1182   long int __align;\r
1183 };\r
1184 \r
1185 typedef union pthread_attr_t pthread_attr_t;\r
1186 \r
1187 \r
1188 \r
1189 \r
1190 \r
1191 typedef struct __pthread_internal_list\r
1192 {\r
1193   struct __pthread_internal_list *__prev;\r
1194   struct __pthread_internal_list *__next;\r
1195 } __pthread_list_t;\r
1196 # 90 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1197 typedef union\r
1198 {\r
1199   struct __pthread_mutex_s\r
1200   {\r
1201     int __lock;\r
1202     unsigned int __count;\r
1203     int __owner;\r
1204 \r
1205     unsigned int __nusers;\r
1206 \r
1207 \r
1208 \r
1209     int __kind;\r
1210 \r
1211     short __spins;\r
1212     short __elision;\r
1213     __pthread_list_t __list;\r
1214 # 124 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1215   } __data;\r
1216   char __size[40];\r
1217   long int __align;\r
1218 } pthread_mutex_t;\r
1219 \r
1220 typedef union\r
1221 {\r
1222   char __size[4];\r
1223   int __align;\r
1224 } pthread_mutexattr_t;\r
1225 \r
1226 \r
1227 \r
1228 \r
1229 typedef union\r
1230 {\r
1231   struct\r
1232   {\r
1233     int __lock;\r
1234     unsigned int __futex;\r
1235     __extension__ unsigned long long int __total_seq;\r
1236     __extension__ unsigned long long int __wakeup_seq;\r
1237     __extension__ unsigned long long int __woken_seq;\r
1238     void *__mutex;\r
1239     unsigned int __nwaiters;\r
1240     unsigned int __broadcast_seq;\r
1241   } __data;\r
1242   char __size[48];\r
1243   __extension__ long long int __align;\r
1244 } pthread_cond_t;\r
1245 \r
1246 typedef union\r
1247 {\r
1248   char __size[4];\r
1249   int __align;\r
1250 } pthread_condattr_t;\r
1251 \r
1252 \r
1253 \r
1254 typedef unsigned int pthread_key_t;\r
1255 \r
1256 \r
1257 \r
1258 typedef int pthread_once_t;\r
1259 \r
1260 \r
1261 \r
1262 \r
1263 \r
1264 typedef union\r
1265 {\r
1266 \r
1267   struct\r
1268   {\r
1269     int __lock;\r
1270     unsigned int __nr_readers;\r
1271     unsigned int __readers_wakeup;\r
1272     unsigned int __writer_wakeup;\r
1273     unsigned int __nr_readers_queued;\r
1274     unsigned int __nr_writers_queued;\r
1275     int __writer;\r
1276     int __shared;\r
1277     unsigned long int __pad1;\r
1278     unsigned long int __pad2;\r
1279 \r
1280 \r
1281     unsigned int __flags;\r
1282 \r
1283   } __data;\r
1284 # 211 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1285   char __size[56];\r
1286   long int __align;\r
1287 } pthread_rwlock_t;\r
1288 \r
1289 typedef union\r
1290 {\r
1291   char __size[8];\r
1292   long int __align;\r
1293 } pthread_rwlockattr_t;\r
1294 \r
1295 \r
1296 \r
1297 \r
1298 \r
1299 typedef volatile int pthread_spinlock_t;\r
1300 \r
1301 \r
1302 \r
1303 \r
1304 typedef union\r
1305 {\r
1306   char __size[32];\r
1307   long int __align;\r
1308 } pthread_barrier_t;\r
1309 \r
1310 typedef union\r
1311 {\r
1312   char __size[4];\r
1313   int __align;\r
1314 } pthread_barrierattr_t;\r
1315 # 271 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1316 # 315 "/usr/include/stdlib.h" 2 3 4\r
1317 \r
1318 \r
1319 \r
1320 \r
1321 \r
1322 \r
1323 extern long int random (void) __attribute__ ((__nothrow__ ));\r
1324 \r
1325 \r
1326 extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ ));\r
1327 \r
1328 \r
1329 \r
1330 \r
1331 \r
1332 extern char *initstate (unsigned int __seed, char *__statebuf,\r
1333    size_t __statelen) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1334 \r
1335 \r
1336 \r
1337 extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1338 \r
1339 \r
1340 \r
1341 \r
1342 \r
1343 \r
1344 \r
1345 struct random_data\r
1346   {\r
1347     int32_t *fptr;\r
1348     int32_t *rptr;\r
1349     int32_t *state;\r
1350     int rand_type;\r
1351     int rand_deg;\r
1352     int rand_sep;\r
1353     int32_t *end_ptr;\r
1354   };\r
1355 \r
1356 extern int random_r (struct random_data *__restrict __buf,\r
1357        int32_t *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1358 \r
1359 extern int srandom_r (unsigned int __seed, struct random_data *__buf)\r
1360      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1361 \r
1362 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,\r
1363    size_t __statelen,\r
1364    struct random_data *__restrict __buf)\r
1365      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
1366 \r
1367 extern int setstate_r (char *__restrict __statebuf,\r
1368          struct random_data *__restrict __buf)\r
1369      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1370 \r
1371 \r
1372 \r
1373 \r
1374 \r
1375 \r
1376 extern int rand (void) __attribute__ ((__nothrow__ ));\r
1377 \r
1378 extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ ));\r
1379 \r
1380 \r
1381 \r
1382 \r
1383 extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ ));\r
1384 \r
1385 \r
1386 \r
1387 \r
1388 \r
1389 \r
1390 \r
1391 extern double drand48 (void) __attribute__ ((__nothrow__ ));\r
1392 extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1393 \r
1394 \r
1395 extern long int lrand48 (void) __attribute__ ((__nothrow__ ));\r
1396 extern long int nrand48 (unsigned short int __xsubi[3])\r
1397      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1398 \r
1399 \r
1400 extern long int mrand48 (void) __attribute__ ((__nothrow__ ));\r
1401 extern long int jrand48 (unsigned short int __xsubi[3])\r
1402      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1403 \r
1404 \r
1405 extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ ));\r
1406 extern unsigned short int *seed48 (unsigned short int __seed16v[3])\r
1407      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1408 extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1409 \r
1410 \r
1411 \r
1412 \r
1413 \r
1414 struct drand48_data\r
1415   {\r
1416     unsigned short int __x[3];\r
1417     unsigned short int __old_x[3];\r
1418     unsigned short int __c;\r
1419     unsigned short int __init;\r
1420     __extension__ unsigned long long int __a;\r
1421 \r
1422   };\r
1423 \r
1424 \r
1425 extern int drand48_r (struct drand48_data *__restrict __buffer,\r
1426         double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1427 extern int erand48_r (unsigned short int __xsubi[3],\r
1428         struct drand48_data *__restrict __buffer,\r
1429         double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1430 \r
1431 \r
1432 extern int lrand48_r (struct drand48_data *__restrict __buffer,\r
1433         long int *__restrict __result)\r
1434      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1435 extern int nrand48_r (unsigned short int __xsubi[3],\r
1436         struct drand48_data *__restrict __buffer,\r
1437         long int *__restrict __result)\r
1438      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1439 \r
1440 \r
1441 extern int mrand48_r (struct drand48_data *__restrict __buffer,\r
1442         long int *__restrict __result)\r
1443      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1444 extern int jrand48_r (unsigned short int __xsubi[3],\r
1445         struct drand48_data *__restrict __buffer,\r
1446         long int *__restrict __result)\r
1447      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1448 \r
1449 \r
1450 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)\r
1451      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1452 \r
1453 extern int seed48_r (unsigned short int __seed16v[3],\r
1454        struct drand48_data *__buffer) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1455 \r
1456 extern int lcong48_r (unsigned short int __param[7],\r
1457         struct drand48_data *__buffer)\r
1458      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1459 # 466 "/usr/include/stdlib.h" 3 4\r
1460 extern void *malloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
1461 \r
1462 extern void *calloc (size_t __nmemb, size_t __size)\r
1463      __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
1464 # 480 "/usr/include/stdlib.h" 3 4\r
1465 extern void *realloc (void *__ptr, size_t __size)\r
1466      __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));\r
1467 \r
1468 extern void free (void *__ptr) __attribute__ ((__nothrow__ ));\r
1469 \r
1470 \r
1471 \r
1472 \r
1473 extern void cfree (void *__ptr) __attribute__ ((__nothrow__ ));\r
1474 \r
1475 \r
1476 \r
1477 \r
1478 # 1 "/usr/include/alloca.h" 1 3 4\r
1479 # 24 "/usr/include/alloca.h" 3 4\r
1480 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
1481 # 25 "/usr/include/alloca.h" 2 3 4\r
1482 \r
1483 \r
1484 \r
1485 \r
1486 \r
1487 \r
1488 \r
1489 extern void *alloca (size_t __size) __attribute__ ((__nothrow__ ));\r
1490 # 493 "/usr/include/stdlib.h" 2 3 4\r
1491 \r
1492 \r
1493 \r
1494 \r
1495 \r
1496 extern void *valloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
1497 \r
1498 \r
1499 \r
1500 \r
1501 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)\r
1502      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1503 # 515 "/usr/include/stdlib.h" 3 4\r
1504 extern void abort (void) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
1505 \r
1506 \r
1507 \r
1508 extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1509 # 535 "/usr/include/stdlib.h" 3 4\r
1510 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)\r
1511      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1512 \r
1513 \r
1514 \r
1515 \r
1516 \r
1517 \r
1518 extern void exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
1519 # 557 "/usr/include/stdlib.h" 3 4\r
1520 extern void _Exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
1521 \r
1522 \r
1523 \r
1524 \r
1525 \r
1526 \r
1527 extern char *getenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1528 # 578 "/usr/include/stdlib.h" 3 4\r
1529 extern int putenv (char *__string) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1530 \r
1531 \r
1532 \r
1533 \r
1534 \r
1535 extern int setenv (const char *__name, const char *__value, int __replace)\r
1536      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1537 \r
1538 \r
1539 extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1540 \r
1541 \r
1542 \r
1543 \r
1544 \r
1545 \r
1546 extern int clearenv (void) __attribute__ ((__nothrow__ ));\r
1547 # 606 "/usr/include/stdlib.h" 3 4\r
1548 extern char *mktemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1549 # 620 "/usr/include/stdlib.h" 3 4\r
1550 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;\r
1551 # 642 "/usr/include/stdlib.h" 3 4\r
1552 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;\r
1553 # 663 "/usr/include/stdlib.h" 3 4\r
1554 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1555 # 717 "/usr/include/stdlib.h" 3 4\r
1556 extern int system (const char *__command) ;\r
1557 # 734 "/usr/include/stdlib.h" 3 4\r
1558 extern char *realpath (const char *__restrict __name,\r
1559          char *__restrict __resolved) __attribute__ ((__nothrow__ )) ;\r
1560 \r
1561 \r
1562 \r
1563 \r
1564 \r
1565 \r
1566 typedef int (*__compar_fn_t) (const void *, const void *);\r
1567 # 755 "/usr/include/stdlib.h" 3 4\r
1568 extern void *bsearch (const void *__key, const void *__base,\r
1569         size_t __nmemb, size_t __size, __compar_fn_t __compar)\r
1570      __attribute__ ((__nonnull__ (1, 2, 5))) ;\r
1571 \r
1572 \r
1573 \r
1574 \r
1575 \r
1576 \r
1577 \r
1578 extern void qsort (void *__base, size_t __nmemb, size_t __size,\r
1579      __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));\r
1580 # 775 "/usr/include/stdlib.h" 3 4\r
1581 extern int abs (int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1582 extern long int labs (long int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1583 \r
1584 \r
1585 \r
1586 __extension__ extern long long int llabs (long long int __x)\r
1587      __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1588 \r
1589 \r
1590 \r
1591 \r
1592 \r
1593 \r
1594 \r
1595 extern div_t div (int __numer, int __denom)\r
1596      __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1597 extern ldiv_t ldiv (long int __numer, long int __denom)\r
1598      __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1599 \r
1600 \r
1601 \r
1602 \r
1603 __extension__ extern lldiv_t lldiv (long long int __numer,\r
1604         long long int __denom)\r
1605      __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1606 # 812 "/usr/include/stdlib.h" 3 4\r
1607 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,\r
1608      int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
1609 \r
1610 \r
1611 \r
1612 \r
1613 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,\r
1614      int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
1615 \r
1616 \r
1617 \r
1618 \r
1619 extern char *gcvt (double __value, int __ndigit, char *__buf)\r
1620      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) ;\r
1621 \r
1622 \r
1623 \r
1624 \r
1625 extern char *qecvt (long double __value, int __ndigit,\r
1626       int *__restrict __decpt, int *__restrict __sign)\r
1627      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
1628 extern char *qfcvt (long double __value, int __ndigit,\r
1629       int *__restrict __decpt, int *__restrict __sign)\r
1630      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
1631 extern char *qgcvt (long double __value, int __ndigit, char *__buf)\r
1632      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) ;\r
1633 \r
1634 \r
1635 \r
1636 \r
1637 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,\r
1638      int *__restrict __sign, char *__restrict __buf,\r
1639      size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
1640 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,\r
1641      int *__restrict __sign, char *__restrict __buf,\r
1642      size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
1643 \r
1644 extern int qecvt_r (long double __value, int __ndigit,\r
1645       int *__restrict __decpt, int *__restrict __sign,\r
1646       char *__restrict __buf, size_t __len)\r
1647      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
1648 extern int qfcvt_r (long double __value, int __ndigit,\r
1649       int *__restrict __decpt, int *__restrict __sign,\r
1650       char *__restrict __buf, size_t __len)\r
1651      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
1652 \r
1653 \r
1654 \r
1655 \r
1656 \r
1657 \r
1658 extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ ));\r
1659 \r
1660 \r
1661 extern int mbtowc (wchar_t *__restrict __pwc,\r
1662      const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));\r
1663 \r
1664 \r
1665 extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ ));\r
1666 \r
1667 \r
1668 \r
1669 extern size_t mbstowcs (wchar_t *__restrict __pwcs,\r
1670    const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));\r
1671 \r
1672 extern size_t wcstombs (char *__restrict __s,\r
1673    const wchar_t *__restrict __pwcs, size_t __n)\r
1674      __attribute__ ((__nothrow__ ));\r
1675 # 888 "/usr/include/stdlib.h" 3 4\r
1676 extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1677 # 899 "/usr/include/stdlib.h" 3 4\r
1678 extern int getsubopt (char **__restrict __optionp,\r
1679         char *const *__restrict __tokens,\r
1680         char **__restrict __valuep)\r
1681      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3))) ;\r
1682 # 951 "/usr/include/stdlib.h" 3 4\r
1683 extern int getloadavg (double __loadavg[], int __nelem)\r
1684      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1685 \r
1686 \r
1687 \r
1688 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4\r
1689 # 956 "/usr/include/stdlib.h" 2 3 4\r
1690 # 24 "./../test/abts.h" 2\r
1691 # 1 "/usr/include/string.h" 1 3 4\r
1692 # 32 "/usr/include/string.h" 3 4\r
1693 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
1694 # 33 "/usr/include/string.h" 2 3 4\r
1695 # 46 "/usr/include/string.h" 3 4\r
1696 extern void *memcpy (void *__restrict __dest, const void *__restrict __src,\r
1697        size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1698 \r
1699 \r
1700 extern void *memmove (void *__dest, const void *__src, size_t __n)\r
1701      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1702 \r
1703 \r
1704 \r
1705 \r
1706 \r
1707 \r
1708 extern void *memccpy (void *__restrict __dest, const void *__restrict __src,\r
1709         int __c, size_t __n)\r
1710      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1711 \r
1712 \r
1713 \r
1714 \r
1715 \r
1716 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1717 \r
1718 \r
1719 extern int memcmp (const void *__s1, const void *__s2, size_t __n)\r
1720      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1721 # 96 "/usr/include/string.h" 3 4\r
1722 extern void *memchr (const void *__s, int __c, size_t __n)\r
1723       __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1724 # 129 "/usr/include/string.h" 3 4\r
1725 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)\r
1726      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1727 \r
1728 extern char *strncpy (char *__restrict __dest,\r
1729         const char *__restrict __src, size_t __n)\r
1730      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1731 \r
1732 \r
1733 extern char *strcat (char *__restrict __dest, const char *__restrict __src)\r
1734      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1735 \r
1736 extern char *strncat (char *__restrict __dest, const char *__restrict __src,\r
1737         size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1738 \r
1739 \r
1740 extern int strcmp (const char *__s1, const char *__s2)\r
1741      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1742 \r
1743 extern int strncmp (const char *__s1, const char *__s2, size_t __n)\r
1744      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1745 \r
1746 \r
1747 extern int strcoll (const char *__s1, const char *__s2)\r
1748      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1749 \r
1750 extern size_t strxfrm (char *__restrict __dest,\r
1751          const char *__restrict __src, size_t __n)\r
1752      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1753 \r
1754 \r
1755 \r
1756 \r
1757 \r
1758 \r
1759 \r
1760 # 1 "/usr/include/xlocale.h" 1 3 4\r
1761 # 27 "/usr/include/xlocale.h" 3 4\r
1762 typedef struct __locale_struct\r
1763 {\r
1764 \r
1765   struct __locale_data *__locales[13];\r
1766 \r
1767 \r
1768   const unsigned short int *__ctype_b;\r
1769   const int *__ctype_tolower;\r
1770   const int *__ctype_toupper;\r
1771 \r
1772 \r
1773   const char *__names[13];\r
1774 } *__locale_t;\r
1775 \r
1776 \r
1777 typedef __locale_t locale_t;\r
1778 # 164 "/usr/include/string.h" 2 3 4\r
1779 \r
1780 \r
1781 extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)\r
1782      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));\r
1783 \r
1784 extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,\r
1785     __locale_t __l) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
1786 \r
1787 \r
1788 \r
1789 \r
1790 \r
1791 extern char *strdup (const char *__s)\r
1792      __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));\r
1793 \r
1794 \r
1795 \r
1796 \r
1797 \r
1798 \r
1799 extern char *strndup (const char *__string, size_t __n)\r
1800      __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));\r
1801 # 236 "/usr/include/string.h" 3 4\r
1802 extern char *strchr (const char *__s, int __c)\r
1803      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1804 # 263 "/usr/include/string.h" 3 4\r
1805 extern char *strrchr (const char *__s, int __c)\r
1806      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1807 # 285 "/usr/include/string.h" 3 4\r
1808 extern size_t strcspn (const char *__s, const char *__reject)\r
1809      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1810 \r
1811 \r
1812 extern size_t strspn (const char *__s, const char *__accept)\r
1813      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1814 # 315 "/usr/include/string.h" 3 4\r
1815 extern char *strpbrk (const char *__s, const char *__accept)\r
1816      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1817 # 342 "/usr/include/string.h" 3 4\r
1818 extern char *strstr (const char *__haystack, const char *__needle)\r
1819      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1820 \r
1821 \r
1822 \r
1823 \r
1824 extern char *strtok (char *__restrict __s, const char *__restrict __delim)\r
1825      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1826 \r
1827 \r
1828 \r
1829 \r
1830 extern char *__strtok_r (char *__restrict __s,\r
1831     const char *__restrict __delim,\r
1832     char **__restrict __save_ptr)\r
1833      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
1834 \r
1835 extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,\r
1836          char **__restrict __save_ptr)\r
1837      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
1838 # 399 "/usr/include/string.h" 3 4\r
1839 extern size_t strlen (const char *__s)\r
1840      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1841 \r
1842 \r
1843 \r
1844 \r
1845 \r
1846 extern size_t strnlen (const char *__string, size_t __maxlen)\r
1847      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1848 \r
1849 \r
1850 \r
1851 \r
1852 \r
1853 extern char *strerror (int __errnum) __attribute__ ((__nothrow__ ));\r
1854 # 427 "/usr/include/string.h" 3 4\r
1855 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1856 # 445 "/usr/include/string.h" 3 4\r
1857 extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ ));\r
1858 \r
1859 \r
1860 \r
1861 \r
1862 \r
1863 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1864 \r
1865 \r
1866 \r
1867 extern void bcopy (const void *__src, void *__dest, size_t __n)\r
1868      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1869 \r
1870 \r
1871 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1872 \r
1873 \r
1874 extern int bcmp (const void *__s1, const void *__s2, size_t __n)\r
1875      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1876 # 489 "/usr/include/string.h" 3 4\r
1877 extern char *index (const char *__s, int __c)\r
1878      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1879 # 517 "/usr/include/string.h" 3 4\r
1880 extern char *rindex (const char *__s, int __c)\r
1881      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1882 \r
1883 \r
1884 \r
1885 \r
1886 extern int ffs (int __i) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
1887 # 534 "/usr/include/string.h" 3 4\r
1888 extern int strcasecmp (const char *__s1, const char *__s2)\r
1889      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1890 \r
1891 \r
1892 extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)\r
1893      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1894 # 557 "/usr/include/string.h" 3 4\r
1895 extern char *strsep (char **__restrict __stringp,\r
1896        const char *__restrict __delim)\r
1897      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1898 \r
1899 \r
1900 \r
1901 \r
1902 extern char *strsignal (int __sig) __attribute__ ((__nothrow__ ));\r
1903 \r
1904 \r
1905 extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)\r
1906      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1907 extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)\r
1908      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1909 \r
1910 \r
1911 \r
1912 extern char *__stpncpy (char *__restrict __dest,\r
1913    const char *__restrict __src, size_t __n)\r
1914      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1915 extern char *stpncpy (char *__restrict __dest,\r
1916         const char *__restrict __src, size_t __n)\r
1917      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1918 # 25 "./../test/abts.h" 2\r
1919 \r
1920 \r
1921 \r
1922 # 1 "/usr/include/unistd.h" 1 3 4\r
1923 # 202 "/usr/include/unistd.h" 3 4\r
1924 # 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4\r
1925 # 203 "/usr/include/unistd.h" 2 3 4\r
1926 \r
1927 \r
1928 \r
1929 # 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4\r
1930 # 22 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4\r
1931 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
1932 # 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4\r
1933 # 207 "/usr/include/unistd.h" 2 3 4\r
1934 # 226 "/usr/include/unistd.h" 3 4\r
1935 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
1936 # 227 "/usr/include/unistd.h" 2 3 4\r
1937 # 255 "/usr/include/unistd.h" 3 4\r
1938 typedef __useconds_t useconds_t;\r
1939 # 267 "/usr/include/unistd.h" 3 4\r
1940 typedef __intptr_t intptr_t;\r
1941 \r
1942 \r
1943 \r
1944 \r
1945 \r
1946 \r
1947 typedef __socklen_t socklen_t;\r
1948 # 287 "/usr/include/unistd.h" 3 4\r
1949 extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1950 # 304 "/usr/include/unistd.h" 3 4\r
1951 extern int faccessat (int __fd, const char *__file, int __type, int __flag)\r
1952      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
1953 # 334 "/usr/include/unistd.h" 3 4\r
1954 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ ));\r
1955 # 353 "/usr/include/unistd.h" 3 4\r
1956 extern int close (int __fd);\r
1957 \r
1958 \r
1959 \r
1960 \r
1961 \r
1962 \r
1963 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;\r
1964 \r
1965 \r
1966 \r
1967 \r
1968 \r
1969 extern ssize_t write (int __fd, const void *__buf, size_t __n) ;\r
1970 # 376 "/usr/include/unistd.h" 3 4\r
1971 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,\r
1972         __off_t __offset) ;\r
1973 \r
1974 \r
1975 \r
1976 \r
1977 \r
1978 \r
1979 extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,\r
1980          __off_t __offset) ;\r
1981 # 417 "/usr/include/unistd.h" 3 4\r
1982 extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ )) ;\r
1983 # 432 "/usr/include/unistd.h" 3 4\r
1984 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ ));\r
1985 # 444 "/usr/include/unistd.h" 3 4\r
1986 extern unsigned int sleep (unsigned int __seconds);\r
1987 \r
1988 \r
1989 \r
1990 \r
1991 \r
1992 \r
1993 \r
1994 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)\r
1995      __attribute__ ((__nothrow__ ));\r
1996 \r
1997 \r
1998 \r
1999 \r
2000 \r
2001 \r
2002 extern int usleep (__useconds_t __useconds);\r
2003 # 469 "/usr/include/unistd.h" 3 4\r
2004 extern int pause (void);\r
2005 \r
2006 \r
2007 \r
2008 extern int chown (const char *__file, __uid_t __owner, __gid_t __group)\r
2009      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
2010 \r
2011 \r
2012 \r
2013 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ )) ;\r
2014 \r
2015 \r
2016 \r
2017 \r
2018 extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)\r
2019      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
2020 \r
2021 \r
2022 \r
2023 \r
2024 \r
2025 \r
2026 extern int fchownat (int __fd, const char *__file, __uid_t __owner,\r
2027        __gid_t __group, int __flag)\r
2028      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
2029 \r
2030 \r
2031 \r
2032 extern int chdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
2033 \r
2034 \r
2035 \r
2036 extern int fchdir (int __fd) __attribute__ ((__nothrow__ )) ;\r
2037 # 511 "/usr/include/unistd.h" 3 4\r
2038 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ )) ;\r
2039 # 525 "/usr/include/unistd.h" 3 4\r
2040 extern char *getwd (char *__buf)\r
2041      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;\r
2042 \r
2043 \r
2044 \r
2045 \r
2046 extern int dup (int __fd) __attribute__ ((__nothrow__ )) ;\r
2047 \r
2048 \r
2049 extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ ));\r
2050 # 543 "/usr/include/unistd.h" 3 4\r
2051 extern char **__environ;\r
2052 \r
2053 \r
2054 \r
2055 \r
2056 \r
2057 \r
2058 \r
2059 extern int execve (const char *__path, char *const __argv[],\r
2060      char *const __envp[]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2061 \r
2062 \r
2063 \r
2064 \r
2065 extern int fexecve (int __fd, char *const __argv[], char *const __envp[])\r
2066      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
2067 \r
2068 \r
2069 \r
2070 \r
2071 extern int execv (const char *__path, char *const __argv[])\r
2072      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2073 \r
2074 \r
2075 \r
2076 extern int execle (const char *__path, const char *__arg, ...)\r
2077      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2078 \r
2079 \r
2080 \r
2081 extern int execl (const char *__path, const char *__arg, ...)\r
2082      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2083 \r
2084 \r
2085 \r
2086 extern int execvp (const char *__file, char *const __argv[])\r
2087      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2088 \r
2089 \r
2090 \r
2091 \r
2092 extern int execlp (const char *__file, const char *__arg, ...)\r
2093      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2094 # 598 "/usr/include/unistd.h" 3 4\r
2095 extern int nice (int __inc) __attribute__ ((__nothrow__ )) ;\r
2096 \r
2097 \r
2098 \r
2099 \r
2100 extern void _exit (int __status) __attribute__ ((__noreturn__));\r
2101 \r
2102 \r
2103 \r
2104 \r
2105 \r
2106 \r
2107 # 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4\r
2108 # 24 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4\r
2109 enum\r
2110   {\r
2111     _PC_LINK_MAX,\r
2112 \r
2113     _PC_MAX_CANON,\r
2114 \r
2115     _PC_MAX_INPUT,\r
2116 \r
2117     _PC_NAME_MAX,\r
2118 \r
2119     _PC_PATH_MAX,\r
2120 \r
2121     _PC_PIPE_BUF,\r
2122 \r
2123     _PC_CHOWN_RESTRICTED,\r
2124 \r
2125     _PC_NO_TRUNC,\r
2126 \r
2127     _PC_VDISABLE,\r
2128 \r
2129     _PC_SYNC_IO,\r
2130 \r
2131     _PC_ASYNC_IO,\r
2132 \r
2133     _PC_PRIO_IO,\r
2134 \r
2135     _PC_SOCK_MAXBUF,\r
2136 \r
2137     _PC_FILESIZEBITS,\r
2138 \r
2139     _PC_REC_INCR_XFER_SIZE,\r
2140 \r
2141     _PC_REC_MAX_XFER_SIZE,\r
2142 \r
2143     _PC_REC_MIN_XFER_SIZE,\r
2144 \r
2145     _PC_REC_XFER_ALIGN,\r
2146 \r
2147     _PC_ALLOC_SIZE_MIN,\r
2148 \r
2149     _PC_SYMLINK_MAX,\r
2150 \r
2151     _PC_2_SYMLINKS\r
2152 \r
2153   };\r
2154 \r
2155 \r
2156 enum\r
2157   {\r
2158     _SC_ARG_MAX,\r
2159 \r
2160     _SC_CHILD_MAX,\r
2161 \r
2162     _SC_CLK_TCK,\r
2163 \r
2164     _SC_NGROUPS_MAX,\r
2165 \r
2166     _SC_OPEN_MAX,\r
2167 \r
2168     _SC_STREAM_MAX,\r
2169 \r
2170     _SC_TZNAME_MAX,\r
2171 \r
2172     _SC_JOB_CONTROL,\r
2173 \r
2174     _SC_SAVED_IDS,\r
2175 \r
2176     _SC_REALTIME_SIGNALS,\r
2177 \r
2178     _SC_PRIORITY_SCHEDULING,\r
2179 \r
2180     _SC_TIMERS,\r
2181 \r
2182     _SC_ASYNCHRONOUS_IO,\r
2183 \r
2184     _SC_PRIORITIZED_IO,\r
2185 \r
2186     _SC_SYNCHRONIZED_IO,\r
2187 \r
2188     _SC_FSYNC,\r
2189 \r
2190     _SC_MAPPED_FILES,\r
2191 \r
2192     _SC_MEMLOCK,\r
2193 \r
2194     _SC_MEMLOCK_RANGE,\r
2195 \r
2196     _SC_MEMORY_PROTECTION,\r
2197 \r
2198     _SC_MESSAGE_PASSING,\r
2199 \r
2200     _SC_SEMAPHORES,\r
2201 \r
2202     _SC_SHARED_MEMORY_OBJECTS,\r
2203 \r
2204     _SC_AIO_LISTIO_MAX,\r
2205 \r
2206     _SC_AIO_MAX,\r
2207 \r
2208     _SC_AIO_PRIO_DELTA_MAX,\r
2209 \r
2210     _SC_DELAYTIMER_MAX,\r
2211 \r
2212     _SC_MQ_OPEN_MAX,\r
2213 \r
2214     _SC_MQ_PRIO_MAX,\r
2215 \r
2216     _SC_VERSION,\r
2217 \r
2218     _SC_PAGESIZE,\r
2219 \r
2220 \r
2221     _SC_RTSIG_MAX,\r
2222 \r
2223     _SC_SEM_NSEMS_MAX,\r
2224 \r
2225     _SC_SEM_VALUE_MAX,\r
2226 \r
2227     _SC_SIGQUEUE_MAX,\r
2228 \r
2229     _SC_TIMER_MAX,\r
2230 \r
2231 \r
2232 \r
2233 \r
2234     _SC_BC_BASE_MAX,\r
2235 \r
2236     _SC_BC_DIM_MAX,\r
2237 \r
2238     _SC_BC_SCALE_MAX,\r
2239 \r
2240     _SC_BC_STRING_MAX,\r
2241 \r
2242     _SC_COLL_WEIGHTS_MAX,\r
2243 \r
2244     _SC_EQUIV_CLASS_MAX,\r
2245 \r
2246     _SC_EXPR_NEST_MAX,\r
2247 \r
2248     _SC_LINE_MAX,\r
2249 \r
2250     _SC_RE_DUP_MAX,\r
2251 \r
2252     _SC_CHARCLASS_NAME_MAX,\r
2253 \r
2254 \r
2255     _SC_2_VERSION,\r
2256 \r
2257     _SC_2_C_BIND,\r
2258 \r
2259     _SC_2_C_DEV,\r
2260 \r
2261     _SC_2_FORT_DEV,\r
2262 \r
2263     _SC_2_FORT_RUN,\r
2264 \r
2265     _SC_2_SW_DEV,\r
2266 \r
2267     _SC_2_LOCALEDEF,\r
2268 \r
2269 \r
2270     _SC_PII,\r
2271 \r
2272     _SC_PII_XTI,\r
2273 \r
2274     _SC_PII_SOCKET,\r
2275 \r
2276     _SC_PII_INTERNET,\r
2277 \r
2278     _SC_PII_OSI,\r
2279 \r
2280     _SC_POLL,\r
2281 \r
2282     _SC_SELECT,\r
2283 \r
2284     _SC_UIO_MAXIOV,\r
2285 \r
2286     _SC_IOV_MAX = _SC_UIO_MAXIOV,\r
2287 \r
2288     _SC_PII_INTERNET_STREAM,\r
2289 \r
2290     _SC_PII_INTERNET_DGRAM,\r
2291 \r
2292     _SC_PII_OSI_COTS,\r
2293 \r
2294     _SC_PII_OSI_CLTS,\r
2295 \r
2296     _SC_PII_OSI_M,\r
2297 \r
2298     _SC_T_IOV_MAX,\r
2299 \r
2300 \r
2301 \r
2302     _SC_THREADS,\r
2303 \r
2304     _SC_THREAD_SAFE_FUNCTIONS,\r
2305 \r
2306     _SC_GETGR_R_SIZE_MAX,\r
2307 \r
2308     _SC_GETPW_R_SIZE_MAX,\r
2309 \r
2310     _SC_LOGIN_NAME_MAX,\r
2311 \r
2312     _SC_TTY_NAME_MAX,\r
2313 \r
2314     _SC_THREAD_DESTRUCTOR_ITERATIONS,\r
2315 \r
2316     _SC_THREAD_KEYS_MAX,\r
2317 \r
2318     _SC_THREAD_STACK_MIN,\r
2319 \r
2320     _SC_THREAD_THREADS_MAX,\r
2321 \r
2322     _SC_THREAD_ATTR_STACKADDR,\r
2323 \r
2324     _SC_THREAD_ATTR_STACKSIZE,\r
2325 \r
2326     _SC_THREAD_PRIORITY_SCHEDULING,\r
2327 \r
2328     _SC_THREAD_PRIO_INHERIT,\r
2329 \r
2330     _SC_THREAD_PRIO_PROTECT,\r
2331 \r
2332     _SC_THREAD_PROCESS_SHARED,\r
2333 \r
2334 \r
2335     _SC_NPROCESSORS_CONF,\r
2336 \r
2337     _SC_NPROCESSORS_ONLN,\r
2338 \r
2339     _SC_PHYS_PAGES,\r
2340 \r
2341     _SC_AVPHYS_PAGES,\r
2342 \r
2343     _SC_ATEXIT_MAX,\r
2344 \r
2345     _SC_PASS_MAX,\r
2346 \r
2347 \r
2348     _SC_XOPEN_VERSION,\r
2349 \r
2350     _SC_XOPEN_XCU_VERSION,\r
2351 \r
2352     _SC_XOPEN_UNIX,\r
2353 \r
2354     _SC_XOPEN_CRYPT,\r
2355 \r
2356     _SC_XOPEN_ENH_I18N,\r
2357 \r
2358     _SC_XOPEN_SHM,\r
2359 \r
2360 \r
2361     _SC_2_CHAR_TERM,\r
2362 \r
2363     _SC_2_C_VERSION,\r
2364 \r
2365     _SC_2_UPE,\r
2366 \r
2367 \r
2368     _SC_XOPEN_XPG2,\r
2369 \r
2370     _SC_XOPEN_XPG3,\r
2371 \r
2372     _SC_XOPEN_XPG4,\r
2373 \r
2374 \r
2375     _SC_CHAR_BIT,\r
2376 \r
2377     _SC_CHAR_MAX,\r
2378 \r
2379     _SC_CHAR_MIN,\r
2380 \r
2381     _SC_INT_MAX,\r
2382 \r
2383     _SC_INT_MIN,\r
2384 \r
2385     _SC_LONG_BIT,\r
2386 \r
2387     _SC_WORD_BIT,\r
2388 \r
2389     _SC_MB_LEN_MAX,\r
2390 \r
2391     _SC_NZERO,\r
2392 \r
2393     _SC_SSIZE_MAX,\r
2394 \r
2395     _SC_SCHAR_MAX,\r
2396 \r
2397     _SC_SCHAR_MIN,\r
2398 \r
2399     _SC_SHRT_MAX,\r
2400 \r
2401     _SC_SHRT_MIN,\r
2402 \r
2403     _SC_UCHAR_MAX,\r
2404 \r
2405     _SC_UINT_MAX,\r
2406 \r
2407     _SC_ULONG_MAX,\r
2408 \r
2409     _SC_USHRT_MAX,\r
2410 \r
2411 \r
2412     _SC_NL_ARGMAX,\r
2413 \r
2414     _SC_NL_LANGMAX,\r
2415 \r
2416     _SC_NL_MSGMAX,\r
2417 \r
2418     _SC_NL_NMAX,\r
2419 \r
2420     _SC_NL_SETMAX,\r
2421 \r
2422     _SC_NL_TEXTMAX,\r
2423 \r
2424 \r
2425     _SC_XBS5_ILP32_OFF32,\r
2426 \r
2427     _SC_XBS5_ILP32_OFFBIG,\r
2428 \r
2429     _SC_XBS5_LP64_OFF64,\r
2430 \r
2431     _SC_XBS5_LPBIG_OFFBIG,\r
2432 \r
2433 \r
2434     _SC_XOPEN_LEGACY,\r
2435 \r
2436     _SC_XOPEN_REALTIME,\r
2437 \r
2438     _SC_XOPEN_REALTIME_THREADS,\r
2439 \r
2440 \r
2441     _SC_ADVISORY_INFO,\r
2442 \r
2443     _SC_BARRIERS,\r
2444 \r
2445     _SC_BASE,\r
2446 \r
2447     _SC_C_LANG_SUPPORT,\r
2448 \r
2449     _SC_C_LANG_SUPPORT_R,\r
2450 \r
2451     _SC_CLOCK_SELECTION,\r
2452 \r
2453     _SC_CPUTIME,\r
2454 \r
2455     _SC_THREAD_CPUTIME,\r
2456 \r
2457     _SC_DEVICE_IO,\r
2458 \r
2459     _SC_DEVICE_SPECIFIC,\r
2460 \r
2461     _SC_DEVICE_SPECIFIC_R,\r
2462 \r
2463     _SC_FD_MGMT,\r
2464 \r
2465     _SC_FIFO,\r
2466 \r
2467     _SC_PIPE,\r
2468 \r
2469     _SC_FILE_ATTRIBUTES,\r
2470 \r
2471     _SC_FILE_LOCKING,\r
2472 \r
2473     _SC_FILE_SYSTEM,\r
2474 \r
2475     _SC_MONOTONIC_CLOCK,\r
2476 \r
2477     _SC_MULTI_PROCESS,\r
2478 \r
2479     _SC_SINGLE_PROCESS,\r
2480 \r
2481     _SC_NETWORKING,\r
2482 \r
2483     _SC_READER_WRITER_LOCKS,\r
2484 \r
2485     _SC_SPIN_LOCKS,\r
2486 \r
2487     _SC_REGEXP,\r
2488 \r
2489     _SC_REGEX_VERSION,\r
2490 \r
2491     _SC_SHELL,\r
2492 \r
2493     _SC_SIGNALS,\r
2494 \r
2495     _SC_SPAWN,\r
2496 \r
2497     _SC_SPORADIC_SERVER,\r
2498 \r
2499     _SC_THREAD_SPORADIC_SERVER,\r
2500 \r
2501     _SC_SYSTEM_DATABASE,\r
2502 \r
2503     _SC_SYSTEM_DATABASE_R,\r
2504 \r
2505     _SC_TIMEOUTS,\r
2506 \r
2507     _SC_TYPED_MEMORY_OBJECTS,\r
2508 \r
2509     _SC_USER_GROUPS,\r
2510 \r
2511     _SC_USER_GROUPS_R,\r
2512 \r
2513     _SC_2_PBS,\r
2514 \r
2515     _SC_2_PBS_ACCOUNTING,\r
2516 \r
2517     _SC_2_PBS_LOCATE,\r
2518 \r
2519     _SC_2_PBS_MESSAGE,\r
2520 \r
2521     _SC_2_PBS_TRACK,\r
2522 \r
2523     _SC_SYMLOOP_MAX,\r
2524 \r
2525     _SC_STREAMS,\r
2526 \r
2527     _SC_2_PBS_CHECKPOINT,\r
2528 \r
2529 \r
2530     _SC_V6_ILP32_OFF32,\r
2531 \r
2532     _SC_V6_ILP32_OFFBIG,\r
2533 \r
2534     _SC_V6_LP64_OFF64,\r
2535 \r
2536     _SC_V6_LPBIG_OFFBIG,\r
2537 \r
2538 \r
2539     _SC_HOST_NAME_MAX,\r
2540 \r
2541     _SC_TRACE,\r
2542 \r
2543     _SC_TRACE_EVENT_FILTER,\r
2544 \r
2545     _SC_TRACE_INHERIT,\r
2546 \r
2547     _SC_TRACE_LOG,\r
2548 \r
2549 \r
2550     _SC_LEVEL1_ICACHE_SIZE,\r
2551 \r
2552     _SC_LEVEL1_ICACHE_ASSOC,\r
2553 \r
2554     _SC_LEVEL1_ICACHE_LINESIZE,\r
2555 \r
2556     _SC_LEVEL1_DCACHE_SIZE,\r
2557 \r
2558     _SC_LEVEL1_DCACHE_ASSOC,\r
2559 \r
2560     _SC_LEVEL1_DCACHE_LINESIZE,\r
2561 \r
2562     _SC_LEVEL2_CACHE_SIZE,\r
2563 \r
2564     _SC_LEVEL2_CACHE_ASSOC,\r
2565 \r
2566     _SC_LEVEL2_CACHE_LINESIZE,\r
2567 \r
2568     _SC_LEVEL3_CACHE_SIZE,\r
2569 \r
2570     _SC_LEVEL3_CACHE_ASSOC,\r
2571 \r
2572     _SC_LEVEL3_CACHE_LINESIZE,\r
2573 \r
2574     _SC_LEVEL4_CACHE_SIZE,\r
2575 \r
2576     _SC_LEVEL4_CACHE_ASSOC,\r
2577 \r
2578     _SC_LEVEL4_CACHE_LINESIZE,\r
2579 \r
2580 \r
2581 \r
2582     _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,\r
2583 \r
2584     _SC_RAW_SOCKETS,\r
2585 \r
2586 \r
2587     _SC_V7_ILP32_OFF32,\r
2588 \r
2589     _SC_V7_ILP32_OFFBIG,\r
2590 \r
2591     _SC_V7_LP64_OFF64,\r
2592 \r
2593     _SC_V7_LPBIG_OFFBIG,\r
2594 \r
2595 \r
2596     _SC_SS_REPL_MAX,\r
2597 \r
2598 \r
2599     _SC_TRACE_EVENT_NAME_MAX,\r
2600 \r
2601     _SC_TRACE_NAME_MAX,\r
2602 \r
2603     _SC_TRACE_SYS_MAX,\r
2604 \r
2605     _SC_TRACE_USER_EVENT_MAX,\r
2606 \r
2607 \r
2608     _SC_XOPEN_STREAMS,\r
2609 \r
2610 \r
2611     _SC_THREAD_ROBUST_PRIO_INHERIT,\r
2612 \r
2613     _SC_THREAD_ROBUST_PRIO_PROTECT\r
2614 \r
2615   };\r
2616 \r
2617 \r
2618 enum\r
2619   {\r
2620     _CS_PATH,\r
2621 \r
2622 \r
2623     _CS_V6_WIDTH_RESTRICTED_ENVS,\r
2624 \r
2625 \r
2626 \r
2627     _CS_GNU_LIBC_VERSION,\r
2628 \r
2629     _CS_GNU_LIBPTHREAD_VERSION,\r
2630 \r
2631 \r
2632     _CS_V5_WIDTH_RESTRICTED_ENVS,\r
2633 \r
2634 \r
2635 \r
2636     _CS_V7_WIDTH_RESTRICTED_ENVS,\r
2637 \r
2638 \r
2639 \r
2640     _CS_LFS_CFLAGS = 1000,\r
2641 \r
2642     _CS_LFS_LDFLAGS,\r
2643 \r
2644     _CS_LFS_LIBS,\r
2645 \r
2646     _CS_LFS_LINTFLAGS,\r
2647 \r
2648     _CS_LFS64_CFLAGS,\r
2649 \r
2650     _CS_LFS64_LDFLAGS,\r
2651 \r
2652     _CS_LFS64_LIBS,\r
2653 \r
2654     _CS_LFS64_LINTFLAGS,\r
2655 \r
2656 \r
2657     _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,\r
2658 \r
2659     _CS_XBS5_ILP32_OFF32_LDFLAGS,\r
2660 \r
2661     _CS_XBS5_ILP32_OFF32_LIBS,\r
2662 \r
2663     _CS_XBS5_ILP32_OFF32_LINTFLAGS,\r
2664 \r
2665     _CS_XBS5_ILP32_OFFBIG_CFLAGS,\r
2666 \r
2667     _CS_XBS5_ILP32_OFFBIG_LDFLAGS,\r
2668 \r
2669     _CS_XBS5_ILP32_OFFBIG_LIBS,\r
2670 \r
2671     _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,\r
2672 \r
2673     _CS_XBS5_LP64_OFF64_CFLAGS,\r
2674 \r
2675     _CS_XBS5_LP64_OFF64_LDFLAGS,\r
2676 \r
2677     _CS_XBS5_LP64_OFF64_LIBS,\r
2678 \r
2679     _CS_XBS5_LP64_OFF64_LINTFLAGS,\r
2680 \r
2681     _CS_XBS5_LPBIG_OFFBIG_CFLAGS,\r
2682 \r
2683     _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,\r
2684 \r
2685     _CS_XBS5_LPBIG_OFFBIG_LIBS,\r
2686 \r
2687     _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,\r
2688 \r
2689 \r
2690     _CS_POSIX_V6_ILP32_OFF32_CFLAGS,\r
2691 \r
2692     _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,\r
2693 \r
2694     _CS_POSIX_V6_ILP32_OFF32_LIBS,\r
2695 \r
2696     _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,\r
2697 \r
2698     _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,\r
2699 \r
2700     _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,\r
2701 \r
2702     _CS_POSIX_V6_ILP32_OFFBIG_LIBS,\r
2703 \r
2704     _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,\r
2705 \r
2706     _CS_POSIX_V6_LP64_OFF64_CFLAGS,\r
2707 \r
2708     _CS_POSIX_V6_LP64_OFF64_LDFLAGS,\r
2709 \r
2710     _CS_POSIX_V6_LP64_OFF64_LIBS,\r
2711 \r
2712     _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,\r
2713 \r
2714     _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,\r
2715 \r
2716     _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,\r
2717 \r
2718     _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,\r
2719 \r
2720     _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,\r
2721 \r
2722 \r
2723     _CS_POSIX_V7_ILP32_OFF32_CFLAGS,\r
2724 \r
2725     _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,\r
2726 \r
2727     _CS_POSIX_V7_ILP32_OFF32_LIBS,\r
2728 \r
2729     _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,\r
2730 \r
2731     _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,\r
2732 \r
2733     _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,\r
2734 \r
2735     _CS_POSIX_V7_ILP32_OFFBIG_LIBS,\r
2736 \r
2737     _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,\r
2738 \r
2739     _CS_POSIX_V7_LP64_OFF64_CFLAGS,\r
2740 \r
2741     _CS_POSIX_V7_LP64_OFF64_LDFLAGS,\r
2742 \r
2743     _CS_POSIX_V7_LP64_OFF64_LIBS,\r
2744 \r
2745     _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,\r
2746 \r
2747     _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,\r
2748 \r
2749     _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,\r
2750 \r
2751     _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,\r
2752 \r
2753     _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,\r
2754 \r
2755 \r
2756     _CS_V6_ENV,\r
2757 \r
2758     _CS_V7_ENV\r
2759 \r
2760   };\r
2761 # 610 "/usr/include/unistd.h" 2 3 4\r
2762 \r
2763 \r
2764 extern long int pathconf (const char *__path, int __name)\r
2765      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2766 \r
2767 \r
2768 extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ ));\r
2769 \r
2770 \r
2771 extern long int sysconf (int __name) __attribute__ ((__nothrow__ ));\r
2772 \r
2773 \r
2774 \r
2775 extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ ));\r
2776 \r
2777 \r
2778 \r
2779 \r
2780 extern __pid_t getpid (void) __attribute__ ((__nothrow__ ));\r
2781 \r
2782 \r
2783 extern __pid_t getppid (void) __attribute__ ((__nothrow__ ));\r
2784 \r
2785 \r
2786 extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ ));\r
2787 \r
2788 \r
2789 extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
2790 \r
2791 extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
2792 \r
2793 \r
2794 \r
2795 \r
2796 \r
2797 \r
2798 extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ ));\r
2799 # 660 "/usr/include/unistd.h" 3 4\r
2800 extern int setpgrp (void) __attribute__ ((__nothrow__ ));\r
2801 \r
2802 \r
2803 \r
2804 \r
2805 \r
2806 \r
2807 extern __pid_t setsid (void) __attribute__ ((__nothrow__ ));\r
2808 \r
2809 \r
2810 \r
2811 extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
2812 \r
2813 \r
2814 \r
2815 extern __uid_t getuid (void) __attribute__ ((__nothrow__ ));\r
2816 \r
2817 \r
2818 extern __uid_t geteuid (void) __attribute__ ((__nothrow__ ));\r
2819 \r
2820 \r
2821 extern __gid_t getgid (void) __attribute__ ((__nothrow__ ));\r
2822 \r
2823 \r
2824 extern __gid_t getegid (void) __attribute__ ((__nothrow__ ));\r
2825 \r
2826 \r
2827 \r
2828 \r
2829 extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ )) ;\r
2830 # 700 "/usr/include/unistd.h" 3 4\r
2831 extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ )) ;\r
2832 \r
2833 \r
2834 \r
2835 \r
2836 extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ )) ;\r
2837 \r
2838 \r
2839 \r
2840 \r
2841 extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ )) ;\r
2842 \r
2843 \r
2844 \r
2845 \r
2846 \r
2847 \r
2848 extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ )) ;\r
2849 \r
2850 \r
2851 \r
2852 \r
2853 extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ )) ;\r
2854 \r
2855 \r
2856 \r
2857 \r
2858 extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ )) ;\r
2859 # 756 "/usr/include/unistd.h" 3 4\r
2860 extern __pid_t fork (void) __attribute__ ((__nothrow__));\r
2861 \r
2862 \r
2863 \r
2864 \r
2865 \r
2866 \r
2867 \r
2868 extern __pid_t vfork (void) __attribute__ ((__nothrow__ ));\r
2869 \r
2870 \r
2871 \r
2872 \r
2873 \r
2874 extern char *ttyname (int __fd) __attribute__ ((__nothrow__ ));\r
2875 \r
2876 \r
2877 \r
2878 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)\r
2879      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
2880 \r
2881 \r
2882 \r
2883 extern int isatty (int __fd) __attribute__ ((__nothrow__ ));\r
2884 \r
2885 \r
2886 \r
2887 \r
2888 \r
2889 extern int ttyslot (void) __attribute__ ((__nothrow__ ));\r
2890 \r
2891 \r
2892 \r
2893 \r
2894 extern int link (const char *__from, const char *__to)\r
2895      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;\r
2896 \r
2897 \r
2898 \r
2899 \r
2900 extern int linkat (int __fromfd, const char *__from, int __tofd,\r
2901      const char *__to, int __flags)\r
2902      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4))) ;\r
2903 \r
2904 \r
2905 \r
2906 \r
2907 extern int symlink (const char *__from, const char *__to)\r
2908      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;\r
2909 \r
2910 \r
2911 \r
2912 \r
2913 extern ssize_t readlink (const char *__restrict __path,\r
2914     char *__restrict __buf, size_t __len)\r
2915      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;\r
2916 \r
2917 \r
2918 \r
2919 \r
2920 extern int symlinkat (const char *__from, int __tofd,\r
2921         const char *__to) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3))) ;\r
2922 \r
2923 \r
2924 extern ssize_t readlinkat (int __fd, const char *__restrict __path,\r
2925       char *__restrict __buf, size_t __len)\r
2926      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3))) ;\r
2927 \r
2928 \r
2929 \r
2930 extern int unlink (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2931 \r
2932 \r
2933 \r
2934 extern int unlinkat (int __fd, const char *__name, int __flag)\r
2935      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
2936 \r
2937 \r
2938 \r
2939 extern int rmdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2940 \r
2941 \r
2942 \r
2943 extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ ));\r
2944 \r
2945 \r
2946 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ ));\r
2947 \r
2948 \r
2949 \r
2950 \r
2951 \r
2952 \r
2953 extern char *getlogin (void);\r
2954 \r
2955 \r
2956 \r
2957 \r
2958 \r
2959 \r
2960 \r
2961 extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));\r
2962 \r
2963 \r
2964 \r
2965 \r
2966 extern int setlogin (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2967 # 871 "/usr/include/unistd.h" 3 4\r
2968 # 1 "/usr/include/getopt.h" 1 3 4\r
2969 # 57 "/usr/include/getopt.h" 3 4\r
2970 extern char *optarg;\r
2971 # 71 "/usr/include/getopt.h" 3 4\r
2972 extern int optind;\r
2973 \r
2974 \r
2975 \r
2976 \r
2977 extern int opterr;\r
2978 \r
2979 \r
2980 \r
2981 extern int optopt;\r
2982 # 150 "/usr/include/getopt.h" 3 4\r
2983 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)\r
2984        __attribute__ ((__nothrow__ ));\r
2985 # 872 "/usr/include/unistd.h" 2 3 4\r
2986 \r
2987 \r
2988 \r
2989 \r
2990 \r
2991 \r
2992 \r
2993 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2994 \r
2995 \r
2996 \r
2997 \r
2998 \r
2999 \r
3000 extern int sethostname (const char *__name, size_t __len)\r
3001      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3002 \r
3003 \r
3004 \r
3005 extern int sethostid (long int __id) __attribute__ ((__nothrow__ )) ;\r
3006 \r
3007 \r
3008 \r
3009 \r
3010 \r
3011 extern int getdomainname (char *__name, size_t __len)\r
3012      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3013 extern int setdomainname (const char *__name, size_t __len)\r
3014      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3015 \r
3016 \r
3017 \r
3018 \r
3019 \r
3020 extern int vhangup (void) __attribute__ ((__nothrow__ ));\r
3021 \r
3022 \r
3023 extern int revoke (const char *__file) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3024 \r
3025 \r
3026 \r
3027 \r
3028 \r
3029 \r
3030 \r
3031 extern int profil (unsigned short int *__sample_buffer, size_t __size,\r
3032      size_t __offset, unsigned int __scale)\r
3033      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3034 \r
3035 \r
3036 \r
3037 \r
3038 \r
3039 extern int acct (const char *__name) __attribute__ ((__nothrow__ ));\r
3040 \r
3041 \r
3042 \r
3043 extern char *getusershell (void) __attribute__ ((__nothrow__ ));\r
3044 extern void endusershell (void) __attribute__ ((__nothrow__ ));\r
3045 extern void setusershell (void) __attribute__ ((__nothrow__ ));\r
3046 \r
3047 \r
3048 \r
3049 \r
3050 \r
3051 extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ )) ;\r
3052 \r
3053 \r
3054 \r
3055 \r
3056 \r
3057 \r
3058 extern int chroot (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3059 \r
3060 \r
3061 \r
3062 extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));\r
3063 \r
3064 \r
3065 \r
3066 \r
3067 \r
3068 \r
3069 \r
3070 extern int fsync (int __fd);\r
3071 # 969 "/usr/include/unistd.h" 3 4\r
3072 extern long int gethostid (void);\r
3073 \r
3074 \r
3075 extern void sync (void) __attribute__ ((__nothrow__ ));\r
3076 \r
3077 \r
3078 \r
3079 \r
3080 \r
3081 extern int getpagesize (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
3082 \r
3083 \r
3084 \r
3085 \r
3086 extern int getdtablesize (void) __attribute__ ((__nothrow__ ));\r
3087 # 993 "/usr/include/unistd.h" 3 4\r
3088 extern int truncate (const char *__file, __off_t __length)\r
3089      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3090 # 1016 "/usr/include/unistd.h" 3 4\r
3091 extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ )) ;\r
3092 # 1037 "/usr/include/unistd.h" 3 4\r
3093 extern int brk (void *__addr) __attribute__ ((__nothrow__ )) ;\r
3094 \r
3095 \r
3096 \r
3097 \r
3098 \r
3099 extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ ));\r
3100 # 1058 "/usr/include/unistd.h" 3 4\r
3101 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ ));\r
3102 # 1081 "/usr/include/unistd.h" 3 4\r
3103 extern int lockf (int __fd, int __cmd, __off_t __len) ;\r
3104 # 1112 "/usr/include/unistd.h" 3 4\r
3105 extern int fdatasync (int __fildes);\r
3106 # 29 "./../test/abts.h" 2\r
3107 # 41 "./../test/abts.h"\r
3108 struct sub_suite {\r
3109     const char *name;\r
3110     int num_test;\r
3111     int failed;\r
3112     int not_run;\r
3113     int not_impl;\r
3114     struct sub_suite *next;\r
3115 };\r
3116 typedef struct sub_suite sub_suite;\r
3117 \r
3118 struct abts_suite {\r
3119     sub_suite *head;\r
3120     sub_suite *tail;\r
3121 };\r
3122 typedef struct abts_suite abts_suite;\r
3123 \r
3124 struct abts_case {\r
3125     int failed;\r
3126     sub_suite *suite;\r
3127 };\r
3128 typedef struct abts_case abts_case;\r
3129 \r
3130 typedef void (*test_func)(abts_case *tc, void *data);\r
3131 \r
3132 \r
3133 \r
3134 abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name);\r
3135 void abts_run_test(abts_suite *ts, test_func f, void *value);\r
3136 void abts_log_message(const char *fmt, ...);\r
3137 \r
3138 void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno);\r
3139 void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno);\r
3140 void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno);\r
3141 void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,\r
3142                        size_t n, int lineno);\r
3143 void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno);\r
3144 void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno);\r
3145 void abts_true(abts_case *tc, int condition, int lineno);\r
3146 void abts_fail(abts_case *tc, const char *message, int lineno);\r
3147 void abts_not_impl(abts_case *tc, const char *message, int lineno);\r
3148 void abts_assert(abts_case *tc, const char *message, int condition, int lineno);\r
3149 void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno);\r
3150 # 99 "./../test/abts.h"\r
3151 abts_suite *run_tests(abts_suite *suite);\r
3152 abts_suite *run_tests1(abts_suite *suite);\r
3153 # 8 "main1.c" 2\r
3154 # 1 "./../test/testutil.h" 1\r
3155 # 17 "./../test/testutil.h"\r
3156 # 1 "../include/apr_pools.h" 1\r
3157 # 43 "../include/apr_pools.h"\r
3158 # 1 "../include/apr.h" 1\r
3159 # 168 "../include/apr.h"\r
3160 # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4\r
3161 # 26 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3162 # 1 "/usr/include/x86_64-linux-gnu/sys/uio.h" 1 3 4\r
3163 # 28 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3164 # 1 "/usr/include/x86_64-linux-gnu/bits/uio.h" 1 3 4\r
3165 # 43 "/usr/include/x86_64-linux-gnu/bits/uio.h" 3 4\r
3166 struct iovec\r
3167   {\r
3168     void *iov_base;\r
3169     size_t iov_len;\r
3170   };\r
3171 # 29 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4\r
3172 # 39 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3173 extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)\r
3174        ;\r
3175 # 50 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3176 extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)\r
3177        ;\r
3178 # 65 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3179 extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,\r
3180          __off_t __offset) ;\r
3181 # 77 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3182 extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,\r
3183    __off_t __offset) ;\r
3184 # 27 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
3185 \r
3186 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
3187 # 29 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
3188 # 38 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3189 # 1 "/usr/include/x86_64-linux-gnu/bits/socket.h" 1 3 4\r
3190 # 27 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3191 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
3192 # 28 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
3193 # 38 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3194 # 1 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 1 3 4\r
3195 # 24 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 3 4\r
3196 enum __socket_type\r
3197 {\r
3198   SOCK_STREAM = 1,\r
3199 \r
3200 \r
3201   SOCK_DGRAM = 2,\r
3202 \r
3203 \r
3204   SOCK_RAW = 3,\r
3205 \r
3206   SOCK_RDM = 4,\r
3207 \r
3208   SOCK_SEQPACKET = 5,\r
3209 \r
3210 \r
3211   SOCK_DCCP = 6,\r
3212 \r
3213   SOCK_PACKET = 10,\r
3214 \r
3215 \r
3216 \r
3217 \r
3218 \r
3219 \r
3220 \r
3221   SOCK_CLOEXEC = 02000000,\r
3222 \r
3223 \r
3224   SOCK_NONBLOCK = 00004000\r
3225 \r
3226 \r
3227 };\r
3228 # 39 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
3229 # 146 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3230 # 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4\r
3231 # 28 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 3 4\r
3232 typedef unsigned short int sa_family_t;\r
3233 # 147 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
3234 \r
3235 \r
3236 struct sockaddr\r
3237   {\r
3238     sa_family_t sa_family;\r
3239     char sa_data[14];\r
3240   };\r
3241 # 162 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3242 struct sockaddr_storage\r
3243   {\r
3244     sa_family_t ss_family;\r
3245     unsigned long int __ss_align;\r
3246     char __ss_padding[(128 - (2 * sizeof (unsigned long int)))];\r
3247   };\r
3248 \r
3249 \r
3250 \r
3251 enum\r
3252   {\r
3253     MSG_OOB = 0x01,\r
3254 \r
3255     MSG_PEEK = 0x02,\r
3256 \r
3257     MSG_DONTROUTE = 0x04,\r
3258 \r
3259 \r
3260 \r
3261 \r
3262 \r
3263 \r
3264     MSG_CTRUNC = 0x08,\r
3265 \r
3266     MSG_PROXY = 0x10,\r
3267 \r
3268     MSG_TRUNC = 0x20,\r
3269 \r
3270     MSG_DONTWAIT = 0x40,\r
3271 \r
3272     MSG_EOR = 0x80,\r
3273 \r
3274     MSG_WAITALL = 0x100,\r
3275 \r
3276     MSG_FIN = 0x200,\r
3277 \r
3278     MSG_SYN = 0x400,\r
3279 \r
3280     MSG_CONFIRM = 0x800,\r
3281 \r
3282     MSG_RST = 0x1000,\r
3283 \r
3284     MSG_ERRQUEUE = 0x2000,\r
3285 \r
3286     MSG_NOSIGNAL = 0x4000,\r
3287 \r
3288     MSG_MORE = 0x8000,\r
3289 \r
3290     MSG_WAITFORONE = 0x10000,\r
3291 \r
3292     MSG_FASTOPEN = 0x20000000,\r
3293 \r
3294 \r
3295     MSG_CMSG_CLOEXEC = 0x40000000\r
3296 \r
3297 \r
3298 \r
3299   };\r
3300 \r
3301 \r
3302 \r
3303 \r
3304 struct msghdr\r
3305   {\r
3306     void *msg_name;\r
3307     socklen_t msg_namelen;\r
3308 \r
3309     struct iovec *msg_iov;\r
3310     size_t msg_iovlen;\r
3311 \r
3312     void *msg_control;\r
3313     size_t msg_controllen;\r
3314 \r
3315 \r
3316 \r
3317 \r
3318     int msg_flags;\r
3319   };\r
3320 \r
3321 \r
3322 struct cmsghdr\r
3323   {\r
3324     size_t cmsg_len;\r
3325 \r
3326 \r
3327 \r
3328 \r
3329     int cmsg_level;\r
3330     int cmsg_type;\r
3331 \r
3332     __extension__ unsigned char __cmsg_data [];\r
3333 \r
3334   };\r
3335 # 272 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3336 extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,\r
3337           struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ ));\r
3338 # 299 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3339 enum\r
3340   {\r
3341     SCM_RIGHTS = 0x01\r
3342 \r
3343 \r
3344 \r
3345 \r
3346 \r
3347   };\r
3348 # 345 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3349 # 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 1 3 4\r
3350 # 1 "/usr/include/asm-generic/socket.h" 1 3 4\r
3351 \r
3352 \r
3353 \r
3354 # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4\r
3355 # 1 "/usr/include/asm-generic/sockios.h" 1 3 4\r
3356 # 2 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 2 3 4\r
3357 # 5 "/usr/include/asm-generic/socket.h" 2 3 4\r
3358 # 2 "/usr/include/x86_64-linux-gnu/asm/socket.h" 2 3 4\r
3359 # 346 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
3360 # 379 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3361 struct linger\r
3362   {\r
3363     int l_onoff;\r
3364     int l_linger;\r
3365   };\r
3366 # 39 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
3367 \r
3368 \r
3369 \r
3370 \r
3371 struct osockaddr\r
3372   {\r
3373     unsigned short int sa_family;\r
3374     unsigned char sa_data[14];\r
3375   };\r
3376 \r
3377 \r
3378 \r
3379 \r
3380 enum\r
3381 {\r
3382   SHUT_RD = 0,\r
3383 \r
3384   SHUT_WR,\r
3385 \r
3386   SHUT_RDWR\r
3387 \r
3388 };\r
3389 # 113 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3390 extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ ));\r
3391 \r
3392 \r
3393 \r
3394 \r
3395 \r
3396 extern int socketpair (int __domain, int __type, int __protocol,\r
3397          int __fds[2]) __attribute__ ((__nothrow__ ));\r
3398 \r
3399 \r
3400 extern int bind (int __fd, const struct sockaddr * __addr, socklen_t __len)\r
3401      __attribute__ ((__nothrow__ ));\r
3402 \r
3403 \r
3404 extern int getsockname (int __fd, struct sockaddr *__restrict __addr,\r
3405    socklen_t *__restrict __len) __attribute__ ((__nothrow__ ));\r
3406 # 137 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3407 extern int connect (int __fd, const struct sockaddr * __addr, socklen_t __len);\r
3408 \r
3409 \r
3410 \r
3411 extern int getpeername (int __fd, struct sockaddr *__restrict __addr,\r
3412    socklen_t *__restrict __len) __attribute__ ((__nothrow__ ));\r
3413 \r
3414 \r
3415 \r
3416 \r
3417 \r
3418 \r
3419 extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);\r
3420 \r
3421 \r
3422 \r
3423 \r
3424 \r
3425 \r
3426 extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);\r
3427 \r
3428 \r
3429 \r
3430 \r
3431 \r
3432 \r
3433 extern ssize_t sendto (int __fd, const void *__buf, size_t __n,\r
3434          int __flags, const struct sockaddr * __addr,\r
3435          socklen_t __addr_len);\r
3436 # 174 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3437 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,\r
3438     int __flags, struct sockaddr *__restrict __addr,\r
3439     socklen_t *__restrict __addr_len);\r
3440 \r
3441 \r
3442 \r
3443 \r
3444 \r
3445 \r
3446 \r
3447 extern ssize_t sendmsg (int __fd, const struct msghdr *__message,\r
3448    int __flags);\r
3449 # 202 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3450 extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);\r
3451 # 219 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3452 extern int getsockopt (int __fd, int __level, int __optname,\r
3453          void *__restrict __optval,\r
3454          socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ ));\r
3455 \r
3456 \r
3457 \r
3458 \r
3459 extern int setsockopt (int __fd, int __level, int __optname,\r
3460          const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ ));\r
3461 \r
3462 \r
3463 \r
3464 \r
3465 \r
3466 extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ ));\r
3467 # 243 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3468 extern int accept (int __fd, struct sockaddr *__restrict __addr,\r
3469      socklen_t *__restrict __addr_len);\r
3470 # 261 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3471 extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ ));\r
3472 \r
3473 \r
3474 \r
3475 \r
3476 extern int sockatmark (int __fd) __attribute__ ((__nothrow__ ));\r
3477 \r
3478 \r
3479 \r
3480 \r
3481 \r
3482 \r
3483 \r
3484 extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ ));\r
3485 # 169 "../include/apr.h" 2\r
3486 # 178 "../include/apr.h"\r
3487 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 1 3\r
3488 # 61 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 3\r
3489 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 1 3 4\r
3490 \r
3491 \r
3492 \r
3493 \r
3494 \r
3495 \r
3496 \r
3497 \r
3498 # 1 "/usr/include/stdint.h" 1 3 4\r
3499 # 26 "/usr/include/stdint.h" 3 4\r
3500 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4\r
3501 # 27 "/usr/include/stdint.h" 2 3 4\r
3502 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
3503 # 28 "/usr/include/stdint.h" 2 3 4\r
3504 # 48 "/usr/include/stdint.h" 3 4\r
3505 typedef unsigned char uint8_t;\r
3506 typedef unsigned short int uint16_t;\r
3507 \r
3508 typedef unsigned int uint32_t;\r
3509 \r
3510 \r
3511 \r
3512 typedef unsigned long int uint64_t;\r
3513 # 65 "/usr/include/stdint.h" 3 4\r
3514 typedef signed char int_least8_t;\r
3515 typedef short int int_least16_t;\r
3516 typedef int int_least32_t;\r
3517 \r
3518 typedef long int int_least64_t;\r
3519 \r
3520 \r
3521 \r
3522 \r
3523 \r
3524 \r
3525 typedef unsigned char uint_least8_t;\r
3526 typedef unsigned short int uint_least16_t;\r
3527 typedef unsigned int uint_least32_t;\r
3528 \r
3529 typedef unsigned long int uint_least64_t;\r
3530 # 90 "/usr/include/stdint.h" 3 4\r
3531 typedef signed char int_fast8_t;\r
3532 \r
3533 typedef long int int_fast16_t;\r
3534 typedef long int int_fast32_t;\r
3535 typedef long int int_fast64_t;\r
3536 # 103 "/usr/include/stdint.h" 3 4\r
3537 typedef unsigned char uint_fast8_t;\r
3538 \r
3539 typedef unsigned long int uint_fast16_t;\r
3540 typedef unsigned long int uint_fast32_t;\r
3541 typedef unsigned long int uint_fast64_t;\r
3542 # 122 "/usr/include/stdint.h" 3 4\r
3543 typedef unsigned long int uintptr_t;\r
3544 # 134 "/usr/include/stdint.h" 3 4\r
3545 typedef long int intmax_t;\r
3546 typedef unsigned long int uintmax_t;\r
3547 # 10 "/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 2 3 4\r
3548 # 62 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 2 3\r
3549 # 179 "../include/apr.h" 2\r
3550 \r
3551 \r
3552 \r
3553 # 1 "/usr/include/x86_64-linux-gnu/sys/wait.h" 1 3 4\r
3554 # 29 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
3555 # 1 "/usr/include/signal.h" 1 3 4\r
3556 # 32 "/usr/include/signal.h" 3 4\r
3557 # 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4\r
3558 # 102 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4\r
3559 extern int __sigismember (const __sigset_t *, int);\r
3560 extern int __sigaddset (__sigset_t *, int);\r
3561 extern int __sigdelset (__sigset_t *, int);\r
3562 # 33 "/usr/include/signal.h" 2 3 4\r
3563 \r
3564 \r
3565 \r
3566 \r
3567 \r
3568 \r
3569 \r
3570 typedef __sig_atomic_t sig_atomic_t;\r
3571 # 57 "/usr/include/signal.h" 3 4\r
3572 # 1 "/usr/include/x86_64-linux-gnu/bits/signum.h" 1 3 4\r
3573 # 58 "/usr/include/signal.h" 2 3 4\r
3574 # 75 "/usr/include/signal.h" 3 4\r
3575 # 1 "/usr/include/time.h" 1 3 4\r
3576 # 76 "/usr/include/signal.h" 2 3 4\r
3577 \r
3578 \r
3579 \r
3580 \r
3581 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 1 3 4\r
3582 # 24 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
3583 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
3584 # 25 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 2 3 4\r
3585 \r
3586 \r
3587 \r
3588 \r
3589 \r
3590 \r
3591 \r
3592 typedef union sigval\r
3593   {\r
3594     int sival_int;\r
3595     void *sival_ptr;\r
3596   } sigval_t;\r
3597 # 58 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
3598 typedef __clock_t __sigchld_clock_t;\r
3599 \r
3600 \r
3601 \r
3602 typedef struct\r
3603   {\r
3604     int si_signo;\r
3605     int si_errno;\r
3606 \r
3607     int si_code;\r
3608 \r
3609     union\r
3610       {\r
3611  int _pad[((128 / sizeof (int)) - 4)];\r
3612 \r
3613 \r
3614  struct\r
3615    {\r
3616      __pid_t si_pid;\r
3617      __uid_t si_uid;\r
3618    } _kill;\r
3619 \r
3620 \r
3621  struct\r
3622    {\r
3623      int si_tid;\r
3624      int si_overrun;\r
3625      sigval_t si_sigval;\r
3626    } _timer;\r
3627 \r
3628 \r
3629  struct\r
3630    {\r
3631      __pid_t si_pid;\r
3632      __uid_t si_uid;\r
3633      sigval_t si_sigval;\r
3634    } _rt;\r
3635 \r
3636 \r
3637  struct\r
3638    {\r
3639      __pid_t si_pid;\r
3640      __uid_t si_uid;\r
3641      int si_status;\r
3642      __sigchld_clock_t si_utime;\r
3643      __sigchld_clock_t si_stime;\r
3644    } _sigchld;\r
3645 \r
3646 \r
3647  struct\r
3648    {\r
3649      void *si_addr;\r
3650      short int si_addr_lsb;\r
3651    } _sigfault;\r
3652 \r
3653 \r
3654  struct\r
3655    {\r
3656      long int si_band;\r
3657      int si_fd;\r
3658    } _sigpoll;\r
3659 \r
3660 \r
3661  struct\r
3662    {\r
3663      void *_call_addr;\r
3664      int _syscall;\r
3665      unsigned int _arch;\r
3666    } _sigsys;\r
3667       } _sifields;\r
3668   } siginfo_t ;\r
3669 # 153 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
3670 enum\r
3671 {\r
3672   SI_ASYNCNL = -60,\r
3673 \r
3674   SI_TKILL = -6,\r
3675 \r
3676   SI_SIGIO,\r
3677 \r
3678   SI_ASYNCIO,\r
3679 \r
3680   SI_MESGQ,\r
3681 \r
3682   SI_TIMER,\r
3683 \r
3684   SI_QUEUE,\r
3685 \r
3686   SI_USER,\r
3687 \r
3688   SI_KERNEL = 0x80\r
3689 \r
3690 };\r
3691 \r
3692 \r
3693 \r
3694 enum\r
3695 {\r
3696   ILL_ILLOPC = 1,\r
3697 \r
3698   ILL_ILLOPN,\r
3699 \r
3700   ILL_ILLADR,\r
3701 \r
3702   ILL_ILLTRP,\r
3703 \r
3704   ILL_PRVOPC,\r
3705 \r
3706   ILL_PRVREG,\r
3707 \r
3708   ILL_COPROC,\r
3709 \r
3710   ILL_BADSTK\r
3711 \r
3712 };\r
3713 \r
3714 \r
3715 enum\r
3716 {\r
3717   FPE_INTDIV = 1,\r
3718 \r
3719   FPE_INTOVF,\r
3720 \r
3721   FPE_FLTDIV,\r
3722 \r
3723   FPE_FLTOVF,\r
3724 \r
3725   FPE_FLTUND,\r
3726 \r
3727   FPE_FLTRES,\r
3728 \r
3729   FPE_FLTINV,\r
3730 \r
3731   FPE_FLTSUB\r
3732 \r
3733 };\r
3734 \r
3735 \r
3736 enum\r
3737 {\r
3738   SEGV_MAPERR = 1,\r
3739 \r
3740   SEGV_ACCERR\r
3741 \r
3742 };\r
3743 \r
3744 \r
3745 enum\r
3746 {\r
3747   BUS_ADRALN = 1,\r
3748 \r
3749   BUS_ADRERR,\r
3750 \r
3751   BUS_OBJERR,\r
3752 \r
3753   BUS_MCEERR_AR,\r
3754 \r
3755   BUS_MCEERR_AO\r
3756 \r
3757 };\r
3758 \r
3759 \r
3760 enum\r
3761 {\r
3762   TRAP_BRKPT = 1,\r
3763 \r
3764   TRAP_TRACE\r
3765 \r
3766 };\r
3767 \r
3768 \r
3769 enum\r
3770 {\r
3771   CLD_EXITED = 1,\r
3772 \r
3773   CLD_KILLED,\r
3774 \r
3775   CLD_DUMPED,\r
3776 \r
3777   CLD_TRAPPED,\r
3778 \r
3779   CLD_STOPPED,\r
3780 \r
3781   CLD_CONTINUED\r
3782 \r
3783 };\r
3784 \r
3785 \r
3786 enum\r
3787 {\r
3788   POLL_IN = 1,\r
3789 \r
3790   POLL_OUT,\r
3791 \r
3792   POLL_MSG,\r
3793 \r
3794   POLL_ERR,\r
3795 \r
3796   POLL_PRI,\r
3797 \r
3798   POLL_HUP\r
3799 \r
3800 };\r
3801 # 307 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
3802 typedef struct sigevent\r
3803   {\r
3804     sigval_t sigev_value;\r
3805     int sigev_signo;\r
3806     int sigev_notify;\r
3807 \r
3808     union\r
3809       {\r
3810  int _pad[((64 / sizeof (int)) - 4)];\r
3811 \r
3812 \r
3813 \r
3814  __pid_t _tid;\r
3815 \r
3816  struct\r
3817    {\r
3818      void (*_function) (sigval_t);\r
3819      pthread_attr_t *_attribute;\r
3820    } _sigev_thread;\r
3821       } _sigev_un;\r
3822   } sigevent_t;\r
3823 \r
3824 \r
3825 \r
3826 \r
3827 \r
3828 \r
3829 enum\r
3830 {\r
3831   SIGEV_SIGNAL = 0,\r
3832 \r
3833   SIGEV_NONE,\r
3834 \r
3835   SIGEV_THREAD,\r
3836 \r
3837 \r
3838   SIGEV_THREAD_ID = 4\r
3839 \r
3840 };\r
3841 # 81 "/usr/include/signal.h" 2 3 4\r
3842 \r
3843 \r
3844 \r
3845 \r
3846 typedef void (*__sighandler_t) (int);\r
3847 \r
3848 \r
3849 \r
3850 \r
3851 extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)\r
3852      __attribute__ ((__nothrow__ ));\r
3853 # 102 "/usr/include/signal.h" 3 4\r
3854 extern __sighandler_t signal (int __sig, __sighandler_t __handler)\r
3855      __attribute__ ((__nothrow__ ));\r
3856 # 127 "/usr/include/signal.h" 3 4\r
3857 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ ));\r
3858 \r
3859 \r
3860 \r
3861 \r
3862 \r
3863 \r
3864 extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ ));\r
3865 \r
3866 \r
3867 \r
3868 \r
3869 extern int raise (int __sig) __attribute__ ((__nothrow__ ));\r
3870 \r
3871 \r
3872 \r
3873 \r
3874 extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)\r
3875      __attribute__ ((__nothrow__ ));\r
3876 extern int gsignal (int __sig) __attribute__ ((__nothrow__ ));\r
3877 \r
3878 \r
3879 \r
3880 \r
3881 extern void psignal (int __sig, const char *__s);\r
3882 \r
3883 \r
3884 \r
3885 \r
3886 extern void psiginfo (const siginfo_t *__pinfo, const char *__s);\r
3887 # 167 "/usr/include/signal.h" 3 4\r
3888 extern int __sigpause (int __sig_or_mask, int __is_sig);\r
3889 # 189 "/usr/include/signal.h" 3 4\r
3890 extern int sigblock (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
3891 \r
3892 \r
3893 extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
3894 \r
3895 \r
3896 extern int siggetmask (void) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
3897 # 209 "/usr/include/signal.h" 3 4\r
3898 typedef __sighandler_t sig_t;\r
3899 \r
3900 \r
3901 \r
3902 \r
3903 \r
3904 extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3905 \r
3906 \r
3907 extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3908 \r
3909 \r
3910 extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3911 \r
3912 \r
3913 extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3914 \r
3915 \r
3916 extern int sigismember (const sigset_t *__set, int __signo)\r
3917      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3918 # 245 "/usr/include/signal.h" 3 4\r
3919 # 1 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 1 3 4\r
3920 # 24 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 3 4\r
3921 struct sigaction\r
3922   {\r
3923 \r
3924 \r
3925     union\r
3926       {\r
3927 \r
3928  __sighandler_t sa_handler;\r
3929 \r
3930  void (*sa_sigaction) (int, siginfo_t *, void *);\r
3931       }\r
3932     __sigaction_handler;\r
3933 \r
3934 \r
3935 \r
3936 \r
3937 \r
3938 \r
3939 \r
3940     __sigset_t sa_mask;\r
3941 \r
3942 \r
3943     int sa_flags;\r
3944 \r
3945 \r
3946     void (*sa_restorer) (void);\r
3947   };\r
3948 # 246 "/usr/include/signal.h" 2 3 4\r
3949 \r
3950 \r
3951 extern int sigprocmask (int __how, const sigset_t *__restrict __set,\r
3952    sigset_t *__restrict __oset) __attribute__ ((__nothrow__ ));\r
3953 \r
3954 \r
3955 \r
3956 \r
3957 \r
3958 \r
3959 extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));\r
3960 \r
3961 \r
3962 extern int sigaction (int __sig, const struct sigaction *__restrict __act,\r
3963         struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ ));\r
3964 \r
3965 \r
3966 extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3967 \r
3968 \r
3969 \r
3970 \r
3971 \r
3972 \r
3973 extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)\r
3974      __attribute__ ((__nonnull__ (1, 2)));\r
3975 \r
3976 \r
3977 \r
3978 \r
3979 \r
3980 \r
3981 extern int sigwaitinfo (const sigset_t *__restrict __set,\r
3982    siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));\r
3983 \r
3984 \r
3985 \r
3986 \r
3987 \r
3988 \r
3989 extern int sigtimedwait (const sigset_t *__restrict __set,\r
3990     siginfo_t *__restrict __info,\r
3991     const struct timespec *__restrict __timeout)\r
3992      __attribute__ ((__nonnull__ (1)));\r
3993 \r
3994 \r
3995 \r
3996 extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)\r
3997      __attribute__ ((__nothrow__ ));\r
3998 # 303 "/usr/include/signal.h" 3 4\r
3999 extern const char *const _sys_siglist[65];\r
4000 extern const char *const sys_siglist[65];\r
4001 \r
4002 \r
4003 struct sigvec\r
4004   {\r
4005     __sighandler_t sv_handler;\r
4006     int sv_mask;\r
4007 \r
4008     int sv_flags;\r
4009 \r
4010   };\r
4011 # 327 "/usr/include/signal.h" 3 4\r
4012 extern int sigvec (int __sig, const struct sigvec *__vec,\r
4013      struct sigvec *__ovec) __attribute__ ((__nothrow__ ));\r
4014 \r
4015 \r
4016 \r
4017 \r
4018 # 1 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 1 3 4\r
4019 # 29 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4\r
4020 struct _fpx_sw_bytes\r
4021 {\r
4022   __uint32_t magic1;\r
4023   __uint32_t extended_size;\r
4024   __uint64_t xstate_bv;\r
4025   __uint32_t xstate_size;\r
4026   __uint32_t padding[7];\r
4027 };\r
4028 \r
4029 struct _fpreg\r
4030 {\r
4031   unsigned short significand[4];\r
4032   unsigned short exponent;\r
4033 };\r
4034 \r
4035 struct _fpxreg\r
4036 {\r
4037   unsigned short significand[4];\r
4038   unsigned short exponent;\r
4039   unsigned short padding[3];\r
4040 };\r
4041 \r
4042 struct _xmmreg\r
4043 {\r
4044   __uint32_t element[4];\r
4045 };\r
4046 # 121 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4\r
4047 struct _fpstate\r
4048 {\r
4049 \r
4050   __uint16_t cwd;\r
4051   __uint16_t swd;\r
4052   __uint16_t ftw;\r
4053   __uint16_t fop;\r
4054   __uint64_t rip;\r
4055   __uint64_t rdp;\r
4056   __uint32_t mxcsr;\r
4057   __uint32_t mxcr_mask;\r
4058   struct _fpxreg _st[8];\r
4059   struct _xmmreg _xmm[16];\r
4060   __uint32_t padding[24];\r
4061 };\r
4062 \r
4063 struct sigcontext\r
4064 {\r
4065   __uint64_t r8;\r
4066   __uint64_t r9;\r
4067   __uint64_t r10;\r
4068   __uint64_t r11;\r
4069   __uint64_t r12;\r
4070   __uint64_t r13;\r
4071   __uint64_t r14;\r
4072   __uint64_t r15;\r
4073   __uint64_t rdi;\r
4074   __uint64_t rsi;\r
4075   __uint64_t rbp;\r
4076   __uint64_t rbx;\r
4077   __uint64_t rdx;\r
4078   __uint64_t rax;\r
4079   __uint64_t rcx;\r
4080   __uint64_t rsp;\r
4081   __uint64_t rip;\r
4082   __uint64_t eflags;\r
4083   unsigned short cs;\r
4084   unsigned short gs;\r
4085   unsigned short fs;\r
4086   unsigned short __pad0;\r
4087   __uint64_t err;\r
4088   __uint64_t trapno;\r
4089   __uint64_t oldmask;\r
4090   __uint64_t cr2;\r
4091   __extension__ union\r
4092     {\r
4093       struct _fpstate * fpstate;\r
4094       __uint64_t __fpstate_word;\r
4095     };\r
4096   __uint64_t __reserved1 [8];\r
4097 };\r
4098 \r
4099 \r
4100 \r
4101 struct _xsave_hdr\r
4102 {\r
4103   __uint64_t xstate_bv;\r
4104   __uint64_t reserved1[2];\r
4105   __uint64_t reserved2[5];\r
4106 };\r
4107 \r
4108 struct _ymmh_state\r
4109 {\r
4110   __uint32_t ymmh_space[64];\r
4111 };\r
4112 \r
4113 struct _xstate\r
4114 {\r
4115   struct _fpstate fpstate;\r
4116   struct _xsave_hdr xstate_hdr;\r
4117   struct _ymmh_state ymmh;\r
4118 };\r
4119 # 333 "/usr/include/signal.h" 2 3 4\r
4120 \r
4121 \r
4122 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ ));\r
4123 \r
4124 \r
4125 \r
4126 \r
4127 \r
4128 \r
4129 \r
4130 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
4131 # 343 "/usr/include/signal.h" 2 3 4\r
4132 \r
4133 \r
4134 \r
4135 \r
4136 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ ));\r
4137 \r
4138 \r
4139 # 1 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 1 3 4\r
4140 # 25 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4\r
4141 struct sigstack\r
4142   {\r
4143     void *ss_sp;\r
4144     int ss_onstack;\r
4145   };\r
4146 \r
4147 \r
4148 \r
4149 enum\r
4150 {\r
4151   SS_ONSTACK = 1,\r
4152 \r
4153   SS_DISABLE\r
4154 \r
4155 };\r
4156 # 49 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4\r
4157 typedef struct sigaltstack\r
4158   {\r
4159     void *ss_sp;\r
4160     int ss_flags;\r
4161     size_t ss_size;\r
4162   } stack_t;\r
4163 # 350 "/usr/include/signal.h" 2 3 4\r
4164 \r
4165 \r
4166 # 1 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 1 3 4\r
4167 # 22 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4\r
4168 # 1 "/usr/include/signal.h" 1 3 4\r
4169 # 23 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 2 3 4\r
4170 \r
4171 \r
4172 \r
4173 \r
4174 \r
4175 \r
4176 \r
4177 \r
4178 __extension__ typedef long long int greg_t;\r
4179 \r
4180 \r
4181 \r
4182 \r
4183 \r
4184 typedef greg_t gregset_t[23];\r
4185 # 92 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4\r
4186 struct _libc_fpxreg\r
4187 {\r
4188   unsigned short int significand[4];\r
4189   unsigned short int exponent;\r
4190   unsigned short int padding[3];\r
4191 };\r
4192 \r
4193 struct _libc_xmmreg\r
4194 {\r
4195   __uint32_t element[4];\r
4196 };\r
4197 \r
4198 struct _libc_fpstate\r
4199 {\r
4200 \r
4201   __uint16_t cwd;\r
4202   __uint16_t swd;\r
4203   __uint16_t ftw;\r
4204   __uint16_t fop;\r
4205   __uint64_t rip;\r
4206   __uint64_t rdp;\r
4207   __uint32_t mxcsr;\r
4208   __uint32_t mxcr_mask;\r
4209   struct _libc_fpxreg _st[8];\r
4210   struct _libc_xmmreg _xmm[16];\r
4211   __uint32_t padding[24];\r
4212 };\r
4213 \r
4214 \r
4215 typedef struct _libc_fpstate *fpregset_t;\r
4216 \r
4217 \r
4218 typedef struct\r
4219   {\r
4220     gregset_t gregs;\r
4221 \r
4222     fpregset_t fpregs;\r
4223     __extension__ unsigned long long __reserved1 [8];\r
4224 } mcontext_t;\r
4225 \r
4226 \r
4227 typedef struct ucontext\r
4228   {\r
4229     unsigned long int uc_flags;\r
4230     struct ucontext *uc_link;\r
4231     stack_t uc_stack;\r
4232     mcontext_t uc_mcontext;\r
4233     __sigset_t uc_sigmask;\r
4234     struct _libc_fpstate __fpregs_mem;\r
4235   } ucontext_t;\r
4236 # 353 "/usr/include/signal.h" 2 3 4\r
4237 \r
4238 \r
4239 \r
4240 \r
4241 \r
4242 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)\r
4243      __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
4244 \r
4245 \r
4246 \r
4247 extern int sigaltstack (const struct sigaltstack *__restrict __ss,\r
4248    struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__ ));\r
4249 # 388 "/usr/include/signal.h" 3 4\r
4250 # 1 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 1 3 4\r
4251 # 30 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 3 4\r
4252 extern int pthread_sigmask (int __how,\r
4253        const __sigset_t *__restrict __newmask,\r
4254        __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ ));\r
4255 \r
4256 \r
4257 extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ ));\r
4258 # 389 "/usr/include/signal.h" 2 3 4\r
4259 \r
4260 \r
4261 \r
4262 \r
4263 \r
4264 \r
4265 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ ));\r
4266 \r
4267 extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ ));\r
4268 # 30 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4\r
4269 # 102 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
4270 extern __pid_t wait (__WAIT_STATUS __stat_loc);\r
4271 # 125 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
4272 extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);\r
4273 # 135 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
4274 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 1 3 4\r
4275 # 24 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
4276 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
4277 # 25 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 2 3 4\r
4278 # 136 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4\r
4279 # 148 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
4280 extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,\r
4281      int __options);\r
4282 \r
4283 \r
4284 \r
4285 \r
4286 \r
4287 struct rusage;\r
4288 \r
4289 \r
4290 \r
4291 \r
4292 \r
4293 \r
4294 extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,\r
4295         struct rusage * __usage) __attribute__ ((__nothrow__));\r
4296 \r
4297 \r
4298 \r
4299 \r
4300 extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,\r
4301         struct rusage *__usage) __attribute__ ((__nothrow__));\r
4302 # 183 "../include/apr.h" 2\r
4303 # 193 "../include/apr.h"\r
4304 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 1 3\r
4305 # 37 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 3\r
4306 # 1 "/usr/include/limits.h" 1 3 4\r
4307 # 143 "/usr/include/limits.h" 3 4\r
4308 # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4\r
4309 # 160 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4\r
4310 # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4\r
4311 # 38 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4\r
4312 # 1 "/usr/include/linux/limits.h" 1 3 4\r
4313 # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4\r
4314 # 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4\r
4315 # 144 "/usr/include/limits.h" 2 3 4\r
4316 \r
4317 \r
4318 \r
4319 # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4\r
4320 # 148 "/usr/include/limits.h" 2 3 4\r
4321 # 38 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 2 3\r
4322 # 194 "../include/apr.h" 2\r
4323 # 309 "../include/apr.h"\r
4324 typedef unsigned char apr_byte_t;\r
4325 \r
4326 typedef short apr_int16_t;\r
4327 typedef unsigned short apr_uint16_t;\r
4328 \r
4329 typedef int apr_int32_t;\r
4330 typedef unsigned int apr_uint32_t;\r
4331 # 352 "../include/apr.h"\r
4332  typedef long apr_int64_t;\r
4333  typedef unsigned long apr_uint64_t;\r
4334 \r
4335 \r
4336 typedef size_t apr_size_t;\r
4337 typedef ssize_t apr_ssize_t;\r
4338 typedef off_t apr_off_t;\r
4339 typedef socklen_t apr_socklen_t;\r
4340 typedef ino_t apr_ino_t;\r
4341 \r
4342 \r
4343 typedef apr_uint64_t apr_uintptr_t;\r
4344 # 44 "../include/apr_pools.h" 2\r
4345 # 1 "../include/apr_errno.h" 1\r
4346 # 28 "../include/apr_errno.h"\r
4347 # 1 "/usr/include/errno.h" 1 3 4\r
4348 # 35 "/usr/include/errno.h" 3 4\r
4349 # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4\r
4350 # 24 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4\r
4351 # 1 "/usr/include/linux/errno.h" 1 3 4\r
4352 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4\r
4353 # 1 "/usr/include/asm-generic/errno.h" 1 3 4\r
4354 \r
4355 \r
4356 \r
4357 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4\r
4358 # 5 "/usr/include/asm-generic/errno.h" 2 3 4\r
4359 # 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4\r
4360 # 2 "/usr/include/linux/errno.h" 2 3 4\r
4361 # 25 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4\r
4362 # 50 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4\r
4363 extern int *__errno_location (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
4364 # 36 "/usr/include/errno.h" 2 3 4\r
4365 # 29 "../include/apr_errno.h" 2\r
4366 # 44 "../include/apr_errno.h"\r
4367 typedef int apr_status_t;\r
4368 \r
4369 \r
4370 \r
4371 \r
4372 \r
4373 \r
4374 \r
4375 char * apr_strerror(apr_status_t statcode, char *buf,\r
4376                                  apr_size_t bufsize);\r
4377 # 45 "../include/apr_pools.h" 2\r
4378 # 1 "../include/apr_general.h" 1\r
4379 # 29 "../include/apr_general.h"\r
4380 # 1 "../include/apr_pools.h" 1\r
4381 # 30 "../include/apr_general.h" 2\r
4382 # 68 "../include/apr_general.h"\r
4383 typedef int apr_signum_t;\r
4384 # 177 "../include/apr_general.h"\r
4385 apr_status_t apr_initialize(void);\r
4386 # 191 "../include/apr_general.h"\r
4387 apr_status_t apr_app_initialize(int *argc,\r
4388                                              char const * const * *argv,\r
4389                                              char const * const * *env);\r
4390 # 205 "../include/apr_general.h"\r
4391 void apr_terminate(void);\r
4392 # 216 "../include/apr_general.h"\r
4393 void apr_terminate2(void);\r
4394 # 233 "../include/apr_general.h"\r
4395 apr_status_t apr_generate_random_bytes(unsigned char * buf,\r
4396                                                     apr_size_t length);\r
4397 # 46 "../include/apr_pools.h" 2\r
4398 \r
4399 # 1 "../include/apr_want.h" 1\r
4400 # 48 "../include/apr_pools.h" 2\r
4401 # 60 "../include/apr_pools.h"\r
4402 typedef struct apr_pool_t apr_pool_t;\r
4403 # 148 "../include/apr_pools.h"\r
4404 typedef int (*apr_abortfunc_t)(int retcode);\r
4405 # 164 "../include/apr_pools.h"\r
4406 apr_status_t apr_pool_initialize(void);\r
4407 \r
4408 \r
4409 \r
4410 \r
4411 \r
4412 \r
4413 \r
4414 void apr_pool_terminate(void);\r
4415 \r
4416 \r
4417 \r
4418 \r
4419 \r
4420 \r
4421 \r
4422 # 1 "../include/apr_allocator.h" 1\r
4423 # 28 "../include/apr_allocator.h"\r
4424 # 1 "../include/apr_want.h" 1\r
4425 # 29 "../include/apr_allocator.h" 2\r
4426 # 41 "../include/apr_allocator.h"\r
4427 typedef struct apr_allocator_t apr_allocator_t;\r
4428 \r
4429 typedef struct apr_memnode_t apr_memnode_t;\r
4430 # 54 "../include/apr_allocator.h"\r
4431 struct apr_memnode_t {\r
4432     apr_memnode_t *next;\r
4433     apr_memnode_t **ref;\r
4434     apr_uint32_t index;\r
4435     apr_uint32_t free_index;\r
4436     char *first_avail;\r
4437     char *endp;\r
4438 };\r
4439 # 74 "../include/apr_allocator.h"\r
4440 apr_status_t apr_allocator_create(apr_allocator_t **allocator)\r
4441                           __attribute__((nonnull(1)));\r
4442 \r
4443 \r
4444 \r
4445 \r
4446 \r
4447 \r
4448 \r
4449 void apr_allocator_destroy(apr_allocator_t *allocator)\r
4450                   __attribute__((nonnull(1)));\r
4451 \r
4452 \r
4453 \r
4454 \r
4455 \r
4456 \r
4457 \r
4458 apr_memnode_t * apr_allocator_alloc(apr_allocator_t *allocator,\r
4459                                                  apr_size_t size)\r
4460                              __attribute__((nonnull(1)));\r
4461 # 103 "../include/apr_allocator.h"\r
4462 void apr_allocator_free(apr_allocator_t *allocator,\r
4463                                      apr_memnode_t *memnode)\r
4464                   __attribute__((nonnull(1,2)));\r
4465 \r
4466 \r
4467 # 1 "../include/apr_pools.h" 1\r
4468 # 108 "../include/apr_allocator.h" 2\r
4469 # 120 "../include/apr_allocator.h"\r
4470 void apr_allocator_owner_set(apr_allocator_t *allocator,\r
4471                                           apr_pool_t *pool)\r
4472                   __attribute__((nonnull(1)));\r
4473 \r
4474 \r
4475 \r
4476 \r
4477 \r
4478 apr_pool_t * apr_allocator_owner_get(apr_allocator_t *allocator)\r
4479                           __attribute__((nonnull(1)));\r
4480 \r
4481 \r
4482 \r
4483 \r
4484 \r
4485 \r
4486 \r
4487 void apr_allocator_max_free_set(apr_allocator_t *allocator,\r
4488                                              apr_size_t size)\r
4489                   __attribute__((nonnull(1)));\r
4490 \r
4491 \r
4492 # 1 "../include/apr_thread_mutex.h" 1\r
4493 # 41 "../include/apr_thread_mutex.h"\r
4494 typedef struct apr_thread_mutex_t apr_thread_mutex_t;\r
4495 \r
4496 \r
4497 \r
4498 \r
4499 \r
4500 \r
4501 \r
4502 # 1 "../include/apr_pools.h" 1\r
4503 # 49 "../include/apr_thread_mutex.h" 2\r
4504 # 65 "../include/apr_thread_mutex.h"\r
4505 apr_status_t apr_thread_mutex_create(apr_thread_mutex_t **mutex,\r
4506                                                   unsigned int flags,\r
4507                                                   apr_pool_t *pool);\r
4508 \r
4509 \r
4510 \r
4511 \r
4512 \r
4513 apr_status_t apr_thread_mutex_lock(apr_thread_mutex_t *mutex);\r
4514 # 82 "../include/apr_thread_mutex.h"\r
4515 apr_status_t apr_thread_mutex_trylock(apr_thread_mutex_t *mutex);\r
4516 \r
4517 \r
4518 \r
4519 \r
4520 \r
4521 apr_status_t apr_thread_mutex_unlock(apr_thread_mutex_t *mutex);\r
4522 \r
4523 \r
4524 \r
4525 \r
4526 \r
4527 apr_status_t apr_thread_mutex_destroy(apr_thread_mutex_t *mutex);\r
4528 \r
4529 \r
4530 \r
4531 \r
4532 \r
4533 apr_pool_t * apr_thread_mutex_pool_get (const apr_thread_mutex_t *thethread_mutex);\r
4534 # 142 "../include/apr_allocator.h" 2\r
4535 \r
4536 \r
4537 \r
4538 \r
4539 \r
4540 \r
4541 \r
4542 void apr_allocator_mutex_set(apr_allocator_t *allocator,\r
4543                                           apr_thread_mutex_t *mutex)\r
4544                   __attribute__((nonnull(1)));\r
4545 \r
4546 \r
4547 \r
4548 \r
4549 \r
4550 apr_thread_mutex_t * apr_allocator_mutex_get(\r
4551                                           apr_allocator_t *allocator)\r
4552                                   __attribute__((nonnull(1)));\r
4553 # 180 "../include/apr_pools.h" 2\r
4554 # 196 "../include/apr_pools.h"\r
4555 apr_status_t apr_pool_create_ex(apr_pool_t **newpool,\r
4556                                              apr_pool_t *parent,\r
4557                                              apr_abortfunc_t abort_fn,\r
4558                                              apr_allocator_t *allocator)\r
4559                           __attribute__((nonnull(1)));\r
4560 \r
4561 \r
4562 \r
4563 \r
4564 \r
4565 apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool,\r
4566                                                   apr_abortfunc_t abort_fn,\r
4567                                                   apr_allocator_t *allocator);\r
4568 # 226 "../include/apr_pools.h"\r
4569 apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool,\r
4570                                                    apr_abortfunc_t abort_fn,\r
4571                                                    apr_allocator_t *allocator)\r
4572                           __attribute__((nonnull(1)));\r
4573 # 247 "../include/apr_pools.h"\r
4574 apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool,\r
4575                                                    apr_pool_t *parent,\r
4576                                                    apr_abortfunc_t abort_fn,\r
4577                                                    apr_allocator_t *allocator,\r
4578                                                    const char *file_line)\r
4579                           __attribute__((nonnull(1)));\r
4580 # 264 "../include/apr_pools.h"\r
4581 apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool,\r
4582                                                    apr_abortfunc_t abort_fn,\r
4583                                                    apr_allocator_t *allocator,\r
4584                                                    const char *file_line);\r
4585 # 284 "../include/apr_pools.h"\r
4586 apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,\r
4587                                                    apr_abortfunc_t abort_fn,\r
4588                                                    apr_allocator_t *allocator,\r
4589                                                    const char *file_line)\r
4590                           __attribute__((nonnull(1)));\r
4591 # 354 "../include/apr_pools.h"\r
4592 apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)\r
4593                                __attribute__((nonnull(1)));\r
4594 # 365 "../include/apr_pools.h"\r
4595 void apr_pool_clear(apr_pool_t *p) __attribute__((nonnull(1)));\r
4596 # 380 "../include/apr_pools.h"\r
4597 void apr_pool_clear_debug(apr_pool_t *p,\r
4598                                        const char *file_line)\r
4599                   __attribute__((nonnull(1)));\r
4600 # 395 "../include/apr_pools.h"\r
4601 void apr_pool_destroy(apr_pool_t *p) __attribute__((nonnull(1)));\r
4602 # 410 "../include/apr_pools.h"\r
4603 void apr_pool_destroy_debug(apr_pool_t *p,\r
4604                                          const char *file_line)\r
4605                   __attribute__((nonnull(1)));\r
4606 # 430 "../include/apr_pools.h"\r
4607 void * apr_palloc(apr_pool_t *p, apr_size_t size)\r
4608 \r
4609 \r
4610 \r
4611                     __attribute__((nonnull(1)));\r
4612 # 444 "../include/apr_pools.h"\r
4613 void * apr_palloc_debug(apr_pool_t *p, apr_size_t size,\r
4614                                      const char *file_line)\r
4615 \r
4616 \r
4617 \r
4618                     __attribute__((nonnull(1)));\r
4619 # 476 "../include/apr_pools.h"\r
4620 void * apr_pcalloc_debug(apr_pool_t *p, apr_size_t size,\r
4621                                       const char *file_line)\r
4622                     __attribute__((nonnull(1)));\r
4623 # 498 "../include/apr_pools.h"\r
4624 void apr_pool_abort_set(apr_abortfunc_t abortfunc,\r
4625                                      apr_pool_t *pool)\r
4626                   __attribute__((nonnull(2)));\r
4627 \r
4628 \r
4629 \r
4630 \r
4631 \r
4632 \r
4633 apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)\r
4634                              __attribute__((nonnull(1)));\r
4635 \r
4636 \r
4637 \r
4638 \r
4639 \r
4640 \r
4641 apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)\r
4642                           __attribute__((nonnull(1)));\r
4643 # 529 "../include/apr_pools.h"\r
4644 int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);\r
4645 \r
4646 \r
4647 \r
4648 \r
4649 \r
4650 \r
4651 void apr_pool_tag(apr_pool_t *pool, const char *tag)\r
4652                   __attribute__((nonnull(1)));\r
4653 # 563 "../include/apr_pools.h"\r
4654 apr_status_t apr_pool_userdata_set(const void *data,\r
4655                                                 const char *key,\r
4656                                                 apr_status_t (*cleanup)(void *),\r
4657                                                 apr_pool_t *pool)\r
4658                           __attribute__((nonnull(2,4)));\r
4659 # 588 "../include/apr_pools.h"\r
4660 apr_status_t apr_pool_userdata_setn(\r
4661                                 const void *data, const char *key,\r
4662                                 apr_status_t (*cleanup)(void *),\r
4663                                 apr_pool_t *pool)\r
4664                           __attribute__((nonnull(2,4)));\r
4665 \r
4666 \r
4667 \r
4668 \r
4669 \r
4670 \r
4671 \r
4672 apr_status_t apr_pool_userdata_get(void **data, const char *key,\r
4673                                                 apr_pool_t *pool)\r
4674                           __attribute__((nonnull(1,2,3)));\r
4675 # 628 "../include/apr_pools.h"\r
4676 void apr_pool_cleanup_register(\r
4677                             apr_pool_t *p, const void *data,\r
4678                             apr_status_t (*plain_cleanup)(void *),\r
4679                             apr_status_t (*child_cleanup)(void *))\r
4680                   __attribute__((nonnull(3,4)));\r
4681 # 646 "../include/apr_pools.h"\r
4682 void apr_pool_pre_cleanup_register(\r
4683                             apr_pool_t *p, const void *data,\r
4684                             apr_status_t (*plain_cleanup)(void *))\r
4685                   __attribute__((nonnull(3)));\r
4686 # 663 "../include/apr_pools.h"\r
4687 void apr_pool_cleanup_kill(apr_pool_t *p, const void *data,\r
4688                                         apr_status_t (*cleanup)(void *))\r
4689                   __attribute__((nonnull(3)));\r
4690 # 679 "../include/apr_pools.h"\r
4691 void apr_pool_child_cleanup_set(\r
4692                         apr_pool_t *p, const void *data,\r
4693                         apr_status_t (*plain_cleanup)(void *),\r
4694                         apr_status_t (*child_cleanup)(void *))\r
4695                   __attribute__((nonnull(3,4)));\r
4696 # 696 "../include/apr_pools.h"\r
4697 apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data,\r
4698                                                apr_status_t (*cleanup)(void *))\r
4699                           __attribute__((nonnull(3)));\r
4700 # 707 "../include/apr_pools.h"\r
4701 apr_status_t apr_pool_cleanup_null(void *data);\r
4702 \r
4703 \r
4704 \r
4705 \r
4706 \r
4707 \r
4708 \r
4709 void apr_pool_cleanup_for_exec(void);\r
4710 # 18 "./../test/testutil.h" 2\r
4711 \r
4712 # 1 "./../test/abts.h" 1\r
4713 # 20 "./../test/testutil.h" 2\r
4714 # 52 "./../test/testutil.h"\r
4715 extern apr_pool_t *p;\r
4716 \r
4717 \r
4718 \r
4719 void apr_assert_success(abts_case* tc, const char *context,\r
4720                         apr_status_t rv, int lineno);\r
4721 \r
4722 \r
4723 \r
4724 void initialize(void);\r
4725 \r
4726 abts_suite *testatomic(abts_suite *suite);\r
4727 abts_suite *testdir(abts_suite *suite);\r
4728 abts_suite *testdso(abts_suite *suite);\r
4729 abts_suite *testdup(abts_suite *suite);\r
4730 abts_suite *testescape(abts_suite *suite);\r
4731 abts_suite *testenv(abts_suite *suite);\r
4732 abts_suite *testfile(abts_suite *suite);\r
4733 abts_suite *testfilecopy(abts_suite *suite);\r
4734 abts_suite *testfileinfo(abts_suite *suite);\r
4735 abts_suite *testflock(abts_suite *suite);\r
4736 abts_suite *testfmt(abts_suite *suite);\r
4737 abts_suite *testfnmatch(abts_suite *suite);\r
4738 abts_suite *testgetopt(abts_suite *suite);\r
4739 abts_suite *testglobalmutex(abts_suite *suite);\r
4740 abts_suite *testhash(abts_suite *suite);\r
4741 abts_suite *testipsub(abts_suite *suite);\r
4742 abts_suite *testlock(abts_suite *suite);\r
4743 abts_suite *testcond(abts_suite *suite);\r
4744 abts_suite *testlfs(abts_suite *suite);\r
4745 abts_suite *testmmap(abts_suite *suite);\r
4746 abts_suite *testnames(abts_suite *suite);\r
4747 abts_suite *testoc(abts_suite *suite);\r
4748 abts_suite *testpath(abts_suite *suite);\r
4749 abts_suite *testpipe(abts_suite *suite);\r
4750 abts_suite *testpoll(abts_suite *suite);\r
4751 abts_suite *testpool(abts_suite *suite);\r
4752 abts_suite *testproc(abts_suite *suite);\r
4753 abts_suite *testprocmutex(abts_suite *suite);\r
4754 abts_suite *testrand(abts_suite *suite);\r
4755 abts_suite *testsleep(abts_suite *suite);\r
4756 abts_suite *testshm(abts_suite *suite);\r
4757 abts_suite *testsock(abts_suite *suite);\r
4758 abts_suite *testsockets(abts_suite *suite);\r
4759 abts_suite *testsockopt(abts_suite *suite);\r
4760 abts_suite *teststr(abts_suite *suite);\r
4761 abts_suite *teststrnatcmp(abts_suite *suite);\r
4762 abts_suite *testtable(abts_suite *suite);\r
4763 abts_suite *testtemp(abts_suite *suite);\r
4764 abts_suite *testthread(abts_suite *suite);\r
4765 abts_suite *testtime(abts_suite *suite);\r
4766 abts_suite *testud(abts_suite *suite);\r
4767 abts_suite *testuser(abts_suite *suite);\r
4768 abts_suite *testvsn(abts_suite *suite);\r
4769 # 9 "main1.c" 2\r
4770 \r
4771 # 1 "./../test/testatomic.c" 1\r
4772 # 17 "./../test/testatomic.c"\r
4773 # 1 "./../test/testutil.h" 1\r
4774 # 19 "./../test/testutil.h"\r
4775 # 1 "./../test/abts.h" 1\r
4776 # 20 "./../test/testutil.h" 2\r
4777 # 18 "./../test/testatomic.c" 2\r
4778 # 1 "../include/apr_strings.h" 1\r
4779 # 52 "../include/apr_strings.h"\r
4780 # 1 "../include/apr_want.h" 1\r
4781 # 53 "../include/apr_strings.h" 2\r
4782 # 76 "../include/apr_strings.h"\r
4783 int apr_strnatcmp(char const *a, char const *b);\r
4784 # 87 "../include/apr_strings.h"\r
4785 int apr_strnatcasecmp(char const *a, char const *b);\r
4786 \r
4787 \r
4788 \r
4789 \r
4790 \r
4791 \r
4792 \r
4793 char * apr_pstrdup(apr_pool_t *p, const char *s);\r
4794 # 109 "../include/apr_strings.h"\r
4795 char * apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n)\r
4796 \r
4797 \r
4798 \r
4799     ;\r
4800 # 125 "../include/apr_strings.h"\r
4801 char * apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n);\r
4802 # 135 "../include/apr_strings.h"\r
4803 void * apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n)\r
4804 \r
4805 \r
4806 \r
4807     ;\r
4808 \r
4809 \r
4810 \r
4811 \r
4812 \r
4813 \r
4814 \r
4815 char * apr_pstrcat(apr_pool_t *p, ...)\r
4816 \r
4817     __attribute__((sentinel))\r
4818 \r
4819     ;\r
4820 # 161 "../include/apr_strings.h"\r
4821 char * apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,\r
4822                                  apr_size_t nvec, apr_size_t *nbytes);\r
4823 # 172 "../include/apr_strings.h"\r
4824 char * apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap);\r
4825 # 182 "../include/apr_strings.h"\r
4826 char * apr_psprintf(apr_pool_t *p, const char *fmt, ...)\r
4827         __attribute__((format(printf,2,3)));\r
4828 # 207 "../include/apr_strings.h"\r
4829 char * apr_cpystrn(char *dst, const char *src,\r
4830                                 apr_size_t dst_size);\r
4831 # 217 "../include/apr_strings.h"\r
4832 char * apr_collapse_spaces(char *dest, const char *src);\r
4833 # 226 "../include/apr_strings.h"\r
4834 apr_status_t apr_tokenize_to_argv(const char *arg_str,\r
4835                                                char ***argv_out,\r
4836                                                apr_pool_t *token_context);\r
4837 # 247 "../include/apr_strings.h"\r
4838 char * apr_strtok(char *str, const char *sep, char **last);\r
4839 # 279 "../include/apr_strings.h"\r
4840 int apr_snprintf(char *buf, apr_size_t len,\r
4841                                      const char *format, ...)\r
4842         __attribute__((format(printf,3,4)));\r
4843 # 291 "../include/apr_strings.h"\r
4844 int apr_vsnprintf(char *buf, apr_size_t len, const char *format,\r
4845                                va_list ap);\r
4846 # 301 "../include/apr_strings.h"\r
4847 char * apr_itoa(apr_pool_t *p, int n);\r
4848 \r
4849 \r
4850 \r
4851 \r
4852 \r
4853 \r
4854 \r
4855 char * apr_ltoa(apr_pool_t *p, long n);\r
4856 \r
4857 \r
4858 \r
4859 \r
4860 \r
4861 \r
4862 \r
4863 char * apr_off_t_toa(apr_pool_t *p, apr_off_t n);\r
4864 # 335 "../include/apr_strings.h"\r
4865 apr_status_t apr_strtoff(apr_off_t *offset, const char *buf,\r
4866                                       char **end, int base);\r
4867 # 353 "../include/apr_strings.h"\r
4868 apr_int64_t apr_strtoi64(const char *buf, char **end, int base);\r
4869 # 362 "../include/apr_strings.h"\r
4870 apr_int64_t apr_atoi64(const char *buf);\r
4871 # 372 "../include/apr_strings.h"\r
4872 char * apr_strfsize(apr_off_t size, char *buf);\r
4873 # 19 "./../test/testatomic.c" 2\r
4874 # 1 "../include/apr_thread_proc.h" 1\r
4875 # 26 "../include/apr_thread_proc.h"\r
4876 # 1 "../include/apr_file_io.h" 1\r
4877 # 27 "../include/apr_file_io.h"\r
4878 # 1 "../include/apr_time.h" 1\r
4879 # 40 "../include/apr_time.h"\r
4880                  extern const char apr_month_snames[12][4];\r
4881 \r
4882                  extern const char apr_day_snames[7][4];\r
4883 \r
4884 \r
4885 \r
4886 typedef apr_int64_t apr_time_t;\r
4887 # 56 "../include/apr_time.h"\r
4888 typedef apr_int64_t apr_interval_time_t;\r
4889 \r
4890 typedef apr_int32_t apr_short_interval_time_t;\r
4891 # 88 "../include/apr_time.h"\r
4892 apr_time_t apr_time_now(void);\r
4893 \r
4894 \r
4895 typedef struct apr_time_exp_t apr_time_exp_t;\r
4896 \r
4897 \r
4898 \r
4899 \r
4900 \r
4901 \r
4902 struct apr_time_exp_t {\r
4903 \r
4904     apr_int32_t tm_usec;\r
4905 \r
4906     apr_int32_t tm_sec;\r
4907 \r
4908     apr_int32_t tm_min;\r
4909 \r
4910     apr_int32_t tm_hour;\r
4911 \r
4912     apr_int32_t tm_mday;\r
4913 \r
4914     apr_int32_t tm_mon;\r
4915 \r
4916     apr_int32_t tm_year;\r
4917 \r
4918     apr_int32_t tm_wday;\r
4919 \r
4920     apr_int32_t tm_yday;\r
4921 \r
4922     apr_int32_t tm_isdst;\r
4923 \r
4924     apr_int32_t tm_gmtoff;\r
4925 };\r
4926 \r
4927 \r
4928 \r
4929 \r
4930 \r
4931 \r
4932 apr_status_t apr_time_ansi_put(apr_time_t *result,\r
4933                                                     time_t input);\r
4934 # 138 "../include/apr_time.h"\r
4935 apr_status_t apr_time_exp_tz(apr_time_exp_t *result,\r
4936                                           apr_time_t input,\r
4937                                           apr_int32_t offs);\r
4938 \r
4939 \r
4940 \r
4941 \r
4942 \r
4943 \r
4944 apr_status_t apr_time_exp_gmt(apr_time_exp_t *result,\r
4945                                            apr_time_t input);\r
4946 \r
4947 \r
4948 \r
4949 \r
4950 \r
4951 \r
4952 apr_status_t apr_time_exp_lt(apr_time_exp_t *result,\r
4953                                           apr_time_t input);\r
4954 \r
4955 \r
4956 \r
4957 \r
4958 \r
4959 \r
4960 \r
4961 apr_status_t apr_time_exp_get(apr_time_t *result,\r
4962                                            apr_time_exp_t *input);\r
4963 \r
4964 \r
4965 \r
4966 \r
4967 \r
4968 \r
4969 \r
4970 apr_status_t apr_time_exp_gmt_get(apr_time_t *result,\r
4971                                                apr_time_exp_t *input);\r
4972 \r
4973 \r
4974 \r
4975 \r
4976 \r
4977 \r
4978 void apr_sleep(apr_interval_time_t t);\r
4979 # 193 "../include/apr_time.h"\r
4980 apr_status_t apr_rfc822_date(char *date_str, apr_time_t t);\r
4981 # 207 "../include/apr_time.h"\r
4982 apr_status_t apr_ctime(char *date_str, apr_time_t t);\r
4983 # 217 "../include/apr_time.h"\r
4984 apr_status_t apr_strftime(char *s, apr_size_t *retsize,\r
4985                                        apr_size_t max, const char *format,\r
4986                                        apr_time_exp_t *tm);\r
4987 \r
4988 \r
4989 \r
4990 \r
4991 \r
4992 \r
4993 \r
4994 void apr_time_clock_hires(apr_pool_t *p);\r
4995 # 28 "../include/apr_file_io.h" 2\r
4996 \r
4997 # 1 "../include/apr_file_info.h" 1\r
4998 # 26 "../include/apr_file_info.h"\r
4999 # 1 "../include/apr_user.h" 1\r
5000 # 45 "../include/apr_user.h"\r
5001 typedef uid_t apr_uid_t;\r
5002 # 54 "../include/apr_user.h"\r
5003 typedef gid_t apr_gid_t;\r
5004 # 66 "../include/apr_user.h"\r
5005 apr_status_t apr_uid_current(apr_uid_t *userid,\r
5006                                           apr_gid_t *groupid,\r
5007                                           apr_pool_t *p);\r
5008 # 77 "../include/apr_user.h"\r
5009 apr_status_t apr_uid_name_get(char **username, apr_uid_t userid,\r
5010                                            apr_pool_t *p);\r
5011 # 88 "../include/apr_user.h"\r
5012 apr_status_t apr_uid_get(apr_uid_t *userid, apr_gid_t *groupid,\r
5013                                       const char *username, apr_pool_t *p);\r
5014 # 98 "../include/apr_user.h"\r
5015 apr_status_t apr_uid_homepath_get(char **dirname,\r
5016                                                const char *username,\r
5017                                                apr_pool_t *p);\r
5018 # 123 "../include/apr_user.h"\r
5019 apr_status_t apr_gid_name_get(char **groupname,\r
5020                                              apr_gid_t groupid, apr_pool_t *p);\r
5021 # 133 "../include/apr_user.h"\r
5022 apr_status_t apr_gid_get(apr_gid_t *groupid,\r
5023                                       const char *groupname, apr_pool_t *p);\r
5024 # 27 "../include/apr_file_info.h" 2\r
5025 \r
5026 # 1 "../include/apr_tables.h" 1\r
5027 # 56 "../include/apr_tables.h"\r
5028 typedef struct apr_table_t apr_table_t;\r
5029 \r
5030 \r
5031 typedef struct apr_array_header_t apr_array_header_t;\r
5032 \r
5033 \r
5034 struct apr_array_header_t {\r
5035 \r
5036     apr_pool_t *pool;\r
5037 \r
5038     int elt_size;\r
5039 \r
5040     int nelts;\r
5041 \r
5042     int nalloc;\r
5043 \r
5044     char *elts;\r
5045 };\r
5046 \r
5047 \r
5048 \r
5049 \r
5050 typedef struct apr_table_entry_t apr_table_entry_t;\r
5051 \r
5052 \r
5053 struct apr_table_entry_t {\r
5054 \r
5055     char *key;\r
5056 \r
5057 \r
5058 \r
5059     char *val;\r
5060 \r
5061 \r
5062     apr_uint32_t key_checksum;\r
5063 };\r
5064 \r
5065 \r
5066 \r
5067 \r
5068 \r
5069 \r
5070 const apr_array_header_t * apr_table_elts(const apr_table_t *t);\r
5071 \r
5072 \r
5073 \r
5074 \r
5075 \r
5076 \r
5077 int apr_is_empty_table(const apr_table_t *t);\r
5078 \r
5079 \r
5080 \r
5081 \r
5082 \r
5083 \r
5084 int apr_is_empty_array(const apr_array_header_t *a);\r
5085 # 121 "../include/apr_tables.h"\r
5086 apr_array_header_t * apr_array_make(apr_pool_t *p,\r
5087                                                  int nelts, int elt_size);\r
5088 # 131 "../include/apr_tables.h"\r
5089 void * apr_array_push(apr_array_header_t *arr);\r
5090 # 158 "../include/apr_tables.h"\r
5091 void * apr_array_pop(apr_array_header_t *arr);\r
5092 \r
5093 \r
5094 \r
5095 \r
5096 \r
5097 \r
5098 \r
5099 void apr_array_clear(apr_array_header_t *arr);\r
5100 \r
5101 \r
5102 \r
5103 \r
5104 \r
5105 \r
5106 \r
5107 void apr_array_cat(apr_array_header_t *dst,\r
5108            const apr_array_header_t *src);\r
5109 # 186 "../include/apr_tables.h"\r
5110 apr_array_header_t * apr_array_copy(apr_pool_t *p,\r
5111                                       const apr_array_header_t *arr);\r
5112 # 196 "../include/apr_tables.h"\r
5113 apr_array_header_t * apr_array_copy_hdr(apr_pool_t *p,\r
5114                                       const apr_array_header_t *arr);\r
5115 # 206 "../include/apr_tables.h"\r
5116 apr_array_header_t * apr_array_append(apr_pool_t *p,\r
5117                                       const apr_array_header_t *first,\r
5118                                       const apr_array_header_t *second);\r
5119 # 221 "../include/apr_tables.h"\r
5120 char * apr_array_pstrcat(apr_pool_t *p,\r
5121           const apr_array_header_t *arr,\r
5122           const char sep);\r
5123 # 232 "../include/apr_tables.h"\r
5124 apr_table_t * apr_table_make(apr_pool_t *p, int nelts);\r
5125 # 241 "../include/apr_tables.h"\r
5126 apr_table_t * apr_table_copy(apr_pool_t *p,\r
5127                                           const apr_table_t *t);\r
5128 # 252 "../include/apr_tables.h"\r
5129 apr_table_t * apr_table_clone(apr_pool_t *p,\r
5130                                            const apr_table_t *t);\r
5131 \r
5132 \r
5133 \r
5134 \r
5135 \r
5136 void apr_table_clear(apr_table_t *t);\r
5137 # 268 "../include/apr_tables.h"\r
5138 const char * apr_table_get(const apr_table_t *t, const char *key);\r
5139 # 279 "../include/apr_tables.h"\r
5140 const char * apr_table_getm(apr_pool_t *p, const apr_table_t *t,\r
5141                                          const char *key);\r
5142 # 291 "../include/apr_tables.h"\r
5143 void apr_table_set(apr_table_t *t, const char *key,\r
5144                                 const char *val);\r
5145 # 304 "../include/apr_tables.h"\r
5146 void apr_table_setn(apr_table_t *t, const char *key,\r
5147                                  const char *val);\r
5148 \r
5149 \r
5150 \r
5151 \r
5152 \r
5153 \r
5154 void apr_table_unset(apr_table_t *t, const char *key);\r
5155 # 323 "../include/apr_tables.h"\r
5156 void apr_table_merge(apr_table_t *t, const char *key,\r
5157                                   const char *val);\r
5158 # 335 "../include/apr_tables.h"\r
5159 void apr_table_mergen(apr_table_t *t, const char *key,\r
5160                                    const char *val);\r
5161 # 347 "../include/apr_tables.h"\r
5162 void apr_table_add(apr_table_t *t, const char *key,\r
5163                                 const char *val);\r
5164 # 360 "../include/apr_tables.h"\r
5165 void apr_table_addn(apr_table_t *t, const char *key,\r
5166                                  const char *val);\r
5167 # 370 "../include/apr_tables.h"\r
5168 apr_table_t * apr_table_overlay(apr_pool_t *p,\r
5169                                              const apr_table_t *overlay,\r
5170                                              const apr_table_t *base);\r
5171 # 384 "../include/apr_tables.h"\r
5172 typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,\r
5173                                                     const char *value);\r
5174 # 406 "../include/apr_tables.h"\r
5175 int apr_table_do(apr_table_do_callback_fn_t *comp,\r
5176                                      void *rec, const apr_table_t *t, ...)\r
5177 \r
5178     __attribute__((sentinel))\r
5179 \r
5180     ;\r
5181 # 432 "../include/apr_tables.h"\r
5182 int apr_table_vdo(apr_table_do_callback_fn_t *comp,\r
5183                                void *rec, const apr_table_t *t, va_list vp);\r
5184 # 478 "../include/apr_tables.h"\r
5185 void apr_table_overlap(apr_table_t *a, const apr_table_t *b,\r
5186                                      unsigned flags);\r
5187 # 491 "../include/apr_tables.h"\r
5188 void apr_table_compress(apr_table_t *t, unsigned flags);\r
5189 # 29 "../include/apr_file_info.h" 2\r
5190 # 62 "../include/apr_file_info.h"\r
5191 typedef enum {\r
5192     APR_NOFILE = 0,\r
5193     APR_REG,\r
5194     APR_DIR,\r
5195     APR_CHR,\r
5196     APR_BLK,\r
5197     APR_PIPE,\r
5198     APR_LNK,\r
5199     APR_SOCK,\r
5200     APR_UNKFILE = 127\r
5201 } apr_filetype_e;\r
5202 # 121 "../include/apr_file_info.h"\r
5203 typedef struct apr_dir_t apr_dir_t;\r
5204 \r
5205 \r
5206 \r
5207 typedef apr_int32_t apr_fileperms_t;\r
5208 # 135 "../include/apr_file_info.h"\r
5209 typedef dev_t apr_dev_t;\r
5210 \r
5211 \r
5212 \r
5213 \r
5214 \r
5215 \r
5216 \r
5217 typedef struct apr_finfo_t apr_finfo_t;\r
5218 # 174 "../include/apr_file_info.h"\r
5219 struct apr_finfo_t {\r
5220 \r
5221     apr_pool_t *pool;\r
5222 \r
5223 \r
5224     apr_int32_t valid;\r
5225 \r
5226     apr_fileperms_t protection;\r
5227 \r
5228 \r
5229 \r
5230 \r
5231     apr_filetype_e filetype;\r
5232 \r
5233     apr_uid_t user;\r
5234 \r
5235     apr_gid_t group;\r
5236 \r
5237     apr_ino_t inode;\r
5238 \r
5239     apr_dev_t device;\r
5240 \r
5241     apr_int32_t nlink;\r
5242 \r
5243     apr_off_t size;\r
5244 \r
5245     apr_off_t csize;\r
5246 \r
5247     apr_time_t atime;\r
5248 \r
5249     apr_time_t mtime;\r
5250 \r
5251     apr_time_t ctime;\r
5252 \r
5253     const char *fname;\r
5254 \r
5255     const char *name;\r
5256 \r
5257     struct apr_file_t *filehand;\r
5258 };\r
5259 # 229 "../include/apr_file_info.h"\r
5260 apr_status_t apr_stat(apr_finfo_t *finfo, const char *fname,\r
5261                                    apr_int32_t wanted, apr_pool_t *pool);\r
5262 # 244 "../include/apr_file_info.h"\r
5263 apr_status_t apr_dir_open(apr_dir_t **new_dir,\r
5264                                        const char *dirname,\r
5265                                        apr_pool_t *pool);\r
5266 \r
5267 \r
5268 \r
5269 \r
5270 \r
5271 apr_status_t apr_dir_close(apr_dir_t *thedir);\r
5272 # 267 "../include/apr_file_info.h"\r
5273 apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,\r
5274                                        apr_dir_t *thedir);\r
5275 \r
5276 \r
5277 \r
5278 \r
5279 \r
5280 apr_status_t apr_dir_rewind(apr_dir_t *thedir);\r
5281 # 336 "../include/apr_file_info.h"\r
5282 apr_status_t apr_filepath_root(const char **rootpath,\r
5283                                             const char **filepath,\r
5284                                             apr_int32_t flags,\r
5285                                             apr_pool_t *p);\r
5286 # 354 "../include/apr_file_info.h"\r
5287 apr_status_t apr_filepath_merge(char **newpath,\r
5288                                              const char *rootpath,\r
5289                                              const char *addpath,\r
5290                                              apr_int32_t flags,\r
5291                                              apr_pool_t *p);\r
5292 # 369 "../include/apr_file_info.h"\r
5293 apr_status_t apr_filepath_list_split(apr_array_header_t **pathelts,\r
5294                                                   const char *liststr,\r
5295                                                   apr_pool_t *p);\r
5296 # 382 "../include/apr_file_info.h"\r
5297 apr_status_t apr_filepath_list_merge(char **liststr,\r
5298                                                   apr_array_header_t *pathelts,\r
5299                                                   apr_pool_t *p);\r
5300 # 393 "../include/apr_file_info.h"\r
5301 apr_status_t apr_filepath_get(char **path, apr_int32_t flags,\r
5302                                            apr_pool_t *p);\r
5303 \r
5304 \r
5305 \r
5306 \r
5307 \r
5308 \r
5309 apr_status_t apr_filepath_set(const char *path, apr_pool_t *p);\r
5310 # 419 "../include/apr_file_info.h"\r
5311 apr_status_t apr_filepath_encoding(int *style, apr_pool_t *p);\r
5312 # 30 "../include/apr_file_io.h" 2\r
5313 # 1 "../include/apr_inherit.h" 1\r
5314 # 31 "../include/apr_file_io.h" 2\r
5315 \r
5316 \r
5317 \r
5318 # 1 "../include/apr_want.h" 1\r
5319 # 35 "../include/apr_file_io.h" 2\r
5320 # 180 "../include/apr_file_io.h"\r
5321 typedef apr_uint32_t apr_fileattrs_t;\r
5322 \r
5323 \r
5324 typedef int apr_seek_where_t;\r
5325 \r
5326 \r
5327 \r
5328 \r
5329 typedef struct apr_file_t apr_file_t;\r
5330 # 250 "../include/apr_file_io.h"\r
5331 apr_status_t apr_file_open(apr_file_t **newf, const char *fname,\r
5332                                         apr_int32_t flag, apr_fileperms_t perm,\r
5333                                         apr_pool_t *pool);\r
5334 \r
5335 \r
5336 \r
5337 \r
5338 \r
5339 apr_status_t apr_file_close(apr_file_t *file);\r
5340 # 267 "../include/apr_file_io.h"\r
5341 apr_status_t apr_file_remove(const char *path, apr_pool_t *pool);\r
5342 # 278 "../include/apr_file_io.h"\r
5343 apr_status_t apr_file_rename(const char *from_path,\r
5344                                           const char *to_path,\r
5345                                           apr_pool_t *pool);\r
5346 \r
5347 \r
5348 \r
5349 \r
5350 \r
5351 \r
5352 \r
5353 apr_status_t apr_file_link(const char *from_path,\r
5354                                           const char *to_path);\r
5355 # 303 "../include/apr_file_io.h"\r
5356 apr_status_t apr_file_copy(const char *from_path,\r
5357                                         const char *to_path,\r
5358                                         apr_fileperms_t perms,\r
5359                                         apr_pool_t *pool);\r
5360 # 319 "../include/apr_file_io.h"\r
5361 apr_status_t apr_file_append(const char *from_path,\r
5362                                           const char *to_path,\r
5363                                           apr_fileperms_t perms,\r
5364                                           apr_pool_t *pool);\r
5365 \r
5366 \r
5367 \r
5368 \r
5369 \r
5370 \r
5371 apr_status_t apr_file_eof(apr_file_t *fptr);\r
5372 # 346 "../include/apr_file_io.h"\r
5373 apr_status_t apr_file_open_stderr(apr_file_t **thefile,\r
5374                                                apr_pool_t *pool);\r
5375 # 356 "../include/apr_file_io.h"\r
5376 apr_status_t apr_file_open_stdout(apr_file_t **thefile,\r
5377                                                apr_pool_t *pool);\r
5378 # 366 "../include/apr_file_io.h"\r
5379 apr_status_t apr_file_open_stdin(apr_file_t **thefile,\r
5380                                               apr_pool_t *pool);\r
5381 # 386 "../include/apr_file_io.h"\r
5382 apr_status_t apr_file_open_flags_stderr(apr_file_t **thefile,\r
5383                                                      apr_int32_t flags,\r
5384                                                      apr_pool_t *pool);\r
5385 # 407 "../include/apr_file_io.h"\r
5386 apr_status_t apr_file_open_flags_stdout(apr_file_t **thefile,\r
5387                                                      apr_int32_t flags,\r
5388                                                      apr_pool_t *pool);\r
5389 # 428 "../include/apr_file_io.h"\r
5390 apr_status_t apr_file_open_flags_stdin(apr_file_t **thefile,\r
5391                                                      apr_int32_t flags,\r
5392                                                      apr_pool_t *pool);\r
5393 # 449 "../include/apr_file_io.h"\r
5394 apr_status_t apr_file_read(apr_file_t *thefile, void *buf,\r
5395                                         apr_size_t *nbytes);\r
5396 # 467 "../include/apr_file_io.h"\r
5397 apr_status_t apr_file_write(apr_file_t *thefile, const void *buf,\r
5398                                          apr_size_t *nbytes);\r
5399 # 485 "../include/apr_file_io.h"\r
5400 apr_status_t apr_file_writev(apr_file_t *thefile,\r
5401                                           const struct iovec *vec,\r
5402                                           apr_size_t nvec, apr_size_t *nbytes);\r
5403 # 509 "../include/apr_file_io.h"\r
5404 apr_status_t apr_file_read_full(apr_file_t *thefile, void *buf,\r
5405                                              apr_size_t nbytes,\r
5406                                              apr_size_t *bytes_read);\r
5407 # 533 "../include/apr_file_io.h"\r
5408 apr_status_t apr_file_write_full(apr_file_t *thefile,\r
5409                                               const void *buf,\r
5410                                               apr_size_t nbytes,\r
5411                                               apr_size_t *bytes_written);\r
5412 # 552 "../include/apr_file_io.h"\r
5413 apr_status_t apr_file_writev_full(apr_file_t *thefile,\r
5414                                                const struct iovec *vec,\r
5415                                                apr_size_t nvec,\r
5416                                                apr_size_t *nbytes);\r
5417 \r
5418 \r
5419 \r
5420 \r
5421 \r
5422 apr_status_t apr_file_putc(char ch, apr_file_t *thefile);\r
5423 \r
5424 \r
5425 \r
5426 \r
5427 \r
5428 \r
5429 apr_status_t apr_file_getc(char *ch, apr_file_t *thefile);\r
5430 \r
5431 \r
5432 \r
5433 \r
5434 \r
5435 \r
5436 apr_status_t apr_file_ungetc(char ch, apr_file_t *thefile);\r
5437 # 585 "../include/apr_file_io.h"\r
5438 apr_status_t apr_file_gets(char *str, int len,\r
5439                                         apr_file_t *thefile);\r
5440 \r
5441 \r
5442 \r
5443 \r
5444 \r
5445 \r
5446 apr_status_t apr_file_puts(const char *str, apr_file_t *thefile);\r
5447 \r
5448 \r
5449 \r
5450 \r
5451 \r
5452 apr_status_t apr_file_flush(apr_file_t *thefile);\r
5453 \r
5454 \r
5455 \r
5456 \r
5457 \r
5458 apr_status_t apr_file_sync(apr_file_t *thefile);\r
5459 \r
5460 \r
5461 \r
5462 \r
5463 \r
5464 apr_status_t apr_file_datasync(apr_file_t *thefile);\r
5465 # 620 "../include/apr_file_io.h"\r
5466 apr_status_t apr_file_dup(apr_file_t **new_file,\r
5467                                        apr_file_t *old_file,\r
5468                                        apr_pool_t *p);\r
5469 # 632 "../include/apr_file_io.h"\r
5470 apr_status_t apr_file_dup2(apr_file_t *new_file,\r
5471                                         apr_file_t *old_file,\r
5472                                         apr_pool_t *p);\r
5473 # 647 "../include/apr_file_io.h"\r
5474 apr_status_t apr_file_setaside(apr_file_t **new_file,\r
5475                                             apr_file_t *old_file,\r
5476                                             apr_pool_t *p);\r
5477 # 662 "../include/apr_file_io.h"\r
5478 apr_status_t apr_file_buffer_set(apr_file_t *thefile,\r
5479                                               char * buffer,\r
5480                                               apr_size_t bufsize);\r
5481 \r
5482 \r
5483 \r
5484 \r
5485 \r
5486 apr_size_t apr_file_buffer_size_get(apr_file_t *thefile);\r
5487 # 683 "../include/apr_file_io.h"\r
5488 apr_status_t apr_file_seek(apr_file_t *thefile,\r
5489                                    apr_seek_where_t where,\r
5490                                    apr_off_t *offset);\r
5491 # 700 "../include/apr_file_io.h"\r
5492 apr_status_t apr_file_pipe_create(apr_file_t **in,\r
5493                                                apr_file_t **out,\r
5494                                                apr_pool_t *pool);\r
5495 # 723 "../include/apr_file_io.h"\r
5496 apr_status_t apr_file_pipe_create_ex(apr_file_t **in,\r
5497                                                   apr_file_t **out,\r
5498                                                   apr_int32_t blocking,\r
5499                                                   apr_pool_t *pool);\r
5500 \r
5501 \r
5502 \r
5503 \r
5504 \r
5505 \r
5506 \r
5507 apr_status_t apr_file_namedpipe_create(const char *filename,\r
5508                                                     apr_fileperms_t perm,\r
5509                                                     apr_pool_t *pool);\r
5510 \r
5511 \r
5512 \r
5513 \r
5514 \r
5515 \r
5516 apr_status_t apr_file_pipe_timeout_get(apr_file_t *thepipe,\r
5517                                                apr_interval_time_t *timeout);\r
5518 \r
5519 \r
5520 \r
5521 \r
5522 \r
5523 \r
5524 \r
5525 apr_status_t apr_file_pipe_timeout_set(apr_file_t *thepipe,\r
5526                                                   apr_interval_time_t timeout);\r
5527 # 766 "../include/apr_file_io.h"\r
5528 apr_status_t apr_file_lock(apr_file_t *thefile, int type);\r
5529 \r
5530 \r
5531 \r
5532 \r
5533 \r
5534 apr_status_t apr_file_unlock(apr_file_t *thefile);\r
5535 # 781 "../include/apr_file_io.h"\r
5536 apr_status_t apr_file_name_get(const char **new_path,\r
5537                                             apr_file_t *thefile);\r
5538 \r
5539 \r
5540 \r
5541 \r
5542 \r
5543 \r
5544 \r
5545 apr_status_t apr_file_data_get(void **data, const char *key,\r
5546                                             apr_file_t *file);\r
5547 # 800 "../include/apr_file_io.h"\r
5548 apr_status_t apr_file_data_set(apr_file_t *file, void *data,\r
5549                                             const char *key,\r
5550                                             apr_status_t (*cleanup)(void *));\r
5551 # 811 "../include/apr_file_io.h"\r
5552 int apr_file_printf(apr_file_t *fptr,\r
5553                                         const char *format, ...)\r
5554         __attribute__((format(printf,2,3)));\r
5555 # 827 "../include/apr_file_io.h"\r
5556 apr_status_t apr_file_perms_set(const char *fname,\r
5557                                              apr_fileperms_t perms);\r
5558 # 846 "../include/apr_file_io.h"\r
5559 apr_status_t apr_file_attrs_set(const char *fname,\r
5560                                              apr_fileattrs_t attributes,\r
5561                                              apr_fileattrs_t attr_mask,\r
5562                                              apr_pool_t *pool);\r
5563 # 859 "../include/apr_file_io.h"\r
5564 apr_status_t apr_file_mtime_set(const char *fname,\r
5565                                              apr_time_t mtime,\r
5566                                              apr_pool_t *pool);\r
5567 \r
5568 \r
5569 \r
5570 \r
5571 \r
5572 \r
5573 \r
5574 apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,\r
5575                                        apr_pool_t *pool);\r
5576 # 879 "../include/apr_file_io.h"\r
5577 apr_status_t apr_dir_make_recursive(const char *path,\r
5578                                                  apr_fileperms_t perm,\r
5579                                                  apr_pool_t *pool);\r
5580 # 890 "../include/apr_file_io.h"\r
5581 apr_status_t apr_dir_remove(const char *path, apr_pool_t *pool);\r
5582 \r
5583 \r
5584 \r
5585 \r
5586 \r
5587 \r
5588 \r
5589 apr_status_t apr_file_info_get(apr_finfo_t *finfo,\r
5590                                             apr_int32_t wanted,\r
5591                                             apr_file_t *thefile);\r
5592 # 909 "../include/apr_file_io.h"\r
5593 apr_status_t apr_file_trunc(apr_file_t *fp, apr_off_t offset);\r
5594 \r
5595 \r
5596 \r
5597 \r
5598 \r
5599 \r
5600 apr_int32_t apr_file_flags_get(apr_file_t *f);\r
5601 \r
5602 \r
5603 \r
5604 \r
5605 apr_pool_t * apr_file_pool_get (const apr_file_t *thefile);\r
5606 \r
5607 \r
5608 \r
5609 \r
5610 \r
5611 apr_status_t apr_file_inherit_set( apr_file_t *thefile);\r
5612 \r
5613 \r
5614 \r
5615 \r
5616 apr_status_t apr_file_inherit_unset( apr_file_t *thefile);\r
5617 # 951 "../include/apr_file_io.h"\r
5618 apr_status_t apr_file_mktemp(apr_file_t **fp, char *templ,\r
5619                                           apr_int32_t flags, apr_pool_t *p);\r
5620 # 964 "../include/apr_file_io.h"\r
5621 apr_status_t apr_temp_dir_get(const char **temp_dir,\r
5622                                            apr_pool_t *p);\r
5623 # 27 "../include/apr_thread_proc.h" 2\r
5624 \r
5625 \r
5626 \r
5627 \r
5628 # 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4\r
5629 # 25 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
5630 # 1 "/usr/include/time.h" 1 3 4\r
5631 # 26 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4\r
5632 \r
5633 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
5634 # 28 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4\r
5635 # 55 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
5636 struct timezone\r
5637   {\r
5638     int tz_minuteswest;\r
5639     int tz_dsttime;\r
5640   };\r
5641 \r
5642 typedef struct timezone *__restrict __timezone_ptr_t;\r
5643 # 71 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
5644 extern int gettimeofday (struct timeval *__restrict __tv,\r
5645     __timezone_ptr_t __tz) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
5646 \r
5647 \r
5648 \r
5649 \r
5650 extern int settimeofday (const struct timeval *__tv,\r
5651     const struct timezone *__tz)\r
5652      __attribute__ ((__nothrow__ ));\r
5653 \r
5654 \r
5655 \r
5656 \r
5657 \r
5658 extern int adjtime (const struct timeval *__delta,\r
5659       struct timeval *__olddelta) __attribute__ ((__nothrow__ ));\r
5660 \r
5661 \r
5662 \r
5663 \r
5664 enum __itimer_which\r
5665   {\r
5666 \r
5667     ITIMER_REAL = 0,\r
5668 \r
5669 \r
5670     ITIMER_VIRTUAL = 1,\r
5671 \r
5672 \r
5673 \r
5674     ITIMER_PROF = 2\r
5675 \r
5676   };\r
5677 \r
5678 \r
5679 \r
5680 struct itimerval\r
5681   {\r
5682 \r
5683     struct timeval it_interval;\r
5684 \r
5685     struct timeval it_value;\r
5686   };\r
5687 \r
5688 \r
5689 \r
5690 \r
5691 \r
5692 \r
5693 typedef int __itimer_which_t;\r
5694 \r
5695 \r
5696 \r
5697 \r
5698 extern int getitimer (__itimer_which_t __which,\r
5699         struct itimerval *__value) __attribute__ ((__nothrow__ ));\r
5700 \r
5701 \r
5702 \r
5703 \r
5704 extern int setitimer (__itimer_which_t __which,\r
5705         const struct itimerval *__restrict __new,\r
5706         struct itimerval *__restrict __old) __attribute__ ((__nothrow__ ));\r
5707 \r
5708 \r
5709 \r
5710 \r
5711 extern int utimes (const char *__file, const struct timeval __tvp[2])\r
5712      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
5713 \r
5714 \r
5715 \r
5716 extern int lutimes (const char *__file, const struct timeval __tvp[2])\r
5717      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
5718 \r
5719 \r
5720 extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ ));\r
5721 # 32 "../include/apr_thread_proc.h" 2\r
5722 # 1 "/usr/include/x86_64-linux-gnu/sys/resource.h" 1 3 4\r
5723 # 24 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
5724 # 1 "/usr/include/x86_64-linux-gnu/bits/resource.h" 1 3 4\r
5725 # 31 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
5726 enum __rlimit_resource\r
5727 {\r
5728 \r
5729   RLIMIT_CPU = 0,\r
5730 \r
5731 \r
5732 \r
5733   RLIMIT_FSIZE = 1,\r
5734 \r
5735 \r
5736 \r
5737   RLIMIT_DATA = 2,\r
5738 \r
5739 \r
5740 \r
5741   RLIMIT_STACK = 3,\r
5742 \r
5743 \r
5744 \r
5745   RLIMIT_CORE = 4,\r
5746 \r
5747 \r
5748 \r
5749 \r
5750 \r
5751 \r
5752   __RLIMIT_RSS = 5,\r
5753 \r
5754 \r
5755 \r
5756   RLIMIT_NOFILE = 7,\r
5757   __RLIMIT_OFILE = RLIMIT_NOFILE,\r
5758 \r
5759 \r
5760 \r
5761 \r
5762   RLIMIT_AS = 9,\r
5763 \r
5764 \r
5765 \r
5766   __RLIMIT_NPROC = 6,\r
5767 \r
5768 \r
5769 \r
5770   __RLIMIT_MEMLOCK = 8,\r
5771 \r
5772 \r
5773 \r
5774   __RLIMIT_LOCKS = 10,\r
5775 \r
5776 \r
5777 \r
5778   __RLIMIT_SIGPENDING = 11,\r
5779 \r
5780 \r
5781 \r
5782   __RLIMIT_MSGQUEUE = 12,\r
5783 \r
5784 \r
5785 \r
5786 \r
5787 \r
5788   __RLIMIT_NICE = 13,\r
5789 \r
5790 \r
5791 \r
5792 \r
5793   __RLIMIT_RTPRIO = 14,\r
5794 \r
5795 \r
5796 \r
5797 \r
5798 \r
5799   __RLIMIT_RTTIME = 15,\r
5800 \r
5801 \r
5802   __RLIMIT_NLIMITS = 16,\r
5803   __RLIM_NLIMITS = __RLIMIT_NLIMITS\r
5804 \r
5805 \r
5806 };\r
5807 # 131 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
5808 typedef __rlim_t rlim_t;\r
5809 \r
5810 \r
5811 \r
5812 \r
5813 \r
5814 \r
5815 \r
5816 struct rlimit\r
5817   {\r
5818 \r
5819     rlim_t rlim_cur;\r
5820 \r
5821     rlim_t rlim_max;\r
5822   };\r
5823 # 158 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
5824 enum __rusage_who\r
5825 {\r
5826 \r
5827   RUSAGE_SELF = 0,\r
5828 \r
5829 \r
5830 \r
5831   RUSAGE_CHILDREN = -1\r
5832 # 176 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
5833 };\r
5834 \r
5835 \r
5836 \r
5837 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
5838 # 180 "/usr/include/x86_64-linux-gnu/bits/resource.h" 2 3 4\r
5839 \r
5840 \r
5841 \r
5842 \r
5843 \r
5844 \r
5845 \r
5846 struct rusage\r
5847   {\r
5848 \r
5849     struct timeval ru_utime;\r
5850 \r
5851     struct timeval ru_stime;\r
5852 \r
5853     __extension__ union\r
5854       {\r
5855  long int ru_maxrss;\r
5856  __syscall_slong_t __ru_maxrss_word;\r
5857       };\r
5858 \r
5859 \r
5860 \r
5861     __extension__ union\r
5862       {\r
5863  long int ru_ixrss;\r
5864  __syscall_slong_t __ru_ixrss_word;\r
5865       };\r
5866 \r
5867     __extension__ union\r
5868       {\r
5869  long int ru_idrss;\r
5870  __syscall_slong_t __ru_idrss_word;\r
5871       };\r
5872 \r
5873     __extension__ union\r
5874       {\r
5875  long int ru_isrss;\r
5876   __syscall_slong_t __ru_isrss_word;\r
5877       };\r
5878 \r
5879 \r
5880     __extension__ union\r
5881       {\r
5882  long int ru_minflt;\r
5883  __syscall_slong_t __ru_minflt_word;\r
5884       };\r
5885 \r
5886     __extension__ union\r
5887       {\r
5888  long int ru_majflt;\r
5889  __syscall_slong_t __ru_majflt_word;\r
5890       };\r
5891 \r
5892     __extension__ union\r
5893       {\r
5894  long int ru_nswap;\r
5895  __syscall_slong_t __ru_nswap_word;\r
5896       };\r
5897 \r
5898 \r
5899     __extension__ union\r
5900       {\r
5901  long int ru_inblock;\r
5902  __syscall_slong_t __ru_inblock_word;\r
5903       };\r
5904 \r
5905     __extension__ union\r
5906       {\r
5907  long int ru_oublock;\r
5908  __syscall_slong_t __ru_oublock_word;\r
5909       };\r
5910 \r
5911     __extension__ union\r
5912       {\r
5913  long int ru_msgsnd;\r
5914  __syscall_slong_t __ru_msgsnd_word;\r
5915       };\r
5916 \r
5917     __extension__ union\r
5918       {\r
5919  long int ru_msgrcv;\r
5920  __syscall_slong_t __ru_msgrcv_word;\r
5921       };\r
5922 \r
5923     __extension__ union\r
5924       {\r
5925  long int ru_nsignals;\r
5926  __syscall_slong_t __ru_nsignals_word;\r
5927       };\r
5928 \r
5929 \r
5930 \r
5931     __extension__ union\r
5932       {\r
5933  long int ru_nvcsw;\r
5934  __syscall_slong_t __ru_nvcsw_word;\r
5935       };\r
5936 \r
5937 \r
5938     __extension__ union\r
5939       {\r
5940  long int ru_nivcsw;\r
5941  __syscall_slong_t __ru_nivcsw_word;\r
5942       };\r
5943   };\r
5944 \r
5945 \r
5946 \r
5947 \r
5948 \r
5949 \r
5950 \r
5951 enum __priority_which\r
5952 {\r
5953   PRIO_PROCESS = 0,\r
5954 \r
5955   PRIO_PGRP = 1,\r
5956 \r
5957   PRIO_USER = 2\r
5958 \r
5959 };\r
5960 # 25 "/usr/include/x86_64-linux-gnu/sys/resource.h" 2 3 4\r
5961 # 42 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
5962 typedef int __rlimit_resource_t;\r
5963 typedef int __rusage_who_t;\r
5964 typedef int __priority_which_t;\r
5965 \r
5966 \r
5967 \r
5968 \r
5969 \r
5970 extern int getrlimit (__rlimit_resource_t __resource,\r
5971         struct rlimit *__rlimits) __attribute__ ((__nothrow__ ));\r
5972 # 69 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
5973 extern int setrlimit (__rlimit_resource_t __resource,\r
5974         const struct rlimit *__rlimits) __attribute__ ((__nothrow__ ));\r
5975 # 87 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
5976 extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__ ));\r
5977 \r
5978 \r
5979 \r
5980 \r
5981 \r
5982 extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__ ));\r
5983 \r
5984 \r
5985 \r
5986 extern int setpriority (__priority_which_t __which, id_t __who, int __prio)\r
5987      __attribute__ ((__nothrow__ ));\r
5988 # 33 "../include/apr_thread_proc.h" 2\r
5989 # 45 "../include/apr_thread_proc.h"\r
5990 typedef enum {\r
5991     APR_SHELLCMD,\r
5992     APR_PROGRAM,\r
5993     APR_PROGRAM_ENV,\r
5994     APR_PROGRAM_PATH,\r
5995     APR_SHELLCMD_ENV\r
5996 \r
5997 \r
5998 } apr_cmdtype_e;\r
5999 \r
6000 typedef enum {\r
6001     APR_WAIT,\r
6002     APR_NOWAIT\r
6003 } apr_wait_how_e;\r
6004 \r
6005 \r
6006 \r
6007 \r
6008 \r
6009 \r
6010 typedef enum {\r
6011     APR_PROC_EXIT = 1,\r
6012     APR_PROC_SIGNAL = 2,\r
6013     APR_PROC_SIGNAL_CORE = 4\r
6014 } apr_exit_why_e;\r
6015 # 133 "../include/apr_thread_proc.h"\r
6016 typedef struct apr_proc_t {\r
6017 \r
6018     pid_t pid;\r
6019 \r
6020     apr_file_t *in;\r
6021 \r
6022     apr_file_t *out;\r
6023 \r
6024     apr_file_t *err;\r
6025 # 161 "../include/apr_thread_proc.h"\r
6026 } apr_proc_t;\r
6027 # 173 "../include/apr_thread_proc.h"\r
6028 typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,\r
6029                                  const char *description);\r
6030 \r
6031 \r
6032 typedef struct apr_thread_t apr_thread_t;\r
6033 \r
6034 \r
6035 typedef struct apr_threadattr_t apr_threadattr_t;\r
6036 \r
6037 \r
6038 typedef struct apr_procattr_t apr_procattr_t;\r
6039 \r
6040 \r
6041 typedef struct apr_thread_once_t apr_thread_once_t;\r
6042 \r
6043 \r
6044 typedef struct apr_threadkey_t apr_threadkey_t;\r
6045 \r
6046 \r
6047 typedef struct apr_other_child_rec_t apr_other_child_rec_t;\r
6048 \r
6049 \r
6050 \r
6051 \r
6052 typedef void *( *apr_thread_start_t)(apr_thread_t*, void*);\r
6053 \r
6054 typedef enum {\r
6055     APR_KILL_NEVER,\r
6056 \r
6057 \r
6058     APR_KILL_ALWAYS,\r
6059     APR_KILL_AFTER_TIMEOUT,\r
6060     APR_JUST_WAIT,\r
6061     APR_KILL_ONLY_ONCE\r
6062 } apr_kill_conditions_e;\r
6063 # 218 "../include/apr_thread_proc.h"\r
6064 apr_status_t apr_threadattr_create(apr_threadattr_t **new_attr,\r
6065                                                 apr_pool_t *cont);\r
6066 \r
6067 \r
6068 \r
6069 \r
6070 \r
6071 \r
6072 apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,\r
6073                                                     apr_int32_t on);\r
6074 \r
6075 \r
6076 \r
6077 \r
6078 \r
6079 \r
6080 \r
6081 apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr);\r
6082 \r
6083 \r
6084 \r
6085 \r
6086 \r
6087 \r
6088 apr_status_t apr_threadattr_stacksize_set(apr_threadattr_t *attr,\r
6089                                                        apr_size_t stacksize);\r
6090 # 255 "../include/apr_thread_proc.h"\r
6091 apr_status_t apr_threadattr_guardsize_set(apr_threadattr_t *attr,\r
6092                                                        apr_size_t guardsize);\r
6093 # 266 "../include/apr_thread_proc.h"\r
6094 apr_status_t apr_thread_create(apr_thread_t **new_thread,\r
6095                                             apr_threadattr_t *attr,\r
6096                                             apr_thread_start_t func,\r
6097                                             void *data, apr_pool_t *cont);\r
6098 \r
6099 \r
6100 \r
6101 \r
6102 \r
6103 \r
6104 apr_status_t apr_thread_exit(apr_thread_t *thd,\r
6105                                           apr_status_t retval);\r
6106 \r
6107 \r
6108 \r
6109 \r
6110 \r
6111 \r
6112 apr_status_t apr_thread_join(apr_status_t *retval,\r
6113                                           apr_thread_t *thd);\r
6114 \r
6115 \r
6116 \r
6117 \r
6118 void apr_thread_yield(void);\r
6119 \r
6120 \r
6121 \r
6122 \r
6123 \r
6124 \r
6125 \r
6126 apr_status_t apr_thread_once_init(apr_thread_once_t **control,\r
6127                                                apr_pool_t *p);\r
6128 # 310 "../include/apr_thread_proc.h"\r
6129 apr_status_t apr_thread_once(apr_thread_once_t *control,\r
6130                                           void (*func)(void));\r
6131 \r
6132 \r
6133 \r
6134 \r
6135 \r
6136 apr_status_t apr_thread_detach(apr_thread_t *thd);\r
6137 \r
6138 \r
6139 \r
6140 \r
6141 \r
6142 \r
6143 \r
6144 apr_status_t apr_thread_data_get(void **data, const char *key,\r
6145                                              apr_thread_t *thread);\r
6146 # 335 "../include/apr_thread_proc.h"\r
6147 apr_status_t apr_thread_data_set(void *data, const char *key,\r
6148                                              apr_status_t (*cleanup) (void *),\r
6149                                              apr_thread_t *thread);\r
6150 \r
6151 \r
6152 \r
6153 \r
6154 \r
6155 \r
6156 \r
6157 apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,\r
6158                                                     void (*dest)(void *),\r
6159                                                     apr_pool_t *cont);\r
6160 \r
6161 \r
6162 \r
6163 \r
6164 \r
6165 \r
6166 apr_status_t apr_threadkey_private_get(void **new_mem,\r
6167                                                  apr_threadkey_t *key);\r
6168 \r
6169 \r
6170 \r
6171 \r
6172 \r
6173 \r
6174 apr_status_t apr_threadkey_private_set(void *priv,\r
6175                                                  apr_threadkey_t *key);\r
6176 \r
6177 \r
6178 \r
6179 \r
6180 \r
6181 apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key);\r
6182 \r
6183 \r
6184 \r
6185 \r
6186 \r
6187 \r
6188 \r
6189 apr_status_t apr_threadkey_data_get(void **data, const char *key,\r
6190                                                 apr_threadkey_t *threadkey);\r
6191 # 387 "../include/apr_thread_proc.h"\r
6192 apr_status_t apr_threadkey_data_set(void *data, const char *key,\r
6193                                                 apr_status_t (*cleanup) (void *),\r
6194                                                 apr_threadkey_t *threadkey);\r
6195 # 398 "../include/apr_thread_proc.h"\r
6196 apr_status_t apr_procattr_create(apr_procattr_t **new_attr,\r
6197                                                   apr_pool_t *cont);\r
6198 # 415 "../include/apr_thread_proc.h"\r
6199 apr_status_t apr_procattr_io_set(apr_procattr_t *attr,\r
6200                                              apr_int32_t in, apr_int32_t out,\r
6201                                              apr_int32_t err);\r
6202 # 434 "../include/apr_thread_proc.h"\r
6203 apr_status_t apr_procattr_child_in_set(struct apr_procattr_t *attr,\r
6204                                                   apr_file_t *child_in,\r
6205                                                   apr_file_t *parent_in);\r
6206 # 451 "../include/apr_thread_proc.h"\r
6207 apr_status_t apr_procattr_child_out_set(struct apr_procattr_t *attr,\r
6208                                                    apr_file_t *child_out,\r
6209                                                    apr_file_t *parent_out);\r
6210 # 468 "../include/apr_thread_proc.h"\r
6211 apr_status_t apr_procattr_child_err_set(struct apr_procattr_t *attr,\r
6212                                                    apr_file_t *child_err,\r
6213                                                    apr_file_t *parent_err);\r
6214 # 479 "../include/apr_thread_proc.h"\r
6215 apr_status_t apr_procattr_dir_set(apr_procattr_t *attr,\r
6216                                               const char *dir);\r
6217 # 493 "../include/apr_thread_proc.h"\r
6218 apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr,\r
6219                                                   apr_cmdtype_e cmd);\r
6220 \r
6221 \r
6222 \r
6223 \r
6224 \r
6225 \r
6226 apr_status_t apr_procattr_detach_set(apr_procattr_t *attr,\r
6227                                                  apr_int32_t detach);\r
6228 # 517 "../include/apr_thread_proc.h"\r
6229 apr_status_t apr_procattr_limit_set(apr_procattr_t *attr,\r
6230                                                 apr_int32_t what,\r
6231                                                 struct rlimit *limit);\r
6232 # 533 "../include/apr_thread_proc.h"\r
6233 apr_status_t apr_procattr_child_errfn_set(apr_procattr_t *attr,\r
6234                                                        apr_child_errfn_t *errfn);\r
6235 # 548 "../include/apr_thread_proc.h"\r
6236 apr_status_t apr_procattr_error_check_set(apr_procattr_t *attr,\r
6237                                                        apr_int32_t chk);\r
6238 # 558 "../include/apr_thread_proc.h"\r
6239 apr_status_t apr_procattr_addrspace_set(apr_procattr_t *attr,\r
6240                                                        apr_int32_t addrspace);\r
6241 # 569 "../include/apr_thread_proc.h"\r
6242 apr_status_t apr_procattr_user_set(apr_procattr_t *attr,\r
6243                                                 const char *username,\r
6244                                                 const char *password);\r
6245 \r
6246 \r
6247 \r
6248 \r
6249 \r
6250 \r
6251 apr_status_t apr_procattr_group_set(apr_procattr_t *attr,\r
6252                                                  const char *groupname);\r
6253 # 591 "../include/apr_thread_proc.h"\r
6254 apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont);\r
6255 # 610 "../include/apr_thread_proc.h"\r
6256 apr_status_t apr_proc_create(apr_proc_t *new_proc,\r
6257                                           const char *progname,\r
6258                                           const char * const *args,\r
6259                                           const char * const *env,\r
6260                                           apr_procattr_t *attr,\r
6261                                           apr_pool_t *pool);\r
6262 # 643 "../include/apr_thread_proc.h"\r
6263 apr_status_t apr_proc_wait(apr_proc_t *proc,\r
6264                                         int *exitcode, apr_exit_why_e *exitwhy,\r
6265                                         apr_wait_how_e waithow);\r
6266 # 673 "../include/apr_thread_proc.h"\r
6267 apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc,\r
6268                                                   int *exitcode,\r
6269                                                   apr_exit_why_e *exitwhy,\r
6270                                                   apr_wait_how_e waithow,\r
6271                                                   apr_pool_t *p);\r
6272 # 688 "../include/apr_thread_proc.h"\r
6273 apr_status_t apr_proc_detach(int daemonize);\r
6274 # 707 "../include/apr_thread_proc.h"\r
6275 void apr_proc_other_child_register(apr_proc_t *proc,\r
6276                                            void (*maintenance) (int reason,\r
6277                                                                 void *,\r
6278                                                                 int status),\r
6279                                            void *data, apr_file_t *write_fd,\r
6280                                            apr_pool_t *p);\r
6281 # 723 "../include/apr_thread_proc.h"\r
6282 void apr_proc_other_child_unregister(void *data);\r
6283 # 745 "../include/apr_thread_proc.h"\r
6284 apr_status_t apr_proc_other_child_alert(apr_proc_t *proc,\r
6285                                                      int reason,\r
6286                                                      int status);\r
6287 # 756 "../include/apr_thread_proc.h"\r
6288 void apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,\r
6289                                                int reason);\r
6290 \r
6291 \r
6292 \r
6293 \r
6294 \r
6295 \r
6296 \r
6297 void apr_proc_other_child_refresh_all(int reason);\r
6298 \r
6299 \r
6300 \r
6301 \r
6302 \r
6303 \r
6304 apr_status_t apr_proc_kill(apr_proc_t *proc, int sig);\r
6305 # 787 "../include/apr_thread_proc.h"\r
6306 void apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *proc,\r
6307                                            apr_kill_conditions_e how);\r
6308 # 798 "../include/apr_thread_proc.h"\r
6309 apr_status_t apr_setup_signal_thread(void);\r
6310 # 807 "../include/apr_thread_proc.h"\r
6311 apr_status_t apr_signal_thread(int(*signal_handler)(int signum));\r
6312 \r
6313 \r
6314 \r
6315 \r
6316 \r
6317 \r
6318 \r
6319 apr_pool_t * apr_thread_pool_get (const apr_thread_t *thethread);\r
6320 # 20 "./../test/testatomic.c" 2\r
6321 \r
6322 \r
6323 # 1 "../include/apr_atomic.h" 1\r
6324 # 47 "../include/apr_atomic.h"\r
6325 apr_status_t apr_atomic_init(apr_pool_t *p);\r
6326 # 59 "../include/apr_atomic.h"\r
6327 apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem);\r
6328 \r
6329 \r
6330 \r
6331 \r
6332 \r
6333 \r
6334 void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
6335 \r
6336 \r
6337 \r
6338 \r
6339 \r
6340 \r
6341 \r
6342 apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
6343 \r
6344 \r
6345 \r
6346 \r
6347 \r
6348 \r
6349 void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
6350 \r
6351 \r
6352 \r
6353 \r
6354 \r
6355 \r
6356 apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem);\r
6357 \r
6358 \r
6359 \r
6360 \r
6361 \r
6362 \r
6363 int apr_atomic_dec32(volatile apr_uint32_t *mem);\r
6364 # 105 "../include/apr_atomic.h"\r
6365 apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,\r
6366                               apr_uint32_t cmp);\r
6367 \r
6368 \r
6369 \r
6370 \r
6371 \r
6372 \r
6373 \r
6374 apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
6375 # 124 "../include/apr_atomic.h"\r
6376 void* apr_atomic_casptr(volatile void **mem, void *with, const void *cmp);\r
6377 \r
6378 \r
6379 \r
6380 \r
6381 \r
6382 \r
6383 \r
6384 void* apr_atomic_xchgptr(volatile void **mem, void *with);\r
6385 # 23 "./../test/testatomic.c" 2\r
6386 # 37 "./../test/testatomic.c"\r
6387 static void test_init(abts_case *tc, void *data)\r
6388 {\r
6389     apr_assert_success(tc, "Could not initliaze atomics", apr_atomic_init(p), 39);\r
6390 }\r
6391 \r
6392 static void test_set32(abts_case *tc, void *data)\r
6393 {\r
6394     apr_uint32_t y32;\r
6395     apr_atomic_set32(&y32, 2);\r
6396     abts_int_equal(tc, 2, y32, 46);\r
6397 }\r
6398 \r
6399 static void test_read32(abts_case *tc, void *data)\r
6400 {\r
6401     apr_uint32_t y32;\r
6402     apr_atomic_set32(&y32, 2);\r
6403     abts_int_equal(tc, 2, apr_atomic_read32(&y32), 53);\r
6404 }\r
6405 \r
6406 static void test_dec32(abts_case *tc, void *data)\r
6407 {\r
6408     apr_uint32_t y32;\r
6409     int rv;\r
6410 \r
6411     apr_atomic_set32(&y32, 2);\r
6412 \r
6413     rv = apr_atomic_dec32(&y32);\r
6414     abts_int_equal(tc, 1, y32, 64);\r
6415     abts_assert(tc, "atomic_dec returned zero when it shouldn't", rv != 0, 65);;\r
6416 \r
6417     rv = apr_atomic_dec32(&y32);\r
6418     abts_int_equal(tc, 0, y32, 68);\r
6419     abts_assert(tc, "atomic_dec didn't returned zero when it should", rv == 0, 69);;\r
6420 }\r
6421 \r
6422 static void test_xchg32(abts_case *tc, void *data)\r
6423 {\r
6424     apr_uint32_t oldval;\r
6425     apr_uint32_t y32;\r
6426 \r
6427     apr_atomic_set32(&y32, 100);\r
6428     oldval = apr_atomic_xchg32(&y32, 50);\r
6429 \r
6430     abts_int_equal(tc, 100, oldval, 80);\r
6431     abts_int_equal(tc, 50, y32, 81);\r
6432 }\r
6433 \r
6434 static void test_xchgptr(abts_case *tc, void *data)\r
6435 {\r
6436     int a;\r
6437     void *ref = "little piggy";\r
6438     volatile void *target_ptr = ref;\r
6439     void *old_ptr;\r
6440 \r
6441     old_ptr = apr_atomic_xchgptr(&target_ptr, &a);\r
6442     abts_ptr_equal(tc, ref, old_ptr, 92);\r
6443     abts_ptr_equal(tc, &a, (void *) target_ptr, 93);\r
6444 }\r
6445 \r
6446 static void test_cas_equal(abts_case *tc, void *data)\r
6447 {\r
6448     apr_uint32_t casval = 0;\r
6449     apr_uint32_t oldval;\r
6450 \r
6451     oldval = apr_atomic_cas32(&casval, 12, 0);\r
6452     abts_int_equal(tc, 0, oldval, 102);\r
6453     abts_int_equal(tc, 12, casval, 103);\r
6454 }\r
6455 \r
6456 static void test_cas_equal_nonnull(abts_case *tc, void *data)\r
6457 {\r
6458     apr_uint32_t casval = 12;\r
6459     apr_uint32_t oldval;\r
6460 \r
6461     oldval = apr_atomic_cas32(&casval, 23, 12);\r
6462     abts_int_equal(tc, 12, oldval, 112);\r
6463     abts_int_equal(tc, 23, casval, 113);\r
6464 }\r
6465 \r
6466 static void test_cas_notequal(abts_case *tc, void *data)\r
6467 {\r
6468     apr_uint32_t casval = 12;\r
6469     apr_uint32_t oldval;\r
6470 \r
6471     oldval = apr_atomic_cas32(&casval, 23, 2);\r
6472     abts_int_equal(tc, 12, oldval, 122);\r
6473     abts_int_equal(tc, 12, casval, 123);\r
6474 }\r
6475 \r
6476 static void test_casptr_equal(abts_case *tc, void *data)\r
6477 {\r
6478     int a;\r
6479     volatile void *target_ptr = ((void*)0);\r
6480     void *old_ptr;\r
6481 \r
6482     old_ptr = apr_atomic_casptr(&target_ptr, &a, ((void*)0));\r
6483     abts_ptr_equal(tc, ((void*)0), old_ptr, 133);\r
6484     abts_ptr_equal(tc, &a, (void *) target_ptr, 134);\r
6485 }\r
6486 \r
6487 static void test_casptr_equal_nonnull(abts_case *tc, void *data)\r
6488 {\r
6489     int a, b;\r
6490     volatile void *target_ptr = &a;\r
6491     void *old_ptr;\r
6492 \r
6493     old_ptr = apr_atomic_casptr(&target_ptr, &b, &a);\r
6494     abts_ptr_equal(tc, &a, old_ptr, 144);\r
6495     abts_ptr_equal(tc, &b, (void *) target_ptr, 145);\r
6496 }\r
6497 \r
6498 static void test_casptr_notequal(abts_case *tc, void *data)\r
6499 {\r
6500     int a, b;\r
6501     volatile void *target_ptr = &a;\r
6502     void *old_ptr;\r
6503 \r
6504     old_ptr = apr_atomic_casptr(&target_ptr, &a, &b);\r
6505     abts_ptr_equal(tc, &a, old_ptr, 155);\r
6506     abts_ptr_equal(tc, &a, (void *) target_ptr, 156);\r
6507 }\r
6508 \r
6509 static void test_add32(abts_case *tc, void *data)\r
6510 {\r
6511     apr_uint32_t oldval;\r
6512     apr_uint32_t y32;\r
6513 \r
6514     apr_atomic_set32(&y32, 23);\r
6515     oldval = apr_atomic_add32(&y32, 4);\r
6516     abts_int_equal(tc, 23, oldval, 166);\r
6517     abts_int_equal(tc, 27, y32, 167);\r
6518 }\r
6519 \r
6520 static void test_add32_neg(abts_case *tc, void *data)\r
6521 {\r
6522     apr_uint32_t oldval;\r
6523     apr_uint32_t y32;\r
6524 \r
6525     apr_atomic_set32(&y32, 23);\r
6526     oldval = apr_atomic_add32(&y32, -10);\r
6527     abts_int_equal(tc, 23, oldval, 177);\r
6528     abts_int_equal(tc, 13, y32, 178);\r
6529 }\r
6530 \r
6531 static void test_inc32(abts_case *tc, void *data)\r
6532 {\r
6533     apr_uint32_t oldval;\r
6534     apr_uint32_t y32;\r
6535 \r
6536     apr_atomic_set32(&y32, 23);\r
6537     oldval = apr_atomic_inc32(&y32);\r
6538     abts_int_equal(tc, 23, oldval, 188);\r
6539     abts_int_equal(tc, 24, y32, 189);\r
6540 }\r
6541 \r
6542 static void test_set_add_inc_sub(abts_case *tc, void *data)\r
6543 {\r
6544     apr_uint32_t y32;\r
6545 \r
6546     apr_atomic_set32(&y32, 0);\r
6547     apr_atomic_add32(&y32, 20);\r
6548     apr_atomic_inc32(&y32);\r
6549     apr_atomic_sub32(&y32, 10);\r
6550 \r
6551     abts_int_equal(tc, 11, y32, 201);\r
6552 }\r
6553 \r
6554 static void test_wrap_zero(abts_case *tc, void *data)\r
6555 {\r
6556     apr_uint32_t y32;\r
6557     apr_uint32_t rv;\r
6558     apr_uint32_t minus1 = -1;\r
6559     char *str;\r
6560 \r
6561     apr_atomic_set32(&y32, 0);\r
6562     rv = apr_atomic_dec32(&y32);\r
6563 \r
6564     abts_assert(tc, "apr_atomic_dec32 on zero returned zero.", rv != 0, 214);;\r
6565     str = apr_psprintf(p, "zero wrap failed: 0 - 1 = %d", y32);\r
6566     abts_assert(tc, str, y32 == minus1, 216);;\r
6567 }\r
6568 \r
6569 static void test_inc_neg1(abts_case *tc, void *data)\r
6570 {\r
6571     apr_uint32_t y32 = -1;\r
6572     apr_uint32_t minus1 = -1;\r
6573     apr_uint32_t rv;\r
6574     char *str;\r
6575 \r
6576     rv = apr_atomic_inc32(&y32);\r
6577 \r
6578     abts_assert(tc, "apr_atomic_inc32 didn't return the old value.", rv == minus1, 228);;\r
6579     str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);\r
6580     abts_assert(tc, str, y32 == 0, 230);;\r
6581 }\r
6582 \r
6583 \r
6584 \r
6585 \r
6586 void * thread_func_mutex(apr_thread_t *thd, void *data);\r
6587 void * thread_func_atomic(apr_thread_t *thd, void *data);\r
6588 \r
6589 apr_thread_mutex_t *thread_lock;\r
6590 volatile apr_uint32_t mutex_locks = 0;\r
6591 volatile apr_uint32_t atomic_ops = 0;\r
6592 apr_status_t exit_ret_val = 123;\r
6593 \r
6594 void * thread_func_mutex(apr_thread_t *thd, void *data)\r
6595 {\r
6596     int i;\r
6597 \r
6598     for (i = 0; i < 1; i++) {\r
6599         apr_thread_mutex_lock(thread_lock);\r
6600         mutex_locks++;\r
6601         apr_thread_mutex_unlock(thread_lock);\r
6602     }\r
6603     apr_thread_exit(thd, exit_ret_val);\r
6604     return ((void*)0);\r
6605 }\r
6606 \r
6607 void * thread_func_atomic(apr_thread_t *thd, void *data)\r
6608 {\r
6609     int i;\r
6610 \r
6611     for (i = 0; i < 1 ; i++) {\r
6612         apr_atomic_inc32(&atomic_ops);\r
6613         apr_atomic_add32(&atomic_ops, 2);\r
6614         apr_atomic_dec32(&atomic_ops);\r
6615         apr_atomic_dec32(&atomic_ops);\r
6616     }\r
6617     apr_thread_exit(thd, exit_ret_val);\r
6618     return ((void*)0);\r
6619 }\r
6620 \r
6621 static void test_atomics_threaded(abts_case *tc, void *data)\r
6622 {\r
6623     apr_thread_t *t1[3];\r
6624     apr_thread_t *t2[3];\r
6625     apr_status_t rv;\r
6626     int i;\r
6627 \r
6628 \r
6629 \r
6630 \r
6631 \r
6632     rv = apr_thread_mutex_create(&thread_lock, 0x0, p);\r
6633     apr_assert_success(tc, "Could not create lock", rv, 283);\r
6634 \r
6635     for (i = 0; i < 3; i++) {\r
6636         apr_status_t r1, r2;\r
6637         r1 = apr_thread_create(&t1[i], ((void*)0), thread_func_mutex, ((void*)0), p);\r
6638         r2 = apr_thread_create(&t2[i], ((void*)0), thread_func_atomic, ((void*)0), p);\r
6639         abts_assert(tc, "Failed creating threads", !r1 && !r2, 289);;\r
6640     }\r
6641 \r
6642     for (i = 0; i < 3; i++) {\r
6643         apr_status_t s1, s2;\r
6644         apr_thread_join(&s1, t1[i]);\r
6645         apr_thread_join(&s2, t2[i]);\r
6646 \r
6647         abts_assert(tc, "Invalid return value from thread_join", s1 == exit_ret_val && s2 == exit_ret_val, 298);;\r
6648 \r
6649     }\r
6650 \r
6651     abts_int_equal(tc, 3 * 1, mutex_locks, 301);\r
6652     abts_int_equal(tc, 3 * 1, apr_atomic_read32(&atomic_ops), 303);\r
6653 \r
6654 \r
6655     rv = apr_thread_mutex_destroy(thread_lock);\r
6656     abts_assert(tc, "Failed creating threads", rv == 0, 306);;\r
6657 }\r
6658 \r
6659 typedef struct tbox_t tbox_t;\r
6660 \r
6661 struct tbox_t {\r
6662     abts_case *tc;\r
6663     apr_uint32_t *mem;\r
6664     apr_uint32_t preval;\r
6665     apr_uint32_t postval;\r
6666     apr_uint32_t loop;\r
6667     void (*func)(tbox_t *box);\r
6668 };\r
6669 \r
6670 static __inline__ void busyloop_read32(tbox_t *tbox)\r
6671 {\r
6672     apr_uint32_t val;\r
6673 \r
6674     do {\r
6675         val = apr_atomic_read32(tbox->mem);\r
6676 \r
6677         if (val != tbox->preval) {\r
6678             apr_thread_yield();\r
6679         } else {\r
6680             break;\r
6681                 }\r
6682     } while (1);\r
6683 }\r
6684 \r
6685 static void busyloop_set32(tbox_t *tbox)\r
6686 {\r
6687     do {\r
6688         busyloop_read32(tbox);\r
6689         apr_atomic_set32(tbox->mem, tbox->postval);\r
6690     } while (--tbox->loop);\r
6691 }\r
6692 \r
6693 static void busyloop_add32(tbox_t *tbox)\r
6694 {\r
6695     apr_uint32_t val;\r
6696 \r
6697     do {\r
6698         busyloop_read32(tbox);\r
6699         val = apr_atomic_add32(tbox->mem, tbox->postval);\r
6700         apr_thread_mutex_lock(thread_lock);\r
6701         abts_int_equal(tbox->tc, val, tbox->preval, 350);\r
6702         apr_thread_mutex_unlock(thread_lock);\r
6703     } while (--tbox->loop);\r
6704 }\r
6705 \r
6706 static void busyloop_sub32(tbox_t *tbox)\r
6707 {\r
6708     do {\r
6709         busyloop_read32(tbox);\r
6710         apr_atomic_sub32(tbox->mem, tbox->postval);\r
6711     } while (--tbox->loop);\r
6712 }\r
6713 \r
6714 static void busyloop_inc32(tbox_t *tbox)\r
6715 {\r
6716     apr_uint32_t val;\r
6717 \r
6718     do {\r
6719         busyloop_read32(tbox);\r
6720         val = apr_atomic_inc32(tbox->mem);\r
6721         apr_thread_mutex_lock(thread_lock);\r
6722         abts_int_equal(tbox->tc, val, tbox->preval, 371);\r
6723         apr_thread_mutex_unlock(thread_lock);\r
6724     } while (--tbox->loop);\r
6725 }\r
6726 \r
6727 static void busyloop_dec32(tbox_t *tbox)\r
6728 {\r
6729     apr_uint32_t val;\r
6730 \r
6731     do {\r
6732         busyloop_read32(tbox);\r
6733         val = apr_atomic_dec32(tbox->mem);\r
6734         apr_thread_mutex_lock(thread_lock);\r
6735         abts_int_nequal(tbox->tc, 0, val, 384);\r
6736         apr_thread_mutex_unlock(thread_lock);\r
6737     } while (--tbox->loop);\r
6738 }\r
6739 \r
6740 static void busyloop_cas32(tbox_t *tbox)\r
6741 {\r
6742     apr_uint32_t val;\r
6743 \r
6744     do {\r
6745         do {\r
6746             val = apr_atomic_cas32(tbox->mem, tbox->postval, tbox->preval);\r
6747 \r
6748             if (val != tbox->preval) {\r
6749                 apr_thread_yield();\r
6750                         } else {\r
6751                 break;\r
6752                         }\r
6753         } while (1);\r
6754     } while (--tbox->loop);\r
6755 }\r
6756 \r
6757 static void busyloop_xchg32(tbox_t *tbox)\r
6758 {\r
6759     apr_uint32_t val;\r
6760 \r
6761     do {\r
6762         busyloop_read32(tbox);\r
6763         val = apr_atomic_xchg32(tbox->mem, tbox->postval);\r
6764         apr_thread_mutex_lock(thread_lock);\r
6765         abts_int_equal(tbox->tc, val, tbox->preval, 413);\r
6766         apr_thread_mutex_unlock(thread_lock);\r
6767     } while (--tbox->loop);\r
6768 }\r
6769 \r
6770 static void * thread_func_busyloop(apr_thread_t *thd, void *data)\r
6771 {\r
6772     tbox_t *tbox = data;\r
6773 \r
6774     tbox->func(tbox);\r
6775 \r
6776     apr_thread_exit(thd, 0);\r
6777 \r
6778     return ((void*)0);\r
6779 }\r
6780 \r
6781 static void test_atomics_busyloop_threaded(abts_case *tc, void *data)\r
6782 {\r
6783     unsigned int i;\r
6784     apr_status_t rv;\r
6785     apr_uint32_t count = 0;\r
6786     tbox_t tbox[3];\r
6787     apr_thread_t *thread[3];\r
6788 \r
6789     rv = apr_thread_mutex_create(&thread_lock, 0x0, p);\r
6790     apr_assert_success(tc, "Could not create lock", rv, 438);\r
6791 \r
6792 \r
6793     for (i = 0; i < 3; i++) {\r
6794         tbox[i].tc = tc;\r
6795         tbox[i].mem = &count;\r
6796         tbox[i].loop = 50;\r
6797     }\r
6798 \r
6799     tbox[0].preval = 98;\r
6800     tbox[0].postval = 3891;\r
6801     tbox[0].func = busyloop_add32;\r
6802 \r
6803     tbox[1].preval = 3989;\r
6804     tbox[1].postval = 1010;\r
6805     tbox[1].func = busyloop_sub32;\r
6806 \r
6807     tbox[2].preval = 2979;\r
6808     tbox[2].postval = 0;\r
6809     tbox[2].func = busyloop_inc32;\r
6810 \r
6811     tbox[3].preval = 2980;\r
6812     tbox[3].postval = 16384;\r
6813     tbox[3].func = busyloop_set32;\r
6814 \r
6815     tbox[4].preval = 16384;\r
6816     tbox[4].postval = 0;\r
6817     tbox[4].func = busyloop_dec32;\r
6818 \r
6819     tbox[5].preval = 16383;\r
6820     tbox[5].postval = 1048576;\r
6821     tbox[5].func = busyloop_cas32;\r
6822 \r
6823     tbox[6].preval = 1048576;\r
6824     tbox[6].postval = 98;\r
6825     tbox[6].func = busyloop_xchg32;\r
6826 \r
6827 \r
6828     for (i = 0; i < 3; i++) {\r
6829         rv = apr_thread_create(&thread[i], ((void*)0), thread_func_busyloop,\r
6830                                &tbox[i], p);\r
6831         abts_assert(tc, "Failed creating thread", rv == 0, 479);;\r
6832     }\r
6833 \r
6834 \r
6835     apr_atomic_set32(tbox->mem, 98);\r
6836 \r
6837     for (i = 0; i < 3; i++) {\r
6838         apr_status_t retval;\r
6839         rv = apr_thread_join(&retval, thread[i]);\r
6840         abts_assert(tc, "Thread join failed", rv == 0, 488);;\r
6841         abts_assert(tc, "Invalid return value from thread_join", retval == 0, 489);;\r
6842     }\r
6843 \r
6844     abts_int_equal(tbox->tc, 98, count, 492);\r
6845 \r
6846     rv = apr_thread_mutex_destroy(thread_lock);\r
6847     abts_assert(tc, "Failed creating threads", rv == 0, 495);;\r
6848 }\r
6849 \r
6850 \r
6851 \r
6852 abts_suite *testatomic(abts_suite *suite)\r
6853 {\r
6854     suite = abts_add_suite(suite, "./../test/testatomic.c");\r
6855 \r
6856     abts_run_test(suite, test_init, ((void*)0));\r
6857     abts_run_test(suite, test_set32, ((void*)0));\r
6858     abts_run_test(suite, test_read32, ((void*)0));\r
6859     abts_run_test(suite, test_dec32, ((void*)0));\r
6860     abts_run_test(suite, test_xchg32, ((void*)0));\r
6861     abts_run_test(suite, test_xchgptr, ((void*)0));\r
6862     abts_run_test(suite, test_cas_equal, ((void*)0));\r
6863     abts_run_test(suite, test_cas_equal_nonnull, ((void*)0));\r
6864     abts_run_test(suite, test_cas_notequal, ((void*)0));\r
6865     abts_run_test(suite, test_casptr_equal, ((void*)0));\r
6866     abts_run_test(suite, test_casptr_equal_nonnull, ((void*)0));\r
6867     abts_run_test(suite, test_casptr_notequal, ((void*)0));\r
6868     abts_run_test(suite, test_add32, ((void*)0));\r
6869     abts_run_test(suite, test_add32_neg, ((void*)0));\r
6870     abts_run_test(suite, test_inc32, ((void*)0));\r
6871     abts_run_test(suite, test_set_add_inc_sub, ((void*)0));\r
6872     abts_run_test(suite, test_wrap_zero, ((void*)0));\r
6873     abts_run_test(suite, test_inc_neg1, ((void*)0));\r
6874 \r
6875 \r
6876     abts_run_test(suite, test_atomics_threaded, ((void*)0));\r
6877     abts_run_test(suite, test_atomics_busyloop_threaded, ((void*)0));\r
6878 \r
6879 \r
6880     return suite;\r
6881 }\r
6882 # 11 "main1.c" 2\r
6883 # 1 "./../test/testutil.c" 1\r
6884 # 20 "./../test/testutil.c"\r
6885 # 1 "./../test/abts.h" 1\r
6886 # 21 "./../test/testutil.c" 2\r
6887 # 1 "./../test/testutil.h" 1\r
6888 # 19 "./../test/testutil.h"\r
6889 # 1 "./../test/abts.h" 1\r
6890 # 20 "./../test/testutil.h" 2\r
6891 # 22 "./../test/testutil.c" 2\r
6892 \r
6893 \r
6894 apr_pool_t *p;\r
6895 \r
6896 void apr_assert_success(abts_case* tc, const char* context, apr_status_t rv,\r
6897                         int lineno)\r
6898 {\r
6899     if (rv == ((20000 + 50000) + 23)) {\r
6900         abts_not_impl(tc, context, lineno);\r
6901     } else if (rv != 0) {\r
6902         char buf[8096], ebuf[128];\r
6903         sprintf(buf, "%s (%d): %s\n", context, rv,\r
6904                 apr_strerror(rv, ebuf, sizeof ebuf));\r
6905         abts_fail(tc, buf, lineno);\r
6906         }\r
6907 }\r
6908 \r
6909 void initialize(void) {\r
6910     apr_initialize();\r
6911     atexit(apr_terminate);\r
6912 \r
6913     apr_pool_create_ex(&p, ((void*)0), ((void*)0), ((void*)0));\r
6914 }\r
6915 # 12 "main1.c" 2\r
6916 # 1 "./../locks/unix/thread_mutex.c" 1\r
6917 # 17 "./../locks/unix/thread_mutex.c"\r
6918 # 1 "../include/arch/unix/apr_arch_thread_mutex.h" 1\r
6919 # 21 "../include/arch/unix/apr_arch_thread_mutex.h"\r
6920 # 1 "../include/arch/unix/apr_private.h" 1\r
6921 # 999 "../include/arch/unix/apr_private.h"\r
6922 # 1 "../include/arch/unix/../apr_private_common.h" 1\r
6923 # 27 "../include/arch/unix/../apr_private_common.h"\r
6924 apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,\r
6925                                           const char *liststr,\r
6926                                           char separator,\r
6927                                           apr_pool_t *p);\r
6928 \r
6929 apr_status_t apr_filepath_list_merge_impl(char **liststr,\r
6930                                           apr_array_header_t *pathelts,\r
6931                                           char separator,\r
6932                                           apr_pool_t *p);\r
6933 # 1000 "../include/arch/unix/apr_private.h" 2\r
6934 # 22 "../include/arch/unix/apr_arch_thread_mutex.h" 2\r
6935 \r
6936 \r
6937 # 1 "../include/apr_portable.h" 1\r
6938 # 32 "../include/apr_portable.h"\r
6939 # 1 "../include/apr_network_io.h" 1\r
6940 # 31 "../include/apr_network_io.h"\r
6941 # 1 "/usr/include/netinet/in.h" 1 3 4\r
6942 # 22 "/usr/include/netinet/in.h" 3 4\r
6943 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 1 3 4\r
6944 # 23 "/usr/include/netinet/in.h" 2 3 4\r
6945 \r
6946 \r
6947 \r
6948 \r
6949 \r
6950 \r
6951 \r
6952 typedef uint32_t in_addr_t;\r
6953 struct in_addr\r
6954   {\r
6955     in_addr_t s_addr;\r
6956   };\r
6957 \r
6958 \r
6959 \r
6960 # 1 "/usr/include/x86_64-linux-gnu/bits/in.h" 1 3 4\r
6961 # 112 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4\r
6962 struct ip_opts\r
6963   {\r
6964     struct in_addr ip_dst;\r
6965     char ip_opts[40];\r
6966   };\r
6967 \r
6968 \r
6969 struct ip_mreqn\r
6970   {\r
6971     struct in_addr imr_multiaddr;\r
6972     struct in_addr imr_address;\r
6973     int imr_ifindex;\r
6974   };\r
6975 \r
6976 \r
6977 struct in_pktinfo\r
6978   {\r
6979     int ipi_ifindex;\r
6980     struct in_addr ipi_spec_dst;\r
6981     struct in_addr ipi_addr;\r
6982   };\r
6983 # 38 "/usr/include/netinet/in.h" 2 3 4\r
6984 \r
6985 \r
6986 enum\r
6987   {\r
6988     IPPROTO_IP = 0,\r
6989 \r
6990     IPPROTO_ICMP = 1,\r
6991 \r
6992     IPPROTO_IGMP = 2,\r
6993 \r
6994     IPPROTO_IPIP = 4,\r
6995 \r
6996     IPPROTO_TCP = 6,\r
6997 \r
6998     IPPROTO_EGP = 8,\r
6999 \r
7000     IPPROTO_PUP = 12,\r
7001 \r
7002     IPPROTO_UDP = 17,\r
7003 \r
7004     IPPROTO_IDP = 22,\r
7005 \r
7006     IPPROTO_TP = 29,\r
7007 \r
7008     IPPROTO_DCCP = 33,\r
7009 \r
7010     IPPROTO_IPV6 = 41,\r
7011 \r
7012     IPPROTO_RSVP = 46,\r
7013 \r
7014     IPPROTO_GRE = 47,\r
7015 \r
7016     IPPROTO_ESP = 50,\r
7017 \r
7018     IPPROTO_AH = 51,\r
7019 \r
7020     IPPROTO_MTP = 92,\r
7021 \r
7022     IPPROTO_BEETPH = 94,\r
7023 \r
7024     IPPROTO_ENCAP = 98,\r
7025 \r
7026     IPPROTO_PIM = 103,\r
7027 \r
7028     IPPROTO_COMP = 108,\r
7029 \r
7030     IPPROTO_SCTP = 132,\r
7031 \r
7032     IPPROTO_UDPLITE = 136,\r
7033 \r
7034     IPPROTO_RAW = 255,\r
7035 \r
7036     IPPROTO_MAX\r
7037   };\r
7038 \r
7039 \r
7040 \r
7041 \r
7042 \r
7043 enum\r
7044   {\r
7045     IPPROTO_HOPOPTS = 0,\r
7046 \r
7047     IPPROTO_ROUTING = 43,\r
7048 \r
7049     IPPROTO_FRAGMENT = 44,\r
7050 \r
7051     IPPROTO_ICMPV6 = 58,\r
7052 \r
7053     IPPROTO_NONE = 59,\r
7054 \r
7055     IPPROTO_DSTOPTS = 60,\r
7056 \r
7057     IPPROTO_MH = 135\r
7058 \r
7059   };\r
7060 \r
7061 \r
7062 \r
7063 typedef uint16_t in_port_t;\r
7064 \r
7065 \r
7066 enum\r
7067   {\r
7068     IPPORT_ECHO = 7,\r
7069     IPPORT_DISCARD = 9,\r
7070     IPPORT_SYSTAT = 11,\r
7071     IPPORT_DAYTIME = 13,\r
7072     IPPORT_NETSTAT = 15,\r
7073     IPPORT_FTP = 21,\r
7074     IPPORT_TELNET = 23,\r
7075     IPPORT_SMTP = 25,\r
7076     IPPORT_TIMESERVER = 37,\r
7077     IPPORT_NAMESERVER = 42,\r
7078     IPPORT_WHOIS = 43,\r
7079     IPPORT_MTP = 57,\r
7080 \r
7081     IPPORT_TFTP = 69,\r
7082     IPPORT_RJE = 77,\r
7083     IPPORT_FINGER = 79,\r
7084     IPPORT_TTYLINK = 87,\r
7085     IPPORT_SUPDUP = 95,\r
7086 \r
7087 \r
7088     IPPORT_EXECSERVER = 512,\r
7089     IPPORT_LOGINSERVER = 513,\r
7090     IPPORT_CMDSERVER = 514,\r
7091     IPPORT_EFSSERVER = 520,\r
7092 \r
7093 \r
7094     IPPORT_BIFFUDP = 512,\r
7095     IPPORT_WHOSERVER = 513,\r
7096     IPPORT_ROUTESERVER = 520,\r
7097 \r
7098 \r
7099     IPPORT_RESERVED = 1024,\r
7100 \r
7101 \r
7102     IPPORT_USERRESERVED = 5000\r
7103   };\r
7104 # 209 "/usr/include/netinet/in.h" 3 4\r
7105 struct in6_addr\r
7106   {\r
7107     union\r
7108       {\r
7109  uint8_t __u6_addr8[16];\r
7110 \r
7111  uint16_t __u6_addr16[8];\r
7112  uint32_t __u6_addr32[4];\r
7113 \r
7114       } __in6_u;\r
7115 \r
7116 \r
7117 \r
7118 \r
7119 \r
7120   };\r
7121 \r
7122 \r
7123 extern const struct in6_addr in6addr_any;\r
7124 extern const struct in6_addr in6addr_loopback;\r
7125 # 237 "/usr/include/netinet/in.h" 3 4\r
7126 struct sockaddr_in\r
7127   {\r
7128     sa_family_t sin_family;\r
7129     in_port_t sin_port;\r
7130     struct in_addr sin_addr;\r
7131 \r
7132 \r
7133     unsigned char sin_zero[sizeof (struct sockaddr) -\r
7134       (sizeof (unsigned short int)) -\r
7135       sizeof (in_port_t) -\r
7136       sizeof (struct in_addr)];\r
7137   };\r
7138 \r
7139 \r
7140 \r
7141 struct sockaddr_in6\r
7142   {\r
7143     sa_family_t sin6_family;\r
7144     in_port_t sin6_port;\r
7145     uint32_t sin6_flowinfo;\r
7146     struct in6_addr sin6_addr;\r
7147     uint32_t sin6_scope_id;\r
7148   };\r
7149 \r
7150 \r
7151 \r
7152 \r
7153 struct ip_mreq\r
7154   {\r
7155 \r
7156     struct in_addr imr_multiaddr;\r
7157 \r
7158 \r
7159     struct in_addr imr_interface;\r
7160   };\r
7161 \r
7162 struct ip_mreq_source\r
7163   {\r
7164 \r
7165     struct in_addr imr_multiaddr;\r
7166 \r
7167 \r
7168     struct in_addr imr_interface;\r
7169 \r
7170 \r
7171     struct in_addr imr_sourceaddr;\r
7172   };\r
7173 \r
7174 \r
7175 \r
7176 \r
7177 struct ipv6_mreq\r
7178   {\r
7179 \r
7180     struct in6_addr ipv6mr_multiaddr;\r
7181 \r
7182 \r
7183     unsigned int ipv6mr_interface;\r
7184   };\r
7185 \r
7186 \r
7187 \r
7188 \r
7189 struct group_req\r
7190   {\r
7191 \r
7192     uint32_t gr_interface;\r
7193 \r
7194 \r
7195     struct sockaddr_storage gr_group;\r
7196   };\r
7197 \r
7198 struct group_source_req\r
7199   {\r
7200 \r
7201     uint32_t gsr_interface;\r
7202 \r
7203 \r
7204     struct sockaddr_storage gsr_group;\r
7205 \r
7206 \r
7207     struct sockaddr_storage gsr_source;\r
7208   };\r
7209 \r
7210 \r
7211 \r
7212 struct ip_msfilter\r
7213   {\r
7214 \r
7215     struct in_addr imsf_multiaddr;\r
7216 \r
7217 \r
7218     struct in_addr imsf_interface;\r
7219 \r
7220 \r
7221     uint32_t imsf_fmode;\r
7222 \r
7223 \r
7224     uint32_t imsf_numsrc;\r
7225 \r
7226     struct in_addr imsf_slist[1];\r
7227   };\r
7228 \r
7229 \r
7230 \r
7231 \r
7232 \r
7233 struct group_filter\r
7234   {\r
7235 \r
7236     uint32_t gf_interface;\r
7237 \r
7238 \r
7239     struct sockaddr_storage gf_group;\r
7240 \r
7241 \r
7242     uint32_t gf_fmode;\r
7243 \r
7244 \r
7245     uint32_t gf_numsrc;\r
7246 \r
7247     struct sockaddr_storage gf_slist[1];\r
7248 };\r
7249 # 374 "/usr/include/netinet/in.h" 3 4\r
7250 extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
7251 extern uint16_t ntohs (uint16_t __netshort)\r
7252      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
7253 extern uint32_t htonl (uint32_t __hostlong)\r
7254      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
7255 extern uint16_t htons (uint16_t __hostshort)\r
7256      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
7257 \r
7258 \r
7259 \r
7260 \r
7261 \r
7262 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4\r
7263 # 386 "/usr/include/netinet/in.h" 2 3 4\r
7264 # 501 "/usr/include/netinet/in.h" 3 4\r
7265 extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ ));\r
7266 \r
7267 \r
7268 extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)\r
7269      __attribute__ ((__nothrow__ ));\r
7270 # 32 "../include/apr_network_io.h" 2\r
7271 # 108 "../include/apr_network_io.h"\r
7272 typedef enum {\r
7273     APR_SHUTDOWN_READ,\r
7274     APR_SHUTDOWN_WRITE,\r
7275     APR_SHUTDOWN_READWRITE\r
7276 } apr_shutdown_how_e;\r
7277 # 172 "../include/apr_network_io.h"\r
7278 typedef enum {\r
7279     APR_LOCAL,\r
7280     APR_REMOTE\r
7281 } apr_interface_e;\r
7282 # 193 "../include/apr_network_io.h"\r
7283 typedef struct apr_socket_t apr_socket_t;\r
7284 \r
7285 \r
7286 \r
7287 typedef struct apr_hdtr_t apr_hdtr_t;\r
7288 \r
7289 typedef struct in_addr apr_in_addr_t;\r
7290 \r
7291 typedef struct apr_ipsubnet_t apr_ipsubnet_t;\r
7292 \r
7293 \r
7294 typedef apr_uint16_t apr_port_t;\r
7295 \r
7296 \r
7297 \r
7298 \r
7299 typedef struct apr_sockaddr_t apr_sockaddr_t;\r
7300 \r
7301 \r
7302 \r
7303 struct apr_sockaddr_t {\r
7304 \r
7305     apr_pool_t *pool;\r
7306 \r
7307     char *hostname;\r
7308 \r
7309     char *servname;\r
7310 \r
7311     apr_port_t port;\r
7312 \r
7313     apr_int32_t family;\r
7314 \r
7315     apr_socklen_t salen;\r
7316 \r
7317     int ipaddr_len;\r
7318 \r
7319 \r
7320     int addr_str_len;\r
7321 \r
7322 \r
7323     void *ipaddr_ptr;\r
7324 \r
7325 \r
7326     apr_sockaddr_t *next;\r
7327 \r
7328     union {\r
7329 \r
7330         struct sockaddr_in sin;\r
7331 \r
7332 \r
7333         struct sockaddr_in6 sin6;\r
7334 \r
7335 \r
7336 \r
7337 \r
7338         struct sockaddr_storage sas;\r
7339 \r
7340     } sa;\r
7341 };\r
7342 # 263 "../include/apr_network_io.h"\r
7343 struct apr_hdtr_t {\r
7344 \r
7345     struct iovec* headers;\r
7346 \r
7347     int numheaders;\r
7348 \r
7349     struct iovec* trailers;\r
7350 \r
7351     int numtrailers;\r
7352 };\r
7353 # 287 "../include/apr_network_io.h"\r
7354 apr_status_t apr_socket_create(apr_socket_t **new_sock,\r
7355                                             int family, int type,\r
7356                                             int protocol,\r
7357                                             apr_pool_t *cont);\r
7358 # 305 "../include/apr_network_io.h"\r
7359 apr_status_t apr_socket_shutdown(apr_socket_t *thesocket,\r
7360                                               apr_shutdown_how_e how);\r
7361 \r
7362 \r
7363 \r
7364 \r
7365 \r
7366 apr_status_t apr_socket_close(apr_socket_t *thesocket);\r
7367 # 321 "../include/apr_network_io.h"\r
7368 apr_status_t apr_socket_bind(apr_socket_t *sock,\r
7369                                           apr_sockaddr_t *sa);\r
7370 # 331 "../include/apr_network_io.h"\r
7371 apr_status_t apr_socket_listen(apr_socket_t *sock,\r
7372                                             apr_int32_t backlog);\r
7373 # 345 "../include/apr_network_io.h"\r
7374 apr_status_t apr_socket_accept(apr_socket_t **new_sock,\r
7375                                             apr_socket_t *sock,\r
7376                                             apr_pool_t *connection_pool);\r
7377 \r
7378 \r
7379 \r
7380 \r
7381 \r
7382 \r
7383 \r
7384 apr_status_t apr_socket_connect(apr_socket_t *sock,\r
7385                                              apr_sockaddr_t *sa);\r
7386 # 370 "../include/apr_network_io.h"\r
7387 apr_status_t apr_socket_atreadeof(apr_socket_t *sock,\r
7388                                                int *atreadeof);\r
7389 # 396 "../include/apr_network_io.h"\r
7390 apr_status_t apr_sockaddr_info_get(apr_sockaddr_t **sa,\r
7391                                           const char *hostname,\r
7392                                           apr_int32_t family,\r
7393                                           apr_port_t port,\r
7394                                           apr_int32_t flags,\r
7395                                           apr_pool_t *p);\r
7396 # 411 "../include/apr_network_io.h"\r
7397 apr_status_t apr_getnameinfo(char **hostname,\r
7398                                           apr_sockaddr_t *sa,\r
7399                                           apr_int32_t flags);\r
7400 # 445 "../include/apr_network_io.h"\r
7401 apr_status_t apr_parse_addr_port(char **addr,\r
7402                                               char **scope_id,\r
7403                                               apr_port_t *port,\r
7404                                               const char *str,\r
7405                                               apr_pool_t *p);\r
7406 # 459 "../include/apr_network_io.h"\r
7407 apr_status_t apr_gethostname(char *buf, int len, apr_pool_t *cont);\r
7408 \r
7409 \r
7410 \r
7411 \r
7412 \r
7413 \r
7414 \r
7415 apr_status_t apr_socket_data_get(void **data, const char *key,\r
7416                                               apr_socket_t *sock);\r
7417 # 477 "../include/apr_network_io.h"\r
7418 apr_status_t apr_socket_data_set(apr_socket_t *sock, void *data,\r
7419                                               const char *key,\r
7420                                               apr_status_t (*cleanup)(void*));\r
7421 # 498 "../include/apr_network_io.h"\r
7422 apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf,\r
7423                                           apr_size_t *len);\r
7424 # 519 "../include/apr_network_io.h"\r
7425 apr_status_t apr_socket_sendv(apr_socket_t *sock,\r
7426                                            const struct iovec *vec,\r
7427                                            apr_int32_t nvec, apr_size_t *len);\r
7428 # 530 "../include/apr_network_io.h"\r
7429 apr_status_t apr_socket_sendto(apr_socket_t *sock,\r
7430                                             apr_sockaddr_t *where,\r
7431                                             apr_int32_t flags, const char *buf,\r
7432                                             apr_size_t *len);\r
7433 # 548 "../include/apr_network_io.h"\r
7434 apr_status_t apr_socket_recvfrom(apr_sockaddr_t *from,\r
7435                                               apr_socket_t *sock,\r
7436                                               apr_int32_t flags, char *buf,\r
7437                                               apr_size_t *len);\r
7438 # 573 "../include/apr_network_io.h"\r
7439 apr_status_t apr_socket_sendfile(apr_socket_t *sock,\r
7440                                               apr_file_t *file,\r
7441                                               apr_hdtr_t *hdtr,\r
7442                                               apr_off_t *offset,\r
7443                                               apr_size_t *len,\r
7444                                               apr_int32_t flags);\r
7445 # 601 "../include/apr_network_io.h"\r
7446 apr_status_t apr_socket_recv(apr_socket_t *sock,\r
7447                                    char *buf, apr_size_t *len);\r
7448 # 626 "../include/apr_network_io.h"\r
7449 apr_status_t apr_socket_opt_set(apr_socket_t *sock,\r
7450                                              apr_int32_t opt, apr_int32_t on);\r
7451 # 640 "../include/apr_network_io.h"\r
7452 apr_status_t apr_socket_timeout_set(apr_socket_t *sock,\r
7453                                                  apr_interval_time_t t);\r
7454 # 662 "../include/apr_network_io.h"\r
7455 apr_status_t apr_socket_opt_get(apr_socket_t *sock,\r
7456                                              apr_int32_t opt, apr_int32_t *on);\r
7457 \r
7458 \r
7459 \r
7460 \r
7461 \r
7462 \r
7463 apr_status_t apr_socket_timeout_get(apr_socket_t *sock,\r
7464                                                  apr_interval_time_t *t);\r
7465 \r
7466 \r
7467 \r
7468 \r
7469 \r
7470 \r
7471 \r
7472 apr_status_t apr_socket_atmark(apr_socket_t *sock,\r
7473                                             int *atmark);\r
7474 # 690 "../include/apr_network_io.h"\r
7475 apr_status_t apr_socket_addr_get(apr_sockaddr_t **sa,\r
7476                                               apr_interface_e which,\r
7477                                               apr_socket_t *sock);\r
7478 # 701 "../include/apr_network_io.h"\r
7479 apr_status_t apr_sockaddr_ip_get(char **addr,\r
7480                                               apr_sockaddr_t *sockaddr);\r
7481 \r
7482 \r
7483 \r
7484 \r
7485 \r
7486 \r
7487 apr_status_t apr_sockaddr_ip_getbuf(char *buf, apr_size_t buflen,\r
7488                                                  apr_sockaddr_t *sockaddr);\r
7489 # 722 "../include/apr_network_io.h"\r
7490 int apr_sockaddr_equal(const apr_sockaddr_t *addr1,\r
7491                                     const apr_sockaddr_t *addr2);\r
7492 # 733 "../include/apr_network_io.h"\r
7493 int apr_sockaddr_is_wildcard(const apr_sockaddr_t *addr);\r
7494 \r
7495 \r
7496 \r
7497 \r
7498 \r
7499 \r
7500 apr_status_t apr_socket_type_get(apr_socket_t *sock,\r
7501                                               int *type);\r
7502 \r
7503 \r
7504 \r
7505 \r
7506 \r
7507 \r
7508 apr_status_t apr_getservbyname(apr_sockaddr_t *sockaddr,\r
7509                                             const char *servname);\r
7510 # 758 "../include/apr_network_io.h"\r
7511 apr_status_t apr_ipsubnet_create(apr_ipsubnet_t **ipsub,\r
7512                                               const char *ipstr,\r
7513                                               const char *mask_or_numbits,\r
7514                                               apr_pool_t *p);\r
7515 # 770 "../include/apr_network_io.h"\r
7516 int apr_ipsubnet_test(apr_ipsubnet_t *ipsub, apr_sockaddr_t *sa);\r
7517 # 791 "../include/apr_network_io.h"\r
7518 apr_status_t apr_socket_protocol_get(apr_socket_t *sock,\r
7519                                                   int *protocol);\r
7520 \r
7521 \r
7522 \r
7523 \r
7524 apr_pool_t * apr_socket_pool_get (const apr_socket_t *thesocket);\r
7525 \r
7526 \r
7527 \r
7528 \r
7529 apr_status_t apr_socket_inherit_set( apr_socket_t *thesocket);\r
7530 \r
7531 \r
7532 \r
7533 \r
7534 apr_status_t apr_socket_inherit_unset( apr_socket_t *thesocket);\r
7535 # 823 "../include/apr_network_io.h"\r
7536 apr_status_t apr_mcast_join(apr_socket_t *sock,\r
7537                                          apr_sockaddr_t *join,\r
7538                                          apr_sockaddr_t *iface,\r
7539                                          apr_sockaddr_t *source);\r
7540 # 838 "../include/apr_network_io.h"\r
7541 apr_status_t apr_mcast_leave(apr_socket_t *sock,\r
7542                                           apr_sockaddr_t *addr,\r
7543                                           apr_sockaddr_t *iface,\r
7544                                           apr_sockaddr_t *source);\r
7545 # 850 "../include/apr_network_io.h"\r
7546 apr_status_t apr_mcast_hops(apr_socket_t *sock,\r
7547                                          apr_byte_t ttl);\r
7548 \r
7549 \r
7550 \r
7551 \r
7552 \r
7553 \r
7554 apr_status_t apr_mcast_loopback(apr_socket_t *sock,\r
7555                                              apr_byte_t opt);\r
7556 \r
7557 \r
7558 \r
7559 \r
7560 \r
7561 \r
7562 \r
7563 apr_status_t apr_mcast_interface(apr_socket_t *sock,\r
7564                                               apr_sockaddr_t *iface);\r
7565 # 33 "../include/apr_portable.h" 2\r
7566 \r
7567 # 1 "../include/apr_global_mutex.h" 1\r
7568 # 26 "../include/apr_global_mutex.h"\r
7569 # 1 "../include/apr_proc_mutex.h" 1\r
7570 # 44 "../include/apr_proc_mutex.h"\r
7571 typedef enum {\r
7572     APR_LOCK_FCNTL,\r
7573     APR_LOCK_FLOCK,\r
7574     APR_LOCK_SYSVSEM,\r
7575     APR_LOCK_PROC_PTHREAD,\r
7576     APR_LOCK_POSIXSEM,\r
7577     APR_LOCK_DEFAULT\r
7578 } apr_lockmech_e;\r
7579 \r
7580 \r
7581 typedef struct apr_proc_mutex_t apr_proc_mutex_t;\r
7582 # 79 "../include/apr_proc_mutex.h"\r
7583 apr_status_t apr_proc_mutex_create(apr_proc_mutex_t **mutex,\r
7584                                                 const char *fname,\r
7585                                                 apr_lockmech_e mech,\r
7586                                                 apr_pool_t *pool);\r
7587 # 95 "../include/apr_proc_mutex.h"\r
7588 apr_status_t apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,\r
7589                                                     const char *fname,\r
7590                                                     apr_pool_t *pool);\r
7591 \r
7592 \r
7593 \r
7594 \r
7595 \r
7596 \r
7597 apr_status_t apr_proc_mutex_lock(apr_proc_mutex_t *mutex);\r
7598 # 113 "../include/apr_proc_mutex.h"\r
7599 apr_status_t apr_proc_mutex_trylock(apr_proc_mutex_t *mutex);\r
7600 \r
7601 \r
7602 \r
7603 \r
7604 \r
7605 apr_status_t apr_proc_mutex_unlock(apr_proc_mutex_t *mutex);\r
7606 \r
7607 \r
7608 \r
7609 \r
7610 \r
7611 apr_status_t apr_proc_mutex_destroy(apr_proc_mutex_t *mutex);\r
7612 \r
7613 \r
7614 \r
7615 \r
7616 \r
7617 \r
7618 \r
7619 apr_status_t apr_proc_mutex_cleanup(void *mutex);\r
7620 \r
7621 \r
7622 \r
7623 \r
7624 \r
7625 \r
7626 const char * apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex);\r
7627 \r
7628 \r
7629 \r
7630 \r
7631 \r
7632 \r
7633 const char * apr_proc_mutex_name(apr_proc_mutex_t *mutex);\r
7634 \r
7635 \r
7636 \r
7637 \r
7638 const char * apr_proc_mutex_defname(void);\r
7639 \r
7640 \r
7641 \r
7642 \r
7643 \r
7644 apr_pool_t * apr_proc_mutex_pool_get (const apr_proc_mutex_t *theproc_mutex);\r
7645 # 27 "../include/apr_global_mutex.h" 2\r
7646 # 46 "../include/apr_global_mutex.h"\r
7647 typedef struct apr_global_mutex_t apr_global_mutex_t;\r
7648 # 74 "../include/apr_global_mutex.h"\r
7649 apr_status_t apr_global_mutex_create(apr_global_mutex_t **mutex,\r
7650                                                   const char *fname,\r
7651                                                   apr_lockmech_e mech,\r
7652                                                   apr_pool_t *pool);\r
7653 # 90 "../include/apr_global_mutex.h"\r
7654 apr_status_t apr_global_mutex_child_init(\r
7655                               apr_global_mutex_t **mutex,\r
7656                               const char *fname,\r
7657                               apr_pool_t *pool);\r
7658 \r
7659 \r
7660 \r
7661 \r
7662 \r
7663 \r
7664 apr_status_t apr_global_mutex_lock(apr_global_mutex_t *mutex);\r
7665 # 109 "../include/apr_global_mutex.h"\r
7666 apr_status_t apr_global_mutex_trylock(apr_global_mutex_t *mutex);\r
7667 \r
7668 \r
7669 \r
7670 \r
7671 \r
7672 apr_status_t apr_global_mutex_unlock(apr_global_mutex_t *mutex);\r
7673 \r
7674 \r
7675 \r
7676 \r
7677 \r
7678 apr_status_t apr_global_mutex_destroy(apr_global_mutex_t *mutex);\r
7679 \r
7680 \r
7681 \r
7682 \r
7683 \r
7684 const char * apr_global_mutex_lockfile(apr_global_mutex_t *mutex);\r
7685 \r
7686 \r
7687 \r
7688 \r
7689 \r
7690 \r
7691 \r
7692 const char * apr_global_mutex_name(apr_global_mutex_t *mutex);\r
7693 \r
7694 \r
7695 \r
7696 \r
7697 \r
7698 apr_pool_t * apr_global_mutex_pool_get (const apr_global_mutex_t *theglobal_mutex);\r
7699 # 35 "../include/apr_portable.h" 2\r
7700 \r
7701 \r
7702 # 1 "../include/apr_dso.h" 1\r
7703 # 44 "../include/apr_dso.h"\r
7704 typedef struct apr_dso_handle_t apr_dso_handle_t;\r
7705 \r
7706 \r
7707 \r
7708 \r
7709 typedef void * apr_dso_handle_sym_t;\r
7710 # 59 "../include/apr_dso.h"\r
7711 apr_status_t apr_dso_load(apr_dso_handle_t **res_handle,\r
7712                                        const char *path, apr_pool_t *ctx);\r
7713 \r
7714 \r
7715 \r
7716 \r
7717 \r
7718 apr_status_t apr_dso_unload(apr_dso_handle_t *handle);\r
7719 \r
7720 \r
7721 \r
7722 \r
7723 \r
7724 \r
7725 \r
7726 apr_status_t apr_dso_sym(apr_dso_handle_sym_t *ressym,\r
7727                                       apr_dso_handle_t *handle,\r
7728                                       const char *symname);\r
7729 \r
7730 \r
7731 \r
7732 \r
7733 \r
7734 \r
7735 \r
7736 const char * apr_dso_error(apr_dso_handle_t *dso, char *buf, apr_size_t bufsize);\r
7737 # 38 "../include/apr_portable.h" 2\r
7738 # 1 "../include/apr_shm.h" 1\r
7739 # 43 "../include/apr_shm.h"\r
7740 typedef struct apr_shm_t apr_shm_t;\r
7741 # 69 "../include/apr_shm.h"\r
7742 apr_status_t apr_shm_create(apr_shm_t **m,\r
7743                                          apr_size_t reqsize,\r
7744                                          const char *filename,\r
7745                                          apr_pool_t *pool);\r
7746 # 114 "../include/apr_shm.h"\r
7747 apr_status_t apr_shm_create_ex(apr_shm_t **m,\r
7748                                             apr_size_t reqsize,\r
7749                                             const char *filename,\r
7750                                             apr_pool_t *pool,\r
7751                                             apr_int32_t flags);\r
7752 # 135 "../include/apr_shm.h"\r
7753 apr_status_t apr_shm_remove(const char *filename,\r
7754                                          apr_pool_t *pool);\r
7755 \r
7756 \r
7757 \r
7758 \r
7759 \r
7760 apr_status_t apr_shm_destroy(apr_shm_t *m);\r
7761 # 153 "../include/apr_shm.h"\r
7762 apr_status_t apr_shm_attach(apr_shm_t **m,\r
7763                                          const char *filename,\r
7764                                          apr_pool_t *pool);\r
7765 # 167 "../include/apr_shm.h"\r
7766 apr_status_t apr_shm_attach_ex(apr_shm_t **m,\r
7767                                             const char *filename,\r
7768                                             apr_pool_t *pool,\r
7769                                             apr_int32_t flags);\r
7770 \r
7771 \r
7772 \r
7773 \r
7774 \r
7775 \r
7776 apr_status_t apr_shm_detach(apr_shm_t *m);\r
7777 # 188 "../include/apr_shm.h"\r
7778 void * apr_shm_baseaddr_get(const apr_shm_t *m);\r
7779 \r
7780 \r
7781 \r
7782 \r
7783 \r
7784 \r
7785 apr_size_t apr_shm_size_get(const apr_shm_t *m);\r
7786 \r
7787 \r
7788 \r
7789 \r
7790 apr_pool_t * apr_shm_pool_get (const apr_shm_t *theshm);\r
7791 # 39 "../include/apr_portable.h" 2\r
7792 \r
7793 \r
7794 # 1 "/usr/include/dirent.h" 1 3 4\r
7795 # 61 "/usr/include/dirent.h" 3 4\r
7796 # 1 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 1 3 4\r
7797 # 22 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 3 4\r
7798 struct dirent\r
7799   {\r
7800 \r
7801     __ino_t d_ino;\r
7802     __off_t d_off;\r
7803 \r
7804 \r
7805 \r
7806 \r
7807     unsigned short int d_reclen;\r
7808     unsigned char d_type;\r
7809     char d_name[256];\r
7810   };\r
7811 # 62 "/usr/include/dirent.h" 2 3 4\r
7812 # 97 "/usr/include/dirent.h" 3 4\r
7813 enum\r
7814   {\r
7815     DT_UNKNOWN = 0,\r
7816 \r
7817     DT_FIFO = 1,\r
7818 \r
7819     DT_CHR = 2,\r
7820 \r
7821     DT_DIR = 4,\r
7822 \r
7823     DT_BLK = 6,\r
7824 \r
7825     DT_REG = 8,\r
7826 \r
7827     DT_LNK = 10,\r
7828 \r
7829     DT_SOCK = 12,\r
7830 \r
7831     DT_WHT = 14\r
7832 \r
7833   };\r
7834 # 127 "/usr/include/dirent.h" 3 4\r
7835 typedef struct __dirstream DIR;\r
7836 \r
7837 \r
7838 \r
7839 \r
7840 \r
7841 \r
7842 extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1)));\r
7843 \r
7844 \r
7845 \r
7846 \r
7847 \r
7848 \r
7849 extern DIR *fdopendir (int __fd);\r
7850 \r
7851 \r
7852 \r
7853 \r
7854 \r
7855 \r
7856 \r
7857 extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));\r
7858 # 162 "/usr/include/dirent.h" 3 4\r
7859 extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));\r
7860 # 183 "/usr/include/dirent.h" 3 4\r
7861 extern int readdir_r (DIR *__restrict __dirp,\r
7862         struct dirent *__restrict __entry,\r
7863         struct dirent **__restrict __result)\r
7864      __attribute__ ((__nonnull__ (1, 2, 3)));\r
7865 # 208 "/usr/include/dirent.h" 3 4\r
7866 extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
7867 \r
7868 \r
7869 \r
7870 \r
7871 \r
7872 extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
7873 \r
7874 \r
7875 extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
7876 \r
7877 \r
7878 \r
7879 \r
7880 \r
7881 extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
7882 # 244 "/usr/include/dirent.h" 3 4\r
7883 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
7884 # 245 "/usr/include/dirent.h" 2 3 4\r
7885 # 254 "/usr/include/dirent.h" 3 4\r
7886 extern int scandir (const char *__restrict __dir,\r
7887       struct dirent ***__restrict __namelist,\r
7888       int (*__selector) (const struct dirent *),\r
7889       int (*__cmp) (const struct dirent **,\r
7890       const struct dirent **))\r
7891      __attribute__ ((__nonnull__ (1, 2)));\r
7892 # 324 "/usr/include/dirent.h" 3 4\r
7893 extern int alphasort (const struct dirent **__e1,\r
7894         const struct dirent **__e2)\r
7895      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
7896 # 352 "/usr/include/dirent.h" 3 4\r
7897 extern __ssize_t getdirentries (int __fd, char *__restrict __buf,\r
7898     size_t __nbytes,\r
7899     __off_t *__restrict __basep)\r
7900      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
7901 # 42 "../include/apr_portable.h" 2\r
7902 \r
7903 \r
7904 # 1 "/usr/include/fcntl.h" 1 3 4\r
7905 # 35 "/usr/include/fcntl.h" 3 4\r
7906 # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 1 3 4\r
7907 # 35 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4\r
7908 struct flock\r
7909   {\r
7910     short int l_type;\r
7911     short int l_whence;\r
7912 \r
7913     __off_t l_start;\r
7914     __off_t l_len;\r
7915 \r
7916 \r
7917 \r
7918 \r
7919     __pid_t l_pid;\r
7920   };\r
7921 # 61 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4\r
7922 # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 1 3 4\r
7923 # 62 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 2 3 4\r
7924 # 36 "/usr/include/fcntl.h" 2 3 4\r
7925 # 67 "/usr/include/fcntl.h" 3 4\r
7926 # 1 "/usr/include/time.h" 1 3 4\r
7927 # 68 "/usr/include/fcntl.h" 2 3 4\r
7928 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4\r
7929 # 46 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
7930 struct stat\r
7931   {\r
7932     __dev_t st_dev;\r
7933 \r
7934 \r
7935 \r
7936 \r
7937     __ino_t st_ino;\r
7938 \r
7939 \r
7940 \r
7941 \r
7942 \r
7943 \r
7944 \r
7945     __nlink_t st_nlink;\r
7946     __mode_t st_mode;\r
7947 \r
7948     __uid_t st_uid;\r
7949     __gid_t st_gid;\r
7950 \r
7951     int __pad0;\r
7952 \r
7953     __dev_t st_rdev;\r
7954 \r
7955 \r
7956 \r
7957 \r
7958     __off_t st_size;\r
7959 \r
7960 \r
7961 \r
7962     __blksize_t st_blksize;\r
7963 \r
7964     __blkcnt_t st_blocks;\r
7965 # 91 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
7966     struct timespec st_atim;\r
7967     struct timespec st_mtim;\r
7968     struct timespec st_ctim;\r
7969 # 106 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
7970     __syscall_slong_t __glibc_reserved[3];\r
7971 # 115 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
7972   };\r
7973 # 69 "/usr/include/fcntl.h" 2 3 4\r
7974 # 137 "/usr/include/fcntl.h" 3 4\r
7975 extern int fcntl (int __fd, int __cmd, ...);\r
7976 # 146 "/usr/include/fcntl.h" 3 4\r
7977 extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));\r
7978 # 170 "/usr/include/fcntl.h" 3 4\r
7979 extern int openat (int __fd, const char *__file, int __oflag, ...)\r
7980      __attribute__ ((__nonnull__ (2)));\r
7981 # 192 "/usr/include/fcntl.h" 3 4\r
7982 extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1)));\r
7983 # 238 "/usr/include/fcntl.h" 3 4\r
7984 extern int posix_fadvise (int __fd, off_t __offset, off_t __len,\r
7985      int __advise) __attribute__ ((__nothrow__ ));\r
7986 # 260 "/usr/include/fcntl.h" 3 4\r
7987 extern int posix_fallocate (int __fd, off_t __offset, off_t __len);\r
7988 # 45 "../include/apr_portable.h" 2\r
7989 \r
7990 \r
7991 # 1 "/usr/include/pthread.h" 1 3 4\r
7992 # 23 "/usr/include/pthread.h" 3 4\r
7993 # 1 "/usr/include/sched.h" 1 3 4\r
7994 # 28 "/usr/include/sched.h" 3 4\r
7995 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
7996 # 29 "/usr/include/sched.h" 2 3 4\r
7997 \r
7998 \r
7999 \r
8000 # 1 "/usr/include/time.h" 1 3 4\r
8001 # 33 "/usr/include/sched.h" 2 3 4\r
8002 \r
8003 \r
8004 \r
8005 \r
8006 \r
8007 \r
8008 \r
8009 \r
8010 # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4\r
8011 # 72 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
8012 struct sched_param\r
8013   {\r
8014     int __sched_priority;\r
8015   };\r
8016 # 103 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
8017 struct __sched_param\r
8018   {\r
8019     int __sched_priority;\r
8020   };\r
8021 # 118 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
8022 typedef unsigned long int __cpu_mask;\r
8023 \r
8024 \r
8025 \r
8026 \r
8027 \r
8028 \r
8029 typedef struct\r
8030 {\r
8031   __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];\r
8032 } cpu_set_t;\r
8033 # 203 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
8034 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)\r
8035   __attribute__ ((__nothrow__ ));\r
8036 extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ )) ;\r
8037 extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ ));\r
8038 # 42 "/usr/include/sched.h" 2 3 4\r
8039 \r
8040 \r
8041 \r
8042 \r
8043 \r
8044 \r
8045 \r
8046 extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)\r
8047      __attribute__ ((__nothrow__ ));\r
8048 \r
8049 \r
8050 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ ));\r
8051 \r
8052 \r
8053 extern int sched_setscheduler (__pid_t __pid, int __policy,\r
8054           const struct sched_param *__param) __attribute__ ((__nothrow__ ));\r
8055 \r
8056 \r
8057 extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
8058 \r
8059 \r
8060 extern int sched_yield (void) __attribute__ ((__nothrow__ ));\r
8061 \r
8062 \r
8063 extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ ));\r
8064 \r
8065 \r
8066 extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ ));\r
8067 \r
8068 \r
8069 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ ));\r
8070 # 24 "/usr/include/pthread.h" 2 3 4\r
8071 # 1 "/usr/include/time.h" 1 3 4\r
8072 # 37 "/usr/include/time.h" 3 4\r
8073 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
8074 # 38 "/usr/include/time.h" 2 3 4\r
8075 \r
8076 \r
8077 \r
8078 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
8079 # 42 "/usr/include/time.h" 2 3 4\r
8080 # 133 "/usr/include/time.h" 3 4\r
8081 struct tm\r
8082 {\r
8083   int tm_sec;\r
8084   int tm_min;\r
8085   int tm_hour;\r
8086   int tm_mday;\r
8087   int tm_mon;\r
8088   int tm_year;\r
8089   int tm_wday;\r
8090   int tm_yday;\r
8091   int tm_isdst;\r
8092 \r
8093 \r
8094   long int tm_gmtoff;\r
8095   const char *tm_zone;\r
8096 \r
8097 \r
8098 \r
8099 \r
8100 };\r
8101 # 161 "/usr/include/time.h" 3 4\r
8102 struct itimerspec\r
8103   {\r
8104     struct timespec it_interval;\r
8105     struct timespec it_value;\r
8106   };\r
8107 \r
8108 \r
8109 struct sigevent;\r
8110 # 189 "/usr/include/time.h" 3 4\r
8111 extern clock_t clock (void) __attribute__ ((__nothrow__ ));\r
8112 \r
8113 \r
8114 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ ));\r
8115 \r
8116 \r
8117 extern double difftime (time_t __time1, time_t __time0)\r
8118      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
8119 \r
8120 \r
8121 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
8122 \r
8123 \r
8124 \r
8125 \r
8126 \r
8127 extern size_t strftime (char *__restrict __s, size_t __maxsize,\r
8128    const char *__restrict __format,\r
8129    const struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
8130 # 223 "/usr/include/time.h" 3 4\r
8131 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,\r
8132      const char *__restrict __format,\r
8133      const struct tm *__restrict __tp,\r
8134      __locale_t __loc) __attribute__ ((__nothrow__ ));\r
8135 # 239 "/usr/include/time.h" 3 4\r
8136 extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
8137 \r
8138 \r
8139 \r
8140 extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
8141 \r
8142 \r
8143 \r
8144 \r
8145 \r
8146 extern struct tm *gmtime_r (const time_t *__restrict __timer,\r
8147        struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
8148 \r
8149 \r
8150 \r
8151 extern struct tm *localtime_r (const time_t *__restrict __timer,\r
8152           struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
8153 \r
8154 \r
8155 \r
8156 \r
8157 \r
8158 extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ ));\r
8159 \r
8160 \r
8161 extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
8162 \r
8163 \r
8164 \r
8165 \r
8166 \r
8167 \r
8168 \r
8169 extern char *asctime_r (const struct tm *__restrict __tp,\r
8170    char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
8171 \r
8172 \r
8173 extern char *ctime_r (const time_t *__restrict __timer,\r
8174         char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
8175 \r
8176 \r
8177 \r
8178 \r
8179 extern char *__tzname[2];\r
8180 extern int __daylight;\r
8181 extern long int __timezone;\r
8182 \r
8183 \r
8184 \r
8185 \r
8186 extern char *tzname[2];\r
8187 \r
8188 \r
8189 \r
8190 extern void tzset (void) __attribute__ ((__nothrow__ ));\r
8191 \r
8192 \r
8193 \r
8194 extern int daylight;\r
8195 extern long int timezone;\r
8196 \r
8197 \r
8198 \r
8199 \r
8200 \r
8201 extern int stime (const time_t *__when) __attribute__ ((__nothrow__ ));\r
8202 # 319 "/usr/include/time.h" 3 4\r
8203 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
8204 \r
8205 \r
8206 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
8207 \r
8208 \r
8209 extern int dysize (int __year) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
8210 # 334 "/usr/include/time.h" 3 4\r
8211 extern int nanosleep (const struct timespec *__requested_time,\r
8212         struct timespec *__remaining);\r
8213 \r
8214 \r
8215 \r
8216 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ ));\r
8217 \r
8218 \r
8219 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ ));\r
8220 \r
8221 \r
8222 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)\r
8223      __attribute__ ((__nothrow__ ));\r
8224 \r
8225 \r
8226 \r
8227 \r
8228 \r
8229 \r
8230 extern int clock_nanosleep (clockid_t __clock_id, int __flags,\r
8231        const struct timespec *__req,\r
8232        struct timespec *__rem);\r
8233 \r
8234 \r
8235 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ ));\r
8236 \r
8237 \r
8238 \r
8239 \r
8240 extern int timer_create (clockid_t __clock_id,\r
8241     struct sigevent *__restrict __evp,\r
8242     timer_t *__restrict __timerid) __attribute__ ((__nothrow__ ));\r
8243 \r
8244 \r
8245 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ ));\r
8246 \r
8247 \r
8248 extern int timer_settime (timer_t __timerid, int __flags,\r
8249      const struct itimerspec *__restrict __value,\r
8250      struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ ));\r
8251 \r
8252 \r
8253 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)\r
8254      __attribute__ ((__nothrow__ ));\r
8255 \r
8256 \r
8257 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ ));\r
8258 # 25 "/usr/include/pthread.h" 2 3 4\r
8259 \r
8260 \r
8261 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4\r
8262 # 26 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4\r
8263 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
8264 # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4\r
8265 \r
8266 \r
8267 \r
8268 \r
8269 typedef long int __jmp_buf[8];\r
8270 # 28 "/usr/include/pthread.h" 2 3 4\r
8271 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
8272 # 29 "/usr/include/pthread.h" 2 3 4\r
8273 \r
8274 \r
8275 \r
8276 enum\r
8277 {\r
8278   PTHREAD_CREATE_JOINABLE,\r
8279 \r
8280   PTHREAD_CREATE_DETACHED\r
8281 \r
8282 };\r
8283 \r
8284 \r
8285 \r
8286 enum\r
8287 {\r
8288   PTHREAD_MUTEX_TIMED_NP,\r
8289   PTHREAD_MUTEX_RECURSIVE_NP,\r
8290   PTHREAD_MUTEX_ERRORCHECK_NP,\r
8291   PTHREAD_MUTEX_ADAPTIVE_NP\r
8292 \r
8293   ,\r
8294   PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,\r
8295   PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,\r
8296   PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,\r
8297   PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL\r
8298 \r
8299 \r
8300 \r
8301 \r
8302 \r
8303 };\r
8304 \r
8305 \r
8306 \r
8307 \r
8308 enum\r
8309 {\r
8310   PTHREAD_MUTEX_STALLED,\r
8311   PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,\r
8312   PTHREAD_MUTEX_ROBUST,\r
8313   PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST\r
8314 };\r
8315 \r
8316 \r
8317 \r
8318 \r
8319 \r
8320 enum\r
8321 {\r
8322   PTHREAD_PRIO_NONE,\r
8323   PTHREAD_PRIO_INHERIT,\r
8324   PTHREAD_PRIO_PROTECT\r
8325 };\r
8326 # 125 "/usr/include/pthread.h" 3 4\r
8327 enum\r
8328 {\r
8329   PTHREAD_RWLOCK_PREFER_READER_NP,\r
8330   PTHREAD_RWLOCK_PREFER_WRITER_NP,\r
8331   PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\r
8332   PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP\r
8333 };\r
8334 # 166 "/usr/include/pthread.h" 3 4\r
8335 enum\r
8336 {\r
8337   PTHREAD_INHERIT_SCHED,\r
8338 \r
8339   PTHREAD_EXPLICIT_SCHED\r
8340 \r
8341 };\r
8342 \r
8343 \r
8344 \r
8345 enum\r
8346 {\r
8347   PTHREAD_SCOPE_SYSTEM,\r
8348 \r
8349   PTHREAD_SCOPE_PROCESS\r
8350 \r
8351 };\r
8352 \r
8353 \r
8354 \r
8355 enum\r
8356 {\r
8357   PTHREAD_PROCESS_PRIVATE,\r
8358 \r
8359   PTHREAD_PROCESS_SHARED\r
8360 \r
8361 };\r
8362 # 201 "/usr/include/pthread.h" 3 4\r
8363 struct _pthread_cleanup_buffer\r
8364 {\r
8365   void (*__routine) (void *);\r
8366   void *__arg;\r
8367   int __canceltype;\r
8368   struct _pthread_cleanup_buffer *__prev;\r
8369 };\r
8370 \r
8371 \r
8372 enum\r
8373 {\r
8374   PTHREAD_CANCEL_ENABLE,\r
8375 \r
8376   PTHREAD_CANCEL_DISABLE\r
8377 \r
8378 };\r
8379 enum\r
8380 {\r
8381   PTHREAD_CANCEL_DEFERRED,\r
8382 \r
8383   PTHREAD_CANCEL_ASYNCHRONOUS\r
8384 \r
8385 };\r
8386 # 244 "/usr/include/pthread.h" 3 4\r
8387 extern int pthread_create (pthread_t *__restrict __newthread,\r
8388       const pthread_attr_t *__restrict __attr,\r
8389       void *(*__start_routine) (void *),\r
8390       void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));\r
8391 \r
8392 \r
8393 \r
8394 \r
8395 \r
8396 extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));\r
8397 \r
8398 \r
8399 \r
8400 \r
8401 \r
8402 \r
8403 \r
8404 extern int pthread_join (pthread_t __th, void **__thread_return);\r
8405 # 282 "/usr/include/pthread.h" 3 4\r
8406 extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ ));\r
8407 \r
8408 \r
8409 \r
8410 extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
8411 \r
8412 \r
8413 extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)\r
8414   __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
8415 \r
8416 \r
8417 \r
8418 \r
8419 \r
8420 \r
8421 \r
8422 extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8423 \r
8424 \r
8425 extern int pthread_attr_destroy (pthread_attr_t *__attr)\r
8426      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8427 \r
8428 \r
8429 extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,\r
8430      int *__detachstate)\r
8431      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8432 \r
8433 \r
8434 extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,\r
8435      int __detachstate)\r
8436      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8437 \r
8438 \r
8439 \r
8440 extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,\r
8441           size_t *__guardsize)\r
8442      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8443 \r
8444 \r
8445 extern int pthread_attr_setguardsize (pthread_attr_t *__attr,\r
8446           size_t __guardsize)\r
8447      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8448 \r
8449 \r
8450 \r
8451 extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,\r
8452            struct sched_param *__restrict __param)\r
8453      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8454 \r
8455 \r
8456 extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,\r
8457            const struct sched_param *__restrict\r
8458            __param) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8459 \r
8460 \r
8461 extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict\r
8462      __attr, int *__restrict __policy)\r
8463      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8464 \r
8465 \r
8466 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)\r
8467      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8468 \r
8469 \r
8470 extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict\r
8471       __attr, int *__restrict __inherit)\r
8472      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8473 \r
8474 \r
8475 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,\r
8476       int __inherit)\r
8477      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8478 \r
8479 \r
8480 \r
8481 extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,\r
8482       int *__restrict __scope)\r
8483      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8484 \r
8485 \r
8486 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)\r
8487      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8488 \r
8489 \r
8490 extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict\r
8491           __attr, void **__restrict __stackaddr)\r
8492      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));\r
8493 \r
8494 \r
8495 \r
8496 \r
8497 \r
8498 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,\r
8499           void *__stackaddr)\r
8500      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));\r
8501 \r
8502 \r
8503 extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict\r
8504           __attr, size_t *__restrict __stacksize)\r
8505      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8506 \r
8507 \r
8508 \r
8509 \r
8510 extern int pthread_attr_setstacksize (pthread_attr_t *__attr,\r
8511           size_t __stacksize)\r
8512      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8513 \r
8514 \r
8515 \r
8516 extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,\r
8517       void **__restrict __stackaddr,\r
8518       size_t *__restrict __stacksize)\r
8519      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3)));\r
8520 \r
8521 \r
8522 \r
8523 \r
8524 extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,\r
8525       size_t __stacksize) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8526 # 440 "/usr/include/pthread.h" 3 4\r
8527 extern int pthread_setschedparam (pthread_t __target_thread, int __policy,\r
8528       const struct sched_param *__param)\r
8529      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));\r
8530 \r
8531 \r
8532 extern int pthread_getschedparam (pthread_t __target_thread,\r
8533       int *__restrict __policy,\r
8534       struct sched_param *__restrict __param)\r
8535      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
8536 \r
8537 \r
8538 extern int pthread_setschedprio (pthread_t __target_thread, int __prio)\r
8539      __attribute__ ((__nothrow__ ));\r
8540 # 505 "/usr/include/pthread.h" 3 4\r
8541 extern int pthread_once (pthread_once_t *__once_control,\r
8542     void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));\r
8543 # 517 "/usr/include/pthread.h" 3 4\r
8544 extern int pthread_setcancelstate (int __state, int *__oldstate);\r
8545 \r
8546 \r
8547 \r
8548 extern int pthread_setcanceltype (int __type, int *__oldtype);\r
8549 \r
8550 \r
8551 extern int pthread_cancel (pthread_t __th);\r
8552 \r
8553 \r
8554 \r
8555 \r
8556 extern void pthread_testcancel (void);\r
8557 \r
8558 \r
8559 \r
8560 \r
8561 typedef struct\r
8562 {\r
8563   struct\r
8564   {\r
8565     __jmp_buf __cancel_jmp_buf;\r
8566     int __mask_was_saved;\r
8567   } __cancel_jmp_buf[1];\r
8568   void *__pad[4];\r
8569 } __pthread_unwind_buf_t __attribute__ ((__aligned__));\r
8570 # 551 "/usr/include/pthread.h" 3 4\r
8571 struct __pthread_cleanup_frame\r
8572 {\r
8573   void (*__cancel_routine) (void *);\r
8574   void *__cancel_arg;\r
8575   int __do_it;\r
8576   int __cancel_type;\r
8577 };\r
8578 # 691 "/usr/include/pthread.h" 3 4\r
8579 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)\r
8580                             ;\r
8581 # 703 "/usr/include/pthread.h" 3 4\r
8582 extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)\r
8583                          ;\r
8584 # 744 "/usr/include/pthread.h" 3 4\r
8585 extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)\r
8586                              __attribute__ ((__noreturn__))\r
8587 \r
8588      __attribute__ ((__weak__))\r
8589 \r
8590      ;\r
8591 \r
8592 \r
8593 \r
8594 struct __jmp_buf_tag;\r
8595 extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));\r
8596 \r
8597 \r
8598 \r
8599 \r
8600 \r
8601 extern int pthread_mutex_init (pthread_mutex_t *__mutex,\r
8602           const pthread_mutexattr_t *__mutexattr)\r
8603      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8604 \r
8605 \r
8606 extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)\r
8607      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8608 \r
8609 \r
8610 extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)\r
8611      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8612 \r
8613 \r
8614 extern int pthread_mutex_lock (pthread_mutex_t *__mutex)\r
8615      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8616 \r
8617 \r
8618 \r
8619 extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,\r
8620         const struct timespec *__restrict\r
8621         __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));\r
8622 \r
8623 \r
8624 \r
8625 extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)\r
8626      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8627 \r
8628 \r
8629 \r
8630 extern int pthread_mutex_getprioceiling (const pthread_mutex_t *\r
8631       __restrict __mutex,\r
8632       int *__restrict __prioceiling)\r
8633      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8634 \r
8635 \r
8636 \r
8637 extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,\r
8638       int __prioceiling,\r
8639       int *__restrict __old_ceiling)\r
8640      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));\r
8641 \r
8642 \r
8643 \r
8644 \r
8645 extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)\r
8646      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8647 # 817 "/usr/include/pthread.h" 3 4\r
8648 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)\r
8649      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8650 \r
8651 \r
8652 extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)\r
8653      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8654 \r
8655 \r
8656 extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *\r
8657       __restrict __attr,\r
8658       int *__restrict __pshared)\r
8659      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8660 \r
8661 \r
8662 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,\r
8663       int __pshared)\r
8664      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8665 \r
8666 \r
8667 \r
8668 extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict\r
8669           __attr, int *__restrict __kind)\r
8670      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8671 \r
8672 \r
8673 \r
8674 \r
8675 extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)\r
8676      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8677 \r
8678 \r
8679 \r
8680 extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *\r
8681        __restrict __attr,\r
8682        int *__restrict __protocol)\r
8683      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8684 \r
8685 \r
8686 \r
8687 extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,\r
8688        int __protocol)\r
8689      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8690 \r
8691 \r
8692 extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *\r
8693           __restrict __attr,\r
8694           int *__restrict __prioceiling)\r
8695      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8696 \r
8697 \r
8698 extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,\r
8699           int __prioceiling)\r
8700      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8701 \r
8702 \r
8703 \r
8704 extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,\r
8705      int *__robustness)\r
8706      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8707 \r
8708 \r
8709 \r
8710 \r
8711 \r
8712 \r
8713 \r
8714 extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,\r
8715      int __robustness)\r
8716      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8717 # 899 "/usr/include/pthread.h" 3 4\r
8718 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,\r
8719     const pthread_rwlockattr_t *__restrict\r
8720     __attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8721 \r
8722 \r
8723 extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)\r
8724      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8725 \r
8726 \r
8727 extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)\r
8728      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8729 \r
8730 \r
8731 extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)\r
8732   __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8733 \r
8734 \r
8735 \r
8736 extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,\r
8737            const struct timespec *__restrict\r
8738            __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));\r
8739 \r
8740 \r
8741 \r
8742 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)\r
8743      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8744 \r
8745 \r
8746 extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)\r
8747      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8748 \r
8749 \r
8750 \r
8751 extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,\r
8752            const struct timespec *__restrict\r
8753            __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));\r
8754 \r
8755 \r
8756 \r
8757 extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)\r
8758      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8759 \r
8760 \r
8761 \r
8762 \r
8763 \r
8764 extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)\r
8765      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8766 \r
8767 \r
8768 extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)\r
8769      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8770 \r
8771 \r
8772 extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *\r
8773        __restrict __attr,\r
8774        int *__restrict __pshared)\r
8775      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8776 \r
8777 \r
8778 extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,\r
8779        int __pshared)\r
8780      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8781 \r
8782 \r
8783 extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *\r
8784        __restrict __attr,\r
8785        int *__restrict __pref)\r
8786      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8787 \r
8788 \r
8789 extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,\r
8790        int __pref) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8791 \r
8792 \r
8793 \r
8794 \r
8795 \r
8796 \r
8797 \r
8798 extern int pthread_cond_init (pthread_cond_t *__restrict __cond,\r
8799          const pthread_condattr_t *__restrict __cond_attr)\r
8800      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8801 \r
8802 \r
8803 extern int pthread_cond_destroy (pthread_cond_t *__cond)\r
8804      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8805 \r
8806 \r
8807 extern int pthread_cond_signal (pthread_cond_t *__cond)\r
8808      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8809 \r
8810 \r
8811 extern int pthread_cond_broadcast (pthread_cond_t *__cond)\r
8812      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8813 \r
8814 \r
8815 \r
8816 \r
8817 \r
8818 \r
8819 extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,\r
8820          pthread_mutex_t *__restrict __mutex)\r
8821      __attribute__ ((__nonnull__ (1, 2)));\r
8822 # 1011 "/usr/include/pthread.h" 3 4\r
8823 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,\r
8824        pthread_mutex_t *__restrict __mutex,\r
8825        const struct timespec *__restrict __abstime)\r
8826      __attribute__ ((__nonnull__ (1, 2, 3)));\r
8827 \r
8828 \r
8829 \r
8830 \r
8831 extern int pthread_condattr_init (pthread_condattr_t *__attr)\r
8832      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8833 \r
8834 \r
8835 extern int pthread_condattr_destroy (pthread_condattr_t *__attr)\r
8836      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8837 \r
8838 \r
8839 extern int pthread_condattr_getpshared (const pthread_condattr_t *\r
8840      __restrict __attr,\r
8841      int *__restrict __pshared)\r
8842      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8843 \r
8844 \r
8845 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,\r
8846      int __pshared) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8847 \r
8848 \r
8849 \r
8850 extern int pthread_condattr_getclock (const pthread_condattr_t *\r
8851           __restrict __attr,\r
8852           __clockid_t *__restrict __clock_id)\r
8853      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8854 \r
8855 \r
8856 extern int pthread_condattr_setclock (pthread_condattr_t *__attr,\r
8857           __clockid_t __clock_id)\r
8858      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8859 # 1055 "/usr/include/pthread.h" 3 4\r
8860 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)\r
8861      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8862 \r
8863 \r
8864 extern int pthread_spin_destroy (pthread_spinlock_t *__lock)\r
8865      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8866 \r
8867 \r
8868 extern int pthread_spin_lock (pthread_spinlock_t *__lock)\r
8869      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8870 \r
8871 \r
8872 extern int pthread_spin_trylock (pthread_spinlock_t *__lock)\r
8873      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8874 \r
8875 \r
8876 extern int pthread_spin_unlock (pthread_spinlock_t *__lock)\r
8877      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8878 \r
8879 \r
8880 \r
8881 \r
8882 \r
8883 \r
8884 extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,\r
8885      const pthread_barrierattr_t *__restrict\r
8886      __attr, unsigned int __count)\r
8887      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8888 \r
8889 \r
8890 extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)\r
8891      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8892 \r
8893 \r
8894 extern int pthread_barrier_wait (pthread_barrier_t *__barrier)\r
8895      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8896 \r
8897 \r
8898 \r
8899 extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)\r
8900      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8901 \r
8902 \r
8903 extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)\r
8904      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8905 \r
8906 \r
8907 extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *\r
8908         __restrict __attr,\r
8909         int *__restrict __pshared)\r
8910      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8911 \r
8912 \r
8913 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,\r
8914         int __pshared)\r
8915      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8916 # 1122 "/usr/include/pthread.h" 3 4\r
8917 extern int pthread_key_create (pthread_key_t *__key,\r
8918           void (*__destr_function) (void *))\r
8919      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8920 \r
8921 \r
8922 extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ ));\r
8923 \r
8924 \r
8925 extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ ));\r
8926 \r
8927 \r
8928 extern int pthread_setspecific (pthread_key_t __key,\r
8929     const void *__pointer) __attribute__ ((__nothrow__ )) ;\r
8930 \r
8931 \r
8932 \r
8933 \r
8934 extern int pthread_getcpuclockid (pthread_t __thread_id,\r
8935       __clockid_t *__clock_id)\r
8936      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
8937 # 1156 "/usr/include/pthread.h" 3 4\r
8938 extern int pthread_atfork (void (*__prepare) (void),\r
8939       void (*__parent) (void),\r
8940       void (*__child) (void)) __attribute__ ((__nothrow__ ));\r
8941 # 48 "../include/apr_portable.h" 2\r
8942 # 127 "../include/apr_portable.h"\r
8943 struct apr_os_proc_mutex_t {\r
8944 \r
8945 \r
8946     int crossproc;\r
8947 \r
8948 \r
8949 \r
8950     pthread_mutex_t *pthread_interproc;\r
8951 \r
8952 \r
8953 \r
8954 \r
8955 \r
8956     pthread_mutex_t *intraproc;\r
8957 \r
8958 \r
8959 };\r
8960 \r
8961 typedef int apr_os_file_t;\r
8962 typedef DIR apr_os_dir_t;\r
8963 typedef int apr_os_sock_t;\r
8964 typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;\r
8965 \r
8966 \r
8967 \r
8968 typedef pthread_t apr_os_thread_t;\r
8969 typedef pthread_key_t apr_os_threadkey_t;\r
8970 \r
8971 \r
8972 typedef pid_t apr_os_proc_t;\r
8973 typedef struct timeval apr_os_imp_time_t;\r
8974 typedef struct tm apr_os_exp_time_t;\r
8975 # 169 "../include/apr_portable.h"\r
8976 typedef void * apr_os_dso_handle_t;\r
8977 \r
8978 typedef void* apr_os_shm_t;\r
8979 # 183 "../include/apr_portable.h"\r
8980 struct apr_os_sock_info_t {\r
8981     apr_os_sock_t *os_sock;\r
8982     struct sockaddr *local;\r
8983     struct sockaddr *remote;\r
8984     int family;\r
8985     int type;\r
8986     int protocol;\r
8987 };\r
8988 \r
8989 typedef struct apr_os_sock_info_t apr_os_sock_info_t;\r
8990 # 203 "../include/apr_portable.h"\r
8991     struct apr_os_global_mutex_t {\r
8992         apr_pool_t *pool;\r
8993         apr_proc_mutex_t *proc_mutex;\r
8994 \r
8995         apr_thread_mutex_t *thread_mutex;\r
8996 \r
8997     };\r
8998     typedef struct apr_os_global_mutex_t apr_os_global_mutex_t;\r
8999 \r
9000 apr_status_t apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex,\r
9001                                                 apr_global_mutex_t *pmutex);\r
9002 # 224 "../include/apr_portable.h"\r
9003 apr_status_t apr_os_file_get(apr_os_file_t *thefile,\r
9004                                           apr_file_t *file);\r
9005 \r
9006 \r
9007 \r
9008 \r
9009 \r
9010 \r
9011 apr_status_t apr_os_dir_get(apr_os_dir_t **thedir,\r
9012                                          apr_dir_t *dir);\r
9013 \r
9014 \r
9015 \r
9016 \r
9017 \r
9018 \r
9019 apr_status_t apr_os_sock_get(apr_os_sock_t *thesock,\r
9020                                           apr_socket_t *sock);\r
9021 \r
9022 \r
9023 \r
9024 \r
9025 \r
9026 \r
9027 apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,\r
9028                                                 apr_proc_mutex_t *pmutex);\r
9029 \r
9030 \r
9031 \r
9032 \r
9033 \r
9034 \r
9035 apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,\r
9036                                  apr_time_exp_t *aprtime);\r
9037 \r
9038 \r
9039 \r
9040 \r
9041 \r
9042 \r
9043 apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime,\r
9044                                               apr_time_t *aprtime);\r
9045 \r
9046 \r
9047 \r
9048 \r
9049 \r
9050 \r
9051 apr_status_t apr_os_shm_get(apr_os_shm_t *osshm,\r
9052                                          apr_shm_t *shm);\r
9053 # 285 "../include/apr_portable.h"\r
9054 apr_status_t apr_os_thread_get(apr_os_thread_t **thethd,\r
9055                                             apr_thread_t *thd);\r
9056 \r
9057 \r
9058 \r
9059 \r
9060 \r
9061 \r
9062 apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey,\r
9063                                                apr_threadkey_t *key);\r
9064 \r
9065 \r
9066 \r
9067 \r
9068 \r
9069 \r
9070 \r
9071 apr_status_t apr_os_thread_put(apr_thread_t **thd,\r
9072                                             apr_os_thread_t *thethd,\r
9073                                             apr_pool_t *cont);\r
9074 \r
9075 \r
9076 \r
9077 \r
9078 \r
9079 \r
9080 \r
9081 apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,\r
9082                                                apr_os_threadkey_t *thekey,\r
9083                                                apr_pool_t *cont);\r
9084 \r
9085 \r
9086 \r
9087 apr_os_thread_t apr_os_thread_current(void);\r
9088 \r
9089 \r
9090 \r
9091 \r
9092 \r
9093 \r
9094 \r
9095 int apr_os_thread_equal(apr_os_thread_t tid1,\r
9096                                      apr_os_thread_t tid2);\r
9097 # 341 "../include/apr_portable.h"\r
9098 apr_status_t apr_os_file_put(apr_file_t **file,\r
9099                                           apr_os_file_t *thefile,\r
9100                                           apr_int32_t flags, apr_pool_t *cont);\r
9101 # 353 "../include/apr_portable.h"\r
9102 apr_status_t apr_os_pipe_put(apr_file_t **file,\r
9103                                           apr_os_file_t *thefile,\r
9104                                           apr_pool_t *cont);\r
9105 # 367 "../include/apr_portable.h"\r
9106 apr_status_t apr_os_pipe_put_ex(apr_file_t **file,\r
9107                                              apr_os_file_t *thefile,\r
9108                                              int register_cleanup,\r
9109                                              apr_pool_t *cont);\r
9110 \r
9111 \r
9112 \r
9113 \r
9114 \r
9115 \r
9116 \r
9117 apr_status_t apr_os_dir_put(apr_dir_t **dir,\r
9118                                          apr_os_dir_t *thedir,\r
9119                                          apr_pool_t *cont);\r
9120 # 390 "../include/apr_portable.h"\r
9121 apr_status_t apr_os_sock_put(apr_socket_t **sock,\r
9122                                           apr_os_sock_t *thesock,\r
9123                                           apr_pool_t *cont);\r
9124 # 404 "../include/apr_portable.h"\r
9125 apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,\r
9126                                            apr_os_sock_info_t *os_sock_info,\r
9127                                            apr_pool_t *cont);\r
9128 \r
9129 \r
9130 \r
9131 \r
9132 \r
9133 \r
9134 \r
9135 apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,\r
9136                                                 apr_os_proc_mutex_t *ospmutex,\r
9137                                                 apr_pool_t *cont);\r
9138 \r
9139 \r
9140 \r
9141 \r
9142 \r
9143 \r
9144 \r
9145 apr_status_t apr_os_imp_time_put(apr_time_t *aprtime,\r
9146                                               apr_os_imp_time_t **ostime,\r
9147                                               apr_pool_t *cont);\r
9148 \r
9149 \r
9150 \r
9151 \r
9152 \r
9153 \r
9154 \r
9155 apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime,\r
9156                                               apr_os_exp_time_t **ostime,\r
9157                                               apr_pool_t *cont);\r
9158 # 447 "../include/apr_portable.h"\r
9159 apr_status_t apr_os_shm_put(apr_shm_t **shm,\r
9160                                          apr_os_shm_t *osshm,\r
9161                                          apr_pool_t *cont);\r
9162 # 463 "../include/apr_portable.h"\r
9163 apr_status_t apr_os_dso_handle_put(apr_dso_handle_t **dso,\r
9164                                                 apr_os_dso_handle_t thedso,\r
9165                                                 apr_pool_t *pool);\r
9166 \r
9167 \r
9168 \r
9169 \r
9170 \r
9171 \r
9172 apr_status_t apr_os_dso_handle_get(apr_os_dso_handle_t *dso,\r
9173                                                 apr_dso_handle_t *aprdso);\r
9174 # 491 "../include/apr_portable.h"\r
9175 const char* apr_os_default_encoding(apr_pool_t *pool);\r
9176 # 500 "../include/apr_portable.h"\r
9177 const char* apr_os_locale_encoding(apr_pool_t *pool);\r
9178 # 25 "../include/arch/unix/apr_arch_thread_mutex.h" 2\r
9179 \r
9180 \r
9181 \r
9182 \r
9183 \r
9184 \r
9185 \r
9186 struct apr_thread_mutex_t {\r
9187     apr_pool_t *pool;\r
9188     pthread_mutex_t mutex;\r
9189 };\r
9190 # 18 "./../locks/unix/thread_mutex.c" 2\r
9191 \r
9192 # 1 "../include/apr_want.h" 1\r
9193 # 20 "./../locks/unix/thread_mutex.c" 2\r
9194 \r
9195 \r
9196 \r
9197 static apr_status_t thread_mutex_cleanup(void *data)\r
9198 {\r
9199     apr_thread_mutex_t *mutex = data;\r
9200     apr_status_t rv;\r
9201 \r
9202     rv = pthread_mutex_destroy(&mutex->mutex);\r
9203 \r
9204 \r
9205 \r
9206 \r
9207 \r
9208     return rv;\r
9209 }\r
9210 \r
9211 apr_status_t apr_thread_mutex_create(apr_thread_mutex_t **mutex,\r
9212                                                   unsigned int flags,\r
9213                                                   apr_pool_t *pool)\r
9214 {\r
9215     apr_thread_mutex_t *new_mutex;\r
9216     apr_status_t rv;\r
9217 \r
9218 \r
9219 \r
9220 \r
9221 \r
9222 \r
9223 \r
9224     new_mutex = memset(apr_palloc(pool, sizeof(apr_thread_mutex_t)), 0, sizeof(apr_thread_mutex_t));\r
9225     new_mutex->pool = pool;\r
9226 \r
9227 \r
9228     if (flags & 0x1) {\r
9229         pthread_mutexattr_t mattr;\r
9230 \r
9231         rv = pthread_mutexattr_init(&mattr);\r
9232         if (rv) return rv;\r
9233 \r
9234         rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);\r
9235         if (rv) {\r
9236             pthread_mutexattr_destroy(&mattr);\r
9237             return rv;\r
9238         }\r
9239 \r
9240         rv = pthread_mutex_init(&new_mutex->mutex, &mattr);\r
9241 \r
9242         pthread_mutexattr_destroy(&mattr);\r
9243     } else\r
9244 \r
9245         rv = pthread_mutex_init(&new_mutex->mutex, ((void*)0));\r
9246 \r
9247     if (rv) {\r
9248 \r
9249 \r
9250 \r
9251         return rv;\r
9252     }\r
9253 \r
9254     apr_pool_cleanup_register(new_mutex->pool,\r
9255                               new_mutex, thread_mutex_cleanup,\r
9256                               apr_pool_cleanup_null);\r
9257 \r
9258     *mutex = new_mutex;\r
9259     return 0;\r
9260 }\r
9261 \r
9262 apr_status_t apr_thread_mutex_lock(apr_thread_mutex_t *mutex)\r
9263 {\r
9264     apr_status_t rv;\r
9265 \r
9266     rv = pthread_mutex_lock(&mutex->mutex);\r
9267 \r
9268 \r
9269 \r
9270 \r
9271 \r
9272 \r
9273     return rv;\r
9274 }\r
9275 \r
9276 apr_status_t apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)\r
9277 {\r
9278     apr_status_t rv;\r
9279 \r
9280     rv = pthread_mutex_trylock(&mutex->mutex);\r
9281     if (rv) {\r
9282 \r
9283 \r
9284 \r
9285         return (rv == 16) ? ((20000 + 50000) + 25) : rv;\r
9286     }\r
9287 \r
9288     return 0;\r
9289 }\r
9290 \r
9291 apr_status_t apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)\r
9292 {\r
9293     apr_status_t status;\r
9294 \r
9295     status = pthread_mutex_unlock(&mutex->mutex);\r
9296 \r
9297 \r
9298 \r
9299 \r
9300 \r
9301 \r
9302     return status;\r
9303 }\r
9304 \r
9305 apr_status_t apr_thread_mutex_destroy(apr_thread_mutex_t *mutex)\r
9306 {\r
9307     return apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup);\r
9308 }\r
9309 \r
9310 apr_pool_t * apr_thread_mutex_pool_get (const apr_thread_mutex_t *thethread_mutex) { return thethread_mutex->pool; }\r
9311 # 13 "main1.c" 2\r
9312 # 1 "./../locks/unix/proc_mutex.c" 1\r
9313 # 19 "./../locks/unix/proc_mutex.c"\r
9314 # 1 "../include/arch/unix/apr_arch_proc_mutex.h" 1\r
9315 # 23 "../include/arch/unix/apr_arch_proc_mutex.h"\r
9316 # 1 "../include/apr_lib.h" 1\r
9317 # 32 "../include/apr_lib.h"\r
9318 # 1 "/usr/include/ctype.h" 1 3 4\r
9319 # 46 "/usr/include/ctype.h" 3 4\r
9320 enum\r
9321 {\r
9322   _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),\r
9323   _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),\r
9324   _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),\r
9325   _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),\r
9326   _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),\r
9327   _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),\r
9328   _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),\r
9329   _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),\r
9330   _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),\r
9331   _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),\r
9332   _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),\r
9333   _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))\r
9334 };\r
9335 # 79 "/usr/include/ctype.h" 3 4\r
9336 extern const unsigned short int **__ctype_b_loc (void)\r
9337      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
9338 extern const __int32_t **__ctype_tolower_loc (void)\r
9339      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
9340 extern const __int32_t **__ctype_toupper_loc (void)\r
9341      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
9342 # 110 "/usr/include/ctype.h" 3 4\r
9343 extern int isalnum (int) __attribute__ ((__nothrow__ ));\r
9344 extern int isalpha (int) __attribute__ ((__nothrow__ ));\r
9345 extern int iscntrl (int) __attribute__ ((__nothrow__ ));\r
9346 extern int isdigit (int) __attribute__ ((__nothrow__ ));\r
9347 extern int islower (int) __attribute__ ((__nothrow__ ));\r
9348 extern int isgraph (int) __attribute__ ((__nothrow__ ));\r
9349 extern int isprint (int) __attribute__ ((__nothrow__ ));\r
9350 extern int ispunct (int) __attribute__ ((__nothrow__ ));\r
9351 extern int isspace (int) __attribute__ ((__nothrow__ ));\r
9352 extern int isupper (int) __attribute__ ((__nothrow__ ));\r
9353 extern int isxdigit (int) __attribute__ ((__nothrow__ ));\r
9354 \r
9355 \r
9356 \r
9357 extern int tolower (int __c) __attribute__ ((__nothrow__ ));\r
9358 \r
9359 \r
9360 extern int toupper (int __c) __attribute__ ((__nothrow__ ));\r
9361 # 136 "/usr/include/ctype.h" 3 4\r
9362 extern int isblank (int) __attribute__ ((__nothrow__ ));\r
9363 # 150 "/usr/include/ctype.h" 3 4\r
9364 extern int isascii (int __c) __attribute__ ((__nothrow__ ));\r
9365 \r
9366 \r
9367 \r
9368 extern int toascii (int __c) __attribute__ ((__nothrow__ ));\r
9369 \r
9370 \r
9371 \r
9372 extern int _toupper (int) __attribute__ ((__nothrow__ ));\r
9373 extern int _tolower (int) __attribute__ ((__nothrow__ ));\r
9374 # 271 "/usr/include/ctype.h" 3 4\r
9375 extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9376 extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9377 extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9378 extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9379 extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9380 extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9381 extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9382 extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9383 extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9384 extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9385 extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9386 \r
9387 extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9388 \r
9389 \r
9390 \r
9391 extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
9392 extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
9393 \r
9394 \r
9395 extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
9396 extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
9397 # 33 "../include/apr_lib.h" 2\r
9398 # 59 "../include/apr_lib.h"\r
9399 typedef struct apr_vformatter_buff_t apr_vformatter_buff_t;\r
9400 \r
9401 \r
9402 \r
9403 \r
9404 struct apr_vformatter_buff_t {\r
9405 \r
9406     char *curpos;\r
9407 \r
9408     char *endpos;\r
9409 };\r
9410 # 84 "../include/apr_lib.h"\r
9411 const char * apr_filepath_name_get(const char *pathname);\r
9412 # 174 "../include/apr_lib.h"\r
9413 int apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *b),\r
9414            apr_vformatter_buff_t *c, const char *fmt,\r
9415            va_list ap);\r
9416 # 189 "../include/apr_lib.h"\r
9417 apr_status_t apr_password_get(const char *prompt, char *pwbuf,\r
9418                                            apr_size_t *bufsize);\r
9419 # 24 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9420 \r
9421 \r
9422 \r
9423 \r
9424 # 1 "../include/arch/unix/apr_arch_file_io.h" 1\r
9425 # 41 "../include/arch/unix/apr_arch_file_io.h"\r
9426 # 1 "/usr/include/errno.h" 1 3 4\r
9427 # 42 "../include/arch/unix/apr_arch_file_io.h" 2\r
9428 \r
9429 \r
9430 \r
9431 \r
9432 \r
9433 # 1 "/usr/include/strings.h" 1 3 4\r
9434 # 48 "../include/arch/unix/apr_arch_file_io.h" 2\r
9435 \r
9436 \r
9437 \r
9438 \r
9439 \r
9440 # 1 "/usr/include/x86_64-linux-gnu/sys/stat.h" 1 3 4\r
9441 # 105 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9442 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4\r
9443 # 106 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4\r
9444 # 209 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9445 extern int stat (const char *__restrict __file,\r
9446    struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
9447 \r
9448 \r
9449 \r
9450 extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9451 # 238 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9452 extern int fstatat (int __fd, const char *__restrict __file,\r
9453       struct stat *__restrict __buf, int __flag)\r
9454      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
9455 # 263 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9456 extern int lstat (const char *__restrict __file,\r
9457     struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
9458 # 284 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9459 extern int chmod (const char *__file, __mode_t __mode)\r
9460      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9461 \r
9462 \r
9463 \r
9464 \r
9465 \r
9466 extern int lchmod (const char *__file, __mode_t __mode)\r
9467      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9468 \r
9469 \r
9470 \r
9471 \r
9472 extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ ));\r
9473 \r
9474 \r
9475 \r
9476 \r
9477 \r
9478 extern int fchmodat (int __fd, const char *__file, __mode_t __mode,\r
9479        int __flag)\r
9480      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
9481 \r
9482 \r
9483 \r
9484 \r
9485 \r
9486 \r
9487 extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ ));\r
9488 # 321 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9489 extern int mkdir (const char *__path, __mode_t __mode)\r
9490      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9491 \r
9492 \r
9493 \r
9494 \r
9495 \r
9496 extern int mkdirat (int __fd, const char *__path, __mode_t __mode)\r
9497      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9498 \r
9499 \r
9500 \r
9501 \r
9502 \r
9503 \r
9504 extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)\r
9505      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9506 \r
9507 \r
9508 \r
9509 \r
9510 \r
9511 extern int mknodat (int __fd, const char *__path, __mode_t __mode,\r
9512       __dev_t __dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9513 \r
9514 \r
9515 \r
9516 \r
9517 \r
9518 extern int mkfifo (const char *__path, __mode_t __mode)\r
9519      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9520 \r
9521 \r
9522 \r
9523 \r
9524 \r
9525 extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)\r
9526      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9527 \r
9528 \r
9529 \r
9530 \r
9531 \r
9532 extern int utimensat (int __fd, const char *__path,\r
9533         const struct timespec __times[2],\r
9534         int __flags)\r
9535      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9536 \r
9537 \r
9538 \r
9539 \r
9540 extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ ));\r
9541 # 399 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9542 extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)\r
9543      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));\r
9544 extern int __xstat (int __ver, const char *__filename,\r
9545       struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
9546 extern int __lxstat (int __ver, const char *__filename,\r
9547        struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
9548 extern int __fxstatat (int __ver, int __fildes, const char *__filename,\r
9549          struct stat *__stat_buf, int __flag)\r
9550      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4)));\r
9551 # 442 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9552 extern int __xmknod (int __ver, const char *__path, __mode_t __mode,\r
9553        __dev_t *__dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
9554 \r
9555 extern int __xmknodat (int __ver, int __fd, const char *__path,\r
9556          __mode_t __mode, __dev_t *__dev)\r
9557      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 5)));\r
9558 # 54 "../include/arch/unix/apr_arch_file_io.h" 2\r
9559 # 75 "../include/arch/unix/apr_arch_file_io.h"\r
9560 # 1 "/usr/include/x86_64-linux-gnu/sys/param.h" 1 3 4\r
9561 # 23 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4\r
9562 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
9563 # 24 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4\r
9564 \r
9565 \r
9566 \r
9567 \r
9568 \r
9569 \r
9570 \r
9571 # 1 "/usr/include/x86_64-linux-gnu/bits/param.h" 1 3 4\r
9572 # 28 "/usr/include/x86_64-linux-gnu/bits/param.h" 3 4\r
9573 # 1 "/usr/include/linux/param.h" 1 3 4\r
9574 \r
9575 \r
9576 \r
9577 # 1 "/usr/include/x86_64-linux-gnu/asm/param.h" 1 3 4\r
9578 # 1 "/usr/include/asm-generic/param.h" 1 3 4\r
9579 # 2 "/usr/include/x86_64-linux-gnu/asm/param.h" 2 3 4\r
9580 # 5 "/usr/include/linux/param.h" 2 3 4\r
9581 # 29 "/usr/include/x86_64-linux-gnu/bits/param.h" 2 3 4\r
9582 # 32 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4\r
9583 # 76 "../include/arch/unix/apr_arch_file_io.h" 2\r
9584 # 93 "../include/arch/unix/apr_arch_file_io.h"\r
9585 struct apr_file_t {\r
9586     apr_pool_t *pool;\r
9587     int filedes;\r
9588     char *fname;\r
9589     apr_int32_t flags;\r
9590     int eof_hit;\r
9591     int is_pipe;\r
9592     apr_interval_time_t timeout;\r
9593     int buffered;\r
9594     enum {BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;\r
9595     int ungetchar;\r
9596 \r
9597 \r
9598 \r
9599 \r
9600 \r
9601     char *buffer;\r
9602     apr_size_t bufpos;\r
9603     apr_size_t bufsize;\r
9604     unsigned long dataRead;\r
9605     int direction;\r
9606     apr_off_t filePtr;\r
9607 \r
9608     struct apr_thread_mutex_t *thlock;\r
9609 \r
9610 };\r
9611 # 142 "../include/arch/unix/apr_arch_file_io.h"\r
9612 typedef struct stat struct_stat;\r
9613 # 151 "../include/arch/unix/apr_arch_file_io.h"\r
9614 struct apr_dir_t {\r
9615     apr_pool_t *pool;\r
9616     char *dirname;\r
9617     DIR *dirstruct;\r
9618 \r
9619 \r
9620 \r
9621     struct dirent *entry;\r
9622 \r
9623 };\r
9624 \r
9625 apr_status_t apr_unix_file_cleanup(void *);\r
9626 apr_status_t apr_unix_child_file_cleanup(void *);\r
9627 \r
9628 mode_t apr_unix_perms2mode(apr_fileperms_t perms);\r
9629 apr_fileperms_t apr_unix_mode2perms(mode_t mode);\r
9630 \r
9631 apr_status_t apr_file_flush_locked(apr_file_t *thefile);\r
9632 apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,\r
9633                                       apr_file_t *thefile);\r
9634 # 29 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9635 # 42 "../include/arch/unix/apr_arch_proc_mutex.h"\r
9636 # 1 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 1 3 4\r
9637 # 28 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 3 4\r
9638 # 1 "/usr/include/x86_64-linux-gnu/bits/ipctypes.h" 1 3 4\r
9639 # 28 "/usr/include/x86_64-linux-gnu/bits/ipctypes.h" 3 4\r
9640 typedef int __ipc_pid_t;\r
9641 # 29 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 2 3 4\r
9642 # 1 "/usr/include/x86_64-linux-gnu/bits/ipc.h" 1 3 4\r
9643 # 42 "/usr/include/x86_64-linux-gnu/bits/ipc.h" 3 4\r
9644 struct ipc_perm\r
9645   {\r
9646     __key_t __key;\r
9647     __uid_t uid;\r
9648     __gid_t gid;\r
9649     __uid_t cuid;\r
9650     __gid_t cgid;\r
9651     unsigned short int mode;\r
9652     unsigned short int __pad1;\r
9653     unsigned short int __seq;\r
9654     unsigned short int __pad2;\r
9655     __syscall_ulong_t __glibc_reserved1;\r
9656     __syscall_ulong_t __glibc_reserved2;\r
9657   };\r
9658 # 30 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 2 3 4\r
9659 # 54 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 3 4\r
9660 extern key_t ftok (const char *__pathname, int __proj_id) __attribute__ ((__nothrow__ ));\r
9661 # 43 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9662 \r
9663 \r
9664 # 1 "/usr/include/x86_64-linux-gnu/sys/sem.h" 1 3 4\r
9665 # 24 "/usr/include/x86_64-linux-gnu/sys/sem.h" 3 4\r
9666 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
9667 # 25 "/usr/include/x86_64-linux-gnu/sys/sem.h" 2 3 4\r
9668 \r
9669 \r
9670 \r
9671 \r
9672 \r
9673 # 1 "/usr/include/x86_64-linux-gnu/bits/sem.h" 1 3 4\r
9674 # 38 "/usr/include/x86_64-linux-gnu/bits/sem.h" 3 4\r
9675 struct semid_ds\r
9676 {\r
9677   struct ipc_perm sem_perm;\r
9678   __time_t sem_otime;\r
9679   __syscall_ulong_t __glibc_reserved1;\r
9680   __time_t sem_ctime;\r
9681   __syscall_ulong_t __glibc_reserved2;\r
9682   __syscall_ulong_t sem_nsems;\r
9683   __syscall_ulong_t __glibc_reserved3;\r
9684   __syscall_ulong_t __glibc_reserved4;\r
9685 };\r
9686 # 72 "/usr/include/x86_64-linux-gnu/bits/sem.h" 3 4\r
9687 struct seminfo\r
9688 {\r
9689   int semmap;\r
9690   int semmni;\r
9691   int semmns;\r
9692   int semmnu;\r
9693   int semmsl;\r
9694   int semopm;\r
9695   int semume;\r
9696   int semusz;\r
9697   int semvmx;\r
9698   int semaem;\r
9699 };\r
9700 # 31 "/usr/include/x86_64-linux-gnu/sys/sem.h" 2 3 4\r
9701 # 41 "/usr/include/x86_64-linux-gnu/sys/sem.h" 3 4\r
9702 struct sembuf\r
9703 {\r
9704   unsigned short int sem_num;\r
9705   short int sem_op;\r
9706   short int sem_flg;\r
9707 };\r
9708 \r
9709 \r
9710 \r
9711 \r
9712 \r
9713 extern int semctl (int __semid, int __semnum, int __cmd, ...) __attribute__ ((__nothrow__ ));\r
9714 \r
9715 \r
9716 extern int semget (key_t __key, int __nsems, int __semflg) __attribute__ ((__nothrow__ ));\r
9717 \r
9718 \r
9719 extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __attribute__ ((__nothrow__ ));\r
9720 # 46 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9721 \r
9722 \r
9723 # 1 "/usr/include/x86_64-linux-gnu/sys/file.h" 1 3 4\r
9724 # 50 "/usr/include/x86_64-linux-gnu/sys/file.h" 3 4\r
9725 extern int flock (int __fd, int __operation) __attribute__ ((__nothrow__ ));\r
9726 # 49 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9727 # 60 "../include/arch/unix/apr_arch_proc_mutex.h"\r
9728 # 1 "/usr/include/x86_64-linux-gnu/sys/mman.h" 1 3 4\r
9729 # 25 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9730 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
9731 # 26 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4\r
9732 # 41 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9733 # 1 "/usr/include/x86_64-linux-gnu/bits/mman.h" 1 3 4\r
9734 # 45 "/usr/include/x86_64-linux-gnu/bits/mman.h" 3 4\r
9735 # 1 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 1 3 4\r
9736 # 46 "/usr/include/x86_64-linux-gnu/bits/mman.h" 2 3 4\r
9737 # 42 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4\r
9738 # 57 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9739 extern void *mmap (void *__addr, size_t __len, int __prot,\r
9740      int __flags, int __fd, __off_t __offset) __attribute__ ((__nothrow__ ));\r
9741 # 76 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9742 extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
9743 \r
9744 \r
9745 \r
9746 \r
9747 extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__ ));\r
9748 \r
9749 \r
9750 \r
9751 \r
9752 \r
9753 \r
9754 \r
9755 extern int msync (void *__addr, size_t __len, int __flags);\r
9756 \r
9757 \r
9758 \r
9759 \r
9760 extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ ));\r
9761 \r
9762 \r
9763 \r
9764 extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ ));\r
9765 \r
9766 \r
9767 \r
9768 \r
9769 extern int mlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
9770 \r
9771 \r
9772 extern int munlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
9773 \r
9774 \r
9775 \r
9776 \r
9777 extern int mlockall (int __flags) __attribute__ ((__nothrow__ ));\r
9778 \r
9779 \r
9780 \r
9781 extern int munlockall (void) __attribute__ ((__nothrow__ ));\r
9782 \r
9783 \r
9784 \r
9785 \r
9786 \r
9787 \r
9788 \r
9789 extern int mincore (void *__start, size_t __len, unsigned char *__vec)\r
9790      __attribute__ ((__nothrow__ ));\r
9791 # 144 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9792 extern int shm_open (const char *__name, int __oflag, mode_t __mode);\r
9793 \r
9794 \r
9795 extern int shm_unlink (const char *__name);\r
9796 # 61 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9797 \r
9798 \r
9799 \r
9800 \r
9801 \r
9802 # 1 "/usr/include/semaphore.h" 1 3 4\r
9803 # 29 "/usr/include/semaphore.h" 3 4\r
9804 # 1 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 1 3 4\r
9805 # 23 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4\r
9806 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
9807 # 24 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 2 3 4\r
9808 # 36 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4\r
9809 typedef union\r
9810 {\r
9811   char __size[32];\r
9812   long int __align;\r
9813 } sem_t;\r
9814 # 30 "/usr/include/semaphore.h" 2 3 4\r
9815 \r
9816 \r
9817 \r
9818 \r
9819 \r
9820 \r
9821 extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)\r
9822      __attribute__ ((__nothrow__ ));\r
9823 \r
9824 extern int sem_destroy (sem_t *__sem) __attribute__ ((__nothrow__ ));\r
9825 \r
9826 \r
9827 extern sem_t *sem_open (const char *__name, int __oflag, ...) __attribute__ ((__nothrow__ ));\r
9828 \r
9829 \r
9830 extern int sem_close (sem_t *__sem) __attribute__ ((__nothrow__ ));\r
9831 \r
9832 \r
9833 extern int sem_unlink (const char *__name) __attribute__ ((__nothrow__ ));\r
9834 \r
9835 \r
9836 \r
9837 \r
9838 \r
9839 extern int sem_wait (sem_t *__sem);\r
9840 \r
9841 \r
9842 \r
9843 \r
9844 \r
9845 \r
9846 extern int sem_timedwait (sem_t *__restrict __sem,\r
9847      const struct timespec *__restrict __abstime);\r
9848 \r
9849 \r
9850 \r
9851 extern int sem_trywait (sem_t *__sem) __attribute__ ((__nothrow__));\r
9852 \r
9853 \r
9854 extern int sem_post (sem_t *__sem) __attribute__ ((__nothrow__));\r
9855 \r
9856 \r
9857 extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)\r
9858      __attribute__ ((__nothrow__ ));\r
9859 # 67 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9860 \r
9861 \r
9862 \r
9863 struct apr_proc_mutex_unix_lock_methods_t {\r
9864     unsigned int flags;\r
9865     apr_status_t (*create)(apr_proc_mutex_t *, const char *);\r
9866     apr_status_t (*acquire)(apr_proc_mutex_t *);\r
9867     apr_status_t (*tryacquire)(apr_proc_mutex_t *);\r
9868     apr_status_t (*release)(apr_proc_mutex_t *);\r
9869     apr_status_t (*cleanup)(void *);\r
9870     apr_status_t (*child_init)(apr_proc_mutex_t **, apr_pool_t *, const char *);\r
9871     const char *name;\r
9872 };\r
9873 typedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lock_methods_t;\r
9874 \r
9875 \r
9876 \r
9877 \r
9878 \r
9879 union semun {\r
9880     int val;\r
9881     struct semid_ds *buf;\r
9882     unsigned short *array;\r
9883 };\r
9884 \r
9885 \r
9886 struct apr_proc_mutex_t {\r
9887     apr_pool_t *pool;\r
9888     const apr_proc_mutex_unix_lock_methods_t *meth;\r
9889     const apr_proc_mutex_unix_lock_methods_t *inter_meth;\r
9890     int curr_locked;\r
9891     char *fname;\r
9892 \r
9893     apr_file_t *interproc;\r
9894 \r
9895 \r
9896     sem_t *psem_interproc;\r
9897 \r
9898 \r
9899     pthread_mutex_t *pthread_interproc;\r
9900 \r
9901 };\r
9902 \r
9903 void apr_proc_mutex_unix_setup_lock(void);\r
9904 # 20 "./../locks/unix/proc_mutex.c" 2\r
9905 \r
9906 # 1 "../include/apr_hash.h" 1\r
9907 # 52 "../include/apr_hash.h"\r
9908 typedef struct apr_hash_t apr_hash_t;\r
9909 \r
9910 \r
9911 \r
9912 \r
9913 typedef struct apr_hash_index_t apr_hash_index_t;\r
9914 \r
9915 \r
9916 \r
9917 \r
9918 \r
9919 \r
9920 \r
9921 typedef unsigned int (*apr_hashfunc_t)(const char *key, apr_ssize_t *klen);\r
9922 \r
9923 \r
9924 \r
9925 \r
9926 unsigned int apr_hashfunc_default(const char *key,\r
9927                                                       apr_ssize_t *klen);\r
9928 \r
9929 \r
9930 \r
9931 \r
9932 \r
9933 \r
9934 apr_hash_t * apr_hash_make(apr_pool_t *pool);\r
9935 \r
9936 \r
9937 \r
9938 \r
9939 \r
9940 \r
9941 \r
9942 apr_hash_t * apr_hash_make_custom(apr_pool_t *pool,\r
9943                                                apr_hashfunc_t hash_func);\r
9944 # 96 "../include/apr_hash.h"\r
9945 apr_hash_t * apr_hash_copy(apr_pool_t *pool,\r
9946                                         const apr_hash_t *h);\r
9947 # 107 "../include/apr_hash.h"\r
9948 void apr_hash_set(apr_hash_t *ht, const void *key,\r
9949                                apr_ssize_t klen, const void *val);\r
9950 # 117 "../include/apr_hash.h"\r
9951 void * apr_hash_get(apr_hash_t *ht, const void *key,\r
9952                                  apr_ssize_t klen);\r
9953 # 147 "../include/apr_hash.h"\r
9954 apr_hash_index_t * apr_hash_first(apr_pool_t *p, apr_hash_t *ht);\r
9955 \r
9956 \r
9957 \r
9958 \r
9959 \r
9960 \r
9961 \r
9962 apr_hash_index_t * apr_hash_next(apr_hash_index_t *hi);\r
9963 # 166 "../include/apr_hash.h"\r
9964 void apr_hash_this(apr_hash_index_t *hi, const void **key,\r
9965                                 apr_ssize_t *klen, void **val);\r
9966 \r
9967 \r
9968 \r
9969 \r
9970 \r
9971 \r
9972 const void* apr_hash_this_key(apr_hash_index_t *hi);\r
9973 \r
9974 \r
9975 \r
9976 \r
9977 \r
9978 \r
9979 apr_ssize_t apr_hash_this_key_len(apr_hash_index_t *hi);\r
9980 \r
9981 \r
9982 \r
9983 \r
9984 \r
9985 \r
9986 void* apr_hash_this_val(apr_hash_index_t *hi);\r
9987 \r
9988 \r
9989 \r
9990 \r
9991 \r
9992 \r
9993 unsigned int apr_hash_count(apr_hash_t *ht);\r
9994 \r
9995 \r
9996 \r
9997 \r
9998 \r
9999 void apr_hash_clear(apr_hash_t *ht);\r
10000 # 212 "../include/apr_hash.h"\r
10001 apr_hash_t * apr_hash_overlay(apr_pool_t *p,\r
10002                                            const apr_hash_t *overlay,\r
10003                                            const apr_hash_t *base);\r
10004 # 230 "../include/apr_hash.h"\r
10005 apr_hash_t * apr_hash_merge(apr_pool_t *p,\r
10006                                          const apr_hash_t *h1,\r
10007                                          const apr_hash_t *h2,\r
10008                                          void * (*merger)(apr_pool_t *p,\r
10009                                                      const void *key,\r
10010                                                      apr_ssize_t klen,\r
10011                                                      const void *h1_val,\r
10012                                                      const void *h2_val,\r
10013                                                      const void *data),\r
10014                                          const void *data);\r
10015 # 252 "../include/apr_hash.h"\r
10016 typedef int (apr_hash_do_callback_fn_t)(void *rec, const void *key,\r
10017                                                    apr_ssize_t klen,\r
10018                                                    const void *value);\r
10019 # 268 "../include/apr_hash.h"\r
10020 int apr_hash_do(apr_hash_do_callback_fn_t *comp,\r
10021                              void *rec, const apr_hash_t *ht);\r
10022 \r
10023 \r
10024 \r
10025 \r
10026 apr_pool_t * apr_hash_pool_get (const apr_hash_t *thehash);\r
10027 # 22 "./../locks/unix/proc_mutex.c" 2\r
10028 \r
10029 apr_status_t apr_proc_mutex_destroy(apr_proc_mutex_t *mutex)\r
10030 {\r
10031     return apr_pool_cleanup_run(mutex->pool, mutex, apr_proc_mutex_cleanup);\r
10032 }\r
10033 \r
10034 \r
10035 \r
10036 static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex,\r
10037                                              apr_pool_t *cont,\r
10038                                              const char *fname)\r
10039 {\r
10040     return 0;\r
10041 }\r
10042 # 44 "./../locks/unix/proc_mutex.c"\r
10043 static apr_status_t proc_mutex_posix_cleanup(void *mutex_)\r
10044 {\r
10045     apr_proc_mutex_t *mutex = mutex_;\r
10046 \r
10047     if (sem_close(mutex->psem_interproc) < 0) {\r
10048         return (*__errno_location ());\r
10049     }\r
10050 \r
10051     return 0;\r
10052 }\r
10053 \r
10054 static unsigned int rshash (char *p) {\r
10055 \r
10056    unsigned int b = 378551;\r
10057    unsigned int a = 63689;\r
10058    unsigned int retval = 0;\r
10059 \r
10060    for( ; *p; p++)\r
10061    {\r
10062       retval = retval * a + (*p);\r
10063       a *= b;\r
10064    }\r
10065 \r
10066    return retval;\r
10067 }\r
10068 \r
10069 static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,\r
10070                                             const char *fname)\r
10071 {\r
10072 \r
10073     sem_t *psem;\r
10074     char semname[32];\r
10075 \r
10076     new_mutex->interproc = apr_palloc(new_mutex->pool,\r
10077                                       sizeof(*new_mutex->interproc));\r
10078 # 101 "./../locks/unix/proc_mutex.c"\r
10079     if (fname) {\r
10080         apr_ssize_t flen = strlen(fname);\r
10081         char *p = apr_pstrndup(new_mutex->pool, fname, strlen(fname));\r
10082         unsigned int h1, h2;\r
10083         h1 = (apr_hashfunc_default((const char *)p, &flen) & 0xffffffff);\r
10084         h2 = (rshash(p) & 0xffffffff);\r
10085         apr_snprintf(semname, sizeof(semname), "/ApR.%xH%x", h1, h2);\r
10086     } else {\r
10087         apr_time_t now;\r
10088         unsigned long sec;\r
10089         unsigned long usec;\r
10090         now = apr_time_now();\r
10091         sec = ((now) / 1000000L);\r
10092         usec = ((now) % 1000000L);\r
10093         apr_snprintf(semname, sizeof(semname), "/ApR.%lxZ%lx", sec, usec);\r
10094     }\r
10095     psem = sem_open(semname, 0100 | 0200, 0644, 1);\r
10096     if (psem == (sem_t *)((sem_t *) 0)) {\r
10097         if ((*__errno_location ()) == 36) {\r
10098 \r
10099             semname[13] = '\0';\r
10100         } else {\r
10101             return (*__errno_location ());\r
10102         }\r
10103         psem = sem_open(semname, 0100 | 0200, 0644, 1);\r
10104     }\r
10105 \r
10106     if (psem == (sem_t *)((sem_t *) 0)) {\r
10107         return (*__errno_location ());\r
10108     }\r
10109 \r
10110     sem_unlink(semname);\r
10111     new_mutex->psem_interproc = psem;\r
10112     new_mutex->fname = apr_pstrdup(new_mutex->pool, semname);\r
10113     apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,\r
10114                               apr_proc_mutex_cleanup,\r
10115                               apr_pool_cleanup_null);\r
10116     return 0;\r
10117 }\r
10118 \r
10119 static apr_status_t proc_mutex_posix_acquire(apr_proc_mutex_t *mutex)\r
10120 {\r
10121     if (sem_wait(mutex->psem_interproc) < 0) {\r
10122         return (*__errno_location ());\r
10123     }\r
10124     mutex->curr_locked = 1;\r
10125     return 0;\r
10126 }\r
10127 \r
10128 static apr_status_t proc_mutex_posix_tryacquire(apr_proc_mutex_t *mutex)\r
10129 {\r
10130     if (sem_trywait(mutex->psem_interproc) < 0) {\r
10131         if ((*__errno_location ()) == 11) {\r
10132             return ((20000 + 50000) + 25);\r
10133         }\r
10134         return (*__errno_location ());\r
10135     }\r
10136     mutex->curr_locked = 1;\r
10137     return 0;\r
10138 }\r
10139 \r
10140 static apr_status_t proc_mutex_posix_release(apr_proc_mutex_t *mutex)\r
10141 {\r
10142     mutex->curr_locked = 0;\r
10143     if (sem_post(mutex->psem_interproc) < 0) {\r
10144 \r
10145 \r
10146         return (*__errno_location ());\r
10147     }\r
10148     return 0;\r
10149 }\r
10150 \r
10151 static const apr_proc_mutex_unix_lock_methods_t mutex_posixsem_methods =\r
10152 {\r
10153 \r
10154 \r
10155 \r
10156     0,\r
10157 \r
10158     proc_mutex_posix_create,\r
10159     proc_mutex_posix_acquire,\r
10160     proc_mutex_posix_tryacquire,\r
10161     proc_mutex_posix_release,\r
10162     proc_mutex_posix_cleanup,\r
10163     proc_mutex_no_child_init,\r
10164     "posixsem"\r
10165 };\r
10166 \r
10167 \r
10168 \r
10169 \r
10170 \r
10171 static struct sembuf proc_mutex_op_on;\r
10172 static struct sembuf proc_mutex_op_try;\r
10173 static struct sembuf proc_mutex_op_off;\r
10174 \r
10175 static void proc_mutex_sysv_setup(void)\r
10176 {\r
10177     proc_mutex_op_on.sem_num = 0;\r
10178     proc_mutex_op_on.sem_op = -1;\r
10179     proc_mutex_op_on.sem_flg = 0x1000;\r
10180     proc_mutex_op_try.sem_num = 0;\r
10181     proc_mutex_op_try.sem_op = -1;\r
10182     proc_mutex_op_try.sem_flg = 0x1000 | 04000;\r
10183     proc_mutex_op_off.sem_num = 0;\r
10184     proc_mutex_op_off.sem_op = 1;\r
10185     proc_mutex_op_off.sem_flg = 0x1000;\r
10186 }\r
10187 \r
10188 static apr_status_t proc_mutex_sysv_cleanup(void *mutex_)\r
10189 {\r
10190     apr_proc_mutex_t *mutex=mutex_;\r
10191     union semun ick;\r
10192 \r
10193     if (mutex->interproc->filedes != -1) {\r
10194         ick.val = 0;\r
10195         semctl(mutex->interproc->filedes, 0, 0, ick);\r
10196     }\r
10197     return 0;\r
10198 }\r
10199 \r
10200 static apr_status_t proc_mutex_sysv_create(apr_proc_mutex_t *new_mutex,\r
10201                                            const char *fname)\r
10202 {\r
10203     union semun ick;\r
10204     apr_status_t rv;\r
10205 \r
10206     new_mutex->interproc = apr_palloc(new_mutex->pool, sizeof(*new_mutex->interproc));\r
10207     new_mutex->interproc->filedes = semget(((__key_t) 0), 1, 01000 | 0600);\r
10208 \r
10209     if (new_mutex->interproc->filedes < 0) {\r
10210         rv = (*__errno_location ());\r
10211         proc_mutex_sysv_cleanup(new_mutex);\r
10212         return rv;\r
10213     }\r
10214     ick.val = 1;\r
10215     if (semctl(new_mutex->interproc->filedes, 0, 16, ick) < 0) {\r
10216         rv = (*__errno_location ());\r
10217         proc_mutex_sysv_cleanup(new_mutex);\r
10218         return rv;\r
10219     }\r
10220     new_mutex->curr_locked = 0;\r
10221     apr_pool_cleanup_register(new_mutex->pool,\r
10222                               (void *)new_mutex, apr_proc_mutex_cleanup,\r
10223                               apr_pool_cleanup_null);\r
10224     return 0;\r
10225 }\r
10226 \r
10227 static apr_status_t proc_mutex_sysv_acquire(apr_proc_mutex_t *mutex)\r
10228 {\r
10229     int rc;\r
10230 \r
10231     do {\r
10232         rc = semop(mutex->interproc->filedes, &proc_mutex_op_on, 1);\r
10233     } while (rc < 0 && (*__errno_location ()) == 4);\r
10234     if (rc < 0) {\r
10235         return (*__errno_location ());\r
10236     }\r
10237     mutex->curr_locked = 1;\r
10238     return 0;\r
10239 }\r
10240 \r
10241 static apr_status_t proc_mutex_sysv_tryacquire(apr_proc_mutex_t *mutex)\r
10242 {\r
10243     int rc;\r
10244 \r
10245     do {\r
10246         rc = semop(mutex->interproc->filedes, &proc_mutex_op_try, 1);\r
10247     } while (rc < 0 && (*__errno_location ()) == 4);\r
10248     if (rc < 0) {\r
10249         if ((*__errno_location ()) == 11) {\r
10250             return ((20000 + 50000) + 25);\r
10251         }\r
10252         return (*__errno_location ());\r
10253     }\r
10254     mutex->curr_locked = 1;\r
10255     return 0;\r
10256 }\r
10257 \r
10258 static apr_status_t proc_mutex_sysv_release(apr_proc_mutex_t *mutex)\r
10259 {\r
10260     int rc;\r
10261 \r
10262     mutex->curr_locked = 0;\r
10263     do {\r
10264         rc = semop(mutex->interproc->filedes, &proc_mutex_op_off, 1);\r
10265     } while (rc < 0 && (*__errno_location ()) == 4);\r
10266     if (rc < 0) {\r
10267         return (*__errno_location ());\r
10268     }\r
10269     return 0;\r
10270 }\r
10271 \r
10272 static const apr_proc_mutex_unix_lock_methods_t mutex_sysv_methods =\r
10273 {\r
10274 \r
10275 \r
10276 \r
10277     0,\r
10278 \r
10279     proc_mutex_sysv_create,\r
10280     proc_mutex_sysv_acquire,\r
10281     proc_mutex_sysv_tryacquire,\r
10282     proc_mutex_sysv_release,\r
10283     proc_mutex_sysv_cleanup,\r
10284     proc_mutex_no_child_init,\r
10285     "sysvsem"\r
10286 };\r
10287 \r
10288 \r
10289 \r
10290 \r
10291 \r
10292 static apr_status_t proc_mutex_proc_pthread_cleanup(void *mutex_)\r
10293 {\r
10294     apr_proc_mutex_t *mutex=mutex_;\r
10295     apr_status_t rv;\r
10296 \r
10297     if (mutex->curr_locked == 1) {\r
10298         if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {\r
10299 \r
10300 \r
10301 \r
10302             return rv;\r
10303         }\r
10304     }\r
10305 \r
10306     if (mutex->curr_locked != -1) {\r
10307         if ((rv = pthread_mutex_destroy(mutex->pthread_interproc))) {\r
10308 \r
10309 \r
10310 \r
10311             return rv;\r
10312         }\r
10313     }\r
10314     if (munmap((caddr_t)mutex->pthread_interproc, sizeof(pthread_mutex_t))) {\r
10315         return (*__errno_location ());\r
10316     }\r
10317     return 0;\r
10318 }\r
10319 \r
10320 static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,\r
10321                                                    const char *fname)\r
10322 {\r
10323     apr_status_t rv;\r
10324     int fd;\r
10325     pthread_mutexattr_t mattr;\r
10326 \r
10327     fd = open("/dev/zero", 02);\r
10328     if (fd < 0) {\r
10329         return (*__errno_location ());\r
10330     }\r
10331 \r
10332     new_mutex->pthread_interproc = (pthread_mutex_t *)mmap(\r
10333                                        (caddr_t) 0,\r
10334                                        sizeof(pthread_mutex_t),\r
10335                                        0x1 | 0x2, 0x01,\r
10336                                        fd, 0);\r
10337     if (new_mutex->pthread_interproc == (pthread_mutex_t *) (caddr_t) -1) {\r
10338         close(fd);\r
10339         return (*__errno_location ());\r
10340     }\r
10341     close(fd);\r
10342 \r
10343     new_mutex->curr_locked = -1;\r
10344 \r
10345     if ((rv = pthread_mutexattr_init(&mattr))) {\r
10346 \r
10347 \r
10348 \r
10349         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10350         return rv;\r
10351     }\r
10352     if ((rv = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))) {\r
10353 \r
10354 \r
10355 \r
10356         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10357         pthread_mutexattr_destroy(&mattr);\r
10358         return rv;\r
10359     }\r
10360 \r
10361 \r
10362     if ((rv = pthread_mutexattr_setrobust_np(&mattr,\r
10363                                                PTHREAD_MUTEX_ROBUST_NP))) {\r
10364 \r
10365 \r
10366 \r
10367         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10368         pthread_mutexattr_destroy(&mattr);\r
10369         return rv;\r
10370     }\r
10371     if ((rv = pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT))) {\r
10372 \r
10373 \r
10374 \r
10375         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10376         pthread_mutexattr_destroy(&mattr);\r
10377         return rv;\r
10378     }\r
10379 \r
10380 \r
10381     if ((rv = pthread_mutex_init(new_mutex->pthread_interproc, &mattr))) {\r
10382 \r
10383 \r
10384 \r
10385         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10386         pthread_mutexattr_destroy(&mattr);\r
10387         return rv;\r
10388     }\r
10389 \r
10390     new_mutex->curr_locked = 0;\r
10391 \r
10392     if ((rv = pthread_mutexattr_destroy(&mattr))) {\r
10393 \r
10394 \r
10395 \r
10396         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10397         return rv;\r
10398     }\r
10399 \r
10400     apr_pool_cleanup_register(new_mutex->pool,\r
10401                               (void *)new_mutex,\r
10402                               apr_proc_mutex_cleanup,\r
10403                               apr_pool_cleanup_null);\r
10404     return 0;\r
10405 }\r
10406 \r
10407 static apr_status_t proc_mutex_proc_pthread_acquire(apr_proc_mutex_t *mutex)\r
10408 {\r
10409     apr_status_t rv;\r
10410 \r
10411     if ((rv = pthread_mutex_lock(mutex->pthread_interproc))) {\r
10412 \r
10413 \r
10414 \r
10415 \r
10416 \r
10417         if (rv == 130) {\r
10418             pthread_mutex_consistent_np(mutex->pthread_interproc);\r
10419         }\r
10420         else\r
10421             return rv;\r
10422 \r
10423 \r
10424 \r
10425     }\r
10426     mutex->curr_locked = 1;\r
10427     return 0;\r
10428 }\r
10429 \r
10430 static apr_status_t proc_mutex_proc_pthread_tryacquire(apr_proc_mutex_t *mutex)\r
10431 {\r
10432     apr_status_t rv;\r
10433 \r
10434     if ((rv = pthread_mutex_trylock(mutex->pthread_interproc))) {\r
10435 \r
10436 \r
10437 \r
10438         if (rv == 16) {\r
10439             return ((20000 + 50000) + 25);\r
10440         }\r
10441 \r
10442 \r
10443         if (rv == 130) {\r
10444             pthread_mutex_consistent_np(mutex->pthread_interproc);\r
10445             rv = 0;\r
10446         }\r
10447         else\r
10448             return rv;\r
10449 \r
10450 \r
10451 \r
10452     }\r
10453     mutex->curr_locked = 1;\r
10454     return rv;\r
10455 }\r
10456 \r
10457 static apr_status_t proc_mutex_proc_pthread_release(apr_proc_mutex_t *mutex)\r
10458 {\r
10459     apr_status_t rv;\r
10460 \r
10461     mutex->curr_locked = 0;\r
10462     if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {\r
10463 \r
10464 \r
10465 \r
10466         return rv;\r
10467     }\r
10468     return 0;\r
10469 }\r
10470 \r
10471 static const apr_proc_mutex_unix_lock_methods_t mutex_proc_pthread_methods =\r
10472 {\r
10473     1,\r
10474     proc_mutex_proc_pthread_create,\r
10475     proc_mutex_proc_pthread_acquire,\r
10476     proc_mutex_proc_pthread_tryacquire,\r
10477     proc_mutex_proc_pthread_release,\r
10478     proc_mutex_proc_pthread_cleanup,\r
10479     proc_mutex_no_child_init,\r
10480     "pthread"\r
10481 };\r
10482 \r
10483 \r
10484 \r
10485 \r
10486 \r
10487 static struct flock proc_mutex_lock_it;\r
10488 static struct flock proc_mutex_unlock_it;\r
10489 \r
10490 static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *);\r
10491 \r
10492 static void proc_mutex_fcntl_setup(void)\r
10493 {\r
10494     proc_mutex_lock_it.l_whence = 0;\r
10495     proc_mutex_lock_it.l_start = 0;\r
10496     proc_mutex_lock_it.l_len = 0;\r
10497     proc_mutex_lock_it.l_type = 1;\r
10498     proc_mutex_lock_it.l_pid = 0;\r
10499     proc_mutex_unlock_it.l_whence = 0;\r
10500     proc_mutex_unlock_it.l_start = 0;\r
10501     proc_mutex_unlock_it.l_len = 0;\r
10502     proc_mutex_unlock_it.l_type = 2;\r
10503     proc_mutex_unlock_it.l_pid = 0;\r
10504 }\r
10505 \r
10506 static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)\r
10507 {\r
10508     apr_status_t status;\r
10509     apr_proc_mutex_t *mutex=mutex_;\r
10510 \r
10511     if (mutex->curr_locked == 1) {\r
10512         status = proc_mutex_fcntl_release(mutex);\r
10513         if (status != 0)\r
10514             return status;\r
10515     }\r
10516 \r
10517     return apr_file_close(mutex->interproc);\r
10518 }\r
10519 \r
10520 static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,\r
10521                                             const char *fname)\r
10522 {\r
10523     int rv;\r
10524 \r
10525     if (fname) {\r
10526         new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);\r
10527         rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
10528                            0x00004 | 0x00002 | 0x00040,\r
10529                            0x0400 | 0x0200 | 0x0040 | 0x0004,\r
10530                            new_mutex->pool);\r
10531     }\r
10532     else {\r
10533         new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");\r
10534         rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,\r
10535                              0x00004 | 0x00002 | 0x00040,\r
10536                              new_mutex->pool);\r
10537     }\r
10538 \r
10539     if (rv != 0) {\r
10540         return rv;\r
10541     }\r
10542 \r
10543     new_mutex->curr_locked = 0;\r
10544     unlink(new_mutex->fname);\r
10545     apr_pool_cleanup_register(new_mutex->pool,\r
10546                               (void*)new_mutex,\r
10547                               apr_proc_mutex_cleanup,\r
10548                               apr_pool_cleanup_null);\r
10549     return 0;\r
10550 }\r
10551 \r
10552 static apr_status_t proc_mutex_fcntl_acquire(apr_proc_mutex_t *mutex)\r
10553 {\r
10554     int rc;\r
10555 \r
10556     do {\r
10557         rc = fcntl(mutex->interproc->filedes, 7, &proc_mutex_lock_it);\r
10558     } while (rc < 0 && (*__errno_location ()) == 4);\r
10559     if (rc < 0) {\r
10560         return (*__errno_location ());\r
10561     }\r
10562     mutex->curr_locked=1;\r
10563     return 0;\r
10564 }\r
10565 \r
10566 static apr_status_t proc_mutex_fcntl_tryacquire(apr_proc_mutex_t *mutex)\r
10567 {\r
10568     int rc;\r
10569 \r
10570     do {\r
10571         rc = fcntl(mutex->interproc->filedes, 6, &proc_mutex_lock_it);\r
10572     } while (rc < 0 && (*__errno_location ()) == 4);\r
10573     if (rc < 0) {\r
10574 \r
10575 \r
10576 \r
10577         if ((*__errno_location ()) == 11) {\r
10578 \r
10579             return ((20000 + 50000) + 25);\r
10580         }\r
10581         return (*__errno_location ());\r
10582     }\r
10583     mutex->curr_locked = 1;\r
10584     return 0;\r
10585 }\r
10586 \r
10587 static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *mutex)\r
10588 {\r
10589     int rc;\r
10590 \r
10591     mutex->curr_locked=0;\r
10592     do {\r
10593         rc = fcntl(mutex->interproc->filedes, 7, &proc_mutex_unlock_it);\r
10594     } while (rc < 0 && (*__errno_location ()) == 4);\r
10595     if (rc < 0) {\r
10596         return (*__errno_location ());\r
10597     }\r
10598     return 0;\r
10599 }\r
10600 \r
10601 static const apr_proc_mutex_unix_lock_methods_t mutex_fcntl_methods =\r
10602 {\r
10603 \r
10604 \r
10605 \r
10606     0,\r
10607 \r
10608     proc_mutex_fcntl_create,\r
10609     proc_mutex_fcntl_acquire,\r
10610     proc_mutex_fcntl_tryacquire,\r
10611     proc_mutex_fcntl_release,\r
10612     proc_mutex_fcntl_cleanup,\r
10613     proc_mutex_no_child_init,\r
10614     "fcntl"\r
10615 };\r
10616 \r
10617 \r
10618 \r
10619 \r
10620 \r
10621 static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *);\r
10622 \r
10623 static apr_status_t proc_mutex_flock_cleanup(void *mutex_)\r
10624 {\r
10625     apr_status_t status;\r
10626     apr_proc_mutex_t *mutex=mutex_;\r
10627 \r
10628     if (mutex->curr_locked == 1) {\r
10629         status = proc_mutex_flock_release(mutex);\r
10630         if (status != 0)\r
10631             return status;\r
10632     }\r
10633     if (mutex->interproc) {\r
10634         apr_file_close(mutex->interproc);\r
10635     }\r
10636     unlink(mutex->fname);\r
10637     return 0;\r
10638 }\r
10639 \r
10640 static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,\r
10641                                             const char *fname)\r
10642 {\r
10643     int rv;\r
10644 \r
10645     if (fname) {\r
10646         new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);\r
10647         rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
10648                            0x00004 | 0x00002 | 0x00040,\r
10649                            0x0400 | 0x0200,\r
10650                            new_mutex->pool);\r
10651     }\r
10652     else {\r
10653         new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");\r
10654         rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,\r
10655                              0x00004 | 0x00002 | 0x00040,\r
10656                              new_mutex->pool);\r
10657     }\r
10658 \r
10659     if (rv != 0) {\r
10660         proc_mutex_flock_cleanup(new_mutex);\r
10661         return (*__errno_location ());\r
10662     }\r
10663     new_mutex->curr_locked = 0;\r
10664     apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,\r
10665                               apr_proc_mutex_cleanup,\r
10666                               apr_pool_cleanup_null);\r
10667     return 0;\r
10668 }\r
10669 \r
10670 static apr_status_t proc_mutex_flock_acquire(apr_proc_mutex_t *mutex)\r
10671 {\r
10672     int rc;\r
10673 \r
10674     do {\r
10675         rc = flock(mutex->interproc->filedes, 2);\r
10676     } while (rc < 0 && (*__errno_location ()) == 4);\r
10677     if (rc < 0) {\r
10678         return (*__errno_location ());\r
10679     }\r
10680     mutex->curr_locked = 1;\r
10681     return 0;\r
10682 }\r
10683 \r
10684 static apr_status_t proc_mutex_flock_tryacquire(apr_proc_mutex_t *mutex)\r
10685 {\r
10686     int rc;\r
10687 \r
10688     do {\r
10689         rc = flock(mutex->interproc->filedes, 2 | 4);\r
10690     } while (rc < 0 && (*__errno_location ()) == 4);\r
10691     if (rc < 0) {\r
10692         if ((*__errno_location ()) == 11 || (*__errno_location ()) == 11) {\r
10693             return ((20000 + 50000) + 25);\r
10694         }\r
10695         return (*__errno_location ());\r
10696     }\r
10697     mutex->curr_locked = 1;\r
10698     return 0;\r
10699 }\r
10700 \r
10701 static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *mutex)\r
10702 {\r
10703     int rc;\r
10704 \r
10705     mutex->curr_locked = 0;\r
10706     do {\r
10707         rc = flock(mutex->interproc->filedes, 8);\r
10708     } while (rc < 0 && (*__errno_location ()) == 4);\r
10709     if (rc < 0) {\r
10710         return (*__errno_location ());\r
10711     }\r
10712     return 0;\r
10713 }\r
10714 \r
10715 static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex,\r
10716                                                 apr_pool_t *pool,\r
10717                                                 const char *fname)\r
10718 {\r
10719     apr_proc_mutex_t *new_mutex;\r
10720     int rv;\r
10721 \r
10722     new_mutex = (apr_proc_mutex_t *)apr_palloc(pool, sizeof(apr_proc_mutex_t));\r
10723 \r
10724     memcpy(new_mutex, *mutex, sizeof *new_mutex);\r
10725     new_mutex->pool = pool;\r
10726     if (!fname) {\r
10727         fname = (*mutex)->fname;\r
10728     }\r
10729     new_mutex->fname = apr_pstrdup(pool, fname);\r
10730     rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
10731                        0x00002, 0, new_mutex->pool);\r
10732     if (rv != 0) {\r
10733         return rv;\r
10734     }\r
10735     *mutex = new_mutex;\r
10736     return 0;\r
10737 }\r
10738 \r
10739 static const apr_proc_mutex_unix_lock_methods_t mutex_flock_methods =\r
10740 {\r
10741 \r
10742 \r
10743 \r
10744     0,\r
10745 \r
10746     proc_mutex_flock_create,\r
10747     proc_mutex_flock_acquire,\r
10748     proc_mutex_flock_tryacquire,\r
10749     proc_mutex_flock_release,\r
10750     proc_mutex_flock_cleanup,\r
10751     proc_mutex_flock_child_init,\r
10752     "flock"\r
10753 };\r
10754 \r
10755 \r
10756 \r
10757 void apr_proc_mutex_unix_setup_lock(void)\r
10758 {\r
10759 \r
10760 \r
10761     proc_mutex_sysv_setup();\r
10762 \r
10763 \r
10764     proc_mutex_fcntl_setup();\r
10765 \r
10766 }\r
10767 \r
10768 static apr_status_t proc_mutex_choose_method(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech)\r
10769 {\r
10770     switch (mech) {\r
10771     case APR_LOCK_FCNTL:\r
10772 \r
10773         new_mutex->inter_meth = &mutex_fcntl_methods;\r
10774 \r
10775 \r
10776 \r
10777         break;\r
10778     case APR_LOCK_FLOCK:\r
10779 \r
10780         new_mutex->inter_meth = &mutex_flock_methods;\r
10781 \r
10782 \r
10783 \r
10784         break;\r
10785     case APR_LOCK_SYSVSEM:\r
10786 \r
10787         new_mutex->inter_meth = &mutex_sysv_methods;\r
10788 \r
10789 \r
10790 \r
10791         break;\r
10792     case APR_LOCK_POSIXSEM:\r
10793 \r
10794         new_mutex->inter_meth = &mutex_posixsem_methods;\r
10795 \r
10796 \r
10797 \r
10798         break;\r
10799     case APR_LOCK_PROC_PTHREAD:\r
10800 \r
10801         new_mutex->inter_meth = &mutex_proc_pthread_methods;\r
10802 \r
10803 \r
10804 \r
10805         break;\r
10806     case APR_LOCK_DEFAULT:\r
10807 \r
10808 \r
10809 \r
10810         new_mutex->inter_meth = &mutex_sysv_methods;\r
10811 # 842 "./../locks/unix/proc_mutex.c"\r
10812         break;\r
10813     default:\r
10814         return ((20000 + 50000) + 23);\r
10815     }\r
10816     return 0;\r
10817 }\r
10818 \r
10819 const char * apr_proc_mutex_defname(void)\r
10820 {\r
10821     apr_status_t rv;\r
10822     apr_proc_mutex_t mutex;\r
10823 \r
10824     if ((rv = proc_mutex_choose_method(&mutex, APR_LOCK_DEFAULT)) != 0) {\r
10825         return "unknown";\r
10826     }\r
10827     mutex.meth = mutex.inter_meth;\r
10828 \r
10829     return apr_proc_mutex_name(&mutex);\r
10830 }\r
10831 \r
10832 static apr_status_t proc_mutex_create(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech, const char *fname)\r
10833 {\r
10834     apr_status_t rv;\r
10835 \r
10836     if ((rv = proc_mutex_choose_method(new_mutex, mech)) != 0) {\r
10837         return rv;\r
10838     }\r
10839 \r
10840     new_mutex->meth = new_mutex->inter_meth;\r
10841 \r
10842     if ((rv = new_mutex->meth->create(new_mutex, fname)) != 0) {\r
10843         return rv;\r
10844     }\r
10845 \r
10846     return 0;\r
10847 }\r
10848 \r
10849 apr_status_t apr_proc_mutex_create(apr_proc_mutex_t **mutex,\r
10850                                                 const char *fname,\r
10851                                                 apr_lockmech_e mech,\r
10852                                                 apr_pool_t *pool)\r
10853 {\r
10854     apr_proc_mutex_t *new_mutex;\r
10855     apr_status_t rv;\r
10856 \r
10857     new_mutex = memset(apr_palloc(pool, sizeof(apr_proc_mutex_t)), 0, sizeof(apr_proc_mutex_t));\r
10858     new_mutex->pool = pool;\r
10859 \r
10860     if ((rv = proc_mutex_create(new_mutex, mech, fname)) != 0)\r
10861         return rv;\r
10862 \r
10863     *mutex = new_mutex;\r
10864     return 0;\r
10865 }\r
10866 \r
10867 apr_status_t apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,\r
10868                                                     const char *fname,\r
10869                                                     apr_pool_t *pool)\r
10870 {\r
10871     return (*mutex)->meth->child_init(mutex, pool, fname);\r
10872 }\r
10873 \r
10874 apr_status_t apr_proc_mutex_lock(apr_proc_mutex_t *mutex)\r
10875 {\r
10876     return mutex->meth->acquire(mutex);\r
10877 }\r
10878 \r
10879 apr_status_t apr_proc_mutex_trylock(apr_proc_mutex_t *mutex)\r
10880 {\r
10881     return mutex->meth->tryacquire(mutex);\r
10882 }\r
10883 \r
10884 apr_status_t apr_proc_mutex_unlock(apr_proc_mutex_t *mutex)\r
10885 {\r
10886     return mutex->meth->release(mutex);\r
10887 }\r
10888 \r
10889 apr_status_t apr_proc_mutex_cleanup(void *mutex)\r
10890 {\r
10891     return ((apr_proc_mutex_t *)mutex)->meth->cleanup(mutex);\r
10892 }\r
10893 \r
10894 const char * apr_proc_mutex_name(apr_proc_mutex_t *mutex)\r
10895 {\r
10896     return mutex->meth->name;\r
10897 }\r
10898 \r
10899 const char * apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)\r
10900 {\r
10901 \r
10902 \r
10903 \r
10904     if (mutex->meth == &mutex_flock_methods) {\r
10905         return mutex->fname;\r
10906     }\r
10907 \r
10908 \r
10909     if (mutex->meth == &mutex_fcntl_methods) {\r
10910         return mutex->fname;\r
10911     }\r
10912 \r
10913     return ((void*)0);\r
10914 }\r
10915 \r
10916 apr_pool_t * apr_proc_mutex_pool_get (const apr_proc_mutex_t *theproc_mutex) { return theproc_mutex->pool; }\r
10917 \r
10918 \r
10919 \r
10920 apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,\r
10921                                                 apr_proc_mutex_t *pmutex)\r
10922 {\r
10923 \r
10924     if (pmutex->interproc) {\r
10925         ospmutex->crossproc = pmutex->interproc->filedes;\r
10926     }\r
10927     else {\r
10928         ospmutex->crossproc = -1;\r
10929     }\r
10930 \r
10931 \r
10932     ospmutex->pthread_interproc = pmutex->pthread_interproc;\r
10933 \r
10934     return 0;\r
10935 }\r
10936 \r
10937 apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,\r
10938                                                 apr_os_proc_mutex_t *ospmutex,\r
10939                                                 apr_pool_t *pool)\r
10940 {\r
10941     if (pool == ((void*)0)) {\r
10942         return (20000 + 2);\r
10943     }\r
10944     if ((*pmutex) == ((void*)0)) {\r
10945         (*pmutex) = (apr_proc_mutex_t *)memset(apr_palloc(pool, sizeof(apr_proc_mutex_t)), 0, sizeof(apr_proc_mutex_t));\r
10946 \r
10947         (*pmutex)->pool = pool;\r
10948     }\r
10949 \r
10950     apr_os_file_put(&(*pmutex)->interproc, &ospmutex->crossproc, 0, pool);\r
10951 \r
10952 \r
10953     (*pmutex)->pthread_interproc = ospmutex->pthread_interproc;\r
10954 \r
10955     return 0;\r
10956 }\r
10957 # 14 "main1.c" 2\r
10958 # 1 "./../memory/unix/apr_pools.c" 1\r
10959 # 31 "./../memory/unix/apr_pools.c"\r
10960 # 1 "../include/apr_want.h" 1\r
10961 # 32 "./../memory/unix/apr_pools.c" 2\r
10962 # 1 "../include/apr_env.h" 1\r
10963 # 42 "../include/apr_env.h"\r
10964 apr_status_t apr_env_get(char **value, const char *envvar,\r
10965                                       apr_pool_t *pool);\r
10966 \r
10967 \r
10968 \r
10969 \r
10970 \r
10971 \r
10972 \r
10973 apr_status_t apr_env_set(const char *envvar, const char *value,\r
10974                                       apr_pool_t *pool);\r
10975 \r
10976 \r
10977 \r
10978 \r
10979 \r
10980 \r
10981 apr_status_t apr_env_delete(const char *envvar, apr_pool_t *pool);\r
10982 # 33 "./../memory/unix/apr_pools.c" 2\r
10983 # 85 "./../memory/unix/apr_pools.c"\r
10984 struct apr_allocator_t {\r
10985 \r
10986     apr_uint32_t max_index;\r
10987 \r
10988 \r
10989 \r
10990 \r
10991 \r
10992     apr_uint32_t max_free_index;\r
10993 \r
10994 \r
10995 \r
10996 \r
10997     apr_uint32_t current_free_index;\r
10998 \r
10999     apr_thread_mutex_t *mutex;\r
11000 \r
11001     apr_pool_t *owner;\r
11002 # 113 "./../memory/unix/apr_pools.c"\r
11003     apr_memnode_t *free[20];\r
11004 };\r
11005 # 123 "./../memory/unix/apr_pools.c"\r
11006 apr_status_t apr_allocator_create(apr_allocator_t **allocator)\r
11007 {\r
11008     apr_allocator_t *new_allocator;\r
11009 \r
11010     *allocator = ((void*)0);\r
11011 \r
11012     if ((new_allocator = malloc((((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0))\r
11013         return 12;\r
11014 \r
11015     memset(new_allocator, 0, (((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)));\r
11016     new_allocator->max_free_index = 0;\r
11017 \r
11018     *allocator = new_allocator;\r
11019 \r
11020     return 0;\r
11021 }\r
11022 \r
11023 void apr_allocator_destroy(apr_allocator_t *allocator)\r
11024 {\r
11025     apr_uint32_t index;\r
11026     apr_memnode_t *node, **ref;\r
11027 \r
11028     for (index = 0; index < 20; index++) {\r
11029         ref = &allocator->free[index];\r
11030         while ((node = *ref) != ((void*)0)) {\r
11031             *ref = node->next;\r
11032 \r
11033 \r
11034 \r
11035             free(node);\r
11036 \r
11037         }\r
11038     }\r
11039 \r
11040     free(allocator);\r
11041 }\r
11042 \r
11043 \r
11044 void apr_allocator_mutex_set(apr_allocator_t *allocator,\r
11045                                           apr_thread_mutex_t *mutex)\r
11046 {\r
11047     allocator->mutex = mutex;\r
11048 }\r
11049 \r
11050 apr_thread_mutex_t * apr_allocator_mutex_get(\r
11051                                       apr_allocator_t *allocator)\r
11052 {\r
11053     return allocator->mutex;\r
11054 }\r
11055 \r
11056 \r
11057 void apr_allocator_owner_set(apr_allocator_t *allocator,\r
11058                                           apr_pool_t *pool)\r
11059 {\r
11060     allocator->owner = pool;\r
11061 }\r
11062 \r
11063 apr_pool_t * apr_allocator_owner_get(apr_allocator_t *allocator)\r
11064 {\r
11065     return allocator->owner;\r
11066 }\r
11067 \r
11068 void apr_allocator_max_free_set(apr_allocator_t *allocator,\r
11069                                              apr_size_t in_size)\r
11070 {\r
11071     apr_uint32_t max_free_index;\r
11072     apr_uint32_t size = (apr_uint32_t)in_size;\r
11073 \r
11074 \r
11075     apr_thread_mutex_t *mutex;\r
11076 \r
11077     mutex = apr_allocator_mutex_get(allocator);\r
11078     if (mutex != ((void*)0))\r
11079         apr_thread_mutex_lock(mutex);\r
11080 \r
11081 \r
11082     max_free_index = (((size) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) >> 12;\r
11083     allocator->current_free_index += max_free_index;\r
11084     allocator->current_free_index -= allocator->max_free_index;\r
11085     allocator->max_free_index = max_free_index;\r
11086     if (allocator->current_free_index > max_free_index)\r
11087         allocator->current_free_index = max_free_index;\r
11088 \r
11089 \r
11090     if (mutex != ((void*)0))\r
11091         apr_thread_mutex_unlock(mutex);\r
11092 \r
11093 }\r
11094 \r
11095 static __inline__\r
11096 apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)\r
11097 {\r
11098     apr_memnode_t *node, **ref;\r
11099     apr_uint32_t max_index;\r
11100     apr_size_t size, i, index;\r
11101 \r
11102 \r
11103 \r
11104 \r
11105     size = (((in_size + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1))) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1));\r
11106     if (size < in_size) {\r
11107         return ((void*)0);\r
11108     }\r
11109     if (size < (2 * (1 << 12)))\r
11110         size = (2 * (1 << 12));\r
11111 \r
11112 \r
11113 \r
11114 \r
11115     index = (size >> 12) - 1;\r
11116 \r
11117     if (index > (4294967295U)) {\r
11118         return ((void*)0);\r
11119     }\r
11120 \r
11121 \r
11122 \r
11123 \r
11124     if (index <= allocator->max_index) {\r
11125 \r
11126         if (allocator->mutex)\r
11127             apr_thread_mutex_lock(allocator->mutex);\r
11128 # 257 "./../memory/unix/apr_pools.c"\r
11129         max_index = allocator->max_index;\r
11130         ref = &allocator->free[index];\r
11131         i = index;\r
11132         while (*ref == ((void*)0) && i < max_index) {\r
11133            ref++;\r
11134            i++;\r
11135         }\r
11136 \r
11137         if ((node = *ref) != ((void*)0)) {\r
11138 \r
11139 \r
11140 \r
11141 \r
11142 \r
11143             if ((*ref = node->next) == ((void*)0) && i >= max_index) {\r
11144                 do {\r
11145                     ref--;\r
11146                     max_index--;\r
11147                 }\r
11148                 while (*ref == ((void*)0) && max_index > 0);\r
11149 \r
11150                 allocator->max_index = max_index;\r
11151             }\r
11152 \r
11153             allocator->current_free_index += node->index + 1;\r
11154             if (allocator->current_free_index > allocator->max_free_index)\r
11155                 allocator->current_free_index = allocator->max_free_index;\r
11156 \r
11157 \r
11158             if (allocator->mutex)\r
11159                 apr_thread_mutex_unlock(allocator->mutex);\r
11160 \r
11161 \r
11162             node->next = ((void*)0);\r
11163             node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
11164 \r
11165             return node;\r
11166         }\r
11167 \r
11168 \r
11169         if (allocator->mutex)\r
11170             apr_thread_mutex_unlock(allocator->mutex);\r
11171 \r
11172     }\r
11173 \r
11174 \r
11175 \r
11176 \r
11177     else if (allocator->free[0]) {\r
11178 \r
11179         if (allocator->mutex)\r
11180             apr_thread_mutex_lock(allocator->mutex);\r
11181 \r
11182 \r
11183 \r
11184 \r
11185 \r
11186         ref = &allocator->free[0];\r
11187         while ((node = *ref) != ((void*)0) && index > node->index)\r
11188             ref = &node->next;\r
11189 \r
11190         if (node) {\r
11191             *ref = node->next;\r
11192 \r
11193             allocator->current_free_index += node->index + 1;\r
11194             if (allocator->current_free_index > allocator->max_free_index)\r
11195                 allocator->current_free_index = allocator->max_free_index;\r
11196 \r
11197 \r
11198             if (allocator->mutex)\r
11199                 apr_thread_mutex_unlock(allocator->mutex);\r
11200 \r
11201 \r
11202             node->next = ((void*)0);\r
11203             node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
11204 \r
11205             return node;\r
11206         }\r
11207 \r
11208 \r
11209         if (allocator->mutex)\r
11210             apr_thread_mutex_unlock(allocator->mutex);\r
11211 \r
11212     }\r
11213 # 349 "./../memory/unix/apr_pools.c"\r
11214     if ((node = malloc(size)) == ((void*)0))\r
11215 \r
11216         return ((void*)0);\r
11217 \r
11218     node->next = ((void*)0);\r
11219     node->index = (apr_uint32_t)index;\r
11220     node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
11221     node->endp = (char *)node + size;\r
11222 \r
11223     return node;\r
11224 }\r
11225 \r
11226 static __inline__\r
11227 void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)\r
11228 {\r
11229     apr_memnode_t *next; apr_memnode_t *freelist = ((void*)0);\r
11230     apr_uint32_t index, max_index;\r
11231     apr_uint32_t max_free_index, current_free_index;\r
11232 \r
11233 \r
11234     if (allocator->mutex)\r
11235         apr_thread_mutex_lock(allocator->mutex);\r
11236 \r
11237 \r
11238     max_index = allocator->max_index;\r
11239     max_free_index = allocator->max_free_index;\r
11240     current_free_index = allocator->current_free_index;\r
11241 \r
11242 \r
11243 \r
11244 \r
11245     do {\r
11246         next = node->next;\r
11247         index = node->index;\r
11248 \r
11249         if (max_free_index != 0\r
11250             && index + 1 > current_free_index) {\r
11251             node->next = freelist;\r
11252             freelist = node;\r
11253         }\r
11254         else if (index < 20) {\r
11255 \r
11256 \r
11257 \r
11258             if ((node->next = allocator->free[index]) == ((void*)0)\r
11259                 && index > max_index) {\r
11260                 max_index = index;\r
11261             }\r
11262             allocator->free[index] = node;\r
11263             if (current_free_index >= index + 1)\r
11264                 current_free_index -= index + 1;\r
11265             else\r
11266                 current_free_index = 0;\r
11267         }\r
11268         else {\r
11269 \r
11270 \r
11271 \r
11272             node->next = allocator->free[0];\r
11273             allocator->free[0] = node;\r
11274             if (current_free_index >= index + 1)\r
11275                 current_free_index -= index + 1;\r
11276             else\r
11277                 current_free_index = 0;\r
11278         }\r
11279     } while ((node = next) != ((void*)0));\r
11280 \r
11281     allocator->max_index = max_index;\r
11282     allocator->current_free_index = current_free_index;\r
11283 \r
11284 \r
11285     if (allocator->mutex)\r
11286         apr_thread_mutex_unlock(allocator->mutex);\r
11287 \r
11288 \r
11289     while (freelist != ((void*)0)) {\r
11290         node = freelist;\r
11291         freelist = node->next;\r
11292 \r
11293 \r
11294 \r
11295         free(node);\r
11296 \r
11297     }\r
11298 }\r
11299 \r
11300 apr_memnode_t * apr_allocator_alloc(apr_allocator_t *allocator,\r
11301                                                  apr_size_t size)\r
11302 {\r
11303     return allocator_alloc(allocator, size);\r
11304 }\r
11305 \r
11306 void apr_allocator_free(apr_allocator_t *allocator,\r
11307                                      apr_memnode_t *node)\r
11308 {\r
11309     allocator_free(allocator, node);\r
11310 }\r
11311 # 467 "./../memory/unix/apr_pools.c"\r
11312 typedef struct cleanup_t cleanup_t;\r
11313 \r
11314 \r
11315 struct process_chain {\r
11316 \r
11317     apr_proc_t *proc;\r
11318     apr_kill_conditions_e kill_how;\r
11319 \r
11320     struct process_chain *next;\r
11321 };\r
11322 # 500 "./../memory/unix/apr_pools.c"\r
11323 struct apr_pool_t {\r
11324     apr_pool_t *parent;\r
11325     apr_pool_t *child;\r
11326     apr_pool_t *sibling;\r
11327     apr_pool_t **ref;\r
11328     cleanup_t *cleanups;\r
11329     cleanup_t *free_cleanups;\r
11330     apr_allocator_t *allocator;\r
11331     struct process_chain *subprocesses;\r
11332     apr_abortfunc_t abort_fn;\r
11333     apr_hash_t *user_data;\r
11334     const char *tag;\r
11335 \r
11336 \r
11337     apr_memnode_t *active;\r
11338     apr_memnode_t *self;\r
11339     char *self_first_avail;\r
11340 # 535 "./../memory/unix/apr_pools.c"\r
11341     cleanup_t *pre_cleanups;\r
11342 };\r
11343 # 545 "./../memory/unix/apr_pools.c"\r
11344 static apr_byte_t apr_pools_initialized = 0;\r
11345 static apr_pool_t *global_pool = ((void*)0);\r
11346 \r
11347 \r
11348 static apr_allocator_t *global_allocator = ((void*)0);\r
11349 # 560 "./../memory/unix/apr_pools.c"\r
11350 static void run_cleanups(cleanup_t **c);\r
11351 static void free_proc_chain(struct process_chain *procs);\r
11352 # 572 "./../memory/unix/apr_pools.c"\r
11353 apr_status_t apr_pool_initialize(void)\r
11354 {\r
11355     apr_status_t rv;\r
11356 \r
11357     if (apr_pools_initialized++)\r
11358         return 0;\r
11359 # 587 "./../memory/unix/apr_pools.c"\r
11360     if ((rv = apr_allocator_create(&global_allocator)) != 0) {\r
11361         apr_pools_initialized = 0;\r
11362         return rv;\r
11363     }\r
11364 \r
11365     if ((rv = apr_pool_create_ex(&global_pool, ((void*)0), ((void*)0),\r
11366                                  global_allocator)) != 0) {\r
11367         apr_allocator_destroy(global_allocator);\r
11368         global_allocator = ((void*)0);\r
11369         apr_pools_initialized = 0;\r
11370         return rv;\r
11371     }\r
11372 \r
11373     apr_pool_tag(global_pool, "apr_global_pool");\r
11374 \r
11375 \r
11376 \r
11377 \r
11378 \r
11379 \r
11380 \r
11381     if ((rv = apr_atomic_init(global_pool)) != 0) {\r
11382         return rv;\r
11383     }\r
11384 \r
11385 \r
11386     {\r
11387         apr_thread_mutex_t *mutex;\r
11388 \r
11389         if ((rv = apr_thread_mutex_create(&mutex,\r
11390                                           0x0,\r
11391                                           global_pool)) != 0) {\r
11392             return rv;\r
11393         }\r
11394 \r
11395         apr_allocator_mutex_set(global_allocator, mutex);\r
11396     }\r
11397 \r
11398 \r
11399     apr_allocator_owner_set(global_allocator, global_pool);\r
11400 \r
11401     return 0;\r
11402 }\r
11403 \r
11404 void apr_pool_terminate(void)\r
11405 {\r
11406     if (!apr_pools_initialized)\r
11407         return;\r
11408 \r
11409     if (--apr_pools_initialized)\r
11410         return;\r
11411 \r
11412     apr_pool_destroy(global_pool);\r
11413     global_pool = ((void*)0);\r
11414 \r
11415     global_allocator = ((void*)0);\r
11416 }\r
11417 # 668 "./../memory/unix/apr_pools.c"\r
11418 void * apr_palloc(apr_pool_t *pool, apr_size_t in_size)\r
11419 {\r
11420     apr_memnode_t *active, *node;\r
11421     void *mem;\r
11422     apr_size_t size, free_index;\r
11423 \r
11424     size = (((in_size) + ((8) - 1)) & ~((8) - 1));\r
11425     if (size < in_size) {\r
11426         if (pool->abort_fn)\r
11427             pool->abort_fn(12);\r
11428 \r
11429         return ((void*)0);\r
11430     }\r
11431     active = pool->active;\r
11432 \r
11433 \r
11434     if (size <= ((apr_size_t)(active->endp - active->first_avail))) {\r
11435         mem = active->first_avail;\r
11436         active->first_avail += size;\r
11437 \r
11438         return mem;\r
11439     }\r
11440 \r
11441     node = active->next;\r
11442     if (size <= ((apr_size_t)(node->endp - node->first_avail))) {\r
11443         do { *node->ref = node->next; node->next->ref = node->ref; } while (0);\r
11444     }\r
11445     else {\r
11446         if ((node = allocator_alloc(pool->allocator, size)) == ((void*)0)) {\r
11447             if (pool->abort_fn)\r
11448                 pool->abort_fn(12);\r
11449 \r
11450             return ((void*)0);\r
11451         }\r
11452     }\r
11453 \r
11454     node->free_index = 0;\r
11455 \r
11456     mem = node->first_avail;\r
11457     node->first_avail += size;\r
11458 \r
11459     do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
11460 \r
11461     pool->active = node;\r
11462 \r
11463     free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
11464 \r
11465 \r
11466     active->free_index = (apr_uint32_t)free_index;\r
11467     node = active->next;\r
11468     if (free_index >= node->free_index)\r
11469         return mem;\r
11470 \r
11471     do {\r
11472         node = node->next;\r
11473     }\r
11474     while (free_index < node->free_index);\r
11475 \r
11476     do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
11477     do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
11478 \r
11479     return mem;\r
11480 }\r
11481 # 740 "./../memory/unix/apr_pools.c"\r
11482 void * apr_pcalloc(apr_pool_t *pool, apr_size_t size);\r
11483 void * apr_pcalloc(apr_pool_t *pool, apr_size_t size)\r
11484 {\r
11485     void *mem;\r
11486 \r
11487     if ((mem = apr_palloc(pool, size)) != ((void*)0)) {\r
11488         memset(mem, 0, size);\r
11489     }\r
11490 \r
11491     return mem;\r
11492 }\r
11493 \r
11494 \r
11495 \r
11496 \r
11497 \r
11498 \r
11499 void apr_pool_clear(apr_pool_t *pool)\r
11500 {\r
11501     apr_memnode_t *active;\r
11502 \r
11503 \r
11504     run_cleanups(&pool->pre_cleanups);\r
11505     pool->pre_cleanups = ((void*)0);\r
11506 \r
11507 \r
11508 \r
11509 \r
11510     while (pool->child)\r
11511         apr_pool_destroy(pool->child);\r
11512 \r
11513 \r
11514     run_cleanups(&pool->cleanups);\r
11515     pool->cleanups = ((void*)0);\r
11516     pool->free_cleanups = ((void*)0);\r
11517 \r
11518 \r
11519     free_proc_chain(pool->subprocesses);\r
11520     pool->subprocesses = ((void*)0);\r
11521 \r
11522 \r
11523     pool->user_data = ((void*)0);\r
11524 \r
11525 \r
11526 \r
11527 \r
11528     active = pool->active = pool->self;\r
11529     active->first_avail = pool->self_first_avail;\r
11530 \r
11531     if (active->next == active)\r
11532         return;\r
11533 \r
11534     *active->ref = ((void*)0);\r
11535     allocator_free(pool->allocator, active->next);\r
11536     active->next = active;\r
11537     active->ref = &active->next;\r
11538 }\r
11539 \r
11540 void apr_pool_destroy(apr_pool_t *pool)\r
11541 {\r
11542     apr_memnode_t *active;\r
11543     apr_allocator_t *allocator;\r
11544 \r
11545 \r
11546     run_cleanups(&pool->pre_cleanups);\r
11547     pool->pre_cleanups = ((void*)0);\r
11548 \r
11549 \r
11550 \r
11551 \r
11552     while (pool->child)\r
11553         apr_pool_destroy(pool->child);\r
11554 \r
11555 \r
11556     run_cleanups(&pool->cleanups);\r
11557 \r
11558 \r
11559     free_proc_chain(pool->subprocesses);\r
11560 \r
11561 \r
11562     if (pool->parent) {\r
11563 \r
11564         apr_thread_mutex_t *mutex;\r
11565 \r
11566         if ((mutex = apr_allocator_mutex_get(pool->parent->allocator)) != ((void*)0))\r
11567             apr_thread_mutex_lock(mutex);\r
11568 \r
11569 \r
11570         if ((*pool->ref = pool->sibling) != ((void*)0))\r
11571             pool->sibling->ref = pool->ref;\r
11572 \r
11573 \r
11574         if (mutex)\r
11575             apr_thread_mutex_unlock(mutex);\r
11576 \r
11577     }\r
11578 \r
11579 \r
11580 \r
11581 \r
11582     allocator = pool->allocator;\r
11583     active = pool->self;\r
11584     *active->ref = ((void*)0);\r
11585 \r
11586 \r
11587     if (apr_allocator_owner_get(allocator) == pool) {\r
11588 \r
11589 \r
11590 \r
11591         apr_allocator_mutex_set(allocator, ((void*)0));\r
11592     }\r
11593 \r
11594 \r
11595 \r
11596 \r
11597 \r
11598     allocator_free(allocator, active);\r
11599 \r
11600 \r
11601 \r
11602 \r
11603 \r
11604 \r
11605     if (apr_allocator_owner_get(allocator) == pool) {\r
11606         apr_allocator_destroy(allocator);\r
11607     }\r
11608 }\r
11609 \r
11610 apr_status_t apr_pool_create_ex(apr_pool_t **newpool,\r
11611                                              apr_pool_t *parent,\r
11612                                              apr_abortfunc_t abort_fn,\r
11613                                              apr_allocator_t *allocator)\r
11614 {\r
11615     apr_pool_t *pool;\r
11616     apr_memnode_t *node;\r
11617 \r
11618     *newpool = ((void*)0);\r
11619 \r
11620     if (!parent)\r
11621         parent = global_pool;\r
11622 \r
11623 \r
11624 \r
11625 \r
11626 \r
11627     if (!abort_fn && parent)\r
11628         abort_fn = parent->abort_fn;\r
11629 \r
11630     if (allocator == ((void*)0))\r
11631         allocator = parent->allocator;\r
11632 \r
11633     if ((node = allocator_alloc(allocator,\r
11634                                 (2 * (1 << 12)) - (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
11635         if (abort_fn)\r
11636             abort_fn(12);\r
11637 \r
11638         return 12;\r
11639     }\r
11640 \r
11641     node->next = node;\r
11642     node->ref = &node->next;\r
11643 \r
11644     pool = (apr_pool_t *)node->first_avail;\r
11645     node->first_avail = pool->self_first_avail = (char *)pool + (((sizeof(apr_pool_t)) + ((8) - 1)) & ~((8) - 1));\r
11646 \r
11647     pool->allocator = allocator;\r
11648     pool->active = pool->self = node;\r
11649     pool->abort_fn = abort_fn;\r
11650     pool->child = ((void*)0);\r
11651     pool->cleanups = ((void*)0);\r
11652     pool->free_cleanups = ((void*)0);\r
11653     pool->pre_cleanups = ((void*)0);\r
11654     pool->subprocesses = ((void*)0);\r
11655     pool->user_data = ((void*)0);\r
11656     pool->tag = ((void*)0);\r
11657 \r
11658 \r
11659 \r
11660 \r
11661 \r
11662     if ((pool->parent = parent) != ((void*)0)) {\r
11663 \r
11664         apr_thread_mutex_t *mutex;\r
11665 \r
11666         if ((mutex = apr_allocator_mutex_get(parent->allocator)) != ((void*)0))\r
11667             apr_thread_mutex_lock(mutex);\r
11668 \r
11669 \r
11670         if ((pool->sibling = parent->child) != ((void*)0))\r
11671             pool->sibling->ref = &pool->sibling;\r
11672 \r
11673         parent->child = pool;\r
11674         pool->ref = &parent->child;\r
11675 \r
11676 \r
11677         if (mutex)\r
11678             apr_thread_mutex_unlock(mutex);\r
11679 \r
11680     }\r
11681     else {\r
11682         pool->sibling = ((void*)0);\r
11683         pool->ref = ((void*)0);\r
11684     }\r
11685 \r
11686     *newpool = pool;\r
11687 \r
11688     return 0;\r
11689 }\r
11690 \r
11691 \r
11692 \r
11693 apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool,\r
11694                                                   apr_abortfunc_t abort_fn,\r
11695                                                   apr_allocator_t *allocator)\r
11696 {\r
11697     return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
11698 }\r
11699 \r
11700 apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool,\r
11701                                                   apr_abortfunc_t abort_fn,\r
11702                                                   apr_allocator_t *allocator)\r
11703 {\r
11704     apr_pool_t *pool;\r
11705     apr_memnode_t *node;\r
11706     apr_allocator_t *pool_allocator;\r
11707 \r
11708     *newpool = ((void*)0);\r
11709 \r
11710     if (!apr_pools_initialized)\r
11711         return (20000 + 2);\r
11712     if ((pool_allocator = allocator) == ((void*)0)) {\r
11713         if ((pool_allocator = malloc((((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
11714             if (abort_fn)\r
11715                 abort_fn(12);\r
11716 \r
11717             return 12;\r
11718         }\r
11719         memset(pool_allocator, 0, (((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)));\r
11720         pool_allocator->max_free_index = 0;\r
11721     }\r
11722     if ((node = allocator_alloc(pool_allocator,\r
11723                                 (2 * (1 << 12)) - (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
11724         if (abort_fn)\r
11725             abort_fn(12);\r
11726 \r
11727         return 12;\r
11728     }\r
11729 \r
11730     node->next = node;\r
11731     node->ref = &node->next;\r
11732 \r
11733     pool = (apr_pool_t *)node->first_avail;\r
11734     node->first_avail = pool->self_first_avail = (char *)pool + (((sizeof(apr_pool_t)) + ((8) - 1)) & ~((8) - 1));\r
11735 \r
11736     pool->allocator = pool_allocator;\r
11737     pool->active = pool->self = node;\r
11738     pool->abort_fn = abort_fn;\r
11739     pool->child = ((void*)0);\r
11740     pool->cleanups = ((void*)0);\r
11741     pool->free_cleanups = ((void*)0);\r
11742     pool->pre_cleanups = ((void*)0);\r
11743     pool->subprocesses = ((void*)0);\r
11744     pool->user_data = ((void*)0);\r
11745     pool->tag = ((void*)0);\r
11746     pool->parent = ((void*)0);\r
11747     pool->sibling = ((void*)0);\r
11748     pool->ref = ((void*)0);\r
11749 \r
11750 \r
11751 \r
11752 \r
11753     if (!allocator)\r
11754         pool_allocator->owner = pool;\r
11755     *newpool = pool;\r
11756 \r
11757     return 0;\r
11758 }\r
11759 # 1036 "./../memory/unix/apr_pools.c"\r
11760 struct psprintf_data {\r
11761     apr_vformatter_buff_t vbuff;\r
11762     apr_memnode_t *node;\r
11763     apr_pool_t *pool;\r
11764     apr_byte_t got_a_new_node;\r
11765     apr_memnode_t *free;\r
11766 };\r
11767 \r
11768 \r
11769 \r
11770 static int psprintf_flush(apr_vformatter_buff_t *vbuff)\r
11771 {\r
11772     struct psprintf_data *ps = (struct psprintf_data *)vbuff;\r
11773     apr_memnode_t *node, *active;\r
11774     apr_size_t cur_len, size;\r
11775     char *strp;\r
11776     apr_pool_t *pool;\r
11777     apr_size_t free_index;\r
11778 \r
11779     pool = ps->pool;\r
11780     active = ps->node;\r
11781     strp = ps->vbuff.curpos;\r
11782     cur_len = strp - active->first_avail;\r
11783     size = cur_len << 1;\r
11784 \r
11785 \r
11786 \r
11787 \r
11788 \r
11789 \r
11790     if (size < 32)\r
11791         size = 32;\r
11792 \r
11793     node = active->next;\r
11794     if (!ps->got_a_new_node && size <= ((apr_size_t)(node->endp - node->first_avail))) {\r
11795 \r
11796         do { *node->ref = node->next; node->next->ref = node->ref; } while (0);\r
11797         do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
11798 \r
11799         node->free_index = 0;\r
11800 \r
11801         pool->active = node;\r
11802 \r
11803         free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
11804 \r
11805 \r
11806         active->free_index = (apr_uint32_t)free_index;\r
11807         node = active->next;\r
11808         if (free_index < node->free_index) {\r
11809             do {\r
11810                 node = node->next;\r
11811             }\r
11812             while (free_index < node->free_index);\r
11813 \r
11814             do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
11815             do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
11816         }\r
11817 \r
11818         node = pool->active;\r
11819     }\r
11820     else {\r
11821         if ((node = allocator_alloc(pool->allocator, size)) == ((void*)0))\r
11822             return -1;\r
11823 \r
11824         if (ps->got_a_new_node) {\r
11825             active->next = ps->free;\r
11826             ps->free = active;\r
11827         }\r
11828 \r
11829         ps->got_a_new_node = 1;\r
11830     }\r
11831 \r
11832     memcpy(node->first_avail, active->first_avail, cur_len);\r
11833 \r
11834     ps->node = node;\r
11835     ps->vbuff.curpos = node->first_avail + cur_len;\r
11836     ps->vbuff.endpos = node->endp - 1;\r
11837 \r
11838     return 0;\r
11839 }\r
11840 \r
11841 char * apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)\r
11842 {\r
11843     struct psprintf_data ps;\r
11844     char *strp;\r
11845     apr_size_t size;\r
11846     apr_memnode_t *active, *node;\r
11847     apr_size_t free_index;\r
11848 \r
11849     ps.node = active = pool->active;\r
11850     ps.pool = pool;\r
11851     ps.vbuff.curpos = ps.node->first_avail;\r
11852 \r
11853 \r
11854     ps.vbuff.endpos = ps.node->endp - 1;\r
11855     ps.got_a_new_node = 0;\r
11856     ps.free = ((void*)0);\r
11857 \r
11858 \r
11859 \r
11860 \r
11861     if (ps.node->first_avail == ps.node->endp) {\r
11862         if (psprintf_flush(&ps.vbuff) == -1) {\r
11863             if (pool->abort_fn) {\r
11864                 pool->abort_fn(12);\r
11865             }\r
11866 \r
11867             return ((void*)0);\r
11868         }\r
11869     }\r
11870 \r
11871     if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) {\r
11872         if (pool->abort_fn)\r
11873             pool->abort_fn(12);\r
11874 \r
11875         return ((void*)0);\r
11876     }\r
11877 \r
11878     strp = ps.vbuff.curpos;\r
11879     *strp++ = '\0';\r
11880 \r
11881     size = strp - ps.node->first_avail;\r
11882     size = (((size) + ((8) - 1)) & ~((8) - 1));\r
11883     strp = ps.node->first_avail;\r
11884     ps.node->first_avail += size;\r
11885 \r
11886     if (ps.free)\r
11887         allocator_free(pool->allocator, ps.free);\r
11888 \r
11889 \r
11890 \r
11891 \r
11892     if (!ps.got_a_new_node)\r
11893         return strp;\r
11894 \r
11895     active = pool->active;\r
11896     node = ps.node;\r
11897 \r
11898     node->free_index = 0;\r
11899 \r
11900     do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
11901 \r
11902     pool->active = node;\r
11903 \r
11904     free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
11905 \r
11906 \r
11907     active->free_index = (apr_uint32_t)free_index;\r
11908     node = active->next;\r
11909 \r
11910     if (free_index >= node->free_index)\r
11911         return strp;\r
11912 \r
11913     do {\r
11914         node = node->next;\r
11915     }\r
11916     while (free_index < node->free_index);\r
11917 \r
11918     do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
11919     do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
11920 \r
11921     return strp;\r
11922 }\r
11923 # 2049 "./../memory/unix/apr_pools.c"\r
11924 char * apr_psprintf(apr_pool_t *p, const char *fmt, ...)\r
11925 {\r
11926     va_list ap;\r
11927     char *res;\r
11928 \r
11929     __builtin_va_start(ap, fmt);\r
11930     res = apr_pvsprintf(p, fmt, ap);\r
11931     __builtin_va_end(ap);\r
11932     return res;\r
11933 }\r
11934 \r
11935 \r
11936 \r
11937 \r
11938 \r
11939 void apr_pool_abort_set(apr_abortfunc_t abort_fn,\r
11940                                      apr_pool_t *pool)\r
11941 {\r
11942     pool->abort_fn = abort_fn;\r
11943 }\r
11944 \r
11945 apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)\r
11946 {\r
11947     return pool->abort_fn;\r
11948 }\r
11949 \r
11950 apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)\r
11951 {\r
11952 \r
11953 \r
11954 \r
11955 \r
11956 \r
11957 \r
11958 \r
11959     return pool->parent;\r
11960 }\r
11961 \r
11962 apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)\r
11963 {\r
11964     return pool->allocator;\r
11965 }\r
11966 \r
11967 \r
11968 \r
11969 \r
11970 int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)\r
11971 {\r
11972     if (a == ((void*)0))\r
11973         return 1;\r
11974 # 2108 "./../memory/unix/apr_pools.c"\r
11975     while (b) {\r
11976         if (a == b)\r
11977             return 1;\r
11978 \r
11979         b = b->parent;\r
11980     }\r
11981 \r
11982     return 0;\r
11983 }\r
11984 \r
11985 void apr_pool_tag(apr_pool_t *pool, const char *tag)\r
11986 {\r
11987     pool->tag = tag;\r
11988 }\r
11989 \r
11990 \r
11991 \r
11992 \r
11993 \r
11994 \r
11995 apr_status_t apr_pool_userdata_set(const void *data, const char *key,\r
11996                                                 apr_status_t (*cleanup) (void *),\r
11997                                                 apr_pool_t *pool)\r
11998 {\r
11999 \r
12000 \r
12001 \r
12002 \r
12003     if (pool->user_data == ((void*)0))\r
12004         pool->user_data = apr_hash_make(pool);\r
12005 \r
12006     if (apr_hash_get(pool->user_data, key, (-1)) == ((void*)0)) {\r
12007         char *new_key = apr_pstrdup(pool, key);\r
12008         apr_hash_set(pool->user_data, new_key, (-1), data);\r
12009     }\r
12010     else {\r
12011         apr_hash_set(pool->user_data, key, (-1), data);\r
12012     }\r
12013 \r
12014     if (cleanup)\r
12015         apr_pool_cleanup_register(pool, data, cleanup, cleanup);\r
12016 \r
12017     return 0;\r
12018 }\r
12019 \r
12020 apr_status_t apr_pool_userdata_setn(const void *data,\r
12021                               const char *key,\r
12022                               apr_status_t (*cleanup)(void *),\r
12023                               apr_pool_t *pool)\r
12024 {\r
12025 \r
12026 \r
12027 \r
12028 \r
12029     if (pool->user_data == ((void*)0))\r
12030         pool->user_data = apr_hash_make(pool);\r
12031 \r
12032     apr_hash_set(pool->user_data, key, (-1), data);\r
12033 \r
12034     if (cleanup)\r
12035         apr_pool_cleanup_register(pool, data, cleanup, cleanup);\r
12036 \r
12037     return 0;\r
12038 }\r
12039 \r
12040 apr_status_t apr_pool_userdata_get(void **data, const char *key,\r
12041                                                 apr_pool_t *pool)\r
12042 {\r
12043 \r
12044 \r
12045 \r
12046 \r
12047     if (pool->user_data == ((void*)0)) {\r
12048         *data = ((void*)0);\r
12049     }\r
12050     else {\r
12051         *data = apr_hash_get(pool->user_data, key, (-1));\r
12052     }\r
12053 \r
12054     return 0;\r
12055 }\r
12056 \r
12057 \r
12058 \r
12059 \r
12060 \r
12061 \r
12062 struct cleanup_t {\r
12063     struct cleanup_t *next;\r
12064     const void *data;\r
12065     apr_status_t (*plain_cleanup_fn)(void *data);\r
12066     apr_status_t (*child_cleanup_fn)(void *data);\r
12067 };\r
12068 \r
12069 void apr_pool_cleanup_register(apr_pool_t *p, const void *data,\r
12070                       apr_status_t (*plain_cleanup_fn)(void *data),\r
12071                       apr_status_t (*child_cleanup_fn)(void *data))\r
12072 {\r
12073     cleanup_t *c;\r
12074 \r
12075 \r
12076 \r
12077 \r
12078 \r
12079     if (p != ((void*)0)) {\r
12080         if (p->free_cleanups) {\r
12081 \r
12082             c = p->free_cleanups;\r
12083             p->free_cleanups = c->next;\r
12084         } else {\r
12085             c = apr_palloc(p, sizeof(cleanup_t));\r
12086         }\r
12087         c->data = data;\r
12088         c->plain_cleanup_fn = plain_cleanup_fn;\r
12089         c->child_cleanup_fn = child_cleanup_fn;\r
12090         c->next = p->cleanups;\r
12091         p->cleanups = c;\r
12092     }\r
12093 }\r
12094 \r
12095 void apr_pool_pre_cleanup_register(apr_pool_t *p, const void *data,\r
12096                       apr_status_t (*plain_cleanup_fn)(void *data))\r
12097 {\r
12098     cleanup_t *c;\r
12099 \r
12100 \r
12101 \r
12102 \r
12103 \r
12104     if (p != ((void*)0)) {\r
12105         if (p->free_cleanups) {\r
12106 \r
12107             c = p->free_cleanups;\r
12108             p->free_cleanups = c->next;\r
12109         } else {\r
12110             c = apr_palloc(p, sizeof(cleanup_t));\r
12111         }\r
12112         c->data = data;\r
12113         c->plain_cleanup_fn = plain_cleanup_fn;\r
12114         c->next = p->pre_cleanups;\r
12115         p->pre_cleanups = c;\r
12116     }\r
12117 }\r
12118 \r
12119 void apr_pool_cleanup_kill(apr_pool_t *p, const void *data,\r
12120                       apr_status_t (*cleanup_fn)(void *))\r
12121 {\r
12122     cleanup_t *c, **lastp;\r
12123 \r
12124 \r
12125 \r
12126 \r
12127 \r
12128     if (p == ((void*)0))\r
12129         return;\r
12130 \r
12131     c = p->cleanups;\r
12132     lastp = &p->cleanups;\r
12133     while (c) {\r
12134 # 2276 "./../memory/unix/apr_pools.c"\r
12135         if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {\r
12136             *lastp = c->next;\r
12137 \r
12138             c->next = p->free_cleanups;\r
12139             p->free_cleanups = c;\r
12140             break;\r
12141         }\r
12142 \r
12143         lastp = &c->next;\r
12144         c = c->next;\r
12145     }\r
12146 \r
12147 \r
12148     c = p->pre_cleanups;\r
12149     lastp = &p->pre_cleanups;\r
12150     while (c) {\r
12151 # 2301 "./../memory/unix/apr_pools.c"\r
12152         if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {\r
12153             *lastp = c->next;\r
12154 \r
12155             c->next = p->free_cleanups;\r
12156             p->free_cleanups = c;\r
12157             break;\r
12158         }\r
12159 \r
12160         lastp = &c->next;\r
12161         c = c->next;\r
12162     }\r
12163 \r
12164 }\r
12165 \r
12166 void apr_pool_child_cleanup_set(apr_pool_t *p, const void *data,\r
12167                       apr_status_t (*plain_cleanup_fn)(void *),\r
12168                       apr_status_t (*child_cleanup_fn)(void *))\r
12169 {\r
12170     cleanup_t *c;\r
12171 \r
12172 \r
12173 \r
12174 \r
12175 \r
12176     if (p == ((void*)0))\r
12177         return;\r
12178 \r
12179     c = p->cleanups;\r
12180     while (c) {\r
12181         if (c->data == data && c->plain_cleanup_fn == plain_cleanup_fn) {\r
12182             c->child_cleanup_fn = child_cleanup_fn;\r
12183             break;\r
12184         }\r
12185 \r
12186         c = c->next;\r
12187     }\r
12188 }\r
12189 \r
12190 apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data,\r
12191                               apr_status_t (*cleanup_fn)(void *))\r
12192 {\r
12193     apr_pool_cleanup_kill(p, data, cleanup_fn);\r
12194     return (*cleanup_fn)(data);\r
12195 }\r
12196 \r
12197 static void run_cleanups(cleanup_t **cref)\r
12198 {\r
12199     cleanup_t *c = *cref;\r
12200 \r
12201     while (c) {\r
12202         *cref = c->next;\r
12203         (*c->plain_cleanup_fn)((void *)c->data);\r
12204         c = *cref;\r
12205     }\r
12206 }\r
12207 \r
12208 \r
12209 \r
12210 static void run_child_cleanups(cleanup_t **cref)\r
12211 {\r
12212     cleanup_t *c = *cref;\r
12213 \r
12214     while (c) {\r
12215         *cref = c->next;\r
12216         (*c->child_cleanup_fn)((void *)c->data);\r
12217         c = *cref;\r
12218     }\r
12219 }\r
12220 \r
12221 static void cleanup_pool_for_exec(apr_pool_t *p)\r
12222 {\r
12223     run_child_cleanups(&p->cleanups);\r
12224 \r
12225     for (p = p->child; p; p = p->sibling)\r
12226         cleanup_pool_for_exec(p);\r
12227 }\r
12228 \r
12229 void apr_pool_cleanup_for_exec(void)\r
12230 {\r
12231     cleanup_pool_for_exec(global_pool);\r
12232 }\r
12233 # 2402 "./../memory/unix/apr_pools.c"\r
12234 apr_status_t apr_pool_cleanup_null(void *data)\r
12235 {\r
12236 \r
12237     return 0;\r
12238 }\r
12239 # 2415 "./../memory/unix/apr_pools.c"\r
12240 void apr_pool_note_subprocess(apr_pool_t *pool, apr_proc_t *proc,\r
12241                                            apr_kill_conditions_e how)\r
12242 {\r
12243     struct process_chain *pc = apr_palloc(pool, sizeof(struct process_chain));\r
12244 \r
12245     pc->proc = proc;\r
12246     pc->kill_how = how;\r
12247     pc->next = pool->subprocesses;\r
12248     pool->subprocesses = pc;\r
12249 }\r
12250 \r
12251 static void free_proc_chain(struct process_chain *procs)\r
12252 {\r
12253 \r
12254 \r
12255 \r
12256 \r
12257     struct process_chain *pc;\r
12258     int need_timeout = 0;\r
12259     apr_time_t timeout_interval;\r
12260 \r
12261     if (!procs)\r
12262         return;\r
12263 # 2448 "./../memory/unix/apr_pools.c"\r
12264     for (pc = procs; pc; pc = pc->next) {\r
12265         if (apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_NOWAIT) != ((20000 + 50000) + 6))\r
12266             pc->kill_how = APR_KILL_NEVER;\r
12267     }\r
12268 \r
12269 \r
12270     for (pc = procs; pc; pc = pc->next) {\r
12271 \r
12272         if ((pc->kill_how == APR_KILL_AFTER_TIMEOUT)\r
12273             || (pc->kill_how == APR_KILL_ONLY_ONCE)) {\r
12274 \r
12275 \r
12276 \r
12277 \r
12278 \r
12279 \r
12280             if (apr_proc_kill(pc->proc, 15) == 0)\r
12281                 need_timeout = 1;\r
12282         }\r
12283         else if (pc->kill_how == APR_KILL_ALWAYS) {\r
12284 \r
12285 \r
12286 \r
12287 \r
12288 \r
12289             apr_proc_kill(pc->proc, 9);\r
12290         }\r
12291     }\r
12292 \r
12293 \r
12294 \r
12295 \r
12296 \r
12297     if (need_timeout) {\r
12298         timeout_interval = 46875;\r
12299         apr_sleep(timeout_interval);\r
12300 \r
12301         do {\r
12302 \r
12303             need_timeout = 0;\r
12304             for (pc = procs; pc; pc = pc->next) {\r
12305                 if (pc->kill_how == APR_KILL_AFTER_TIMEOUT) {\r
12306                     if (apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_NOWAIT)\r
12307                             == ((20000 + 50000) + 6))\r
12308                         need_timeout = 1;\r
12309                     else\r
12310                         pc->kill_how = APR_KILL_NEVER;\r
12311                 }\r
12312             }\r
12313             if (need_timeout) {\r
12314                 if (timeout_interval >= 3000000) {\r
12315                     break;\r
12316                 }\r
12317                 apr_sleep(timeout_interval);\r
12318                 timeout_interval *= 2;\r
12319             }\r
12320         } while (need_timeout);\r
12321     }\r
12322 \r
12323 \r
12324 \r
12325 \r
12326 \r
12327     for (pc = procs; pc; pc = pc->next) {\r
12328         if (pc->kill_how == APR_KILL_AFTER_TIMEOUT)\r
12329             apr_proc_kill(pc->proc, 9);\r
12330     }\r
12331 \r
12332 \r
12333     for (pc = procs; pc; pc = pc->next) {\r
12334         if (pc->kill_how != APR_KILL_NEVER)\r
12335             (void)apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_WAIT);\r
12336     }\r
12337 }\r
12338 # 2530 "./../memory/unix/apr_pools.c"\r
12339 void * apr_palloc_debug(apr_pool_t *pool, apr_size_t size,\r
12340                                      const char *file_line)\r
12341 {\r
12342     return apr_palloc(pool, size);\r
12343 }\r
12344 \r
12345 void * apr_pcalloc_debug(apr_pool_t *pool, apr_size_t size,\r
12346                                       const char *file_line)\r
12347 {\r
12348     return apr_pcalloc(pool, size);\r
12349 }\r
12350 \r
12351 void apr_pool_clear_debug(apr_pool_t *pool,\r
12352                                        const char *file_line)\r
12353 {\r
12354     apr_pool_clear(pool);\r
12355 }\r
12356 \r
12357 void apr_pool_destroy_debug(apr_pool_t *pool,\r
12358                                          const char *file_line)\r
12359 {\r
12360     apr_pool_destroy(pool);\r
12361 }\r
12362 \r
12363 apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool,\r
12364                                                    apr_pool_t *parent,\r
12365                                                    apr_abortfunc_t abort_fn,\r
12366                                                    apr_allocator_t *allocator,\r
12367                                                    const char *file_line)\r
12368 {\r
12369     return apr_pool_create_ex(newpool, parent, abort_fn, allocator);\r
12370 }\r
12371 \r
12372 apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool,\r
12373                                                    apr_abortfunc_t abort_fn,\r
12374                                                    apr_allocator_t *allocator,\r
12375                                                    const char *file_line)\r
12376 {\r
12377     return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
12378 }\r
12379 \r
12380 apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,\r
12381                                                    apr_abortfunc_t abort_fn,\r
12382                                                    apr_allocator_t *allocator,\r
12383                                                    const char *file_line)\r
12384 {\r
12385     return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
12386 }\r
12387 # 15 "main1.c" 2\r
12388 # 1 "./../misc/unix/start.c" 1\r
12389 # 20 "./../misc/unix/start.c"\r
12390 # 1 "../include/apr_signal.h" 1\r
12391 # 57 "../include/apr_signal.h"\r
12392 typedef void apr_sigfunc_t(int);\r
12393 \r
12394 \r
12395 \r
12396 \r
12397 \r
12398 \r
12399 apr_sigfunc_t * apr_signal(int signo, apr_sigfunc_t * func);\r
12400 # 80 "../include/apr_signal.h"\r
12401 const char * apr_signal_description_get(int signum);\r
12402 \r
12403 \r
12404 \r
12405 \r
12406 \r
12407 \r
12408 void apr_signal_init(apr_pool_t *pglobal);\r
12409 \r
12410 \r
12411 \r
12412 \r
12413 \r
12414 \r
12415 apr_status_t apr_signal_block(int signum);\r
12416 \r
12417 \r
12418 \r
12419 \r
12420 \r
12421 \r
12422 apr_status_t apr_signal_unblock(int signum);\r
12423 # 21 "./../misc/unix/start.c" 2\r
12424 \r
12425 \r
12426 \r
12427 # 1 "../include/arch/unix/apr_arch_internal_time.h" 1\r
12428 # 22 "../include/arch/unix/apr_arch_internal_time.h"\r
12429 void apr_unix_setup_time(void);\r
12430 # 25 "./../misc/unix/start.c" 2\r
12431 \r
12432 \r
12433 apr_status_t apr_app_initialize(int *argc,\r
12434                                              const char * const * *argv,\r
12435                                              const char * const * *env)\r
12436 {\r
12437 \r
12438 \r
12439 \r
12440 \r
12441 \r
12442     return apr_initialize();\r
12443 }\r
12444 \r
12445 static int initialized = 0;\r
12446 \r
12447 apr_status_t apr_initialize(void)\r
12448 {\r
12449     apr_pool_t *pool;\r
12450     apr_status_t status;\r
12451 \r
12452     if (initialized++) {\r
12453         return 0;\r
12454     }\r
12455 \r
12456 \r
12457     apr_proc_mutex_unix_setup_lock();\r
12458     apr_unix_setup_time();\r
12459 \r
12460 \r
12461     if ((status = apr_pool_initialize()) != 0)\r
12462         return status;\r
12463 \r
12464     if (apr_pool_create_ex(&pool, ((void*)0), ((void*)0), ((void*)0)) != 0) {\r
12465         return (20000 + 2);\r
12466     }\r
12467 \r
12468     apr_pool_tag(pool, "apr_initialize");\r
12469 # 71 "./../misc/unix/start.c"\r
12470     apr_signal_init(pool);\r
12471 \r
12472     return 0;\r
12473 }\r
12474 \r
12475 void apr_terminate(void)\r
12476 {\r
12477     initialized--;\r
12478     if (initialized) {\r
12479         return;\r
12480     }\r
12481     apr_pool_terminate();\r
12482 \r
12483 }\r
12484 \r
12485 void apr_terminate2(void)\r
12486 {\r
12487     apr_terminate();\r
12488 }\r
12489 # 16 "main1.c" 2\r
12490 # 1 "./../time/unix/time.c" 1\r
12491 # 43 "./../time/unix/time.c"\r
12492 static apr_int32_t get_offset(struct tm *tm)\r
12493 {\r
12494 \r
12495     return tm->tm_gmtoff;\r
12496 # 64 "./../time/unix/time.c"\r
12497 }\r
12498 \r
12499 apr_status_t apr_time_ansi_put(apr_time_t *result,\r
12500                                             time_t input)\r
12501 {\r
12502     *result = (apr_time_t)input * 1000000L;\r
12503     return 0;\r
12504 }\r
12505 \r
12506 \r
12507 apr_time_t apr_time_now(void)\r
12508 {\r
12509     struct timeval tv;\r
12510     gettimeofday(&tv, ((void*)0));\r
12511     return tv.tv_sec * 1000000L + tv.tv_usec;\r
12512 }\r
12513 \r
12514 static void explode_time(apr_time_exp_t *xt, apr_time_t t,\r
12515                          apr_int32_t offset, int use_localtime)\r
12516 {\r
12517     struct tm tm;\r
12518     time_t tt = (t / 1000000L) + offset;\r
12519     xt->tm_usec = t % 1000000L;\r
12520 \r
12521 \r
12522     if (use_localtime)\r
12523         localtime_r(&tt, &tm);\r
12524     else\r
12525         gmtime_r(&tt, &tm);\r
12526 \r
12527 \r
12528 \r
12529 \r
12530 \r
12531 \r
12532 \r
12533     xt->tm_sec = tm.tm_sec;\r
12534     xt->tm_min = tm.tm_min;\r
12535     xt->tm_hour = tm.tm_hour;\r
12536     xt->tm_mday = tm.tm_mday;\r
12537     xt->tm_mon = tm.tm_mon;\r
12538     xt->tm_year = tm.tm_year;\r
12539     xt->tm_wday = tm.tm_wday;\r
12540     xt->tm_yday = tm.tm_yday;\r
12541     xt->tm_isdst = tm.tm_isdst;\r
12542     xt->tm_gmtoff = get_offset(&tm);\r
12543 }\r
12544 \r
12545 apr_status_t apr_time_exp_tz(apr_time_exp_t *result,\r
12546                                           apr_time_t input, apr_int32_t offs)\r
12547 {\r
12548     explode_time(result, input, offs, 0);\r
12549     result->tm_gmtoff = offs;\r
12550     return 0;\r
12551 }\r
12552 \r
12553 apr_status_t apr_time_exp_gmt(apr_time_exp_t *result,\r
12554                                            apr_time_t input)\r
12555 {\r
12556     return apr_time_exp_tz(result, input, 0);\r
12557 }\r
12558 \r
12559 apr_status_t apr_time_exp_lt(apr_time_exp_t *result,\r
12560                                                 apr_time_t input)\r
12561 {\r
12562 \r
12563 \r
12564 \r
12565 \r
12566     explode_time(result, input, 0, 1);\r
12567     return 0;\r
12568 \r
12569 }\r
12570 \r
12571 apr_status_t apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt)\r
12572 {\r
12573     apr_time_t year = xt->tm_year;\r
12574     apr_time_t days;\r
12575     static const int dayoffset[12] =\r
12576     {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};\r
12577 \r
12578 \r
12579 \r
12580     if (xt->tm_mon < 2)\r
12581         year--;\r
12582 \r
12583 \r
12584 \r
12585     days = year * 365 + year / 4 - year / 100 + (year / 100 + 3) / 4;\r
12586     days += dayoffset[xt->tm_mon] + xt->tm_mday - 1;\r
12587     days -= 25508;\r
12588     days = ((days * 24 + xt->tm_hour) * 60 + xt->tm_min) * 60 + xt->tm_sec;\r
12589 \r
12590     if (days < 0) {\r
12591         return (20000 + 4);\r
12592     }\r
12593     *t = days * 1000000L + xt->tm_usec;\r
12594     return 0;\r
12595 }\r
12596 \r
12597 apr_status_t apr_time_exp_gmt_get(apr_time_t *t,\r
12598                                                apr_time_exp_t *xt)\r
12599 {\r
12600     apr_status_t status = apr_time_exp_get(t, xt);\r
12601     if (status == 0)\r
12602         *t -= (apr_time_t) xt->tm_gmtoff * 1000000L;\r
12603     return status;\r
12604 }\r
12605 \r
12606 apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime,\r
12607                                               apr_time_t *aprtime)\r
12608 {\r
12609     (*ostime)->tv_usec = *aprtime % 1000000L;\r
12610     (*ostime)->tv_sec = *aprtime / 1000000L;\r
12611     return 0;\r
12612 }\r
12613 \r
12614 apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,\r
12615                                               apr_time_exp_t *aprtime)\r
12616 {\r
12617     (*ostime)->tm_sec = aprtime->tm_sec;\r
12618     (*ostime)->tm_min = aprtime->tm_min;\r
12619     (*ostime)->tm_hour = aprtime->tm_hour;\r
12620     (*ostime)->tm_mday = aprtime->tm_mday;\r
12621     (*ostime)->tm_mon = aprtime->tm_mon;\r
12622     (*ostime)->tm_year = aprtime->tm_year;\r
12623     (*ostime)->tm_wday = aprtime->tm_wday;\r
12624     (*ostime)->tm_yday = aprtime->tm_yday;\r
12625     (*ostime)->tm_isdst = aprtime->tm_isdst;\r
12626 \r
12627 \r
12628     (*ostime)->tm_gmtoff = aprtime->tm_gmtoff;\r
12629 \r
12630 \r
12631 \r
12632 \r
12633     return 0;\r
12634 }\r
12635 \r
12636 apr_status_t apr_os_imp_time_put(apr_time_t *aprtime,\r
12637                                               apr_os_imp_time_t **ostime,\r
12638                                               apr_pool_t *cont)\r
12639 {\r
12640     *aprtime = (*ostime)->tv_sec * 1000000L + (*ostime)->tv_usec;\r
12641     return 0;\r
12642 }\r
12643 \r
12644 apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime,\r
12645                                               apr_os_exp_time_t **ostime,\r
12646                                               apr_pool_t *cont)\r
12647 {\r
12648     aprtime->tm_sec = (*ostime)->tm_sec;\r
12649     aprtime->tm_min = (*ostime)->tm_min;\r
12650     aprtime->tm_hour = (*ostime)->tm_hour;\r
12651     aprtime->tm_mday = (*ostime)->tm_mday;\r
12652     aprtime->tm_mon = (*ostime)->tm_mon;\r
12653     aprtime->tm_year = (*ostime)->tm_year;\r
12654     aprtime->tm_wday = (*ostime)->tm_wday;\r
12655     aprtime->tm_yday = (*ostime)->tm_yday;\r
12656     aprtime->tm_isdst = (*ostime)->tm_isdst;\r
12657 \r
12658 \r
12659     aprtime->tm_gmtoff = (*ostime)->tm_gmtoff;\r
12660 \r
12661 \r
12662 \r
12663 \r
12664     return 0;\r
12665 }\r
12666 \r
12667 void apr_sleep(apr_interval_time_t t)\r
12668 {\r
12669 \r
12670 \r
12671 \r
12672 \r
12673 \r
12674 \r
12675 \r
12676     struct timeval tv;\r
12677     tv.tv_usec = t % 1000000L;\r
12678     tv.tv_sec = t / 1000000L;\r
12679     select(0, ((void*)0), ((void*)0), ((void*)0), &tv);\r
12680 \r
12681 }\r
12682 # 296 "./../time/unix/time.c"\r
12683 void apr_unix_setup_time(void)\r
12684 {\r
12685 # 339 "./../time/unix/time.c"\r
12686 }\r
12687 \r
12688 \r
12689 \r
12690 \r
12691 void apr_time_clock_hires(apr_pool_t *p)\r
12692 {\r
12693     return;\r
12694 }\r
12695 # 17 "main1.c" 2\r
12696 # 1 "./../atomic/unix/builtins.c" 1\r
12697 # 17 "./../atomic/unix/builtins.c"\r
12698 # 1 "../include/arch/unix/apr_arch_atomic.h" 1\r
12699 # 18 "./../atomic/unix/builtins.c" 2\r
12700 \r
12701 \r
12702 \r
12703 apr_status_t apr_atomic_init(apr_pool_t *p)\r
12704 {\r
12705     return 0;\r
12706 }\r
12707 \r
12708 apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem)\r
12709 {\r
12710     return *mem;\r
12711 }\r
12712 \r
12713 void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
12714 {\r
12715     *mem = val;\r
12716 }\r
12717 \r
12718 apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
12719 {\r
12720     return __sync_fetch_and_add(mem, val);\r
12721 }\r
12722 \r
12723 void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
12724 {\r
12725     __sync_fetch_and_sub(mem, val);\r
12726 }\r
12727 \r
12728 apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)\r
12729 {\r
12730     return __sync_fetch_and_add(mem, 1);\r
12731 }\r
12732 \r
12733 int apr_atomic_dec32(volatile apr_uint32_t *mem)\r
12734 {\r
12735     return __sync_sub_and_fetch(mem, 1);\r
12736 }\r
12737 \r
12738 apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,\r
12739                                            apr_uint32_t cmp)\r
12740 {\r
12741     return __sync_val_compare_and_swap(mem, cmp, with);\r
12742 }\r
12743 \r
12744 apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
12745 {\r
12746     __sync_synchronize();\r
12747 \r
12748     return __sync_lock_test_and_set(mem, val);\r
12749 }\r
12750 \r
12751 void* apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)\r
12752 {\r
12753     return (void*) __sync_val_compare_and_swap(mem, cmp, with);\r
12754 }\r
12755 \r
12756 void* apr_atomic_xchgptr(volatile void **mem, void *with)\r
12757 {\r
12758     __sync_synchronize();\r
12759 \r
12760     return (void*) __sync_lock_test_and_set(mem, with);\r
12761 }\r
12762 # 18 "main1.c" 2\r
12763 # 1 "./../threadproc/unix/signals.c" 1\r
12764 # 18 "./../threadproc/unix/signals.c"\r
12765 # 1 "../include/arch/unix/apr_arch_threadproc.h" 1\r
12766 # 55 "../include/arch/unix/apr_arch_threadproc.h"\r
12767 struct apr_thread_t {\r
12768     apr_pool_t *pool;\r
12769     pthread_t *td;\r
12770     void *data;\r
12771     apr_thread_start_t func;\r
12772     apr_status_t exitval;\r
12773 };\r
12774 \r
12775 struct apr_threadattr_t {\r
12776     apr_pool_t *pool;\r
12777     pthread_attr_t attr;\r
12778 };\r
12779 \r
12780 struct apr_threadkey_t {\r
12781     apr_pool_t *pool;\r
12782     pthread_key_t key;\r
12783 };\r
12784 \r
12785 struct apr_thread_once_t {\r
12786     pthread_once_t once;\r
12787 };\r
12788 \r
12789 \r
12790 \r
12791 struct apr_procattr_t {\r
12792     apr_pool_t *pool;\r
12793     apr_file_t *parent_in;\r
12794     apr_file_t *child_in;\r
12795     apr_file_t *parent_out;\r
12796     apr_file_t *child_out;\r
12797     apr_file_t *parent_err;\r
12798     apr_file_t *child_err;\r
12799     char *currdir;\r
12800     apr_int32_t cmdtype;\r
12801     apr_int32_t detached;\r
12802 \r
12803     struct rlimit *limit_cpu;\r
12804 \r
12805 \r
12806     struct rlimit *limit_mem;\r
12807 \r
12808 \r
12809     struct rlimit *limit_nproc;\r
12810 \r
12811 \r
12812     struct rlimit *limit_nofile;\r
12813 \r
12814     apr_child_errfn_t *errfn;\r
12815     apr_int32_t errchk;\r
12816     apr_uid_t uid;\r
12817     apr_gid_t gid;\r
12818 };\r
12819 # 19 "./../threadproc/unix/signals.c" 2\r
12820 \r
12821 \r
12822 \r
12823 \r
12824 \r
12825 # 1 "/usr/include/assert.h" 1 3 4\r
12826 # 25 "./../threadproc/unix/signals.c" 2\r
12827 # 35 "./../threadproc/unix/signals.c"\r
12828 apr_status_t apr_proc_kill(apr_proc_t *proc, int signum)\r
12829 {\r
12830 # 48 "./../threadproc/unix/signals.c"\r
12831     if (kill(proc->pid, signum) == -1) {\r
12832         return (*__errno_location ());\r
12833     }\r
12834 \r
12835     return 0;\r
12836 }\r
12837 # 74 "./../threadproc/unix/signals.c"\r
12838 apr_sigfunc_t * apr_signal(int signo, apr_sigfunc_t * func)\r
12839 {\r
12840     struct sigaction act, oact;\r
12841 \r
12842     act.__sigaction_handler.sa_handler = func;\r
12843     sigemptyset(&act.sa_mask);\r
12844     act.sa_flags = 0;\r
12845 \r
12846     act.sa_flags |= 0x20000000;\r
12847 # 103 "./../threadproc/unix/signals.c"\r
12848     if (sigaction(signo, &act, &oact) < 0)\r
12849         return ((__sighandler_t) -1);\r
12850     return oact.__sigaction_handler.sa_handler;\r
12851 }\r
12852 \r
12853 \r
12854 \r
12855 \r
12856 \r
12857 \r
12858 \r
12859 void apr_signal_init(apr_pool_t *pglobal)\r
12860 {\r
12861 }\r
12862 const char *apr_signal_description_get(int signum)\r
12863 {\r
12864     return (signum >= 0) ? sys_siglist[signum] : "unknown signal (number)";\r
12865 }\r
12866 # 274 "./../threadproc/unix/signals.c"\r
12867 static void remove_sync_sigs(sigset_t *sig_mask)\r
12868 {\r
12869 \r
12870     sigdelset(sig_mask, 6);\r
12871 \r
12872 \r
12873     sigdelset(sig_mask, 7);\r
12874 \r
12875 \r
12876 \r
12877 \r
12878 \r
12879     sigdelset(sig_mask, 8);\r
12880 \r
12881 \r
12882     sigdelset(sig_mask, 4);\r
12883 \r
12884 \r
12885     sigdelset(sig_mask, 6);\r
12886 \r
12887 \r
12888     sigdelset(sig_mask, 13);\r
12889 \r
12890 \r
12891     sigdelset(sig_mask, 11);\r
12892 \r
12893 \r
12894     sigdelset(sig_mask, 31);\r
12895 \r
12896 \r
12897     sigdelset(sig_mask, 5);\r
12898 # 315 "./../threadproc/unix/signals.c"\r
12899     sigdelset(sig_mask, 12);\r
12900 \r
12901 }\r
12902 \r
12903 apr_status_t apr_signal_thread(int(*signal_handler)(int signum))\r
12904 {\r
12905     sigset_t sig_mask;\r
12906 \r
12907     int (*sig_func)(int signum) = (int (*)(int))signal_handler;\r
12908 \r
12909 \r
12910 \r
12911     sigfillset(&sig_mask);\r
12912 \r
12913 \r
12914 \r
12915 \r
12916 \r
12917 \r
12918     sigdelset(&sig_mask, 9);\r
12919 \r
12920 \r
12921     sigdelset(&sig_mask, 19);\r
12922 \r
12923 \r
12924     sigdelset(&sig_mask, 18);\r
12925 \r
12926 \r
12927 \r
12928 \r
12929 \r
12930 \r
12931     remove_sync_sigs(&sig_mask);\r
12932 # 379 "./../threadproc/unix/signals.c"\r
12933     while (1) {\r
12934 \r
12935         int signal_received;\r
12936 \r
12937         if (sigwait((&sig_mask),(&signal_received)) != 0)\r
12938         {\r
12939 \r
12940         }\r
12941 \r
12942         if (sig_func(signal_received) == 1) {\r
12943             return 0;\r
12944         }\r
12945 \r
12946 \r
12947 \r
12948 \r
12949 \r
12950     }\r
12951 }\r
12952 \r
12953 apr_status_t apr_setup_signal_thread(void)\r
12954 {\r
12955     sigset_t sig_mask;\r
12956     int rv;\r
12957 # 416 "./../threadproc/unix/signals.c"\r
12958     sigfillset(&sig_mask);\r
12959     remove_sync_sigs(&sig_mask);\r
12960 \r
12961 \r
12962 \r
12963 \r
12964 \r
12965 \r
12966     if ((rv = pthread_sigmask(2, &sig_mask, ((void*)0))) != 0) {\r
12967 \r
12968 \r
12969 \r
12970     }\r
12971 \r
12972     return rv;\r
12973 }\r
12974 \r
12975 \r
12976 \r
12977 apr_status_t apr_signal_block(int signum)\r
12978 {\r
12979 \r
12980     sigset_t sig_mask;\r
12981     int rv;\r
12982 \r
12983     sigemptyset(&sig_mask);\r
12984 \r
12985     sigaddset(&sig_mask, signum);\r
12986 \r
12987 \r
12988 \r
12989 \r
12990 \r
12991 \r
12992     if ((rv = pthread_sigmask(0, &sig_mask, ((void*)0))) != 0) {\r
12993 \r
12994 \r
12995 \r
12996     }\r
12997 \r
12998     return rv;\r
12999 \r
13000 \r
13001 \r
13002 }\r
13003 \r
13004 apr_status_t apr_signal_unblock(int signum)\r
13005 {\r
13006 \r
13007     sigset_t sig_mask;\r
13008     int rv;\r
13009 \r
13010     sigemptyset(&sig_mask);\r
13011 \r
13012     sigaddset(&sig_mask, signum);\r
13013 \r
13014 \r
13015 \r
13016 \r
13017 \r
13018 \r
13019     if ((rv = pthread_sigmask(1, &sig_mask, ((void*)0))) != 0) {\r
13020 \r
13021 \r
13022 \r
13023     }\r
13024 \r
13025     return rv;\r
13026 \r
13027 \r
13028 \r
13029 }\r
13030 # 19 "main1.c" 2\r
13031 # 1 "./../threadproc/unix/thread.c" 1\r
13032 # 19 "./../threadproc/unix/thread.c"\r
13033 # 1 "../include/arch/unix/apr_arch_threadproc.h" 1\r
13034 # 20 "./../threadproc/unix/thread.c" 2\r
13035 \r
13036 \r
13037 \r
13038 \r
13039 \r
13040 \r
13041 static apr_status_t threadattr_cleanup(void *data)\r
13042 {\r
13043     apr_threadattr_t *attr = data;\r
13044     apr_status_t rv;\r
13045 \r
13046     rv = pthread_attr_destroy(&attr->attr);\r
13047 \r
13048 \r
13049 \r
13050 \r
13051 \r
13052     return rv;\r
13053 }\r
13054 \r
13055 apr_status_t apr_threadattr_create(apr_threadattr_t **new,\r
13056                                                 apr_pool_t *pool)\r
13057 {\r
13058     apr_status_t stat;\r
13059 \r
13060     (*new) = apr_palloc(pool, sizeof(apr_threadattr_t));\r
13061     (*new)->pool = pool;\r
13062     stat = pthread_attr_init(&(*new)->attr);\r
13063 \r
13064     if (stat == 0) {\r
13065         apr_pool_cleanup_register(pool, *new, threadattr_cleanup,\r
13066                                   apr_pool_cleanup_null);\r
13067         return 0;\r
13068     }\r
13069 \r
13070 \r
13071 \r
13072 \r
13073     return stat;\r
13074 }\r
13075 \r
13076 \r
13077 \r
13078 \r
13079 \r
13080 \r
13081 \r
13082 apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,\r
13083                                                     apr_int32_t on)\r
13084 {\r
13085     apr_status_t stat;\r
13086 \r
13087 \r
13088 \r
13089 \r
13090 \r
13091     if ((stat = pthread_attr_setdetachstate(&attr->attr,\r
13092                                             ((on) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE))) == 0) {\r
13093 \r
13094         return 0;\r
13095     }\r
13096     else {\r
13097 \r
13098 \r
13099 \r
13100 \r
13101         return stat;\r
13102     }\r
13103 }\r
13104 \r
13105 apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)\r
13106 {\r
13107     int state;\r
13108 \r
13109 \r
13110 \r
13111 \r
13112     pthread_attr_getdetachstate(&attr->attr, &state);\r
13113 \r
13114     if (state == ((1) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE))\r
13115         return ((20000 + 50000) + 3);\r
13116     return ((20000 + 50000) + 4);\r
13117 }\r
13118 \r
13119 apr_status_t apr_threadattr_stacksize_set(apr_threadattr_t *attr,\r
13120                                                        apr_size_t stacksize)\r
13121 {\r
13122     int stat;\r
13123 \r
13124     stat = pthread_attr_setstacksize(&attr->attr, stacksize);\r
13125     if (stat == 0) {\r
13126         return 0;\r
13127     }\r
13128 \r
13129 \r
13130 \r
13131 \r
13132     return stat;\r
13133 }\r
13134 \r
13135 apr_status_t apr_threadattr_guardsize_set(apr_threadattr_t *attr,\r
13136                                                        apr_size_t size)\r
13137 {\r
13138 \r
13139     apr_status_t rv;\r
13140 \r
13141     rv = pthread_attr_setguardsize(&attr->attr, size);\r
13142     if (rv == 0) {\r
13143         return 0;\r
13144     }\r
13145 \r
13146 \r
13147 \r
13148     return rv;\r
13149 \r
13150 \r
13151 \r
13152 }\r
13153 \r
13154 static void *dummy_worker(void *opaque)\r
13155 {\r
13156     apr_thread_t *thread = (apr_thread_t*)opaque;\r
13157     return thread->func(thread, thread->data);\r
13158 }\r
13159 \r
13160 apr_status_t apr_thread_create(apr_thread_t **new,\r
13161                                             apr_threadattr_t *attr,\r
13162                                             apr_thread_start_t func,\r
13163                                             void *data,\r
13164                                             apr_pool_t *pool)\r
13165 {\r
13166     apr_status_t stat;\r
13167     pthread_attr_t *temp;\r
13168 \r
13169     (*new) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));\r
13170 \r
13171     if ((*new) == ((void*)0)) {\r
13172         return 12;\r
13173     }\r
13174 \r
13175     (*new)->td = (pthread_t *)apr_pcalloc(pool, sizeof(pthread_t));\r
13176 \r
13177     if ((*new)->td == ((void*)0)) {\r
13178         return 12;\r
13179     }\r
13180 \r
13181     (*new)->data = data;\r
13182     (*new)->func = func;\r
13183 \r
13184     if (attr)\r
13185         temp = &attr->attr;\r
13186     else\r
13187         temp = ((void*)0);\r
13188 \r
13189     stat = apr_pool_create_ex(&(*new)->pool, pool, ((void*)0), ((void*)0));\r
13190     if (stat != 0) {\r
13191         return stat;\r
13192     }\r
13193 \r
13194     if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {\r
13195         return 0;\r
13196     }\r
13197     else {\r
13198 \r
13199 \r
13200 \r
13201 \r
13202         return stat;\r
13203     }\r
13204 }\r
13205 \r
13206 apr_os_thread_t apr_os_thread_current(void)\r
13207 {\r
13208     return pthread_self();\r
13209 }\r
13210 \r
13211 int apr_os_thread_equal(apr_os_thread_t tid1,\r
13212                                      apr_os_thread_t tid2)\r
13213 {\r
13214     return pthread_equal(tid1, tid2);\r
13215 }\r
13216 \r
13217 apr_status_t apr_thread_exit(apr_thread_t *thd,\r
13218                                           apr_status_t retval)\r
13219 {\r
13220     thd->exitval = retval;\r
13221     apr_pool_destroy(thd->pool);\r
13222     pthread_exit(((void*)0));\r
13223     return 0;\r
13224 }\r
13225 \r
13226 apr_status_t apr_thread_join(apr_status_t *retval,\r
13227                                           apr_thread_t *thd)\r
13228 {\r
13229     apr_status_t stat;\r
13230     apr_status_t *thread_stat;\r
13231 \r
13232     if ((stat = pthread_join(*thd->td,(void *)&thread_stat)) == 0) {\r
13233         *retval = thd->exitval;\r
13234         return 0;\r
13235     }\r
13236     else {\r
13237 \r
13238 \r
13239 \r
13240 \r
13241         return stat;\r
13242     }\r
13243 }\r
13244 \r
13245 apr_status_t apr_thread_detach(apr_thread_t *thd)\r
13246 {\r
13247     apr_status_t stat;\r
13248 \r
13249 \r
13250 \r
13251 \r
13252     if ((stat = pthread_detach(*thd->td)) == 0) {\r
13253 \r
13254 \r
13255         return 0;\r
13256     }\r
13257     else {\r
13258 \r
13259 \r
13260 \r
13261 \r
13262         return stat;\r
13263     }\r
13264 }\r
13265 \r
13266 void apr_thread_yield(void)\r
13267 {\r
13268 \r
13269 \r
13270 \r
13271 \r
13272     pthread_yield();\r
13273 \r
13274 \r
13275 \r
13276 \r
13277 \r
13278 \r
13279 }\r
13280 \r
13281 apr_status_t apr_thread_data_get(void **data, const char *key,\r
13282                                               apr_thread_t *thread)\r
13283 {\r
13284     return apr_pool_userdata_get(data, key, thread->pool);\r
13285 }\r
13286 \r
13287 apr_status_t apr_thread_data_set(void *data, const char *key,\r
13288                               apr_status_t (*cleanup)(void *),\r
13289                               apr_thread_t *thread)\r
13290 {\r
13291     return apr_pool_userdata_set(data, key, cleanup, thread->pool);\r
13292 }\r
13293 \r
13294 apr_status_t apr_os_thread_get(apr_os_thread_t **thethd,\r
13295                                             apr_thread_t *thd)\r
13296 {\r
13297     *thethd = thd->td;\r
13298     return 0;\r
13299 }\r
13300 \r
13301 apr_status_t apr_os_thread_put(apr_thread_t **thd,\r
13302                                             apr_os_thread_t *thethd,\r
13303                                             apr_pool_t *pool)\r
13304 {\r
13305     if (pool == ((void*)0)) {\r
13306         return (20000 + 2);\r
13307     }\r
13308 \r
13309     if ((*thd) == ((void*)0)) {\r
13310         (*thd) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));\r
13311         (*thd)->pool = pool;\r
13312     }\r
13313 \r
13314     (*thd)->td = thethd;\r
13315     return 0;\r
13316 }\r
13317 \r
13318 apr_status_t apr_thread_once_init(apr_thread_once_t **control,\r
13319                                                apr_pool_t *p)\r
13320 {\r
13321     static const pthread_once_t once_init = 0;\r
13322 \r
13323     *control = apr_palloc(p, sizeof(**control));\r
13324     (*control)->once = once_init;\r
13325     return 0;\r
13326 }\r
13327 \r
13328 apr_status_t apr_thread_once(apr_thread_once_t *control,\r
13329                                           void (*func)(void))\r
13330 {\r
13331     return pthread_once(&control->once, func);\r
13332 }\r
13333 \r
13334 apr_pool_t * apr_thread_pool_get (const apr_thread_t *thethread) { return thethread->pool; }\r
13335 # 20 "main1.c" 2\r
13336 # 1 "./../test/abts.c" 1\r
13337 # 17 "./../test/abts.c"\r
13338 # 1 "./../test/abts.h" 1\r
13339 # 18 "./../test/abts.c" 2\r
13340 # 1 "./../test/abts_tests.h" 1\r
13341 # 20 "./../test/abts_tests.h"\r
13342 # 1 "./../test/abts.h" 1\r
13343 # 21 "./../test/abts_tests.h" 2\r
13344 # 1 "./../test/testutil.h" 1\r
13345 # 19 "./../test/testutil.h"\r
13346 # 1 "./../test/abts.h" 1\r
13347 # 20 "./../test/testutil.h" 2\r
13348 # 22 "./../test/abts_tests.h" 2\r
13349 \r
13350 const struct testlist {\r
13351     abts_suite *(*func)(abts_suite *suite);\r
13352 } alltests[] = {\r
13353     {testatomic},\r
13354     {testdir},\r
13355     {testdso},\r
13356     {testdup},\r
13357     {testenv},\r
13358     {testescape},\r
13359     {testfile},\r
13360     {testfilecopy},\r
13361     {testfileinfo},\r
13362     {testflock},\r
13363     {testfmt},\r
13364     {testfnmatch},\r
13365     {testgetopt},\r
13366 \r
13367 \r
13368 \r
13369     {testhash},\r
13370     {testipsub},\r
13371     {testlock},\r
13372     {testcond},\r
13373     {testlfs},\r
13374     {testmmap},\r
13375     {testnames},\r
13376     {testoc},\r
13377     {testpath},\r
13378     {testpipe},\r
13379     {testpoll},\r
13380     {testpool},\r
13381     {testproc},\r
13382     {testprocmutex},\r
13383     {testrand},\r
13384     {testsleep},\r
13385     {testshm},\r
13386     {testsock},\r
13387     {testsockets},\r
13388     {testsockopt},\r
13389     {teststr},\r
13390     {teststrnatcmp},\r
13391     {testtable},\r
13392     {testtemp},\r
13393     {testthread},\r
13394     {testtime},\r
13395     {testud},\r
13396     {testuser},\r
13397     {testvsn}\r
13398 };\r
13399 # 19 "./../test/abts.c" 2\r
13400 # 1 "./../test/testutil.h" 1\r
13401 # 19 "./../test/testutil.h"\r
13402 # 1 "./../test/abts.h" 1\r
13403 # 20 "./../test/testutil.h" 2\r
13404 # 20 "./../test/abts.c" 2\r
13405 \r
13406 \r
13407 static char status[6] = {'|', '/', '-', '|', '\\', '-'};\r
13408 static int curr_char;\r
13409 static int verbose = 0;\r
13410 static int exclude = 0;\r
13411 static int quiet = 0;\r
13412 static int list_tests = 0;\r
13413 \r
13414 const char **testlist = ((void*)0);\r
13415 \r
13416 static int find_test_name(const char *testname) {\r
13417     int i;\r
13418     for (i = 0; testlist[i] != ((void*)0); i++) {\r
13419         if (!strcmp(testlist[i], testname)) {\r
13420             return 1;\r
13421         }\r
13422     }\r
13423     return 0;\r
13424 }\r
13425 \r
13426 \r
13427 static int should_test_run(const char *testname) {\r
13428     int found = 0;\r
13429     if (list_tests == 1) {\r
13430         return 0;\r
13431     }\r
13432     if (testlist == ((void*)0)) {\r
13433         return 1;\r
13434     }\r
13435     found = find_test_name(testname);\r
13436     if ((found && !exclude) || (!found && exclude)) {\r
13437         return 1;\r
13438     }\r
13439     return 0;\r
13440 }\r
13441 \r
13442 static void reset_status(void)\r
13443 {\r
13444     curr_char = 0;\r
13445 }\r
13446 \r
13447 static void update_status(void)\r
13448 {\r
13449     if (!quiet) {\r
13450         curr_char = (curr_char + 1) % 6;\r
13451         fprintf(stdout, "\b%c", status[curr_char]);\r
13452         fflush(stdout);\r
13453     }\r
13454 }\r
13455 \r
13456 static void end_suite(abts_suite *suite)\r
13457 {\r
13458     if (suite != ((void*)0)) {\r
13459         sub_suite *last = suite->tail;\r
13460         if (!quiet) {\r
13461             fprintf(stdout, "\b");\r
13462             fflush(stdout);\r
13463         }\r
13464         if (last->failed == 0) {\r
13465             fprintf(stdout, "SUCCESS\n");\r
13466             fflush(stdout);\r
13467         }\r
13468         else {\r
13469             fprintf(stdout, "FAILED %d of %d\n", last->failed, last->num_test);\r
13470             fflush(stdout);\r
13471         }\r
13472     }\r
13473 }\r
13474 \r
13475 abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full)\r
13476 {\r
13477     sub_suite *subsuite;\r
13478     char *p;\r
13479     const char *suite_name;\r
13480     curr_char = 0;\r
13481 \r
13482 \r
13483     if (suite && suite->tail &&!suite->tail->not_run) {\r
13484         end_suite(suite);\r
13485     }\r
13486 \r
13487     subsuite = malloc(sizeof(*subsuite));\r
13488     subsuite->num_test = 0;\r
13489     subsuite->failed = 0;\r
13490     subsuite->next = ((void*)0);\r
13491 \r
13492 \r
13493     suite_name = strrchr(suite_name_full, '/');\r
13494     if (!suite_name) {\r
13495         suite_name = strrchr(suite_name_full, '\\');\r
13496     }\r
13497     if (suite_name) {\r
13498         suite_name++;\r
13499     } else {\r
13500         suite_name = suite_name_full;\r
13501     }\r
13502     p = strrchr(suite_name, '.');\r
13503     if (p) {\r
13504         subsuite->name = memcpy(calloc(p - suite_name + 1, 1),\r
13505                                 suite_name, p - suite_name);\r
13506     }\r
13507     else {\r
13508         subsuite->name = suite_name;\r
13509     }\r
13510 \r
13511     if (list_tests) {\r
13512         fprintf(stdout, "%s\n", subsuite->name);\r
13513     }\r
13514 \r
13515     subsuite->not_run = 0;\r
13516 \r
13517     if (suite == ((void*)0)) {\r
13518         suite = malloc(sizeof(*suite));\r
13519         suite->head = subsuite;\r
13520         suite->tail = subsuite;\r
13521     }\r
13522     else {\r
13523         suite->tail->next = subsuite;\r
13524         suite->tail = subsuite;\r
13525     }\r
13526 \r
13527     if (!should_test_run(subsuite->name)) {\r
13528         subsuite->not_run = 1;\r
13529         return suite;\r
13530     }\r
13531 \r
13532     reset_status();\r
13533     fprintf(stdout, "%-20s:  ", subsuite->name);\r
13534     update_status();\r
13535     fflush(stdout);\r
13536 \r
13537     return suite;\r
13538 }\r
13539 \r
13540 void abts_run_test(abts_suite *ts, test_func f, void *value)\r
13541 {\r
13542     abts_case tc;\r
13543     sub_suite *ss;\r
13544 \r
13545     if (!should_test_run(ts->tail->name)) {\r
13546         return;\r
13547     }\r
13548     ss = ts->tail;\r
13549 \r
13550     tc.failed = 0;\r
13551     tc.suite = ss;\r
13552 \r
13553     ss->num_test++;\r
13554     update_status();\r
13555 \r
13556     f(&tc, value);\r
13557 \r
13558     if (tc.failed) {\r
13559         ss->failed++;\r
13560     }\r
13561 }\r
13562 \r
13563 static int report(abts_suite *suite)\r
13564 {\r
13565     int count = 0;\r
13566     sub_suite *dptr;\r
13567 \r
13568     if (suite && suite->tail &&!suite->tail->not_run) {\r
13569         end_suite(suite);\r
13570     }\r
13571 \r
13572     for (dptr = suite->head; dptr; dptr = dptr->next) {\r
13573         count += dptr->failed;\r
13574     }\r
13575 \r
13576     if (list_tests) {\r
13577         return 0;\r
13578     }\r
13579 \r
13580     if (count == 0) {\r
13581         printf("All tests passed.\n");\r
13582         return 0;\r
13583     }\r
13584 \r
13585     dptr = suite->head;\r
13586     fprintf(stdout, "%-15s\t\tTotal\tFail\tFailed %%\n", "Failed Tests");\r
13587     fprintf(stdout, "===================================================\n");\r
13588     while (dptr != ((void*)0)) {\r
13589         if (dptr->failed != 0) {\r
13590             float percent = ((float)dptr->failed / (float)dptr->num_test);\r
13591             fprintf(stdout, "%-15s\t\t%5d\t%4d\t%6.2f%%\n", dptr->name,\r
13592                     dptr->num_test, dptr->failed, percent * 100);\r
13593         }\r
13594         dptr = dptr->next;\r
13595     }\r
13596     return 1;\r
13597 }\r
13598 \r
13599 void abts_log_message(const char *fmt, ...)\r
13600 {\r
13601     va_list args;\r
13602     update_status();\r
13603 \r
13604     if (verbose) {\r
13605         __builtin_va_start(args, fmt);\r
13606         vfprintf(stderr, fmt, args);\r
13607         __builtin_va_end(args);\r
13608         fprintf(stderr, "\n");\r
13609         fflush(stderr);\r
13610     }\r
13611 }\r
13612 \r
13613 void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno)\r
13614 {\r
13615     update_status();\r
13616     if (tc->failed) return;\r
13617 \r
13618     if (expected == actual) return;\r
13619 \r
13620     tc->failed = 1;\r
13621     if (verbose) {\r
13622         fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual);\r
13623         fflush(stderr);\r
13624     }\r
13625 }\r
13626 \r
13627 void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno)\r
13628 {\r
13629     update_status();\r
13630     if (tc->failed) return;\r
13631 \r
13632     if (expected != actual) return;\r
13633 \r
13634     tc->failed = 1;\r
13635     if (verbose) {\r
13636         fprintf(stderr, "Line %d: expected something other than <%d>, but saw <%d>\n",\r
13637                 lineno, expected, actual);\r
13638         fflush(stderr);\r
13639     }\r
13640 }\r
13641 \r
13642 void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno)\r
13643 {\r
13644     update_status();\r
13645     if (tc->failed) return;\r
13646 \r
13647     if (expected == actual) return;\r
13648 \r
13649     tc->failed = 1;\r
13650     if (verbose) {\r
13651 \r
13652         fprintf(stderr, "Line %d: expected %lu, but saw %lu\n", lineno,\r
13653                 (unsigned long)expected, (unsigned long)actual);\r
13654         fflush(stderr);\r
13655     }\r
13656 }\r
13657 \r
13658 void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno)\r
13659 {\r
13660     update_status();\r
13661     if (tc->failed) return;\r
13662 \r
13663     if (!expected && !actual) return;\r
13664     if (expected && actual)\r
13665         if (!strcmp(expected, actual)) { return; }\r
13666 \r
13667     tc->failed = 1;\r
13668     if (verbose) {\r
13669         fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual);\r
13670         fflush(stderr);\r
13671     }\r
13672 }\r
13673 \r
13674 void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,\r
13675                        size_t n, int lineno)\r
13676 {\r
13677     update_status();\r
13678     if (tc->failed) { return; }\r
13679 \r
13680     if (!strncmp(expected, actual, n)) { return; }\r
13681 \r
13682     tc->failed = 1;\r
13683     if (verbose) {\r
13684         fprintf(stderr, "Line %d: expected something other than <%s>, but saw <%s>\n",\r
13685                 lineno, expected, actual);\r
13686         fflush(stderr);\r
13687     }\r
13688 }\r
13689 \r
13690 void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno)\r
13691 {\r
13692     update_status();\r
13693     if (tc->failed) { return; }\r
13694 \r
13695     if (ptr != ((void*)0)) { return; }\r
13696 \r
13697     tc->failed = 1;\r
13698     if (verbose) {\r
13699         fprintf(stderr, "Line %d: expected non-NULL, but saw NULL\n", lineno);\r
13700         fflush(stderr);\r
13701     }\r
13702 }\r
13703 \r
13704 void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno)\r
13705 {\r
13706     update_status();\r
13707     if (tc->failed) { return; }\r
13708 \r
13709     if (expected == actual) { return; }\r
13710 \r
13711     tc->failed = 1;\r
13712     if (verbose) {\r
13713         fprintf(stderr, "Line %d: expected <%p>, but saw <%p>\n", lineno, expected, actual);\r
13714         fflush(stderr);\r
13715     }\r
13716 }\r
13717 \r
13718 void abts_fail(abts_case *tc, const char *message, int lineno)\r
13719 {\r
13720     update_status();\r
13721     if (tc->failed) { return; }\r
13722 \r
13723     tc->failed = 1;\r
13724     if (verbose) {\r
13725         fprintf(stderr, "Line %d: %s\n", lineno, message);\r
13726         fflush(stderr);\r
13727     }\r
13728 }\r
13729 \r
13730 void abts_assert(abts_case *tc, const char *message, int condition, int lineno)\r
13731 {\r
13732     update_status();\r
13733     if (tc->failed) { return; }\r
13734 \r
13735     if (condition) { return; }\r
13736 \r
13737     tc->failed = 1;\r
13738     if (verbose) {\r
13739         fprintf(stderr, "Line %d: %s\n", lineno, message);\r
13740         fflush(stderr);\r
13741     }\r
13742 }\r
13743 \r
13744 void abts_true(abts_case *tc, int condition, int lineno)\r
13745 {\r
13746     update_status();\r
13747     if (tc->failed) { return; }\r
13748 \r
13749     if (condition) { return; }\r
13750 \r
13751     tc->failed = 1;\r
13752     if (verbose) {\r
13753         fprintf(stderr, "Line %d: Condition is false, but expected true\n", lineno);\r
13754         fflush(stderr);\r
13755     }\r
13756 }\r
13757 \r
13758 void abts_not_impl(abts_case *tc, const char *message, int lineno)\r
13759 {\r
13760     update_status();\r
13761 \r
13762     tc->suite->not_impl++;\r
13763     if (verbose) {\r
13764         fprintf(stderr, "Line %d: %s\n", lineno, message);\r
13765         fflush(stderr);\r
13766     }\r
13767 }\r
13768 # 21 "main1.c" 2\r
13769 \r
13770 \r
13771 \r
13772 \r
13773 \r
13774 \r
13775 int fflush(FILE *stream){\r
13776   return 0;\r
13777 }\r
13778 \r
13779 int fprintf(FILE *stream, const char *format, ...){\r
13780   return 0;\r
13781 }\r
13782 \r
13783 void test_atomics_threaded_1(abts_case *tc, void *data)\r
13784 {\r
13785     apr_thread_t *t1[3];\r
13786     apr_status_t rv;\r
13787     int i;\r
13788 \r
13789 \r
13790 \r
13791 \r
13792 \r
13793     rv = apr_thread_mutex_create(&thread_lock, 0x0, p);\r
13794     (((rv == 0) && "Could not create lock") ? (void) (0) : __assert_fail ("(rv == 0) && \"Could not create lock\"", "main1.c", 46, __PRETTY_FUNCTION__));\r
13795 \r
13796     for (i = 0; i < 3; i++) {\r
13797         apr_status_t r1;\r
13798         r1 = apr_thread_create(&t1[i], ((void*)0), thread_func_mutex, ((void*)0), p);\r
13799         ((!r1 && "Failed creating threads") ? (void) (0) : __assert_fail ("!r1 && \"Failed creating threads\"", "main1.c", 51, __PRETTY_FUNCTION__));\r
13800     }\r
13801 \r
13802     for (i = 0; i < 3; i++) {\r
13803         apr_status_t s1;\r
13804         apr_thread_join(&s1, t1[i]);\r
13805 \r
13806         ((s1 == exit_ret_val && "Invalid return value from thread_join") ? (void) (0) : __assert_fail ("s1 == exit_ret_val && \"Invalid return value from thread_join\"", "main1.c", 59, __PRETTY_FUNCTION__));\r
13807 \r
13808     }\r
13809 \r
13810     abts_int_equal(tc, 3 * 1, mutex_locks, 62);\r
13811 \r
13812     rv = apr_thread_mutex_destroy(thread_lock);\r
13813     ((rv == 0 && "Failed creating threads") ? (void) (0) : __assert_fail ("rv == 0 && \"Failed creating threads\"", "main1.c", 65, __PRETTY_FUNCTION__));\r
13814 }\r
13815 \r
13816 int main(int argc, char *argv[]){\r
13817 \r
13818   initialize();\r
13819 \r
13820   abts_case tc;\r
13821   tc.failed = 0;\r
13822   tc.suite = ((void*)0);\r
13823   test_atomics_threaded_1(&tc,((void*)0));\r
13824 \r
13825   return 0;\r
13826 }\r