Commit state of repository at time of OOPSLA 2015 submission.
[satcheck.git] / clang / test / apr_2_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 "main2.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 "main2.c" 2\r
13 \r
14 \r
15 \r
16 \r
17 \r
18 # 1 "./../test/abts.h" 1\r
19 # 21 "./../test/abts.h"\r
20 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 1 3\r
21 # 30 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 3\r
22 typedef __builtin_va_list va_list;\r
23 # 50 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 3\r
24 typedef __builtin_va_list __gnuc_va_list;\r
25 # 22 "./../test/abts.h" 2\r
26 # 1 "/usr/include/stdio.h" 1 3 4\r
27 # 27 "/usr/include/stdio.h" 3 4\r
28 # 1 "/usr/include/features.h" 1 3 4\r
29 # 352 "/usr/include/features.h" 3 4\r
30 # 1 "/usr/include/stdc-predef.h" 1 3 4\r
31 # 353 "/usr/include/features.h" 2 3 4\r
32 # 374 "/usr/include/features.h" 3 4\r
33 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4\r
34 # 385 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4\r
35 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
36 # 386 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4\r
37 # 375 "/usr/include/features.h" 2 3 4\r
38 # 398 "/usr/include/features.h" 3 4\r
39 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4\r
40 # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4\r
41 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4\r
42 # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4\r
43 # 399 "/usr/include/features.h" 2 3 4\r
44 # 28 "/usr/include/stdio.h" 2 3 4\r
45 \r
46 \r
47 \r
48 \r
49 \r
50 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
51 # 58 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 3 4\r
52 typedef long unsigned int size_t;\r
53 # 34 "/usr/include/stdio.h" 2 3 4\r
54 \r
55 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4\r
56 # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4\r
57 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
58 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4\r
59 \r
60 \r
61 typedef unsigned char __u_char;\r
62 typedef unsigned short int __u_short;\r
63 typedef unsigned int __u_int;\r
64 typedef unsigned long int __u_long;\r
65 \r
66 \r
67 typedef signed char __int8_t;\r
68 typedef unsigned char __uint8_t;\r
69 typedef signed short int __int16_t;\r
70 typedef unsigned short int __uint16_t;\r
71 typedef signed int __int32_t;\r
72 typedef unsigned int __uint32_t;\r
73 \r
74 typedef signed long int __int64_t;\r
75 typedef unsigned long int __uint64_t;\r
76 \r
77 \r
78 \r
79 \r
80 \r
81 \r
82 \r
83 typedef long int __quad_t;\r
84 typedef unsigned long int __u_quad_t;\r
85 # 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4\r
86 # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4\r
87 # 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4\r
88 \r
89 \r
90 typedef unsigned long int __dev_t;\r
91 typedef unsigned int __uid_t;\r
92 typedef unsigned int __gid_t;\r
93 typedef unsigned long int __ino_t;\r
94 typedef unsigned long int __ino64_t;\r
95 typedef unsigned int __mode_t;\r
96 typedef unsigned long int __nlink_t;\r
97 typedef long int __off_t;\r
98 typedef long int __off64_t;\r
99 typedef int __pid_t;\r
100 typedef struct { int __val[2]; } __fsid_t;\r
101 typedef long int __clock_t;\r
102 typedef unsigned long int __rlim_t;\r
103 typedef unsigned long int __rlim64_t;\r
104 typedef unsigned int __id_t;\r
105 typedef long int __time_t;\r
106 typedef unsigned int __useconds_t;\r
107 typedef long int __suseconds_t;\r
108 \r
109 typedef int __daddr_t;\r
110 typedef int __key_t;\r
111 \r
112 \r
113 typedef int __clockid_t;\r
114 \r
115 \r
116 typedef void * __timer_t;\r
117 \r
118 \r
119 typedef long int __blksize_t;\r
120 \r
121 \r
122 \r
123 \r
124 typedef long int __blkcnt_t;\r
125 typedef long int __blkcnt64_t;\r
126 \r
127 \r
128 typedef unsigned long int __fsblkcnt_t;\r
129 typedef unsigned long int __fsblkcnt64_t;\r
130 \r
131 \r
132 typedef unsigned long int __fsfilcnt_t;\r
133 typedef unsigned long int __fsfilcnt64_t;\r
134 \r
135 \r
136 typedef long int __fsword_t;\r
137 \r
138 typedef long int __ssize_t;\r
139 \r
140 \r
141 typedef long int __syscall_slong_t;\r
142 \r
143 typedef unsigned long int __syscall_ulong_t;\r
144 \r
145 \r
146 \r
147 typedef __off64_t __loff_t;\r
148 typedef __quad_t *__qaddr_t;\r
149 typedef char *__caddr_t;\r
150 \r
151 \r
152 typedef long int __intptr_t;\r
153 \r
154 \r
155 typedef unsigned int __socklen_t;\r
156 # 36 "/usr/include/stdio.h" 2 3 4\r
157 \r
158 \r
159 \r
160 \r
161 \r
162 \r
163 \r
164 \r
165 struct _IO_FILE;\r
166 \r
167 \r
168 \r
169 typedef struct _IO_FILE FILE;\r
170 # 64 "/usr/include/stdio.h" 3 4\r
171 typedef struct _IO_FILE __FILE;\r
172 # 74 "/usr/include/stdio.h" 3 4\r
173 # 1 "/usr/include/libio.h" 1 3 4\r
174 # 31 "/usr/include/libio.h" 3 4\r
175 # 1 "/usr/include/_G_config.h" 1 3 4\r
176 # 15 "/usr/include/_G_config.h" 3 4\r
177 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
178 # 16 "/usr/include/_G_config.h" 2 3 4\r
179 \r
180 \r
181 \r
182 \r
183 # 1 "/usr/include/wchar.h" 1 3 4\r
184 # 82 "/usr/include/wchar.h" 3 4\r
185 typedef struct\r
186 {\r
187   int __count;\r
188   union\r
189   {\r
190 \r
191     unsigned int __wch;\r
192 \r
193 \r
194 \r
195     char __wchb[4];\r
196   } __value;\r
197 } __mbstate_t;\r
198 # 21 "/usr/include/_G_config.h" 2 3 4\r
199 typedef struct\r
200 {\r
201   __off_t __pos;\r
202   __mbstate_t __state;\r
203 } _G_fpos_t;\r
204 typedef struct\r
205 {\r
206   __off64_t __pos;\r
207   __mbstate_t __state;\r
208 } _G_fpos64_t;\r
209 # 32 "/usr/include/libio.h" 2 3 4\r
210 # 144 "/usr/include/libio.h" 3 4\r
211 struct _IO_jump_t; struct _IO_FILE;\r
212 # 154 "/usr/include/libio.h" 3 4\r
213 typedef void _IO_lock_t;\r
214 \r
215 \r
216 \r
217 \r
218 \r
219 struct _IO_marker {\r
220   struct _IO_marker *_next;\r
221   struct _IO_FILE *_sbuf;\r
222 \r
223 \r
224 \r
225   int _pos;\r
226 # 177 "/usr/include/libio.h" 3 4\r
227 };\r
228 \r
229 \r
230 enum __codecvt_result\r
231 {\r
232   __codecvt_ok,\r
233   __codecvt_partial,\r
234   __codecvt_error,\r
235   __codecvt_noconv\r
236 };\r
237 # 245 "/usr/include/libio.h" 3 4\r
238 struct _IO_FILE {\r
239   int _flags;\r
240 \r
241 \r
242 \r
243 \r
244   char* _IO_read_ptr;\r
245   char* _IO_read_end;\r
246   char* _IO_read_base;\r
247   char* _IO_write_base;\r
248   char* _IO_write_ptr;\r
249   char* _IO_write_end;\r
250   char* _IO_buf_base;\r
251   char* _IO_buf_end;\r
252 \r
253   char *_IO_save_base;\r
254   char *_IO_backup_base;\r
255   char *_IO_save_end;\r
256 \r
257   struct _IO_marker *_markers;\r
258 \r
259   struct _IO_FILE *_chain;\r
260 \r
261   int _fileno;\r
262 \r
263 \r
264 \r
265   int _flags2;\r
266 \r
267   __off_t _old_offset;\r
268 \r
269 \r
270 \r
271   unsigned short _cur_column;\r
272   signed char _vtable_offset;\r
273   char _shortbuf[1];\r
274 \r
275 \r
276 \r
277   _IO_lock_t *_lock;\r
278 # 293 "/usr/include/libio.h" 3 4\r
279   __off64_t _offset;\r
280 # 302 "/usr/include/libio.h" 3 4\r
281   void *__pad1;\r
282   void *__pad2;\r
283   void *__pad3;\r
284   void *__pad4;\r
285   size_t __pad5;\r
286 \r
287   int _mode;\r
288 \r
289   char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];\r
290 \r
291 };\r
292 \r
293 \r
294 typedef struct _IO_FILE _IO_FILE;\r
295 \r
296 \r
297 struct _IO_FILE_plus;\r
298 \r
299 extern struct _IO_FILE_plus _IO_2_1_stdin_;\r
300 extern struct _IO_FILE_plus _IO_2_1_stdout_;\r
301 extern struct _IO_FILE_plus _IO_2_1_stderr_;\r
302 # 338 "/usr/include/libio.h" 3 4\r
303 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);\r
304 \r
305 \r
306 \r
307 \r
308 \r
309 \r
310 \r
311 typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,\r
312      size_t __n);\r
313 \r
314 \r
315 \r
316 \r
317 \r
318 \r
319 \r
320 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);\r
321 \r
322 \r
323 typedef int __io_close_fn (void *__cookie);\r
324 # 390 "/usr/include/libio.h" 3 4\r
325 extern int __underflow (_IO_FILE *);\r
326 extern int __uflow (_IO_FILE *);\r
327 extern int __overflow (_IO_FILE *, int);\r
328 # 434 "/usr/include/libio.h" 3 4\r
329 extern int _IO_getc (_IO_FILE *__fp);\r
330 extern int _IO_putc (int __c, _IO_FILE *__fp);\r
331 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ ));\r
332 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ ));\r
333 \r
334 extern int _IO_peekc_locked (_IO_FILE *__fp);\r
335 \r
336 \r
337 \r
338 \r
339 \r
340 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
341 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
342 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
343 # 464 "/usr/include/libio.h" 3 4\r
344 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,\r
345    __gnuc_va_list, int *__restrict);\r
346 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,\r
347     __gnuc_va_list);\r
348 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);\r
349 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);\r
350 \r
351 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);\r
352 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);\r
353 \r
354 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
355 # 75 "/usr/include/stdio.h" 2 3 4\r
356 \r
357 \r
358 \r
359 \r
360 typedef __gnuc_va_list va_list;\r
361 # 90 "/usr/include/stdio.h" 3 4\r
362 typedef __off_t off_t;\r
363 # 102 "/usr/include/stdio.h" 3 4\r
364 typedef __ssize_t ssize_t;\r
365 \r
366 \r
367 \r
368 \r
369 \r
370 \r
371 \r
372 typedef _G_fpos_t fpos_t;\r
373 # 164 "/usr/include/stdio.h" 3 4\r
374 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4\r
375 # 165 "/usr/include/stdio.h" 2 3 4\r
376 \r
377 \r
378 \r
379 extern struct _IO_FILE *stdin;\r
380 extern struct _IO_FILE *stdout;\r
381 extern struct _IO_FILE *stderr;\r
382 \r
383 \r
384 \r
385 \r
386 \r
387 \r
388 \r
389 extern int remove (const char *__filename) __attribute__ ((__nothrow__ ));\r
390 \r
391 extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ ));\r
392 \r
393 \r
394 \r
395 \r
396 extern int renameat (int __oldfd, const char *__old, int __newfd,\r
397        const char *__new) __attribute__ ((__nothrow__ ));\r
398 # 195 "/usr/include/stdio.h" 3 4\r
399 extern FILE *tmpfile (void) ;\r
400 # 209 "/usr/include/stdio.h" 3 4\r
401 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ )) ;\r
402 \r
403 \r
404 \r
405 \r
406 \r
407 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ )) ;\r
408 # 227 "/usr/include/stdio.h" 3 4\r
409 extern char *tempnam (const char *__dir, const char *__pfx)\r
410      __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
411 # 237 "/usr/include/stdio.h" 3 4\r
412 extern int fclose (FILE *__stream);\r
413 \r
414 \r
415 \r
416 \r
417 extern int fflush (FILE *__stream);\r
418 # 252 "/usr/include/stdio.h" 3 4\r
419 extern int fflush_unlocked (FILE *__stream);\r
420 # 272 "/usr/include/stdio.h" 3 4\r
421 extern FILE *fopen (const char *__restrict __filename,\r
422       const char *__restrict __modes) ;\r
423 \r
424 \r
425 \r
426 \r
427 extern FILE *freopen (const char *__restrict __filename,\r
428         const char *__restrict __modes,\r
429         FILE *__restrict __stream) ;\r
430 # 306 "/usr/include/stdio.h" 3 4\r
431 extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ )) ;\r
432 # 319 "/usr/include/stdio.h" 3 4\r
433 extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)\r
434   __attribute__ ((__nothrow__ )) ;\r
435 \r
436 \r
437 \r
438 \r
439 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ )) ;\r
440 \r
441 \r
442 \r
443 \r
444 \r
445 \r
446 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
447 \r
448 \r
449 \r
450 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,\r
451       int __modes, size_t __n) __attribute__ ((__nothrow__ ));\r
452 \r
453 \r
454 \r
455 \r
456 \r
457 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,\r
458          size_t __size) __attribute__ ((__nothrow__ ));\r
459 \r
460 \r
461 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ ));\r
462 # 356 "/usr/include/stdio.h" 3 4\r
463 extern int fprintf (FILE *__restrict __stream,\r
464       const char *__restrict __format, ...);\r
465 \r
466 \r
467 \r
468 \r
469 extern int printf (const char *__restrict __format, ...);\r
470 \r
471 extern int sprintf (char *__restrict __s,\r
472       const char *__restrict __format, ...) __attribute__ ((__nothrow__));\r
473 \r
474 \r
475 \r
476 \r
477 \r
478 extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,\r
479        __gnuc_va_list __arg);\r
480 \r
481 \r
482 \r
483 \r
484 extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);\r
485 \r
486 extern int vsprintf (char *__restrict __s, const char *__restrict __format,\r
487        __gnuc_va_list __arg) __attribute__ ((__nothrow__));\r
488 \r
489 \r
490 \r
491 \r
492 \r
493 extern int snprintf (char *__restrict __s, size_t __maxlen,\r
494        const char *__restrict __format, ...)\r
495      __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));\r
496 \r
497 extern int vsnprintf (char *__restrict __s, size_t __maxlen,\r
498         const char *__restrict __format, __gnuc_va_list __arg)\r
499      __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));\r
500 # 412 "/usr/include/stdio.h" 3 4\r
501 extern int vdprintf (int __fd, const char *__restrict __fmt,\r
502        __gnuc_va_list __arg)\r
503      __attribute__ ((__format__ (__printf__, 2, 0)));\r
504 extern int dprintf (int __fd, const char *__restrict __fmt, ...)\r
505      __attribute__ ((__format__ (__printf__, 2, 3)));\r
506 # 425 "/usr/include/stdio.h" 3 4\r
507 extern int fscanf (FILE *__restrict __stream,\r
508      const char *__restrict __format, ...) ;\r
509 \r
510 \r
511 \r
512 \r
513 extern int scanf (const char *__restrict __format, ...) ;\r
514 \r
515 extern int sscanf (const char *__restrict __s,\r
516      const char *__restrict __format, ...) __attribute__ ((__nothrow__ ));\r
517 # 443 "/usr/include/stdio.h" 3 4\r
518 extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") ;\r
519 \r
520 \r
521 extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") ;\r
522 \r
523 extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ ));\r
524 # 471 "/usr/include/stdio.h" 3 4\r
525 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,\r
526       __gnuc_va_list __arg)\r
527      __attribute__ ((__format__ (__scanf__, 2, 0))) ;\r
528 \r
529 \r
530 \r
531 \r
532 \r
533 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)\r
534      __attribute__ ((__format__ (__scanf__, 1, 0))) ;\r
535 \r
536 \r
537 extern int vsscanf (const char *__restrict __s,\r
538       const char *__restrict __format, __gnuc_va_list __arg)\r
539      __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__scanf__, 2, 0)));\r
540 # 494 "/usr/include/stdio.h" 3 4\r
541 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")\r
542 \r
543 \r
544 \r
545      __attribute__ ((__format__ (__scanf__, 2, 0))) ;\r
546 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")\r
547 \r
548      __attribute__ ((__format__ (__scanf__, 1, 0))) ;\r
549 extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ ))\r
550 \r
551 \r
552 \r
553      __attribute__ ((__format__ (__scanf__, 2, 0)));\r
554 # 531 "/usr/include/stdio.h" 3 4\r
555 extern int fgetc (FILE *__stream);\r
556 extern int getc (FILE *__stream);\r
557 \r
558 \r
559 \r
560 \r
561 \r
562 extern int getchar (void);\r
563 # 550 "/usr/include/stdio.h" 3 4\r
564 extern int getc_unlocked (FILE *__stream);\r
565 extern int getchar_unlocked (void);\r
566 # 561 "/usr/include/stdio.h" 3 4\r
567 extern int fgetc_unlocked (FILE *__stream);\r
568 # 573 "/usr/include/stdio.h" 3 4\r
569 extern int fputc (int __c, FILE *__stream);\r
570 extern int putc (int __c, FILE *__stream);\r
571 \r
572 \r
573 \r
574 \r
575 \r
576 extern int putchar (int __c);\r
577 # 594 "/usr/include/stdio.h" 3 4\r
578 extern int fputc_unlocked (int __c, FILE *__stream);\r
579 \r
580 \r
581 \r
582 \r
583 \r
584 \r
585 \r
586 extern int putc_unlocked (int __c, FILE *__stream);\r
587 extern int putchar_unlocked (int __c);\r
588 \r
589 \r
590 \r
591 \r
592 \r
593 \r
594 extern int getw (FILE *__stream);\r
595 \r
596 \r
597 extern int putw (int __w, FILE *__stream);\r
598 # 622 "/usr/include/stdio.h" 3 4\r
599 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)\r
600           ;\r
601 # 638 "/usr/include/stdio.h" 3 4\r
602 extern char *gets (char *__s) __attribute__ ((__deprecated__));\r
603 # 665 "/usr/include/stdio.h" 3 4\r
604 extern __ssize_t __getdelim (char **__restrict __lineptr,\r
605           size_t *__restrict __n, int __delimiter,\r
606           FILE *__restrict __stream) ;\r
607 extern __ssize_t getdelim (char **__restrict __lineptr,\r
608         size_t *__restrict __n, int __delimiter,\r
609         FILE *__restrict __stream) ;\r
610 \r
611 \r
612 \r
613 \r
614 \r
615 \r
616 \r
617 extern __ssize_t getline (char **__restrict __lineptr,\r
618        size_t *__restrict __n,\r
619        FILE *__restrict __stream) ;\r
620 # 689 "/usr/include/stdio.h" 3 4\r
621 extern int fputs (const char *__restrict __s, FILE *__restrict __stream);\r
622 \r
623 \r
624 \r
625 \r
626 \r
627 extern int puts (const char *__s);\r
628 \r
629 \r
630 \r
631 \r
632 \r
633 \r
634 extern int ungetc (int __c, FILE *__stream);\r
635 \r
636 \r
637 \r
638 \r
639 \r
640 \r
641 extern size_t fread (void *__restrict __ptr, size_t __size,\r
642        size_t __n, FILE *__restrict __stream) ;\r
643 \r
644 \r
645 \r
646 \r
647 extern size_t fwrite (const void *__restrict __ptr, size_t __size,\r
648         size_t __n, FILE *__restrict __s);\r
649 # 737 "/usr/include/stdio.h" 3 4\r
650 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,\r
651          size_t __n, FILE *__restrict __stream) ;\r
652 extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,\r
653           size_t __n, FILE *__restrict __stream);\r
654 # 749 "/usr/include/stdio.h" 3 4\r
655 extern int fseek (FILE *__stream, long int __off, int __whence);\r
656 \r
657 \r
658 \r
659 \r
660 extern long int ftell (FILE *__stream) ;\r
661 \r
662 \r
663 \r
664 \r
665 extern void rewind (FILE *__stream);\r
666 # 773 "/usr/include/stdio.h" 3 4\r
667 extern int fseeko (FILE *__stream, __off_t __off, int __whence);\r
668 \r
669 \r
670 \r
671 \r
672 extern __off_t ftello (FILE *__stream) ;\r
673 # 798 "/usr/include/stdio.h" 3 4\r
674 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);\r
675 \r
676 \r
677 \r
678 \r
679 extern int fsetpos (FILE *__stream, const fpos_t *__pos);\r
680 # 826 "/usr/include/stdio.h" 3 4\r
681 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ ));\r
682 \r
683 extern int feof (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
684 \r
685 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
686 \r
687 \r
688 \r
689 \r
690 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ ));\r
691 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
692 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
693 # 846 "/usr/include/stdio.h" 3 4\r
694 extern void perror (const char *__s);\r
695 \r
696 \r
697 \r
698 \r
699 \r
700 \r
701 \r
702 # 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4\r
703 # 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4\r
704 extern int sys_nerr;\r
705 extern const char *const sys_errlist[];\r
706 # 854 "/usr/include/stdio.h" 2 3 4\r
707 \r
708 \r
709 \r
710 \r
711 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
712 \r
713 \r
714 \r
715 \r
716 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
717 # 873 "/usr/include/stdio.h" 3 4\r
718 extern FILE *popen (const char *__command, const char *__modes) ;\r
719 \r
720 \r
721 \r
722 \r
723 \r
724 extern int pclose (FILE *__stream);\r
725 \r
726 \r
727 \r
728 \r
729 \r
730 extern char *ctermid (char *__s) __attribute__ ((__nothrow__ ));\r
731 # 913 "/usr/include/stdio.h" 3 4\r
732 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ ));\r
733 \r
734 \r
735 \r
736 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
737 \r
738 \r
739 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ ));\r
740 # 23 "./../test/abts.h" 2\r
741 # 1 "/usr/include/stdlib.h" 1 3 4\r
742 # 32 "/usr/include/stdlib.h" 3 4\r
743 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
744 # 86 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 3 4\r
745 typedef int wchar_t;\r
746 # 33 "/usr/include/stdlib.h" 2 3 4\r
747 \r
748 \r
749 \r
750 \r
751 \r
752 \r
753 \r
754 \r
755 # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4\r
756 # 50 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4\r
757 typedef enum\r
758 {\r
759   P_ALL,\r
760   P_PID,\r
761   P_PGID\r
762 } idtype_t;\r
763 # 42 "/usr/include/stdlib.h" 2 3 4\r
764 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4\r
765 # 64 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4\r
766 # 1 "/usr/include/endian.h" 1 3 4\r
767 # 36 "/usr/include/endian.h" 3 4\r
768 # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4\r
769 # 37 "/usr/include/endian.h" 2 3 4\r
770 # 60 "/usr/include/endian.h" 3 4\r
771 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4\r
772 # 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4\r
773 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
774 # 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4\r
775 \r
776 \r
777 \r
778 \r
779 \r
780 \r
781 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4\r
782 # 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4\r
783 # 61 "/usr/include/endian.h" 2 3 4\r
784 # 65 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 2 3 4\r
785 \r
786 union wait\r
787   {\r
788     int w_status;\r
789     struct\r
790       {\r
791 \r
792  unsigned int __w_termsig:7;\r
793  unsigned int __w_coredump:1;\r
794  unsigned int __w_retcode:8;\r
795  unsigned int:16;\r
796 \r
797 \r
798 \r
799 \r
800 \r
801 \r
802 \r
803       } __wait_terminated;\r
804     struct\r
805       {\r
806 \r
807  unsigned int __w_stopval:8;\r
808  unsigned int __w_stopsig:8;\r
809  unsigned int:16;\r
810 \r
811 \r
812 \r
813 \r
814 \r
815 \r
816       } __wait_stopped;\r
817   };\r
818 # 43 "/usr/include/stdlib.h" 2 3 4\r
819 # 67 "/usr/include/stdlib.h" 3 4\r
820 typedef union\r
821   {\r
822     union wait *__uptr;\r
823     int *__iptr;\r
824   } __WAIT_STATUS __attribute__ ((__transparent_union__));\r
825 # 97 "/usr/include/stdlib.h" 3 4\r
826 typedef struct\r
827   {\r
828     int quot;\r
829     int rem;\r
830   } div_t;\r
831 \r
832 \r
833 \r
834 typedef struct\r
835   {\r
836     long int quot;\r
837     long int rem;\r
838   } ldiv_t;\r
839 \r
840 \r
841 \r
842 \r
843 \r
844 \r
845 \r
846 __extension__ typedef struct\r
847   {\r
848     long long int quot;\r
849     long long int rem;\r
850   } lldiv_t;\r
851 # 139 "/usr/include/stdlib.h" 3 4\r
852 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ )) ;\r
853 \r
854 \r
855 \r
856 \r
857 extern double atof (const char *__nptr)\r
858      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
859 \r
860 extern int atoi (const char *__nptr)\r
861      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
862 \r
863 extern long int atol (const char *__nptr)\r
864      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
865 \r
866 \r
867 \r
868 \r
869 \r
870 __extension__ extern long long int atoll (const char *__nptr)\r
871      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
872 \r
873 \r
874 \r
875 \r
876 \r
877 extern double strtod (const char *__restrict __nptr,\r
878         char **__restrict __endptr)\r
879      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
880 \r
881 \r
882 \r
883 \r
884 \r
885 extern float strtof (const char *__restrict __nptr,\r
886        char **__restrict __endptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
887 \r
888 extern long double strtold (const char *__restrict __nptr,\r
889        char **__restrict __endptr)\r
890      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
891 \r
892 \r
893 \r
894 \r
895 \r
896 extern long int strtol (const char *__restrict __nptr,\r
897    char **__restrict __endptr, int __base)\r
898      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
899 \r
900 extern unsigned long int strtoul (const char *__restrict __nptr,\r
901       char **__restrict __endptr, int __base)\r
902      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
903 \r
904 \r
905 \r
906 \r
907 __extension__\r
908 extern long long int strtoq (const char *__restrict __nptr,\r
909         char **__restrict __endptr, int __base)\r
910      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
911 \r
912 __extension__\r
913 extern unsigned long long int strtouq (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 \r
921 __extension__\r
922 extern long long int strtoll (const char *__restrict __nptr,\r
923          char **__restrict __endptr, int __base)\r
924      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
925 \r
926 __extension__\r
927 extern unsigned long long int strtoull (const char *__restrict __nptr,\r
928      char **__restrict __endptr, int __base)\r
929      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
930 # 305 "/usr/include/stdlib.h" 3 4\r
931 extern char *l64a (long int __n) __attribute__ ((__nothrow__ )) ;\r
932 \r
933 \r
934 extern long int a64l (const char *__s)\r
935      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
936 \r
937 \r
938 \r
939 \r
940 \r
941 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4\r
942 # 33 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
943 typedef __u_char u_char;\r
944 typedef __u_short u_short;\r
945 typedef __u_int u_int;\r
946 typedef __u_long u_long;\r
947 typedef __quad_t quad_t;\r
948 typedef __u_quad_t u_quad_t;\r
949 typedef __fsid_t fsid_t;\r
950 \r
951 \r
952 \r
953 \r
954 typedef __loff_t loff_t;\r
955 \r
956 \r
957 \r
958 typedef __ino_t ino_t;\r
959 # 60 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
960 typedef __dev_t dev_t;\r
961 \r
962 \r
963 \r
964 \r
965 typedef __gid_t gid_t;\r
966 \r
967 \r
968 \r
969 \r
970 typedef __mode_t mode_t;\r
971 \r
972 \r
973 \r
974 \r
975 typedef __nlink_t nlink_t;\r
976 \r
977 \r
978 \r
979 \r
980 typedef __uid_t uid_t;\r
981 # 98 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
982 typedef __pid_t pid_t;\r
983 \r
984 \r
985 \r
986 \r
987 \r
988 typedef __id_t id_t;\r
989 # 115 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
990 typedef __daddr_t daddr_t;\r
991 typedef __caddr_t caddr_t;\r
992 \r
993 \r
994 \r
995 \r
996 \r
997 typedef __key_t key_t;\r
998 # 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
999 # 1 "/usr/include/time.h" 1 3 4\r
1000 # 59 "/usr/include/time.h" 3 4\r
1001 typedef __clock_t clock_t;\r
1002 # 75 "/usr/include/time.h" 3 4\r
1003 typedef __time_t time_t;\r
1004 # 91 "/usr/include/time.h" 3 4\r
1005 typedef __clockid_t clockid_t;\r
1006 # 103 "/usr/include/time.h" 3 4\r
1007 typedef __timer_t timer_t;\r
1008 # 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1009 # 146 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1010 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
1011 # 147 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1012 \r
1013 \r
1014 \r
1015 typedef unsigned long int ulong;\r
1016 typedef unsigned short int ushort;\r
1017 typedef unsigned int uint;\r
1018 # 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1019 typedef int int8_t __attribute__ ((__mode__ (__QI__)));\r
1020 typedef int int16_t __attribute__ ((__mode__ (__HI__)));\r
1021 typedef int int32_t __attribute__ ((__mode__ (__SI__)));\r
1022 typedef int int64_t __attribute__ ((__mode__ (__DI__)));\r
1023 \r
1024 \r
1025 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));\r
1026 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));\r
1027 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));\r
1028 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));\r
1029 \r
1030 typedef int register_t __attribute__ ((__mode__ (__word__)));\r
1031 # 219 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1032 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4\r
1033 # 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
1034 # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4\r
1035 # 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4\r
1036 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
1037 # 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4\r
1038 # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
1039 \r
1040 \r
1041 # 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4\r
1042 # 22 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4\r
1043 typedef int __sig_atomic_t;\r
1044 \r
1045 \r
1046 \r
1047 \r
1048 typedef struct\r
1049   {\r
1050     unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];\r
1051   } __sigset_t;\r
1052 # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
1053 \r
1054 \r
1055 \r
1056 typedef __sigset_t sigset_t;\r
1057 \r
1058 \r
1059 \r
1060 \r
1061 \r
1062 \r
1063 # 1 "/usr/include/time.h" 1 3 4\r
1064 # 120 "/usr/include/time.h" 3 4\r
1065 struct timespec\r
1066   {\r
1067     __time_t tv_sec;\r
1068     __syscall_slong_t tv_nsec;\r
1069   };\r
1070 # 44 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
1071 \r
1072 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
1073 # 30 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4\r
1074 struct timeval\r
1075   {\r
1076     __time_t tv_sec;\r
1077     __suseconds_t tv_usec;\r
1078   };\r
1079 # 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
1080 \r
1081 \r
1082 typedef __suseconds_t suseconds_t;\r
1083 \r
1084 \r
1085 \r
1086 \r
1087 \r
1088 typedef long int __fd_mask;\r
1089 # 64 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
1090 typedef struct\r
1091   {\r
1092 \r
1093 \r
1094 \r
1095 \r
1096 \r
1097 \r
1098     __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];\r
1099 \r
1100 \r
1101   } fd_set;\r
1102 \r
1103 \r
1104 \r
1105 \r
1106 \r
1107 \r
1108 typedef __fd_mask fd_mask;\r
1109 # 106 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
1110 extern int select (int __nfds, fd_set *__restrict __readfds,\r
1111      fd_set *__restrict __writefds,\r
1112      fd_set *__restrict __exceptfds,\r
1113      struct timeval *__restrict __timeout);\r
1114 # 118 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
1115 extern int pselect (int __nfds, fd_set *__restrict __readfds,\r
1116       fd_set *__restrict __writefds,\r
1117       fd_set *__restrict __exceptfds,\r
1118       const struct timespec *__restrict __timeout,\r
1119       const __sigset_t *__restrict __sigmask);\r
1120 # 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1121 \r
1122 \r
1123 # 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4\r
1124 # 26 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4\r
1125 __extension__\r
1126 extern unsigned int gnu_dev_major (unsigned long long int __dev)\r
1127      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
1128 __extension__\r
1129 extern unsigned int gnu_dev_minor (unsigned long long int __dev)\r
1130      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
1131 __extension__\r
1132 extern unsigned long long int gnu_dev_makedev (unsigned int __major,\r
1133             unsigned int __minor)\r
1134      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
1135 # 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1136 \r
1137 \r
1138 \r
1139 \r
1140 \r
1141 typedef __blksize_t blksize_t;\r
1142 \r
1143 \r
1144 \r
1145 \r
1146 \r
1147 \r
1148 typedef __blkcnt_t blkcnt_t;\r
1149 \r
1150 \r
1151 \r
1152 typedef __fsblkcnt_t fsblkcnt_t;\r
1153 \r
1154 \r
1155 \r
1156 typedef __fsfilcnt_t fsfilcnt_t;\r
1157 # 270 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
1158 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4\r
1159 # 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1160 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
1161 # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4\r
1162 # 60 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1163 typedef unsigned long int pthread_t;\r
1164 \r
1165 \r
1166 union pthread_attr_t\r
1167 {\r
1168   char __size[56];\r
1169   long int __align;\r
1170 };\r
1171 \r
1172 typedef union pthread_attr_t pthread_attr_t;\r
1173 \r
1174 \r
1175 \r
1176 \r
1177 \r
1178 typedef struct __pthread_internal_list\r
1179 {\r
1180   struct __pthread_internal_list *__prev;\r
1181   struct __pthread_internal_list *__next;\r
1182 } __pthread_list_t;\r
1183 # 90 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1184 typedef union\r
1185 {\r
1186   struct __pthread_mutex_s\r
1187   {\r
1188     int __lock;\r
1189     unsigned int __count;\r
1190     int __owner;\r
1191 \r
1192     unsigned int __nusers;\r
1193 \r
1194 \r
1195 \r
1196     int __kind;\r
1197 \r
1198     short __spins;\r
1199     short __elision;\r
1200     __pthread_list_t __list;\r
1201 # 124 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1202   } __data;\r
1203   char __size[40];\r
1204   long int __align;\r
1205 } pthread_mutex_t;\r
1206 \r
1207 typedef union\r
1208 {\r
1209   char __size[4];\r
1210   int __align;\r
1211 } pthread_mutexattr_t;\r
1212 \r
1213 \r
1214 \r
1215 \r
1216 typedef union\r
1217 {\r
1218   struct\r
1219   {\r
1220     int __lock;\r
1221     unsigned int __futex;\r
1222     __extension__ unsigned long long int __total_seq;\r
1223     __extension__ unsigned long long int __wakeup_seq;\r
1224     __extension__ unsigned long long int __woken_seq;\r
1225     void *__mutex;\r
1226     unsigned int __nwaiters;\r
1227     unsigned int __broadcast_seq;\r
1228   } __data;\r
1229   char __size[48];\r
1230   __extension__ long long int __align;\r
1231 } pthread_cond_t;\r
1232 \r
1233 typedef union\r
1234 {\r
1235   char __size[4];\r
1236   int __align;\r
1237 } pthread_condattr_t;\r
1238 \r
1239 \r
1240 \r
1241 typedef unsigned int pthread_key_t;\r
1242 \r
1243 \r
1244 \r
1245 typedef int pthread_once_t;\r
1246 \r
1247 \r
1248 \r
1249 \r
1250 \r
1251 typedef union\r
1252 {\r
1253 \r
1254   struct\r
1255   {\r
1256     int __lock;\r
1257     unsigned int __nr_readers;\r
1258     unsigned int __readers_wakeup;\r
1259     unsigned int __writer_wakeup;\r
1260     unsigned int __nr_readers_queued;\r
1261     unsigned int __nr_writers_queued;\r
1262     int __writer;\r
1263     int __shared;\r
1264     unsigned long int __pad1;\r
1265     unsigned long int __pad2;\r
1266 \r
1267 \r
1268     unsigned int __flags;\r
1269 \r
1270   } __data;\r
1271 # 211 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
1272   char __size[56];\r
1273   long int __align;\r
1274 } pthread_rwlock_t;\r
1275 \r
1276 typedef union\r
1277 {\r
1278   char __size[8];\r
1279   long int __align;\r
1280 } pthread_rwlockattr_t;\r
1281 \r
1282 \r
1283 \r
1284 \r
1285 \r
1286 typedef volatile int pthread_spinlock_t;\r
1287 \r
1288 \r
1289 \r
1290 \r
1291 typedef union\r
1292 {\r
1293   char __size[32];\r
1294   long int __align;\r
1295 } pthread_barrier_t;\r
1296 \r
1297 typedef union\r
1298 {\r
1299   char __size[4];\r
1300   int __align;\r
1301 } pthread_barrierattr_t;\r
1302 # 271 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
1303 # 315 "/usr/include/stdlib.h" 2 3 4\r
1304 \r
1305 \r
1306 \r
1307 \r
1308 \r
1309 \r
1310 extern long int random (void) __attribute__ ((__nothrow__ ));\r
1311 \r
1312 \r
1313 extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ ));\r
1314 \r
1315 \r
1316 \r
1317 \r
1318 \r
1319 extern char *initstate (unsigned int __seed, char *__statebuf,\r
1320    size_t __statelen) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1321 \r
1322 \r
1323 \r
1324 extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1325 \r
1326 \r
1327 \r
1328 \r
1329 \r
1330 \r
1331 \r
1332 struct random_data\r
1333   {\r
1334     int32_t *fptr;\r
1335     int32_t *rptr;\r
1336     int32_t *state;\r
1337     int rand_type;\r
1338     int rand_deg;\r
1339     int rand_sep;\r
1340     int32_t *end_ptr;\r
1341   };\r
1342 \r
1343 extern int random_r (struct random_data *__restrict __buf,\r
1344        int32_t *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1345 \r
1346 extern int srandom_r (unsigned int __seed, struct random_data *__buf)\r
1347      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1348 \r
1349 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,\r
1350    size_t __statelen,\r
1351    struct random_data *__restrict __buf)\r
1352      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
1353 \r
1354 extern int setstate_r (char *__restrict __statebuf,\r
1355          struct random_data *__restrict __buf)\r
1356      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1357 \r
1358 \r
1359 \r
1360 \r
1361 \r
1362 \r
1363 extern int rand (void) __attribute__ ((__nothrow__ ));\r
1364 \r
1365 extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ ));\r
1366 \r
1367 \r
1368 \r
1369 \r
1370 extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ ));\r
1371 \r
1372 \r
1373 \r
1374 \r
1375 \r
1376 \r
1377 \r
1378 extern double drand48 (void) __attribute__ ((__nothrow__ ));\r
1379 extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1380 \r
1381 \r
1382 extern long int lrand48 (void) __attribute__ ((__nothrow__ ));\r
1383 extern long int nrand48 (unsigned short int __xsubi[3])\r
1384      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1385 \r
1386 \r
1387 extern long int mrand48 (void) __attribute__ ((__nothrow__ ));\r
1388 extern long int jrand48 (unsigned short int __xsubi[3])\r
1389      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1390 \r
1391 \r
1392 extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ ));\r
1393 extern unsigned short int *seed48 (unsigned short int __seed16v[3])\r
1394      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1395 extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1396 \r
1397 \r
1398 \r
1399 \r
1400 \r
1401 struct drand48_data\r
1402   {\r
1403     unsigned short int __x[3];\r
1404     unsigned short int __old_x[3];\r
1405     unsigned short int __c;\r
1406     unsigned short int __init;\r
1407     __extension__ unsigned long long int __a;\r
1408 \r
1409   };\r
1410 \r
1411 \r
1412 extern int drand48_r (struct drand48_data *__restrict __buffer,\r
1413         double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1414 extern int erand48_r (unsigned short int __xsubi[3],\r
1415         struct drand48_data *__restrict __buffer,\r
1416         double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1417 \r
1418 \r
1419 extern int lrand48_r (struct drand48_data *__restrict __buffer,\r
1420         long int *__restrict __result)\r
1421      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1422 extern int nrand48_r (unsigned short int __xsubi[3],\r
1423         struct drand48_data *__restrict __buffer,\r
1424         long int *__restrict __result)\r
1425      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1426 \r
1427 \r
1428 extern int mrand48_r (struct drand48_data *__restrict __buffer,\r
1429         long int *__restrict __result)\r
1430      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1431 extern int jrand48_r (unsigned short int __xsubi[3],\r
1432         struct drand48_data *__restrict __buffer,\r
1433         long int *__restrict __result)\r
1434      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1435 \r
1436 \r
1437 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)\r
1438      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1439 \r
1440 extern int seed48_r (unsigned short int __seed16v[3],\r
1441        struct drand48_data *__buffer) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1442 \r
1443 extern int lcong48_r (unsigned short int __param[7],\r
1444         struct drand48_data *__buffer)\r
1445      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1446 # 466 "/usr/include/stdlib.h" 3 4\r
1447 extern void *malloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
1448 \r
1449 extern void *calloc (size_t __nmemb, size_t __size)\r
1450      __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
1451 # 480 "/usr/include/stdlib.h" 3 4\r
1452 extern void *realloc (void *__ptr, size_t __size)\r
1453      __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));\r
1454 \r
1455 extern void free (void *__ptr) __attribute__ ((__nothrow__ ));\r
1456 \r
1457 \r
1458 \r
1459 \r
1460 extern void cfree (void *__ptr) __attribute__ ((__nothrow__ ));\r
1461 \r
1462 \r
1463 \r
1464 \r
1465 # 1 "/usr/include/alloca.h" 1 3 4\r
1466 # 24 "/usr/include/alloca.h" 3 4\r
1467 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
1468 # 25 "/usr/include/alloca.h" 2 3 4\r
1469 \r
1470 \r
1471 \r
1472 \r
1473 \r
1474 \r
1475 \r
1476 extern void *alloca (size_t __size) __attribute__ ((__nothrow__ ));\r
1477 # 493 "/usr/include/stdlib.h" 2 3 4\r
1478 \r
1479 \r
1480 \r
1481 \r
1482 \r
1483 extern void *valloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
1484 \r
1485 \r
1486 \r
1487 \r
1488 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)\r
1489      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1490 # 515 "/usr/include/stdlib.h" 3 4\r
1491 extern void abort (void) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
1492 \r
1493 \r
1494 \r
1495 extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1496 # 535 "/usr/include/stdlib.h" 3 4\r
1497 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)\r
1498      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1499 \r
1500 \r
1501 \r
1502 \r
1503 \r
1504 \r
1505 extern void exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
1506 # 557 "/usr/include/stdlib.h" 3 4\r
1507 extern void _Exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
1508 \r
1509 \r
1510 \r
1511 \r
1512 \r
1513 \r
1514 extern char *getenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1515 # 578 "/usr/include/stdlib.h" 3 4\r
1516 extern int putenv (char *__string) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1517 \r
1518 \r
1519 \r
1520 \r
1521 \r
1522 extern int setenv (const char *__name, const char *__value, int __replace)\r
1523      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1524 \r
1525 \r
1526 extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1527 \r
1528 \r
1529 \r
1530 \r
1531 \r
1532 \r
1533 extern int clearenv (void) __attribute__ ((__nothrow__ ));\r
1534 # 606 "/usr/include/stdlib.h" 3 4\r
1535 extern char *mktemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1536 # 620 "/usr/include/stdlib.h" 3 4\r
1537 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;\r
1538 # 642 "/usr/include/stdlib.h" 3 4\r
1539 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;\r
1540 # 663 "/usr/include/stdlib.h" 3 4\r
1541 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1542 # 717 "/usr/include/stdlib.h" 3 4\r
1543 extern int system (const char *__command) ;\r
1544 # 734 "/usr/include/stdlib.h" 3 4\r
1545 extern char *realpath (const char *__restrict __name,\r
1546          char *__restrict __resolved) __attribute__ ((__nothrow__ )) ;\r
1547 \r
1548 \r
1549 \r
1550 \r
1551 \r
1552 \r
1553 typedef int (*__compar_fn_t) (const void *, const void *);\r
1554 # 755 "/usr/include/stdlib.h" 3 4\r
1555 extern void *bsearch (const void *__key, const void *__base,\r
1556         size_t __nmemb, size_t __size, __compar_fn_t __compar)\r
1557      __attribute__ ((__nonnull__ (1, 2, 5))) ;\r
1558 \r
1559 \r
1560 \r
1561 \r
1562 \r
1563 \r
1564 \r
1565 extern void qsort (void *__base, size_t __nmemb, size_t __size,\r
1566      __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));\r
1567 # 775 "/usr/include/stdlib.h" 3 4\r
1568 extern int abs (int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1569 extern long int labs (long int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1570 \r
1571 \r
1572 \r
1573 __extension__ extern long long int llabs (long long int __x)\r
1574      __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1575 \r
1576 \r
1577 \r
1578 \r
1579 \r
1580 \r
1581 \r
1582 extern div_t div (int __numer, int __denom)\r
1583      __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1584 extern ldiv_t ldiv (long int __numer, long int __denom)\r
1585      __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1586 \r
1587 \r
1588 \r
1589 \r
1590 __extension__ extern lldiv_t lldiv (long long int __numer,\r
1591         long long int __denom)\r
1592      __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
1593 # 812 "/usr/include/stdlib.h" 3 4\r
1594 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,\r
1595      int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
1596 \r
1597 \r
1598 \r
1599 \r
1600 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,\r
1601      int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
1602 \r
1603 \r
1604 \r
1605 \r
1606 extern char *gcvt (double __value, int __ndigit, char *__buf)\r
1607      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) ;\r
1608 \r
1609 \r
1610 \r
1611 \r
1612 extern char *qecvt (long double __value, int __ndigit,\r
1613       int *__restrict __decpt, int *__restrict __sign)\r
1614      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
1615 extern char *qfcvt (long double __value, int __ndigit,\r
1616       int *__restrict __decpt, int *__restrict __sign)\r
1617      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
1618 extern char *qgcvt (long double __value, int __ndigit, char *__buf)\r
1619      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) ;\r
1620 \r
1621 \r
1622 \r
1623 \r
1624 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,\r
1625      int *__restrict __sign, char *__restrict __buf,\r
1626      size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
1627 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,\r
1628      int *__restrict __sign, char *__restrict __buf,\r
1629      size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
1630 \r
1631 extern int qecvt_r (long double __value, int __ndigit,\r
1632       int *__restrict __decpt, int *__restrict __sign,\r
1633       char *__restrict __buf, size_t __len)\r
1634      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
1635 extern int qfcvt_r (long double __value, int __ndigit,\r
1636       int *__restrict __decpt, int *__restrict __sign,\r
1637       char *__restrict __buf, size_t __len)\r
1638      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
1639 \r
1640 \r
1641 \r
1642 \r
1643 \r
1644 \r
1645 extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ ));\r
1646 \r
1647 \r
1648 extern int mbtowc (wchar_t *__restrict __pwc,\r
1649      const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));\r
1650 \r
1651 \r
1652 extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ ));\r
1653 \r
1654 \r
1655 \r
1656 extern size_t mbstowcs (wchar_t *__restrict __pwcs,\r
1657    const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));\r
1658 \r
1659 extern size_t wcstombs (char *__restrict __s,\r
1660    const wchar_t *__restrict __pwcs, size_t __n)\r
1661      __attribute__ ((__nothrow__ ));\r
1662 # 888 "/usr/include/stdlib.h" 3 4\r
1663 extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1664 # 899 "/usr/include/stdlib.h" 3 4\r
1665 extern int getsubopt (char **__restrict __optionp,\r
1666         char *const *__restrict __tokens,\r
1667         char **__restrict __valuep)\r
1668      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3))) ;\r
1669 # 951 "/usr/include/stdlib.h" 3 4\r
1670 extern int getloadavg (double __loadavg[], int __nelem)\r
1671      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1672 \r
1673 \r
1674 \r
1675 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4\r
1676 # 956 "/usr/include/stdlib.h" 2 3 4\r
1677 # 24 "./../test/abts.h" 2\r
1678 # 1 "/usr/include/string.h" 1 3 4\r
1679 # 32 "/usr/include/string.h" 3 4\r
1680 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
1681 # 33 "/usr/include/string.h" 2 3 4\r
1682 # 46 "/usr/include/string.h" 3 4\r
1683 extern void *memcpy (void *__restrict __dest, const void *__restrict __src,\r
1684        size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1685 \r
1686 \r
1687 extern void *memmove (void *__dest, const void *__src, size_t __n)\r
1688      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1689 \r
1690 \r
1691 \r
1692 \r
1693 \r
1694 \r
1695 extern void *memccpy (void *__restrict __dest, const void *__restrict __src,\r
1696         int __c, size_t __n)\r
1697      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1698 \r
1699 \r
1700 \r
1701 \r
1702 \r
1703 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1704 \r
1705 \r
1706 extern int memcmp (const void *__s1, const void *__s2, size_t __n)\r
1707      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1708 # 96 "/usr/include/string.h" 3 4\r
1709 extern void *memchr (const void *__s, int __c, size_t __n)\r
1710       __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1711 # 129 "/usr/include/string.h" 3 4\r
1712 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)\r
1713      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1714 \r
1715 extern char *strncpy (char *__restrict __dest,\r
1716         const char *__restrict __src, size_t __n)\r
1717      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1718 \r
1719 \r
1720 extern char *strcat (char *__restrict __dest, const char *__restrict __src)\r
1721      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1722 \r
1723 extern char *strncat (char *__restrict __dest, const char *__restrict __src,\r
1724         size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1725 \r
1726 \r
1727 extern int strcmp (const char *__s1, const char *__s2)\r
1728      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1729 \r
1730 extern int strncmp (const char *__s1, const char *__s2, size_t __n)\r
1731      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1732 \r
1733 \r
1734 extern int strcoll (const char *__s1, const char *__s2)\r
1735      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1736 \r
1737 extern size_t strxfrm (char *__restrict __dest,\r
1738          const char *__restrict __src, size_t __n)\r
1739      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1740 \r
1741 \r
1742 \r
1743 \r
1744 \r
1745 \r
1746 \r
1747 # 1 "/usr/include/xlocale.h" 1 3 4\r
1748 # 27 "/usr/include/xlocale.h" 3 4\r
1749 typedef struct __locale_struct\r
1750 {\r
1751 \r
1752   struct __locale_data *__locales[13];\r
1753 \r
1754 \r
1755   const unsigned short int *__ctype_b;\r
1756   const int *__ctype_tolower;\r
1757   const int *__ctype_toupper;\r
1758 \r
1759 \r
1760   const char *__names[13];\r
1761 } *__locale_t;\r
1762 \r
1763 \r
1764 typedef __locale_t locale_t;\r
1765 # 164 "/usr/include/string.h" 2 3 4\r
1766 \r
1767 \r
1768 extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)\r
1769      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));\r
1770 \r
1771 extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,\r
1772     __locale_t __l) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
1773 \r
1774 \r
1775 \r
1776 \r
1777 \r
1778 extern char *strdup (const char *__s)\r
1779      __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));\r
1780 \r
1781 \r
1782 \r
1783 \r
1784 \r
1785 \r
1786 extern char *strndup (const char *__string, size_t __n)\r
1787      __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));\r
1788 # 236 "/usr/include/string.h" 3 4\r
1789 extern char *strchr (const char *__s, int __c)\r
1790      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1791 # 263 "/usr/include/string.h" 3 4\r
1792 extern char *strrchr (const char *__s, int __c)\r
1793      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1794 # 285 "/usr/include/string.h" 3 4\r
1795 extern size_t strcspn (const char *__s, const char *__reject)\r
1796      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1797 \r
1798 \r
1799 extern size_t strspn (const char *__s, const char *__accept)\r
1800      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1801 # 315 "/usr/include/string.h" 3 4\r
1802 extern char *strpbrk (const char *__s, const char *__accept)\r
1803      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1804 # 342 "/usr/include/string.h" 3 4\r
1805 extern char *strstr (const char *__haystack, const char *__needle)\r
1806      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1807 \r
1808 \r
1809 \r
1810 \r
1811 extern char *strtok (char *__restrict __s, const char *__restrict __delim)\r
1812      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1813 \r
1814 \r
1815 \r
1816 \r
1817 extern char *__strtok_r (char *__restrict __s,\r
1818     const char *__restrict __delim,\r
1819     char **__restrict __save_ptr)\r
1820      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
1821 \r
1822 extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,\r
1823          char **__restrict __save_ptr)\r
1824      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
1825 # 399 "/usr/include/string.h" 3 4\r
1826 extern size_t strlen (const char *__s)\r
1827      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1828 \r
1829 \r
1830 \r
1831 \r
1832 \r
1833 extern size_t strnlen (const char *__string, size_t __maxlen)\r
1834      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1835 \r
1836 \r
1837 \r
1838 \r
1839 \r
1840 extern char *strerror (int __errnum) __attribute__ ((__nothrow__ ));\r
1841 # 427 "/usr/include/string.h" 3 4\r
1842 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
1843 # 445 "/usr/include/string.h" 3 4\r
1844 extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ ));\r
1845 \r
1846 \r
1847 \r
1848 \r
1849 \r
1850 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1851 \r
1852 \r
1853 \r
1854 extern void bcopy (const void *__src, void *__dest, size_t __n)\r
1855      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1856 \r
1857 \r
1858 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1859 \r
1860 \r
1861 extern int bcmp (const void *__s1, const void *__s2, size_t __n)\r
1862      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1863 # 489 "/usr/include/string.h" 3 4\r
1864 extern char *index (const char *__s, int __c)\r
1865      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1866 # 517 "/usr/include/string.h" 3 4\r
1867 extern char *rindex (const char *__s, int __c)\r
1868      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
1869 \r
1870 \r
1871 \r
1872 \r
1873 extern int ffs (int __i) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
1874 # 534 "/usr/include/string.h" 3 4\r
1875 extern int strcasecmp (const char *__s1, const char *__s2)\r
1876      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1877 \r
1878 \r
1879 extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)\r
1880      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
1881 # 557 "/usr/include/string.h" 3 4\r
1882 extern char *strsep (char **__restrict __stringp,\r
1883        const char *__restrict __delim)\r
1884      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1885 \r
1886 \r
1887 \r
1888 \r
1889 extern char *strsignal (int __sig) __attribute__ ((__nothrow__ ));\r
1890 \r
1891 \r
1892 extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)\r
1893      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1894 extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)\r
1895      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1896 \r
1897 \r
1898 \r
1899 extern char *__stpncpy (char *__restrict __dest,\r
1900    const char *__restrict __src, size_t __n)\r
1901      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1902 extern char *stpncpy (char *__restrict __dest,\r
1903         const char *__restrict __src, size_t __n)\r
1904      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
1905 # 25 "./../test/abts.h" 2\r
1906 \r
1907 \r
1908 \r
1909 # 1 "/usr/include/unistd.h" 1 3 4\r
1910 # 202 "/usr/include/unistd.h" 3 4\r
1911 # 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4\r
1912 # 203 "/usr/include/unistd.h" 2 3 4\r
1913 \r
1914 \r
1915 \r
1916 # 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4\r
1917 # 22 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4\r
1918 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
1919 # 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4\r
1920 # 207 "/usr/include/unistd.h" 2 3 4\r
1921 # 226 "/usr/include/unistd.h" 3 4\r
1922 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
1923 # 227 "/usr/include/unistd.h" 2 3 4\r
1924 # 255 "/usr/include/unistd.h" 3 4\r
1925 typedef __useconds_t useconds_t;\r
1926 # 267 "/usr/include/unistd.h" 3 4\r
1927 typedef __intptr_t intptr_t;\r
1928 \r
1929 \r
1930 \r
1931 \r
1932 \r
1933 \r
1934 typedef __socklen_t socklen_t;\r
1935 # 287 "/usr/include/unistd.h" 3 4\r
1936 extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
1937 # 304 "/usr/include/unistd.h" 3 4\r
1938 extern int faccessat (int __fd, const char *__file, int __type, int __flag)\r
1939      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
1940 # 334 "/usr/include/unistd.h" 3 4\r
1941 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ ));\r
1942 # 353 "/usr/include/unistd.h" 3 4\r
1943 extern int close (int __fd);\r
1944 \r
1945 \r
1946 \r
1947 \r
1948 \r
1949 \r
1950 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;\r
1951 \r
1952 \r
1953 \r
1954 \r
1955 \r
1956 extern ssize_t write (int __fd, const void *__buf, size_t __n) ;\r
1957 # 376 "/usr/include/unistd.h" 3 4\r
1958 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,\r
1959         __off_t __offset) ;\r
1960 \r
1961 \r
1962 \r
1963 \r
1964 \r
1965 \r
1966 extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,\r
1967          __off_t __offset) ;\r
1968 # 417 "/usr/include/unistd.h" 3 4\r
1969 extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ )) ;\r
1970 # 432 "/usr/include/unistd.h" 3 4\r
1971 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ ));\r
1972 # 444 "/usr/include/unistd.h" 3 4\r
1973 extern unsigned int sleep (unsigned int __seconds);\r
1974 \r
1975 \r
1976 \r
1977 \r
1978 \r
1979 \r
1980 \r
1981 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)\r
1982      __attribute__ ((__nothrow__ ));\r
1983 \r
1984 \r
1985 \r
1986 \r
1987 \r
1988 \r
1989 extern int usleep (__useconds_t __useconds);\r
1990 # 469 "/usr/include/unistd.h" 3 4\r
1991 extern int pause (void);\r
1992 \r
1993 \r
1994 \r
1995 extern int chown (const char *__file, __uid_t __owner, __gid_t __group)\r
1996      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
1997 \r
1998 \r
1999 \r
2000 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ )) ;\r
2001 \r
2002 \r
2003 \r
2004 \r
2005 extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)\r
2006      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
2007 \r
2008 \r
2009 \r
2010 \r
2011 \r
2012 \r
2013 extern int fchownat (int __fd, const char *__file, __uid_t __owner,\r
2014        __gid_t __group, int __flag)\r
2015      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
2016 \r
2017 \r
2018 \r
2019 extern int chdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
2020 \r
2021 \r
2022 \r
2023 extern int fchdir (int __fd) __attribute__ ((__nothrow__ )) ;\r
2024 # 511 "/usr/include/unistd.h" 3 4\r
2025 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ )) ;\r
2026 # 525 "/usr/include/unistd.h" 3 4\r
2027 extern char *getwd (char *__buf)\r
2028      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;\r
2029 \r
2030 \r
2031 \r
2032 \r
2033 extern int dup (int __fd) __attribute__ ((__nothrow__ )) ;\r
2034 \r
2035 \r
2036 extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ ));\r
2037 # 543 "/usr/include/unistd.h" 3 4\r
2038 extern char **__environ;\r
2039 \r
2040 \r
2041 \r
2042 \r
2043 \r
2044 \r
2045 \r
2046 extern int execve (const char *__path, char *const __argv[],\r
2047      char *const __envp[]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2048 \r
2049 \r
2050 \r
2051 \r
2052 extern int fexecve (int __fd, char *const __argv[], char *const __envp[])\r
2053      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
2054 \r
2055 \r
2056 \r
2057 \r
2058 extern int execv (const char *__path, char *const __argv[])\r
2059      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2060 \r
2061 \r
2062 \r
2063 extern int execle (const char *__path, const char *__arg, ...)\r
2064      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2065 \r
2066 \r
2067 \r
2068 extern int execl (const char *__path, const char *__arg, ...)\r
2069      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2070 \r
2071 \r
2072 \r
2073 extern int execvp (const char *__file, char *const __argv[])\r
2074      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2075 \r
2076 \r
2077 \r
2078 \r
2079 extern int execlp (const char *__file, const char *__arg, ...)\r
2080      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
2081 # 598 "/usr/include/unistd.h" 3 4\r
2082 extern int nice (int __inc) __attribute__ ((__nothrow__ )) ;\r
2083 \r
2084 \r
2085 \r
2086 \r
2087 extern void _exit (int __status) __attribute__ ((__noreturn__));\r
2088 \r
2089 \r
2090 \r
2091 \r
2092 \r
2093 \r
2094 # 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4\r
2095 # 24 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4\r
2096 enum\r
2097   {\r
2098     _PC_LINK_MAX,\r
2099 \r
2100     _PC_MAX_CANON,\r
2101 \r
2102     _PC_MAX_INPUT,\r
2103 \r
2104     _PC_NAME_MAX,\r
2105 \r
2106     _PC_PATH_MAX,\r
2107 \r
2108     _PC_PIPE_BUF,\r
2109 \r
2110     _PC_CHOWN_RESTRICTED,\r
2111 \r
2112     _PC_NO_TRUNC,\r
2113 \r
2114     _PC_VDISABLE,\r
2115 \r
2116     _PC_SYNC_IO,\r
2117 \r
2118     _PC_ASYNC_IO,\r
2119 \r
2120     _PC_PRIO_IO,\r
2121 \r
2122     _PC_SOCK_MAXBUF,\r
2123 \r
2124     _PC_FILESIZEBITS,\r
2125 \r
2126     _PC_REC_INCR_XFER_SIZE,\r
2127 \r
2128     _PC_REC_MAX_XFER_SIZE,\r
2129 \r
2130     _PC_REC_MIN_XFER_SIZE,\r
2131 \r
2132     _PC_REC_XFER_ALIGN,\r
2133 \r
2134     _PC_ALLOC_SIZE_MIN,\r
2135 \r
2136     _PC_SYMLINK_MAX,\r
2137 \r
2138     _PC_2_SYMLINKS\r
2139 \r
2140   };\r
2141 \r
2142 \r
2143 enum\r
2144   {\r
2145     _SC_ARG_MAX,\r
2146 \r
2147     _SC_CHILD_MAX,\r
2148 \r
2149     _SC_CLK_TCK,\r
2150 \r
2151     _SC_NGROUPS_MAX,\r
2152 \r
2153     _SC_OPEN_MAX,\r
2154 \r
2155     _SC_STREAM_MAX,\r
2156 \r
2157     _SC_TZNAME_MAX,\r
2158 \r
2159     _SC_JOB_CONTROL,\r
2160 \r
2161     _SC_SAVED_IDS,\r
2162 \r
2163     _SC_REALTIME_SIGNALS,\r
2164 \r
2165     _SC_PRIORITY_SCHEDULING,\r
2166 \r
2167     _SC_TIMERS,\r
2168 \r
2169     _SC_ASYNCHRONOUS_IO,\r
2170 \r
2171     _SC_PRIORITIZED_IO,\r
2172 \r
2173     _SC_SYNCHRONIZED_IO,\r
2174 \r
2175     _SC_FSYNC,\r
2176 \r
2177     _SC_MAPPED_FILES,\r
2178 \r
2179     _SC_MEMLOCK,\r
2180 \r
2181     _SC_MEMLOCK_RANGE,\r
2182 \r
2183     _SC_MEMORY_PROTECTION,\r
2184 \r
2185     _SC_MESSAGE_PASSING,\r
2186 \r
2187     _SC_SEMAPHORES,\r
2188 \r
2189     _SC_SHARED_MEMORY_OBJECTS,\r
2190 \r
2191     _SC_AIO_LISTIO_MAX,\r
2192 \r
2193     _SC_AIO_MAX,\r
2194 \r
2195     _SC_AIO_PRIO_DELTA_MAX,\r
2196 \r
2197     _SC_DELAYTIMER_MAX,\r
2198 \r
2199     _SC_MQ_OPEN_MAX,\r
2200 \r
2201     _SC_MQ_PRIO_MAX,\r
2202 \r
2203     _SC_VERSION,\r
2204 \r
2205     _SC_PAGESIZE,\r
2206 \r
2207 \r
2208     _SC_RTSIG_MAX,\r
2209 \r
2210     _SC_SEM_NSEMS_MAX,\r
2211 \r
2212     _SC_SEM_VALUE_MAX,\r
2213 \r
2214     _SC_SIGQUEUE_MAX,\r
2215 \r
2216     _SC_TIMER_MAX,\r
2217 \r
2218 \r
2219 \r
2220 \r
2221     _SC_BC_BASE_MAX,\r
2222 \r
2223     _SC_BC_DIM_MAX,\r
2224 \r
2225     _SC_BC_SCALE_MAX,\r
2226 \r
2227     _SC_BC_STRING_MAX,\r
2228 \r
2229     _SC_COLL_WEIGHTS_MAX,\r
2230 \r
2231     _SC_EQUIV_CLASS_MAX,\r
2232 \r
2233     _SC_EXPR_NEST_MAX,\r
2234 \r
2235     _SC_LINE_MAX,\r
2236 \r
2237     _SC_RE_DUP_MAX,\r
2238 \r
2239     _SC_CHARCLASS_NAME_MAX,\r
2240 \r
2241 \r
2242     _SC_2_VERSION,\r
2243 \r
2244     _SC_2_C_BIND,\r
2245 \r
2246     _SC_2_C_DEV,\r
2247 \r
2248     _SC_2_FORT_DEV,\r
2249 \r
2250     _SC_2_FORT_RUN,\r
2251 \r
2252     _SC_2_SW_DEV,\r
2253 \r
2254     _SC_2_LOCALEDEF,\r
2255 \r
2256 \r
2257     _SC_PII,\r
2258 \r
2259     _SC_PII_XTI,\r
2260 \r
2261     _SC_PII_SOCKET,\r
2262 \r
2263     _SC_PII_INTERNET,\r
2264 \r
2265     _SC_PII_OSI,\r
2266 \r
2267     _SC_POLL,\r
2268 \r
2269     _SC_SELECT,\r
2270 \r
2271     _SC_UIO_MAXIOV,\r
2272 \r
2273     _SC_IOV_MAX = _SC_UIO_MAXIOV,\r
2274 \r
2275     _SC_PII_INTERNET_STREAM,\r
2276 \r
2277     _SC_PII_INTERNET_DGRAM,\r
2278 \r
2279     _SC_PII_OSI_COTS,\r
2280 \r
2281     _SC_PII_OSI_CLTS,\r
2282 \r
2283     _SC_PII_OSI_M,\r
2284 \r
2285     _SC_T_IOV_MAX,\r
2286 \r
2287 \r
2288 \r
2289     _SC_THREADS,\r
2290 \r
2291     _SC_THREAD_SAFE_FUNCTIONS,\r
2292 \r
2293     _SC_GETGR_R_SIZE_MAX,\r
2294 \r
2295     _SC_GETPW_R_SIZE_MAX,\r
2296 \r
2297     _SC_LOGIN_NAME_MAX,\r
2298 \r
2299     _SC_TTY_NAME_MAX,\r
2300 \r
2301     _SC_THREAD_DESTRUCTOR_ITERATIONS,\r
2302 \r
2303     _SC_THREAD_KEYS_MAX,\r
2304 \r
2305     _SC_THREAD_STACK_MIN,\r
2306 \r
2307     _SC_THREAD_THREADS_MAX,\r
2308 \r
2309     _SC_THREAD_ATTR_STACKADDR,\r
2310 \r
2311     _SC_THREAD_ATTR_STACKSIZE,\r
2312 \r
2313     _SC_THREAD_PRIORITY_SCHEDULING,\r
2314 \r
2315     _SC_THREAD_PRIO_INHERIT,\r
2316 \r
2317     _SC_THREAD_PRIO_PROTECT,\r
2318 \r
2319     _SC_THREAD_PROCESS_SHARED,\r
2320 \r
2321 \r
2322     _SC_NPROCESSORS_CONF,\r
2323 \r
2324     _SC_NPROCESSORS_ONLN,\r
2325 \r
2326     _SC_PHYS_PAGES,\r
2327 \r
2328     _SC_AVPHYS_PAGES,\r
2329 \r
2330     _SC_ATEXIT_MAX,\r
2331 \r
2332     _SC_PASS_MAX,\r
2333 \r
2334 \r
2335     _SC_XOPEN_VERSION,\r
2336 \r
2337     _SC_XOPEN_XCU_VERSION,\r
2338 \r
2339     _SC_XOPEN_UNIX,\r
2340 \r
2341     _SC_XOPEN_CRYPT,\r
2342 \r
2343     _SC_XOPEN_ENH_I18N,\r
2344 \r
2345     _SC_XOPEN_SHM,\r
2346 \r
2347 \r
2348     _SC_2_CHAR_TERM,\r
2349 \r
2350     _SC_2_C_VERSION,\r
2351 \r
2352     _SC_2_UPE,\r
2353 \r
2354 \r
2355     _SC_XOPEN_XPG2,\r
2356 \r
2357     _SC_XOPEN_XPG3,\r
2358 \r
2359     _SC_XOPEN_XPG4,\r
2360 \r
2361 \r
2362     _SC_CHAR_BIT,\r
2363 \r
2364     _SC_CHAR_MAX,\r
2365 \r
2366     _SC_CHAR_MIN,\r
2367 \r
2368     _SC_INT_MAX,\r
2369 \r
2370     _SC_INT_MIN,\r
2371 \r
2372     _SC_LONG_BIT,\r
2373 \r
2374     _SC_WORD_BIT,\r
2375 \r
2376     _SC_MB_LEN_MAX,\r
2377 \r
2378     _SC_NZERO,\r
2379 \r
2380     _SC_SSIZE_MAX,\r
2381 \r
2382     _SC_SCHAR_MAX,\r
2383 \r
2384     _SC_SCHAR_MIN,\r
2385 \r
2386     _SC_SHRT_MAX,\r
2387 \r
2388     _SC_SHRT_MIN,\r
2389 \r
2390     _SC_UCHAR_MAX,\r
2391 \r
2392     _SC_UINT_MAX,\r
2393 \r
2394     _SC_ULONG_MAX,\r
2395 \r
2396     _SC_USHRT_MAX,\r
2397 \r
2398 \r
2399     _SC_NL_ARGMAX,\r
2400 \r
2401     _SC_NL_LANGMAX,\r
2402 \r
2403     _SC_NL_MSGMAX,\r
2404 \r
2405     _SC_NL_NMAX,\r
2406 \r
2407     _SC_NL_SETMAX,\r
2408 \r
2409     _SC_NL_TEXTMAX,\r
2410 \r
2411 \r
2412     _SC_XBS5_ILP32_OFF32,\r
2413 \r
2414     _SC_XBS5_ILP32_OFFBIG,\r
2415 \r
2416     _SC_XBS5_LP64_OFF64,\r
2417 \r
2418     _SC_XBS5_LPBIG_OFFBIG,\r
2419 \r
2420 \r
2421     _SC_XOPEN_LEGACY,\r
2422 \r
2423     _SC_XOPEN_REALTIME,\r
2424 \r
2425     _SC_XOPEN_REALTIME_THREADS,\r
2426 \r
2427 \r
2428     _SC_ADVISORY_INFO,\r
2429 \r
2430     _SC_BARRIERS,\r
2431 \r
2432     _SC_BASE,\r
2433 \r
2434     _SC_C_LANG_SUPPORT,\r
2435 \r
2436     _SC_C_LANG_SUPPORT_R,\r
2437 \r
2438     _SC_CLOCK_SELECTION,\r
2439 \r
2440     _SC_CPUTIME,\r
2441 \r
2442     _SC_THREAD_CPUTIME,\r
2443 \r
2444     _SC_DEVICE_IO,\r
2445 \r
2446     _SC_DEVICE_SPECIFIC,\r
2447 \r
2448     _SC_DEVICE_SPECIFIC_R,\r
2449 \r
2450     _SC_FD_MGMT,\r
2451 \r
2452     _SC_FIFO,\r
2453 \r
2454     _SC_PIPE,\r
2455 \r
2456     _SC_FILE_ATTRIBUTES,\r
2457 \r
2458     _SC_FILE_LOCKING,\r
2459 \r
2460     _SC_FILE_SYSTEM,\r
2461 \r
2462     _SC_MONOTONIC_CLOCK,\r
2463 \r
2464     _SC_MULTI_PROCESS,\r
2465 \r
2466     _SC_SINGLE_PROCESS,\r
2467 \r
2468     _SC_NETWORKING,\r
2469 \r
2470     _SC_READER_WRITER_LOCKS,\r
2471 \r
2472     _SC_SPIN_LOCKS,\r
2473 \r
2474     _SC_REGEXP,\r
2475 \r
2476     _SC_REGEX_VERSION,\r
2477 \r
2478     _SC_SHELL,\r
2479 \r
2480     _SC_SIGNALS,\r
2481 \r
2482     _SC_SPAWN,\r
2483 \r
2484     _SC_SPORADIC_SERVER,\r
2485 \r
2486     _SC_THREAD_SPORADIC_SERVER,\r
2487 \r
2488     _SC_SYSTEM_DATABASE,\r
2489 \r
2490     _SC_SYSTEM_DATABASE_R,\r
2491 \r
2492     _SC_TIMEOUTS,\r
2493 \r
2494     _SC_TYPED_MEMORY_OBJECTS,\r
2495 \r
2496     _SC_USER_GROUPS,\r
2497 \r
2498     _SC_USER_GROUPS_R,\r
2499 \r
2500     _SC_2_PBS,\r
2501 \r
2502     _SC_2_PBS_ACCOUNTING,\r
2503 \r
2504     _SC_2_PBS_LOCATE,\r
2505 \r
2506     _SC_2_PBS_MESSAGE,\r
2507 \r
2508     _SC_2_PBS_TRACK,\r
2509 \r
2510     _SC_SYMLOOP_MAX,\r
2511 \r
2512     _SC_STREAMS,\r
2513 \r
2514     _SC_2_PBS_CHECKPOINT,\r
2515 \r
2516 \r
2517     _SC_V6_ILP32_OFF32,\r
2518 \r
2519     _SC_V6_ILP32_OFFBIG,\r
2520 \r
2521     _SC_V6_LP64_OFF64,\r
2522 \r
2523     _SC_V6_LPBIG_OFFBIG,\r
2524 \r
2525 \r
2526     _SC_HOST_NAME_MAX,\r
2527 \r
2528     _SC_TRACE,\r
2529 \r
2530     _SC_TRACE_EVENT_FILTER,\r
2531 \r
2532     _SC_TRACE_INHERIT,\r
2533 \r
2534     _SC_TRACE_LOG,\r
2535 \r
2536 \r
2537     _SC_LEVEL1_ICACHE_SIZE,\r
2538 \r
2539     _SC_LEVEL1_ICACHE_ASSOC,\r
2540 \r
2541     _SC_LEVEL1_ICACHE_LINESIZE,\r
2542 \r
2543     _SC_LEVEL1_DCACHE_SIZE,\r
2544 \r
2545     _SC_LEVEL1_DCACHE_ASSOC,\r
2546 \r
2547     _SC_LEVEL1_DCACHE_LINESIZE,\r
2548 \r
2549     _SC_LEVEL2_CACHE_SIZE,\r
2550 \r
2551     _SC_LEVEL2_CACHE_ASSOC,\r
2552 \r
2553     _SC_LEVEL2_CACHE_LINESIZE,\r
2554 \r
2555     _SC_LEVEL3_CACHE_SIZE,\r
2556 \r
2557     _SC_LEVEL3_CACHE_ASSOC,\r
2558 \r
2559     _SC_LEVEL3_CACHE_LINESIZE,\r
2560 \r
2561     _SC_LEVEL4_CACHE_SIZE,\r
2562 \r
2563     _SC_LEVEL4_CACHE_ASSOC,\r
2564 \r
2565     _SC_LEVEL4_CACHE_LINESIZE,\r
2566 \r
2567 \r
2568 \r
2569     _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,\r
2570 \r
2571     _SC_RAW_SOCKETS,\r
2572 \r
2573 \r
2574     _SC_V7_ILP32_OFF32,\r
2575 \r
2576     _SC_V7_ILP32_OFFBIG,\r
2577 \r
2578     _SC_V7_LP64_OFF64,\r
2579 \r
2580     _SC_V7_LPBIG_OFFBIG,\r
2581 \r
2582 \r
2583     _SC_SS_REPL_MAX,\r
2584 \r
2585 \r
2586     _SC_TRACE_EVENT_NAME_MAX,\r
2587 \r
2588     _SC_TRACE_NAME_MAX,\r
2589 \r
2590     _SC_TRACE_SYS_MAX,\r
2591 \r
2592     _SC_TRACE_USER_EVENT_MAX,\r
2593 \r
2594 \r
2595     _SC_XOPEN_STREAMS,\r
2596 \r
2597 \r
2598     _SC_THREAD_ROBUST_PRIO_INHERIT,\r
2599 \r
2600     _SC_THREAD_ROBUST_PRIO_PROTECT\r
2601 \r
2602   };\r
2603 \r
2604 \r
2605 enum\r
2606   {\r
2607     _CS_PATH,\r
2608 \r
2609 \r
2610     _CS_V6_WIDTH_RESTRICTED_ENVS,\r
2611 \r
2612 \r
2613 \r
2614     _CS_GNU_LIBC_VERSION,\r
2615 \r
2616     _CS_GNU_LIBPTHREAD_VERSION,\r
2617 \r
2618 \r
2619     _CS_V5_WIDTH_RESTRICTED_ENVS,\r
2620 \r
2621 \r
2622 \r
2623     _CS_V7_WIDTH_RESTRICTED_ENVS,\r
2624 \r
2625 \r
2626 \r
2627     _CS_LFS_CFLAGS = 1000,\r
2628 \r
2629     _CS_LFS_LDFLAGS,\r
2630 \r
2631     _CS_LFS_LIBS,\r
2632 \r
2633     _CS_LFS_LINTFLAGS,\r
2634 \r
2635     _CS_LFS64_CFLAGS,\r
2636 \r
2637     _CS_LFS64_LDFLAGS,\r
2638 \r
2639     _CS_LFS64_LIBS,\r
2640 \r
2641     _CS_LFS64_LINTFLAGS,\r
2642 \r
2643 \r
2644     _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,\r
2645 \r
2646     _CS_XBS5_ILP32_OFF32_LDFLAGS,\r
2647 \r
2648     _CS_XBS5_ILP32_OFF32_LIBS,\r
2649 \r
2650     _CS_XBS5_ILP32_OFF32_LINTFLAGS,\r
2651 \r
2652     _CS_XBS5_ILP32_OFFBIG_CFLAGS,\r
2653 \r
2654     _CS_XBS5_ILP32_OFFBIG_LDFLAGS,\r
2655 \r
2656     _CS_XBS5_ILP32_OFFBIG_LIBS,\r
2657 \r
2658     _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,\r
2659 \r
2660     _CS_XBS5_LP64_OFF64_CFLAGS,\r
2661 \r
2662     _CS_XBS5_LP64_OFF64_LDFLAGS,\r
2663 \r
2664     _CS_XBS5_LP64_OFF64_LIBS,\r
2665 \r
2666     _CS_XBS5_LP64_OFF64_LINTFLAGS,\r
2667 \r
2668     _CS_XBS5_LPBIG_OFFBIG_CFLAGS,\r
2669 \r
2670     _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,\r
2671 \r
2672     _CS_XBS5_LPBIG_OFFBIG_LIBS,\r
2673 \r
2674     _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,\r
2675 \r
2676 \r
2677     _CS_POSIX_V6_ILP32_OFF32_CFLAGS,\r
2678 \r
2679     _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,\r
2680 \r
2681     _CS_POSIX_V6_ILP32_OFF32_LIBS,\r
2682 \r
2683     _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,\r
2684 \r
2685     _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,\r
2686 \r
2687     _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,\r
2688 \r
2689     _CS_POSIX_V6_ILP32_OFFBIG_LIBS,\r
2690 \r
2691     _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,\r
2692 \r
2693     _CS_POSIX_V6_LP64_OFF64_CFLAGS,\r
2694 \r
2695     _CS_POSIX_V6_LP64_OFF64_LDFLAGS,\r
2696 \r
2697     _CS_POSIX_V6_LP64_OFF64_LIBS,\r
2698 \r
2699     _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,\r
2700 \r
2701     _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,\r
2702 \r
2703     _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,\r
2704 \r
2705     _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,\r
2706 \r
2707     _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,\r
2708 \r
2709 \r
2710     _CS_POSIX_V7_ILP32_OFF32_CFLAGS,\r
2711 \r
2712     _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,\r
2713 \r
2714     _CS_POSIX_V7_ILP32_OFF32_LIBS,\r
2715 \r
2716     _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,\r
2717 \r
2718     _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,\r
2719 \r
2720     _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,\r
2721 \r
2722     _CS_POSIX_V7_ILP32_OFFBIG_LIBS,\r
2723 \r
2724     _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,\r
2725 \r
2726     _CS_POSIX_V7_LP64_OFF64_CFLAGS,\r
2727 \r
2728     _CS_POSIX_V7_LP64_OFF64_LDFLAGS,\r
2729 \r
2730     _CS_POSIX_V7_LP64_OFF64_LIBS,\r
2731 \r
2732     _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,\r
2733 \r
2734     _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,\r
2735 \r
2736     _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,\r
2737 \r
2738     _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,\r
2739 \r
2740     _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,\r
2741 \r
2742 \r
2743     _CS_V6_ENV,\r
2744 \r
2745     _CS_V7_ENV\r
2746 \r
2747   };\r
2748 # 610 "/usr/include/unistd.h" 2 3 4\r
2749 \r
2750 \r
2751 extern long int pathconf (const char *__path, int __name)\r
2752      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2753 \r
2754 \r
2755 extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ ));\r
2756 \r
2757 \r
2758 extern long int sysconf (int __name) __attribute__ ((__nothrow__ ));\r
2759 \r
2760 \r
2761 \r
2762 extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ ));\r
2763 \r
2764 \r
2765 \r
2766 \r
2767 extern __pid_t getpid (void) __attribute__ ((__nothrow__ ));\r
2768 \r
2769 \r
2770 extern __pid_t getppid (void) __attribute__ ((__nothrow__ ));\r
2771 \r
2772 \r
2773 extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ ));\r
2774 \r
2775 \r
2776 extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
2777 \r
2778 extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
2779 \r
2780 \r
2781 \r
2782 \r
2783 \r
2784 \r
2785 extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ ));\r
2786 # 660 "/usr/include/unistd.h" 3 4\r
2787 extern int setpgrp (void) __attribute__ ((__nothrow__ ));\r
2788 \r
2789 \r
2790 \r
2791 \r
2792 \r
2793 \r
2794 extern __pid_t setsid (void) __attribute__ ((__nothrow__ ));\r
2795 \r
2796 \r
2797 \r
2798 extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
2799 \r
2800 \r
2801 \r
2802 extern __uid_t getuid (void) __attribute__ ((__nothrow__ ));\r
2803 \r
2804 \r
2805 extern __uid_t geteuid (void) __attribute__ ((__nothrow__ ));\r
2806 \r
2807 \r
2808 extern __gid_t getgid (void) __attribute__ ((__nothrow__ ));\r
2809 \r
2810 \r
2811 extern __gid_t getegid (void) __attribute__ ((__nothrow__ ));\r
2812 \r
2813 \r
2814 \r
2815 \r
2816 extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ )) ;\r
2817 # 700 "/usr/include/unistd.h" 3 4\r
2818 extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ )) ;\r
2819 \r
2820 \r
2821 \r
2822 \r
2823 extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ )) ;\r
2824 \r
2825 \r
2826 \r
2827 \r
2828 extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ )) ;\r
2829 \r
2830 \r
2831 \r
2832 \r
2833 \r
2834 \r
2835 extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ )) ;\r
2836 \r
2837 \r
2838 \r
2839 \r
2840 extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ )) ;\r
2841 \r
2842 \r
2843 \r
2844 \r
2845 extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ )) ;\r
2846 # 756 "/usr/include/unistd.h" 3 4\r
2847 extern __pid_t fork (void) __attribute__ ((__nothrow__));\r
2848 \r
2849 \r
2850 \r
2851 \r
2852 \r
2853 \r
2854 \r
2855 extern __pid_t vfork (void) __attribute__ ((__nothrow__ ));\r
2856 \r
2857 \r
2858 \r
2859 \r
2860 \r
2861 extern char *ttyname (int __fd) __attribute__ ((__nothrow__ ));\r
2862 \r
2863 \r
2864 \r
2865 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)\r
2866      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
2867 \r
2868 \r
2869 \r
2870 extern int isatty (int __fd) __attribute__ ((__nothrow__ ));\r
2871 \r
2872 \r
2873 \r
2874 \r
2875 \r
2876 extern int ttyslot (void) __attribute__ ((__nothrow__ ));\r
2877 \r
2878 \r
2879 \r
2880 \r
2881 extern int link (const char *__from, const char *__to)\r
2882      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;\r
2883 \r
2884 \r
2885 \r
2886 \r
2887 extern int linkat (int __fromfd, const char *__from, int __tofd,\r
2888      const char *__to, int __flags)\r
2889      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4))) ;\r
2890 \r
2891 \r
2892 \r
2893 \r
2894 extern int symlink (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 ssize_t readlink (const char *__restrict __path,\r
2901     char *__restrict __buf, size_t __len)\r
2902      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;\r
2903 \r
2904 \r
2905 \r
2906 \r
2907 extern int symlinkat (const char *__from, int __tofd,\r
2908         const char *__to) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3))) ;\r
2909 \r
2910 \r
2911 extern ssize_t readlinkat (int __fd, const char *__restrict __path,\r
2912       char *__restrict __buf, size_t __len)\r
2913      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3))) ;\r
2914 \r
2915 \r
2916 \r
2917 extern int unlink (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2918 \r
2919 \r
2920 \r
2921 extern int unlinkat (int __fd, const char *__name, int __flag)\r
2922      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
2923 \r
2924 \r
2925 \r
2926 extern int rmdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2927 \r
2928 \r
2929 \r
2930 extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ ));\r
2931 \r
2932 \r
2933 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ ));\r
2934 \r
2935 \r
2936 \r
2937 \r
2938 \r
2939 \r
2940 extern char *getlogin (void);\r
2941 \r
2942 \r
2943 \r
2944 \r
2945 \r
2946 \r
2947 \r
2948 extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));\r
2949 \r
2950 \r
2951 \r
2952 \r
2953 extern int setlogin (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2954 # 871 "/usr/include/unistd.h" 3 4\r
2955 # 1 "/usr/include/getopt.h" 1 3 4\r
2956 # 57 "/usr/include/getopt.h" 3 4\r
2957 extern char *optarg;\r
2958 # 71 "/usr/include/getopt.h" 3 4\r
2959 extern int optind;\r
2960 \r
2961 \r
2962 \r
2963 \r
2964 extern int opterr;\r
2965 \r
2966 \r
2967 \r
2968 extern int optopt;\r
2969 # 150 "/usr/include/getopt.h" 3 4\r
2970 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)\r
2971        __attribute__ ((__nothrow__ ));\r
2972 # 872 "/usr/include/unistd.h" 2 3 4\r
2973 \r
2974 \r
2975 \r
2976 \r
2977 \r
2978 \r
2979 \r
2980 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
2981 \r
2982 \r
2983 \r
2984 \r
2985 \r
2986 \r
2987 extern int sethostname (const char *__name, size_t __len)\r
2988      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
2989 \r
2990 \r
2991 \r
2992 extern int sethostid (long int __id) __attribute__ ((__nothrow__ )) ;\r
2993 \r
2994 \r
2995 \r
2996 \r
2997 \r
2998 extern int getdomainname (char *__name, size_t __len)\r
2999      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3000 extern int setdomainname (const char *__name, size_t __len)\r
3001      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3002 \r
3003 \r
3004 \r
3005 \r
3006 \r
3007 extern int vhangup (void) __attribute__ ((__nothrow__ ));\r
3008 \r
3009 \r
3010 extern int revoke (const char *__file) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3011 \r
3012 \r
3013 \r
3014 \r
3015 \r
3016 \r
3017 \r
3018 extern int profil (unsigned short int *__sample_buffer, size_t __size,\r
3019      size_t __offset, unsigned int __scale)\r
3020      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3021 \r
3022 \r
3023 \r
3024 \r
3025 \r
3026 extern int acct (const char *__name) __attribute__ ((__nothrow__ ));\r
3027 \r
3028 \r
3029 \r
3030 extern char *getusershell (void) __attribute__ ((__nothrow__ ));\r
3031 extern void endusershell (void) __attribute__ ((__nothrow__ ));\r
3032 extern void setusershell (void) __attribute__ ((__nothrow__ ));\r
3033 \r
3034 \r
3035 \r
3036 \r
3037 \r
3038 extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ )) ;\r
3039 \r
3040 \r
3041 \r
3042 \r
3043 \r
3044 \r
3045 extern int chroot (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3046 \r
3047 \r
3048 \r
3049 extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));\r
3050 \r
3051 \r
3052 \r
3053 \r
3054 \r
3055 \r
3056 \r
3057 extern int fsync (int __fd);\r
3058 # 969 "/usr/include/unistd.h" 3 4\r
3059 extern long int gethostid (void);\r
3060 \r
3061 \r
3062 extern void sync (void) __attribute__ ((__nothrow__ ));\r
3063 \r
3064 \r
3065 \r
3066 \r
3067 \r
3068 extern int getpagesize (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
3069 \r
3070 \r
3071 \r
3072 \r
3073 extern int getdtablesize (void) __attribute__ ((__nothrow__ ));\r
3074 # 993 "/usr/include/unistd.h" 3 4\r
3075 extern int truncate (const char *__file, __off_t __length)\r
3076      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
3077 # 1016 "/usr/include/unistd.h" 3 4\r
3078 extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ )) ;\r
3079 # 1037 "/usr/include/unistd.h" 3 4\r
3080 extern int brk (void *__addr) __attribute__ ((__nothrow__ )) ;\r
3081 \r
3082 \r
3083 \r
3084 \r
3085 \r
3086 extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ ));\r
3087 # 1058 "/usr/include/unistd.h" 3 4\r
3088 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ ));\r
3089 # 1081 "/usr/include/unistd.h" 3 4\r
3090 extern int lockf (int __fd, int __cmd, __off_t __len) ;\r
3091 # 1112 "/usr/include/unistd.h" 3 4\r
3092 extern int fdatasync (int __fildes);\r
3093 # 29 "./../test/abts.h" 2\r
3094 # 41 "./../test/abts.h"\r
3095 struct sub_suite {\r
3096     const char *name;\r
3097     int num_test;\r
3098     int failed;\r
3099     int not_run;\r
3100     int not_impl;\r
3101     struct sub_suite *next;\r
3102 };\r
3103 typedef struct sub_suite sub_suite;\r
3104 \r
3105 struct abts_suite {\r
3106     sub_suite *head;\r
3107     sub_suite *tail;\r
3108 };\r
3109 typedef struct abts_suite abts_suite;\r
3110 \r
3111 struct abts_case {\r
3112     int failed;\r
3113     sub_suite *suite;\r
3114 };\r
3115 typedef struct abts_case abts_case;\r
3116 \r
3117 typedef void (*test_func)(abts_case *tc, void *data);\r
3118 \r
3119 \r
3120 \r
3121 abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name);\r
3122 void abts_run_test(abts_suite *ts, test_func f, void *value);\r
3123 void abts_log_message(const char *fmt, ...);\r
3124 \r
3125 void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno);\r
3126 void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno);\r
3127 void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno);\r
3128 void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,\r
3129                        size_t n, int lineno);\r
3130 void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno);\r
3131 void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno);\r
3132 void abts_true(abts_case *tc, int condition, int lineno);\r
3133 void abts_fail(abts_case *tc, const char *message, int lineno);\r
3134 void abts_not_impl(abts_case *tc, const char *message, int lineno);\r
3135 void abts_assert(abts_case *tc, const char *message, int condition, int lineno);\r
3136 void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno);\r
3137 # 99 "./../test/abts.h"\r
3138 abts_suite *run_tests(abts_suite *suite);\r
3139 abts_suite *run_tests1(abts_suite *suite);\r
3140 # 7 "main2.c" 2\r
3141 # 1 "./../test/testutil.h" 1\r
3142 # 17 "./../test/testutil.h"\r
3143 # 1 "../include/apr_pools.h" 1\r
3144 # 43 "../include/apr_pools.h"\r
3145 # 1 "../include/apr.h" 1\r
3146 # 168 "../include/apr.h"\r
3147 # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4\r
3148 # 26 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3149 # 1 "/usr/include/x86_64-linux-gnu/sys/uio.h" 1 3 4\r
3150 # 28 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3151 # 1 "/usr/include/x86_64-linux-gnu/bits/uio.h" 1 3 4\r
3152 # 43 "/usr/include/x86_64-linux-gnu/bits/uio.h" 3 4\r
3153 struct iovec\r
3154   {\r
3155     void *iov_base;\r
3156     size_t iov_len;\r
3157   };\r
3158 # 29 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4\r
3159 # 39 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3160 extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)\r
3161        ;\r
3162 # 50 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3163 extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)\r
3164        ;\r
3165 # 65 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3166 extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,\r
3167          __off_t __offset) ;\r
3168 # 77 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
3169 extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,\r
3170    __off_t __offset) ;\r
3171 # 27 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
3172 \r
3173 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
3174 # 29 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
3175 # 38 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3176 # 1 "/usr/include/x86_64-linux-gnu/bits/socket.h" 1 3 4\r
3177 # 27 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3178 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
3179 # 28 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
3180 # 38 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3181 # 1 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 1 3 4\r
3182 # 24 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 3 4\r
3183 enum __socket_type\r
3184 {\r
3185   SOCK_STREAM = 1,\r
3186 \r
3187 \r
3188   SOCK_DGRAM = 2,\r
3189 \r
3190 \r
3191   SOCK_RAW = 3,\r
3192 \r
3193   SOCK_RDM = 4,\r
3194 \r
3195   SOCK_SEQPACKET = 5,\r
3196 \r
3197 \r
3198   SOCK_DCCP = 6,\r
3199 \r
3200   SOCK_PACKET = 10,\r
3201 \r
3202 \r
3203 \r
3204 \r
3205 \r
3206 \r
3207 \r
3208   SOCK_CLOEXEC = 02000000,\r
3209 \r
3210 \r
3211   SOCK_NONBLOCK = 00004000\r
3212 \r
3213 \r
3214 };\r
3215 # 39 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
3216 # 146 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3217 # 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4\r
3218 # 28 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 3 4\r
3219 typedef unsigned short int sa_family_t;\r
3220 # 147 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
3221 \r
3222 \r
3223 struct sockaddr\r
3224   {\r
3225     sa_family_t sa_family;\r
3226     char sa_data[14];\r
3227   };\r
3228 # 162 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3229 struct sockaddr_storage\r
3230   {\r
3231     sa_family_t ss_family;\r
3232     unsigned long int __ss_align;\r
3233     char __ss_padding[(128 - (2 * sizeof (unsigned long int)))];\r
3234   };\r
3235 \r
3236 \r
3237 \r
3238 enum\r
3239   {\r
3240     MSG_OOB = 0x01,\r
3241 \r
3242     MSG_PEEK = 0x02,\r
3243 \r
3244     MSG_DONTROUTE = 0x04,\r
3245 \r
3246 \r
3247 \r
3248 \r
3249 \r
3250 \r
3251     MSG_CTRUNC = 0x08,\r
3252 \r
3253     MSG_PROXY = 0x10,\r
3254 \r
3255     MSG_TRUNC = 0x20,\r
3256 \r
3257     MSG_DONTWAIT = 0x40,\r
3258 \r
3259     MSG_EOR = 0x80,\r
3260 \r
3261     MSG_WAITALL = 0x100,\r
3262 \r
3263     MSG_FIN = 0x200,\r
3264 \r
3265     MSG_SYN = 0x400,\r
3266 \r
3267     MSG_CONFIRM = 0x800,\r
3268 \r
3269     MSG_RST = 0x1000,\r
3270 \r
3271     MSG_ERRQUEUE = 0x2000,\r
3272 \r
3273     MSG_NOSIGNAL = 0x4000,\r
3274 \r
3275     MSG_MORE = 0x8000,\r
3276 \r
3277     MSG_WAITFORONE = 0x10000,\r
3278 \r
3279     MSG_FASTOPEN = 0x20000000,\r
3280 \r
3281 \r
3282     MSG_CMSG_CLOEXEC = 0x40000000\r
3283 \r
3284 \r
3285 \r
3286   };\r
3287 \r
3288 \r
3289 \r
3290 \r
3291 struct msghdr\r
3292   {\r
3293     void *msg_name;\r
3294     socklen_t msg_namelen;\r
3295 \r
3296     struct iovec *msg_iov;\r
3297     size_t msg_iovlen;\r
3298 \r
3299     void *msg_control;\r
3300     size_t msg_controllen;\r
3301 \r
3302 \r
3303 \r
3304 \r
3305     int msg_flags;\r
3306   };\r
3307 \r
3308 \r
3309 struct cmsghdr\r
3310   {\r
3311     size_t cmsg_len;\r
3312 \r
3313 \r
3314 \r
3315 \r
3316     int cmsg_level;\r
3317     int cmsg_type;\r
3318 \r
3319     __extension__ unsigned char __cmsg_data [];\r
3320 \r
3321   };\r
3322 # 272 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3323 extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,\r
3324           struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ ));\r
3325 # 299 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3326 enum\r
3327   {\r
3328     SCM_RIGHTS = 0x01\r
3329 \r
3330 \r
3331 \r
3332 \r
3333 \r
3334   };\r
3335 # 345 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3336 # 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 1 3 4\r
3337 # 1 "/usr/include/asm-generic/socket.h" 1 3 4\r
3338 \r
3339 \r
3340 \r
3341 # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4\r
3342 # 1 "/usr/include/asm-generic/sockios.h" 1 3 4\r
3343 # 2 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 2 3 4\r
3344 # 5 "/usr/include/asm-generic/socket.h" 2 3 4\r
3345 # 2 "/usr/include/x86_64-linux-gnu/asm/socket.h" 2 3 4\r
3346 # 346 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
3347 # 379 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
3348 struct linger\r
3349   {\r
3350     int l_onoff;\r
3351     int l_linger;\r
3352   };\r
3353 # 39 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
3354 \r
3355 \r
3356 \r
3357 \r
3358 struct osockaddr\r
3359   {\r
3360     unsigned short int sa_family;\r
3361     unsigned char sa_data[14];\r
3362   };\r
3363 \r
3364 \r
3365 \r
3366 \r
3367 enum\r
3368 {\r
3369   SHUT_RD = 0,\r
3370 \r
3371   SHUT_WR,\r
3372 \r
3373   SHUT_RDWR\r
3374 \r
3375 };\r
3376 # 113 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3377 extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ ));\r
3378 \r
3379 \r
3380 \r
3381 \r
3382 \r
3383 extern int socketpair (int __domain, int __type, int __protocol,\r
3384          int __fds[2]) __attribute__ ((__nothrow__ ));\r
3385 \r
3386 \r
3387 extern int bind (int __fd, const struct sockaddr * __addr, socklen_t __len)\r
3388      __attribute__ ((__nothrow__ ));\r
3389 \r
3390 \r
3391 extern int getsockname (int __fd, struct sockaddr *__restrict __addr,\r
3392    socklen_t *__restrict __len) __attribute__ ((__nothrow__ ));\r
3393 # 137 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3394 extern int connect (int __fd, const struct sockaddr * __addr, socklen_t __len);\r
3395 \r
3396 \r
3397 \r
3398 extern int getpeername (int __fd, struct sockaddr *__restrict __addr,\r
3399    socklen_t *__restrict __len) __attribute__ ((__nothrow__ ));\r
3400 \r
3401 \r
3402 \r
3403 \r
3404 \r
3405 \r
3406 extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);\r
3407 \r
3408 \r
3409 \r
3410 \r
3411 \r
3412 \r
3413 extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);\r
3414 \r
3415 \r
3416 \r
3417 \r
3418 \r
3419 \r
3420 extern ssize_t sendto (int __fd, const void *__buf, size_t __n,\r
3421          int __flags, const struct sockaddr * __addr,\r
3422          socklen_t __addr_len);\r
3423 # 174 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3424 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,\r
3425     int __flags, struct sockaddr *__restrict __addr,\r
3426     socklen_t *__restrict __addr_len);\r
3427 \r
3428 \r
3429 \r
3430 \r
3431 \r
3432 \r
3433 \r
3434 extern ssize_t sendmsg (int __fd, const struct msghdr *__message,\r
3435    int __flags);\r
3436 # 202 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3437 extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);\r
3438 # 219 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3439 extern int getsockopt (int __fd, int __level, int __optname,\r
3440          void *__restrict __optval,\r
3441          socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ ));\r
3442 \r
3443 \r
3444 \r
3445 \r
3446 extern int setsockopt (int __fd, int __level, int __optname,\r
3447          const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ ));\r
3448 \r
3449 \r
3450 \r
3451 \r
3452 \r
3453 extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ ));\r
3454 # 243 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3455 extern int accept (int __fd, struct sockaddr *__restrict __addr,\r
3456      socklen_t *__restrict __addr_len);\r
3457 # 261 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
3458 extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ ));\r
3459 \r
3460 \r
3461 \r
3462 \r
3463 extern int sockatmark (int __fd) __attribute__ ((__nothrow__ ));\r
3464 \r
3465 \r
3466 \r
3467 \r
3468 \r
3469 \r
3470 \r
3471 extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ ));\r
3472 # 169 "../include/apr.h" 2\r
3473 # 178 "../include/apr.h"\r
3474 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 1 3\r
3475 # 61 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 3\r
3476 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 1 3 4\r
3477 \r
3478 \r
3479 \r
3480 \r
3481 \r
3482 \r
3483 \r
3484 \r
3485 # 1 "/usr/include/stdint.h" 1 3 4\r
3486 # 26 "/usr/include/stdint.h" 3 4\r
3487 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4\r
3488 # 27 "/usr/include/stdint.h" 2 3 4\r
3489 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
3490 # 28 "/usr/include/stdint.h" 2 3 4\r
3491 # 48 "/usr/include/stdint.h" 3 4\r
3492 typedef unsigned char uint8_t;\r
3493 typedef unsigned short int uint16_t;\r
3494 \r
3495 typedef unsigned int uint32_t;\r
3496 \r
3497 \r
3498 \r
3499 typedef unsigned long int uint64_t;\r
3500 # 65 "/usr/include/stdint.h" 3 4\r
3501 typedef signed char int_least8_t;\r
3502 typedef short int int_least16_t;\r
3503 typedef int int_least32_t;\r
3504 \r
3505 typedef long int int_least64_t;\r
3506 \r
3507 \r
3508 \r
3509 \r
3510 \r
3511 \r
3512 typedef unsigned char uint_least8_t;\r
3513 typedef unsigned short int uint_least16_t;\r
3514 typedef unsigned int uint_least32_t;\r
3515 \r
3516 typedef unsigned long int uint_least64_t;\r
3517 # 90 "/usr/include/stdint.h" 3 4\r
3518 typedef signed char int_fast8_t;\r
3519 \r
3520 typedef long int int_fast16_t;\r
3521 typedef long int int_fast32_t;\r
3522 typedef long int int_fast64_t;\r
3523 # 103 "/usr/include/stdint.h" 3 4\r
3524 typedef unsigned char uint_fast8_t;\r
3525 \r
3526 typedef unsigned long int uint_fast16_t;\r
3527 typedef unsigned long int uint_fast32_t;\r
3528 typedef unsigned long int uint_fast64_t;\r
3529 # 122 "/usr/include/stdint.h" 3 4\r
3530 typedef unsigned long int uintptr_t;\r
3531 # 134 "/usr/include/stdint.h" 3 4\r
3532 typedef long int intmax_t;\r
3533 typedef unsigned long int uintmax_t;\r
3534 # 10 "/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 2 3 4\r
3535 # 62 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 2 3\r
3536 # 179 "../include/apr.h" 2\r
3537 \r
3538 \r
3539 \r
3540 # 1 "/usr/include/x86_64-linux-gnu/sys/wait.h" 1 3 4\r
3541 # 29 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
3542 # 1 "/usr/include/signal.h" 1 3 4\r
3543 # 32 "/usr/include/signal.h" 3 4\r
3544 # 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4\r
3545 # 102 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4\r
3546 extern int __sigismember (const __sigset_t *, int);\r
3547 extern int __sigaddset (__sigset_t *, int);\r
3548 extern int __sigdelset (__sigset_t *, int);\r
3549 # 33 "/usr/include/signal.h" 2 3 4\r
3550 \r
3551 \r
3552 \r
3553 \r
3554 \r
3555 \r
3556 \r
3557 typedef __sig_atomic_t sig_atomic_t;\r
3558 # 57 "/usr/include/signal.h" 3 4\r
3559 # 1 "/usr/include/x86_64-linux-gnu/bits/signum.h" 1 3 4\r
3560 # 58 "/usr/include/signal.h" 2 3 4\r
3561 # 75 "/usr/include/signal.h" 3 4\r
3562 # 1 "/usr/include/time.h" 1 3 4\r
3563 # 76 "/usr/include/signal.h" 2 3 4\r
3564 \r
3565 \r
3566 \r
3567 \r
3568 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 1 3 4\r
3569 # 24 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
3570 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
3571 # 25 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 2 3 4\r
3572 \r
3573 \r
3574 \r
3575 \r
3576 \r
3577 \r
3578 \r
3579 typedef union sigval\r
3580   {\r
3581     int sival_int;\r
3582     void *sival_ptr;\r
3583   } sigval_t;\r
3584 # 58 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
3585 typedef __clock_t __sigchld_clock_t;\r
3586 \r
3587 \r
3588 \r
3589 typedef struct\r
3590   {\r
3591     int si_signo;\r
3592     int si_errno;\r
3593 \r
3594     int si_code;\r
3595 \r
3596     union\r
3597       {\r
3598  int _pad[((128 / sizeof (int)) - 4)];\r
3599 \r
3600 \r
3601  struct\r
3602    {\r
3603      __pid_t si_pid;\r
3604      __uid_t si_uid;\r
3605    } _kill;\r
3606 \r
3607 \r
3608  struct\r
3609    {\r
3610      int si_tid;\r
3611      int si_overrun;\r
3612      sigval_t si_sigval;\r
3613    } _timer;\r
3614 \r
3615 \r
3616  struct\r
3617    {\r
3618      __pid_t si_pid;\r
3619      __uid_t si_uid;\r
3620      sigval_t si_sigval;\r
3621    } _rt;\r
3622 \r
3623 \r
3624  struct\r
3625    {\r
3626      __pid_t si_pid;\r
3627      __uid_t si_uid;\r
3628      int si_status;\r
3629      __sigchld_clock_t si_utime;\r
3630      __sigchld_clock_t si_stime;\r
3631    } _sigchld;\r
3632 \r
3633 \r
3634  struct\r
3635    {\r
3636      void *si_addr;\r
3637      short int si_addr_lsb;\r
3638    } _sigfault;\r
3639 \r
3640 \r
3641  struct\r
3642    {\r
3643      long int si_band;\r
3644      int si_fd;\r
3645    } _sigpoll;\r
3646 \r
3647 \r
3648  struct\r
3649    {\r
3650      void *_call_addr;\r
3651      int _syscall;\r
3652      unsigned int _arch;\r
3653    } _sigsys;\r
3654       } _sifields;\r
3655   } siginfo_t ;\r
3656 # 153 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
3657 enum\r
3658 {\r
3659   SI_ASYNCNL = -60,\r
3660 \r
3661   SI_TKILL = -6,\r
3662 \r
3663   SI_SIGIO,\r
3664 \r
3665   SI_ASYNCIO,\r
3666 \r
3667   SI_MESGQ,\r
3668 \r
3669   SI_TIMER,\r
3670 \r
3671   SI_QUEUE,\r
3672 \r
3673   SI_USER,\r
3674 \r
3675   SI_KERNEL = 0x80\r
3676 \r
3677 };\r
3678 \r
3679 \r
3680 \r
3681 enum\r
3682 {\r
3683   ILL_ILLOPC = 1,\r
3684 \r
3685   ILL_ILLOPN,\r
3686 \r
3687   ILL_ILLADR,\r
3688 \r
3689   ILL_ILLTRP,\r
3690 \r
3691   ILL_PRVOPC,\r
3692 \r
3693   ILL_PRVREG,\r
3694 \r
3695   ILL_COPROC,\r
3696 \r
3697   ILL_BADSTK\r
3698 \r
3699 };\r
3700 \r
3701 \r
3702 enum\r
3703 {\r
3704   FPE_INTDIV = 1,\r
3705 \r
3706   FPE_INTOVF,\r
3707 \r
3708   FPE_FLTDIV,\r
3709 \r
3710   FPE_FLTOVF,\r
3711 \r
3712   FPE_FLTUND,\r
3713 \r
3714   FPE_FLTRES,\r
3715 \r
3716   FPE_FLTINV,\r
3717 \r
3718   FPE_FLTSUB\r
3719 \r
3720 };\r
3721 \r
3722 \r
3723 enum\r
3724 {\r
3725   SEGV_MAPERR = 1,\r
3726 \r
3727   SEGV_ACCERR\r
3728 \r
3729 };\r
3730 \r
3731 \r
3732 enum\r
3733 {\r
3734   BUS_ADRALN = 1,\r
3735 \r
3736   BUS_ADRERR,\r
3737 \r
3738   BUS_OBJERR,\r
3739 \r
3740   BUS_MCEERR_AR,\r
3741 \r
3742   BUS_MCEERR_AO\r
3743 \r
3744 };\r
3745 \r
3746 \r
3747 enum\r
3748 {\r
3749   TRAP_BRKPT = 1,\r
3750 \r
3751   TRAP_TRACE\r
3752 \r
3753 };\r
3754 \r
3755 \r
3756 enum\r
3757 {\r
3758   CLD_EXITED = 1,\r
3759 \r
3760   CLD_KILLED,\r
3761 \r
3762   CLD_DUMPED,\r
3763 \r
3764   CLD_TRAPPED,\r
3765 \r
3766   CLD_STOPPED,\r
3767 \r
3768   CLD_CONTINUED\r
3769 \r
3770 };\r
3771 \r
3772 \r
3773 enum\r
3774 {\r
3775   POLL_IN = 1,\r
3776 \r
3777   POLL_OUT,\r
3778 \r
3779   POLL_MSG,\r
3780 \r
3781   POLL_ERR,\r
3782 \r
3783   POLL_PRI,\r
3784 \r
3785   POLL_HUP\r
3786 \r
3787 };\r
3788 # 307 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
3789 typedef struct sigevent\r
3790   {\r
3791     sigval_t sigev_value;\r
3792     int sigev_signo;\r
3793     int sigev_notify;\r
3794 \r
3795     union\r
3796       {\r
3797  int _pad[((64 / sizeof (int)) - 4)];\r
3798 \r
3799 \r
3800 \r
3801  __pid_t _tid;\r
3802 \r
3803  struct\r
3804    {\r
3805      void (*_function) (sigval_t);\r
3806      pthread_attr_t *_attribute;\r
3807    } _sigev_thread;\r
3808       } _sigev_un;\r
3809   } sigevent_t;\r
3810 \r
3811 \r
3812 \r
3813 \r
3814 \r
3815 \r
3816 enum\r
3817 {\r
3818   SIGEV_SIGNAL = 0,\r
3819 \r
3820   SIGEV_NONE,\r
3821 \r
3822   SIGEV_THREAD,\r
3823 \r
3824 \r
3825   SIGEV_THREAD_ID = 4\r
3826 \r
3827 };\r
3828 # 81 "/usr/include/signal.h" 2 3 4\r
3829 \r
3830 \r
3831 \r
3832 \r
3833 typedef void (*__sighandler_t) (int);\r
3834 \r
3835 \r
3836 \r
3837 \r
3838 extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)\r
3839      __attribute__ ((__nothrow__ ));\r
3840 # 102 "/usr/include/signal.h" 3 4\r
3841 extern __sighandler_t signal (int __sig, __sighandler_t __handler)\r
3842      __attribute__ ((__nothrow__ ));\r
3843 # 127 "/usr/include/signal.h" 3 4\r
3844 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ ));\r
3845 \r
3846 \r
3847 \r
3848 \r
3849 \r
3850 \r
3851 extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ ));\r
3852 \r
3853 \r
3854 \r
3855 \r
3856 extern int raise (int __sig) __attribute__ ((__nothrow__ ));\r
3857 \r
3858 \r
3859 \r
3860 \r
3861 extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)\r
3862      __attribute__ ((__nothrow__ ));\r
3863 extern int gsignal (int __sig) __attribute__ ((__nothrow__ ));\r
3864 \r
3865 \r
3866 \r
3867 \r
3868 extern void psignal (int __sig, const char *__s);\r
3869 \r
3870 \r
3871 \r
3872 \r
3873 extern void psiginfo (const siginfo_t *__pinfo, const char *__s);\r
3874 # 167 "/usr/include/signal.h" 3 4\r
3875 extern int __sigpause (int __sig_or_mask, int __is_sig);\r
3876 # 189 "/usr/include/signal.h" 3 4\r
3877 extern int sigblock (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
3878 \r
3879 \r
3880 extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
3881 \r
3882 \r
3883 extern int siggetmask (void) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
3884 # 209 "/usr/include/signal.h" 3 4\r
3885 typedef __sighandler_t sig_t;\r
3886 \r
3887 \r
3888 \r
3889 \r
3890 \r
3891 extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3892 \r
3893 \r
3894 extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3895 \r
3896 \r
3897 extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3898 \r
3899 \r
3900 extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3901 \r
3902 \r
3903 extern int sigismember (const sigset_t *__set, int __signo)\r
3904      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3905 # 245 "/usr/include/signal.h" 3 4\r
3906 # 1 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 1 3 4\r
3907 # 24 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 3 4\r
3908 struct sigaction\r
3909   {\r
3910 \r
3911 \r
3912     union\r
3913       {\r
3914 \r
3915  __sighandler_t sa_handler;\r
3916 \r
3917  void (*sa_sigaction) (int, siginfo_t *, void *);\r
3918       }\r
3919     __sigaction_handler;\r
3920 \r
3921 \r
3922 \r
3923 \r
3924 \r
3925 \r
3926 \r
3927     __sigset_t sa_mask;\r
3928 \r
3929 \r
3930     int sa_flags;\r
3931 \r
3932 \r
3933     void (*sa_restorer) (void);\r
3934   };\r
3935 # 246 "/usr/include/signal.h" 2 3 4\r
3936 \r
3937 \r
3938 extern int sigprocmask (int __how, const sigset_t *__restrict __set,\r
3939    sigset_t *__restrict __oset) __attribute__ ((__nothrow__ ));\r
3940 \r
3941 \r
3942 \r
3943 \r
3944 \r
3945 \r
3946 extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));\r
3947 \r
3948 \r
3949 extern int sigaction (int __sig, const struct sigaction *__restrict __act,\r
3950         struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ ));\r
3951 \r
3952 \r
3953 extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
3954 \r
3955 \r
3956 \r
3957 \r
3958 \r
3959 \r
3960 extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)\r
3961      __attribute__ ((__nonnull__ (1, 2)));\r
3962 \r
3963 \r
3964 \r
3965 \r
3966 \r
3967 \r
3968 extern int sigwaitinfo (const sigset_t *__restrict __set,\r
3969    siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));\r
3970 \r
3971 \r
3972 \r
3973 \r
3974 \r
3975 \r
3976 extern int sigtimedwait (const sigset_t *__restrict __set,\r
3977     siginfo_t *__restrict __info,\r
3978     const struct timespec *__restrict __timeout)\r
3979      __attribute__ ((__nonnull__ (1)));\r
3980 \r
3981 \r
3982 \r
3983 extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)\r
3984      __attribute__ ((__nothrow__ ));\r
3985 # 303 "/usr/include/signal.h" 3 4\r
3986 extern const char *const _sys_siglist[65];\r
3987 extern const char *const sys_siglist[65];\r
3988 \r
3989 \r
3990 struct sigvec\r
3991   {\r
3992     __sighandler_t sv_handler;\r
3993     int sv_mask;\r
3994 \r
3995     int sv_flags;\r
3996 \r
3997   };\r
3998 # 327 "/usr/include/signal.h" 3 4\r
3999 extern int sigvec (int __sig, const struct sigvec *__vec,\r
4000      struct sigvec *__ovec) __attribute__ ((__nothrow__ ));\r
4001 \r
4002 \r
4003 \r
4004 \r
4005 # 1 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 1 3 4\r
4006 # 29 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4\r
4007 struct _fpx_sw_bytes\r
4008 {\r
4009   __uint32_t magic1;\r
4010   __uint32_t extended_size;\r
4011   __uint64_t xstate_bv;\r
4012   __uint32_t xstate_size;\r
4013   __uint32_t padding[7];\r
4014 };\r
4015 \r
4016 struct _fpreg\r
4017 {\r
4018   unsigned short significand[4];\r
4019   unsigned short exponent;\r
4020 };\r
4021 \r
4022 struct _fpxreg\r
4023 {\r
4024   unsigned short significand[4];\r
4025   unsigned short exponent;\r
4026   unsigned short padding[3];\r
4027 };\r
4028 \r
4029 struct _xmmreg\r
4030 {\r
4031   __uint32_t element[4];\r
4032 };\r
4033 # 121 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4\r
4034 struct _fpstate\r
4035 {\r
4036 \r
4037   __uint16_t cwd;\r
4038   __uint16_t swd;\r
4039   __uint16_t ftw;\r
4040   __uint16_t fop;\r
4041   __uint64_t rip;\r
4042   __uint64_t rdp;\r
4043   __uint32_t mxcsr;\r
4044   __uint32_t mxcr_mask;\r
4045   struct _fpxreg _st[8];\r
4046   struct _xmmreg _xmm[16];\r
4047   __uint32_t padding[24];\r
4048 };\r
4049 \r
4050 struct sigcontext\r
4051 {\r
4052   __uint64_t r8;\r
4053   __uint64_t r9;\r
4054   __uint64_t r10;\r
4055   __uint64_t r11;\r
4056   __uint64_t r12;\r
4057   __uint64_t r13;\r
4058   __uint64_t r14;\r
4059   __uint64_t r15;\r
4060   __uint64_t rdi;\r
4061   __uint64_t rsi;\r
4062   __uint64_t rbp;\r
4063   __uint64_t rbx;\r
4064   __uint64_t rdx;\r
4065   __uint64_t rax;\r
4066   __uint64_t rcx;\r
4067   __uint64_t rsp;\r
4068   __uint64_t rip;\r
4069   __uint64_t eflags;\r
4070   unsigned short cs;\r
4071   unsigned short gs;\r
4072   unsigned short fs;\r
4073   unsigned short __pad0;\r
4074   __uint64_t err;\r
4075   __uint64_t trapno;\r
4076   __uint64_t oldmask;\r
4077   __uint64_t cr2;\r
4078   __extension__ union\r
4079     {\r
4080       struct _fpstate * fpstate;\r
4081       __uint64_t __fpstate_word;\r
4082     };\r
4083   __uint64_t __reserved1 [8];\r
4084 };\r
4085 \r
4086 \r
4087 \r
4088 struct _xsave_hdr\r
4089 {\r
4090   __uint64_t xstate_bv;\r
4091   __uint64_t reserved1[2];\r
4092   __uint64_t reserved2[5];\r
4093 };\r
4094 \r
4095 struct _ymmh_state\r
4096 {\r
4097   __uint32_t ymmh_space[64];\r
4098 };\r
4099 \r
4100 struct _xstate\r
4101 {\r
4102   struct _fpstate fpstate;\r
4103   struct _xsave_hdr xstate_hdr;\r
4104   struct _ymmh_state ymmh;\r
4105 };\r
4106 # 333 "/usr/include/signal.h" 2 3 4\r
4107 \r
4108 \r
4109 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ ));\r
4110 \r
4111 \r
4112 \r
4113 \r
4114 \r
4115 \r
4116 \r
4117 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
4118 # 343 "/usr/include/signal.h" 2 3 4\r
4119 \r
4120 \r
4121 \r
4122 \r
4123 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ ));\r
4124 \r
4125 \r
4126 # 1 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 1 3 4\r
4127 # 25 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4\r
4128 struct sigstack\r
4129   {\r
4130     void *ss_sp;\r
4131     int ss_onstack;\r
4132   };\r
4133 \r
4134 \r
4135 \r
4136 enum\r
4137 {\r
4138   SS_ONSTACK = 1,\r
4139 \r
4140   SS_DISABLE\r
4141 \r
4142 };\r
4143 # 49 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4\r
4144 typedef struct sigaltstack\r
4145   {\r
4146     void *ss_sp;\r
4147     int ss_flags;\r
4148     size_t ss_size;\r
4149   } stack_t;\r
4150 # 350 "/usr/include/signal.h" 2 3 4\r
4151 \r
4152 \r
4153 # 1 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 1 3 4\r
4154 # 22 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4\r
4155 # 1 "/usr/include/signal.h" 1 3 4\r
4156 # 23 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 2 3 4\r
4157 \r
4158 \r
4159 \r
4160 \r
4161 \r
4162 \r
4163 \r
4164 \r
4165 __extension__ typedef long long int greg_t;\r
4166 \r
4167 \r
4168 \r
4169 \r
4170 \r
4171 typedef greg_t gregset_t[23];\r
4172 # 92 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4\r
4173 struct _libc_fpxreg\r
4174 {\r
4175   unsigned short int significand[4];\r
4176   unsigned short int exponent;\r
4177   unsigned short int padding[3];\r
4178 };\r
4179 \r
4180 struct _libc_xmmreg\r
4181 {\r
4182   __uint32_t element[4];\r
4183 };\r
4184 \r
4185 struct _libc_fpstate\r
4186 {\r
4187 \r
4188   __uint16_t cwd;\r
4189   __uint16_t swd;\r
4190   __uint16_t ftw;\r
4191   __uint16_t fop;\r
4192   __uint64_t rip;\r
4193   __uint64_t rdp;\r
4194   __uint32_t mxcsr;\r
4195   __uint32_t mxcr_mask;\r
4196   struct _libc_fpxreg _st[8];\r
4197   struct _libc_xmmreg _xmm[16];\r
4198   __uint32_t padding[24];\r
4199 };\r
4200 \r
4201 \r
4202 typedef struct _libc_fpstate *fpregset_t;\r
4203 \r
4204 \r
4205 typedef struct\r
4206   {\r
4207     gregset_t gregs;\r
4208 \r
4209     fpregset_t fpregs;\r
4210     __extension__ unsigned long long __reserved1 [8];\r
4211 } mcontext_t;\r
4212 \r
4213 \r
4214 typedef struct ucontext\r
4215   {\r
4216     unsigned long int uc_flags;\r
4217     struct ucontext *uc_link;\r
4218     stack_t uc_stack;\r
4219     mcontext_t uc_mcontext;\r
4220     __sigset_t uc_sigmask;\r
4221     struct _libc_fpstate __fpregs_mem;\r
4222   } ucontext_t;\r
4223 # 353 "/usr/include/signal.h" 2 3 4\r
4224 \r
4225 \r
4226 \r
4227 \r
4228 \r
4229 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)\r
4230      __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
4231 \r
4232 \r
4233 \r
4234 extern int sigaltstack (const struct sigaltstack *__restrict __ss,\r
4235    struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__ ));\r
4236 # 388 "/usr/include/signal.h" 3 4\r
4237 # 1 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 1 3 4\r
4238 # 30 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 3 4\r
4239 extern int pthread_sigmask (int __how,\r
4240        const __sigset_t *__restrict __newmask,\r
4241        __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ ));\r
4242 \r
4243 \r
4244 extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ ));\r
4245 # 389 "/usr/include/signal.h" 2 3 4\r
4246 \r
4247 \r
4248 \r
4249 \r
4250 \r
4251 \r
4252 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ ));\r
4253 \r
4254 extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ ));\r
4255 # 30 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4\r
4256 # 102 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
4257 extern __pid_t wait (__WAIT_STATUS __stat_loc);\r
4258 # 125 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
4259 extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);\r
4260 # 135 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
4261 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 1 3 4\r
4262 # 24 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
4263 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
4264 # 25 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 2 3 4\r
4265 # 136 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4\r
4266 # 148 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
4267 extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,\r
4268      int __options);\r
4269 \r
4270 \r
4271 \r
4272 \r
4273 \r
4274 struct rusage;\r
4275 \r
4276 \r
4277 \r
4278 \r
4279 \r
4280 \r
4281 extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,\r
4282         struct rusage * __usage) __attribute__ ((__nothrow__));\r
4283 \r
4284 \r
4285 \r
4286 \r
4287 extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,\r
4288         struct rusage *__usage) __attribute__ ((__nothrow__));\r
4289 # 183 "../include/apr.h" 2\r
4290 # 193 "../include/apr.h"\r
4291 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 1 3\r
4292 # 37 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 3\r
4293 # 1 "/usr/include/limits.h" 1 3 4\r
4294 # 143 "/usr/include/limits.h" 3 4\r
4295 # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4\r
4296 # 160 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4\r
4297 # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4\r
4298 # 38 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4\r
4299 # 1 "/usr/include/linux/limits.h" 1 3 4\r
4300 # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4\r
4301 # 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4\r
4302 # 144 "/usr/include/limits.h" 2 3 4\r
4303 \r
4304 \r
4305 \r
4306 # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4\r
4307 # 148 "/usr/include/limits.h" 2 3 4\r
4308 # 38 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 2 3\r
4309 # 194 "../include/apr.h" 2\r
4310 # 309 "../include/apr.h"\r
4311 typedef unsigned char apr_byte_t;\r
4312 \r
4313 typedef short apr_int16_t;\r
4314 typedef unsigned short apr_uint16_t;\r
4315 \r
4316 typedef int apr_int32_t;\r
4317 typedef unsigned int apr_uint32_t;\r
4318 # 352 "../include/apr.h"\r
4319  typedef long apr_int64_t;\r
4320  typedef unsigned long apr_uint64_t;\r
4321 \r
4322 \r
4323 typedef size_t apr_size_t;\r
4324 typedef ssize_t apr_ssize_t;\r
4325 typedef off_t apr_off_t;\r
4326 typedef socklen_t apr_socklen_t;\r
4327 typedef ino_t apr_ino_t;\r
4328 \r
4329 \r
4330 typedef apr_uint64_t apr_uintptr_t;\r
4331 # 44 "../include/apr_pools.h" 2\r
4332 # 1 "../include/apr_errno.h" 1\r
4333 # 28 "../include/apr_errno.h"\r
4334 # 1 "/usr/include/errno.h" 1 3 4\r
4335 # 35 "/usr/include/errno.h" 3 4\r
4336 # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4\r
4337 # 24 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4\r
4338 # 1 "/usr/include/linux/errno.h" 1 3 4\r
4339 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4\r
4340 # 1 "/usr/include/asm-generic/errno.h" 1 3 4\r
4341 \r
4342 \r
4343 \r
4344 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4\r
4345 # 5 "/usr/include/asm-generic/errno.h" 2 3 4\r
4346 # 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4\r
4347 # 2 "/usr/include/linux/errno.h" 2 3 4\r
4348 # 25 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4\r
4349 # 50 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4\r
4350 extern int *__errno_location (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
4351 # 36 "/usr/include/errno.h" 2 3 4\r
4352 # 29 "../include/apr_errno.h" 2\r
4353 # 44 "../include/apr_errno.h"\r
4354 typedef int apr_status_t;\r
4355 \r
4356 \r
4357 \r
4358 \r
4359 \r
4360 \r
4361 \r
4362 char * apr_strerror(apr_status_t statcode, char *buf,\r
4363                                  apr_size_t bufsize);\r
4364 # 45 "../include/apr_pools.h" 2\r
4365 # 1 "../include/apr_general.h" 1\r
4366 # 29 "../include/apr_general.h"\r
4367 # 1 "../include/apr_pools.h" 1\r
4368 # 30 "../include/apr_general.h" 2\r
4369 # 68 "../include/apr_general.h"\r
4370 typedef int apr_signum_t;\r
4371 # 177 "../include/apr_general.h"\r
4372 apr_status_t apr_initialize(void);\r
4373 # 191 "../include/apr_general.h"\r
4374 apr_status_t apr_app_initialize(int *argc,\r
4375                                              char const * const * *argv,\r
4376                                              char const * const * *env);\r
4377 # 205 "../include/apr_general.h"\r
4378 void apr_terminate(void);\r
4379 # 216 "../include/apr_general.h"\r
4380 void apr_terminate2(void);\r
4381 # 233 "../include/apr_general.h"\r
4382 apr_status_t apr_generate_random_bytes(unsigned char * buf,\r
4383                                                     apr_size_t length);\r
4384 # 46 "../include/apr_pools.h" 2\r
4385 \r
4386 # 1 "../include/apr_want.h" 1\r
4387 # 48 "../include/apr_pools.h" 2\r
4388 # 60 "../include/apr_pools.h"\r
4389 typedef struct apr_pool_t apr_pool_t;\r
4390 # 148 "../include/apr_pools.h"\r
4391 typedef int (*apr_abortfunc_t)(int retcode);\r
4392 # 164 "../include/apr_pools.h"\r
4393 apr_status_t apr_pool_initialize(void);\r
4394 \r
4395 \r
4396 \r
4397 \r
4398 \r
4399 \r
4400 \r
4401 void apr_pool_terminate(void);\r
4402 \r
4403 \r
4404 \r
4405 \r
4406 \r
4407 \r
4408 \r
4409 # 1 "../include/apr_allocator.h" 1\r
4410 # 28 "../include/apr_allocator.h"\r
4411 # 1 "../include/apr_want.h" 1\r
4412 # 29 "../include/apr_allocator.h" 2\r
4413 # 41 "../include/apr_allocator.h"\r
4414 typedef struct apr_allocator_t apr_allocator_t;\r
4415 \r
4416 typedef struct apr_memnode_t apr_memnode_t;\r
4417 # 54 "../include/apr_allocator.h"\r
4418 struct apr_memnode_t {\r
4419     apr_memnode_t *next;\r
4420     apr_memnode_t **ref;\r
4421     apr_uint32_t index;\r
4422     apr_uint32_t free_index;\r
4423     char *first_avail;\r
4424     char *endp;\r
4425 };\r
4426 # 74 "../include/apr_allocator.h"\r
4427 apr_status_t apr_allocator_create(apr_allocator_t **allocator)\r
4428                           __attribute__((nonnull(1)));\r
4429 \r
4430 \r
4431 \r
4432 \r
4433 \r
4434 \r
4435 \r
4436 void apr_allocator_destroy(apr_allocator_t *allocator)\r
4437                   __attribute__((nonnull(1)));\r
4438 \r
4439 \r
4440 \r
4441 \r
4442 \r
4443 \r
4444 \r
4445 apr_memnode_t * apr_allocator_alloc(apr_allocator_t *allocator,\r
4446                                                  apr_size_t size)\r
4447                              __attribute__((nonnull(1)));\r
4448 # 103 "../include/apr_allocator.h"\r
4449 void apr_allocator_free(apr_allocator_t *allocator,\r
4450                                      apr_memnode_t *memnode)\r
4451                   __attribute__((nonnull(1,2)));\r
4452 \r
4453 \r
4454 # 1 "../include/apr_pools.h" 1\r
4455 # 108 "../include/apr_allocator.h" 2\r
4456 # 120 "../include/apr_allocator.h"\r
4457 void apr_allocator_owner_set(apr_allocator_t *allocator,\r
4458                                           apr_pool_t *pool)\r
4459                   __attribute__((nonnull(1)));\r
4460 \r
4461 \r
4462 \r
4463 \r
4464 \r
4465 apr_pool_t * apr_allocator_owner_get(apr_allocator_t *allocator)\r
4466                           __attribute__((nonnull(1)));\r
4467 \r
4468 \r
4469 \r
4470 \r
4471 \r
4472 \r
4473 \r
4474 void apr_allocator_max_free_set(apr_allocator_t *allocator,\r
4475                                              apr_size_t size)\r
4476                   __attribute__((nonnull(1)));\r
4477 \r
4478 \r
4479 # 1 "../include/apr_thread_mutex.h" 1\r
4480 # 41 "../include/apr_thread_mutex.h"\r
4481 typedef struct apr_thread_mutex_t apr_thread_mutex_t;\r
4482 \r
4483 \r
4484 \r
4485 \r
4486 \r
4487 \r
4488 \r
4489 # 1 "../include/apr_pools.h" 1\r
4490 # 49 "../include/apr_thread_mutex.h" 2\r
4491 # 65 "../include/apr_thread_mutex.h"\r
4492 apr_status_t apr_thread_mutex_create(apr_thread_mutex_t **mutex,\r
4493                                                   unsigned int flags,\r
4494                                                   apr_pool_t *pool);\r
4495 \r
4496 \r
4497 \r
4498 \r
4499 \r
4500 apr_status_t apr_thread_mutex_lock(apr_thread_mutex_t *mutex);\r
4501 # 82 "../include/apr_thread_mutex.h"\r
4502 apr_status_t apr_thread_mutex_trylock(apr_thread_mutex_t *mutex);\r
4503 \r
4504 \r
4505 \r
4506 \r
4507 \r
4508 apr_status_t apr_thread_mutex_unlock(apr_thread_mutex_t *mutex);\r
4509 \r
4510 \r
4511 \r
4512 \r
4513 \r
4514 apr_status_t apr_thread_mutex_destroy(apr_thread_mutex_t *mutex);\r
4515 \r
4516 \r
4517 \r
4518 \r
4519 \r
4520 apr_pool_t * apr_thread_mutex_pool_get (const apr_thread_mutex_t *thethread_mutex);\r
4521 # 142 "../include/apr_allocator.h" 2\r
4522 \r
4523 \r
4524 \r
4525 \r
4526 \r
4527 \r
4528 \r
4529 void apr_allocator_mutex_set(apr_allocator_t *allocator,\r
4530                                           apr_thread_mutex_t *mutex)\r
4531                   __attribute__((nonnull(1)));\r
4532 \r
4533 \r
4534 \r
4535 \r
4536 \r
4537 apr_thread_mutex_t * apr_allocator_mutex_get(\r
4538                                           apr_allocator_t *allocator)\r
4539                                   __attribute__((nonnull(1)));\r
4540 # 180 "../include/apr_pools.h" 2\r
4541 # 196 "../include/apr_pools.h"\r
4542 apr_status_t apr_pool_create_ex(apr_pool_t **newpool,\r
4543                                              apr_pool_t *parent,\r
4544                                              apr_abortfunc_t abort_fn,\r
4545                                              apr_allocator_t *allocator)\r
4546                           __attribute__((nonnull(1)));\r
4547 \r
4548 \r
4549 \r
4550 \r
4551 \r
4552 apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool,\r
4553                                                   apr_abortfunc_t abort_fn,\r
4554                                                   apr_allocator_t *allocator);\r
4555 # 226 "../include/apr_pools.h"\r
4556 apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool,\r
4557                                                    apr_abortfunc_t abort_fn,\r
4558                                                    apr_allocator_t *allocator)\r
4559                           __attribute__((nonnull(1)));\r
4560 # 247 "../include/apr_pools.h"\r
4561 apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool,\r
4562                                                    apr_pool_t *parent,\r
4563                                                    apr_abortfunc_t abort_fn,\r
4564                                                    apr_allocator_t *allocator,\r
4565                                                    const char *file_line)\r
4566                           __attribute__((nonnull(1)));\r
4567 # 264 "../include/apr_pools.h"\r
4568 apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool,\r
4569                                                    apr_abortfunc_t abort_fn,\r
4570                                                    apr_allocator_t *allocator,\r
4571                                                    const char *file_line);\r
4572 # 284 "../include/apr_pools.h"\r
4573 apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,\r
4574                                                    apr_abortfunc_t abort_fn,\r
4575                                                    apr_allocator_t *allocator,\r
4576                                                    const char *file_line)\r
4577                           __attribute__((nonnull(1)));\r
4578 # 354 "../include/apr_pools.h"\r
4579 apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)\r
4580                                __attribute__((nonnull(1)));\r
4581 # 365 "../include/apr_pools.h"\r
4582 void apr_pool_clear(apr_pool_t *p) __attribute__((nonnull(1)));\r
4583 # 380 "../include/apr_pools.h"\r
4584 void apr_pool_clear_debug(apr_pool_t *p,\r
4585                                        const char *file_line)\r
4586                   __attribute__((nonnull(1)));\r
4587 # 395 "../include/apr_pools.h"\r
4588 void apr_pool_destroy(apr_pool_t *p) __attribute__((nonnull(1)));\r
4589 # 410 "../include/apr_pools.h"\r
4590 void apr_pool_destroy_debug(apr_pool_t *p,\r
4591                                          const char *file_line)\r
4592                   __attribute__((nonnull(1)));\r
4593 # 430 "../include/apr_pools.h"\r
4594 void * apr_palloc(apr_pool_t *p, apr_size_t size)\r
4595 \r
4596 \r
4597 \r
4598                     __attribute__((nonnull(1)));\r
4599 # 444 "../include/apr_pools.h"\r
4600 void * apr_palloc_debug(apr_pool_t *p, apr_size_t size,\r
4601                                      const char *file_line)\r
4602 \r
4603 \r
4604 \r
4605                     __attribute__((nonnull(1)));\r
4606 # 476 "../include/apr_pools.h"\r
4607 void * apr_pcalloc_debug(apr_pool_t *p, apr_size_t size,\r
4608                                       const char *file_line)\r
4609                     __attribute__((nonnull(1)));\r
4610 # 498 "../include/apr_pools.h"\r
4611 void apr_pool_abort_set(apr_abortfunc_t abortfunc,\r
4612                                      apr_pool_t *pool)\r
4613                   __attribute__((nonnull(2)));\r
4614 \r
4615 \r
4616 \r
4617 \r
4618 \r
4619 \r
4620 apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)\r
4621                              __attribute__((nonnull(1)));\r
4622 \r
4623 \r
4624 \r
4625 \r
4626 \r
4627 \r
4628 apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)\r
4629                           __attribute__((nonnull(1)));\r
4630 # 529 "../include/apr_pools.h"\r
4631 int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);\r
4632 \r
4633 \r
4634 \r
4635 \r
4636 \r
4637 \r
4638 void apr_pool_tag(apr_pool_t *pool, const char *tag)\r
4639                   __attribute__((nonnull(1)));\r
4640 # 563 "../include/apr_pools.h"\r
4641 apr_status_t apr_pool_userdata_set(const void *data,\r
4642                                                 const char *key,\r
4643                                                 apr_status_t (*cleanup)(void *),\r
4644                                                 apr_pool_t *pool)\r
4645                           __attribute__((nonnull(2,4)));\r
4646 # 588 "../include/apr_pools.h"\r
4647 apr_status_t apr_pool_userdata_setn(\r
4648                                 const void *data, const char *key,\r
4649                                 apr_status_t (*cleanup)(void *),\r
4650                                 apr_pool_t *pool)\r
4651                           __attribute__((nonnull(2,4)));\r
4652 \r
4653 \r
4654 \r
4655 \r
4656 \r
4657 \r
4658 \r
4659 apr_status_t apr_pool_userdata_get(void **data, const char *key,\r
4660                                                 apr_pool_t *pool)\r
4661                           __attribute__((nonnull(1,2,3)));\r
4662 # 628 "../include/apr_pools.h"\r
4663 void apr_pool_cleanup_register(\r
4664                             apr_pool_t *p, const void *data,\r
4665                             apr_status_t (*plain_cleanup)(void *),\r
4666                             apr_status_t (*child_cleanup)(void *))\r
4667                   __attribute__((nonnull(3,4)));\r
4668 # 646 "../include/apr_pools.h"\r
4669 void apr_pool_pre_cleanup_register(\r
4670                             apr_pool_t *p, const void *data,\r
4671                             apr_status_t (*plain_cleanup)(void *))\r
4672                   __attribute__((nonnull(3)));\r
4673 # 663 "../include/apr_pools.h"\r
4674 void apr_pool_cleanup_kill(apr_pool_t *p, const void *data,\r
4675                                         apr_status_t (*cleanup)(void *))\r
4676                   __attribute__((nonnull(3)));\r
4677 # 679 "../include/apr_pools.h"\r
4678 void apr_pool_child_cleanup_set(\r
4679                         apr_pool_t *p, const void *data,\r
4680                         apr_status_t (*plain_cleanup)(void *),\r
4681                         apr_status_t (*child_cleanup)(void *))\r
4682                   __attribute__((nonnull(3,4)));\r
4683 # 696 "../include/apr_pools.h"\r
4684 apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data,\r
4685                                                apr_status_t (*cleanup)(void *))\r
4686                           __attribute__((nonnull(3)));\r
4687 # 707 "../include/apr_pools.h"\r
4688 apr_status_t apr_pool_cleanup_null(void *data);\r
4689 \r
4690 \r
4691 \r
4692 \r
4693 \r
4694 \r
4695 \r
4696 void apr_pool_cleanup_for_exec(void);\r
4697 # 18 "./../test/testutil.h" 2\r
4698 \r
4699 # 1 "./../test/abts.h" 1\r
4700 # 20 "./../test/testutil.h" 2\r
4701 # 52 "./../test/testutil.h"\r
4702 extern apr_pool_t *p;\r
4703 \r
4704 \r
4705 \r
4706 void apr_assert_success(abts_case* tc, const char *context,\r
4707                         apr_status_t rv, int lineno);\r
4708 \r
4709 \r
4710 \r
4711 void initialize(void);\r
4712 \r
4713 abts_suite *testatomic(abts_suite *suite);\r
4714 abts_suite *testdir(abts_suite *suite);\r
4715 abts_suite *testdso(abts_suite *suite);\r
4716 abts_suite *testdup(abts_suite *suite);\r
4717 abts_suite *testescape(abts_suite *suite);\r
4718 abts_suite *testenv(abts_suite *suite);\r
4719 abts_suite *testfile(abts_suite *suite);\r
4720 abts_suite *testfilecopy(abts_suite *suite);\r
4721 abts_suite *testfileinfo(abts_suite *suite);\r
4722 abts_suite *testflock(abts_suite *suite);\r
4723 abts_suite *testfmt(abts_suite *suite);\r
4724 abts_suite *testfnmatch(abts_suite *suite);\r
4725 abts_suite *testgetopt(abts_suite *suite);\r
4726 abts_suite *testglobalmutex(abts_suite *suite);\r
4727 abts_suite *testhash(abts_suite *suite);\r
4728 abts_suite *testipsub(abts_suite *suite);\r
4729 abts_suite *testlock(abts_suite *suite);\r
4730 abts_suite *testcond(abts_suite *suite);\r
4731 abts_suite *testlfs(abts_suite *suite);\r
4732 abts_suite *testmmap(abts_suite *suite);\r
4733 abts_suite *testnames(abts_suite *suite);\r
4734 abts_suite *testoc(abts_suite *suite);\r
4735 abts_suite *testpath(abts_suite *suite);\r
4736 abts_suite *testpipe(abts_suite *suite);\r
4737 abts_suite *testpoll(abts_suite *suite);\r
4738 abts_suite *testpool(abts_suite *suite);\r
4739 abts_suite *testproc(abts_suite *suite);\r
4740 abts_suite *testprocmutex(abts_suite *suite);\r
4741 abts_suite *testrand(abts_suite *suite);\r
4742 abts_suite *testsleep(abts_suite *suite);\r
4743 abts_suite *testshm(abts_suite *suite);\r
4744 abts_suite *testsock(abts_suite *suite);\r
4745 abts_suite *testsockets(abts_suite *suite);\r
4746 abts_suite *testsockopt(abts_suite *suite);\r
4747 abts_suite *teststr(abts_suite *suite);\r
4748 abts_suite *teststrnatcmp(abts_suite *suite);\r
4749 abts_suite *testtable(abts_suite *suite);\r
4750 abts_suite *testtemp(abts_suite *suite);\r
4751 abts_suite *testthread(abts_suite *suite);\r
4752 abts_suite *testtime(abts_suite *suite);\r
4753 abts_suite *testud(abts_suite *suite);\r
4754 abts_suite *testuser(abts_suite *suite);\r
4755 abts_suite *testvsn(abts_suite *suite);\r
4756 # 8 "main2.c" 2\r
4757 \r
4758 # 1 "./../test/testatomic.c" 1\r
4759 # 17 "./../test/testatomic.c"\r
4760 # 1 "./../test/testutil.h" 1\r
4761 # 19 "./../test/testutil.h"\r
4762 # 1 "./../test/abts.h" 1\r
4763 # 20 "./../test/testutil.h" 2\r
4764 # 18 "./../test/testatomic.c" 2\r
4765 # 1 "../include/apr_strings.h" 1\r
4766 # 52 "../include/apr_strings.h"\r
4767 # 1 "../include/apr_want.h" 1\r
4768 # 53 "../include/apr_strings.h" 2\r
4769 # 76 "../include/apr_strings.h"\r
4770 int apr_strnatcmp(char const *a, char const *b);\r
4771 # 87 "../include/apr_strings.h"\r
4772 int apr_strnatcasecmp(char const *a, char const *b);\r
4773 \r
4774 \r
4775 \r
4776 \r
4777 \r
4778 \r
4779 \r
4780 char * apr_pstrdup(apr_pool_t *p, const char *s);\r
4781 # 109 "../include/apr_strings.h"\r
4782 char * apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n)\r
4783 \r
4784 \r
4785 \r
4786     ;\r
4787 # 125 "../include/apr_strings.h"\r
4788 char * apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n);\r
4789 # 135 "../include/apr_strings.h"\r
4790 void * apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n)\r
4791 \r
4792 \r
4793 \r
4794     ;\r
4795 \r
4796 \r
4797 \r
4798 \r
4799 \r
4800 \r
4801 \r
4802 char * apr_pstrcat(apr_pool_t *p, ...)\r
4803 \r
4804     __attribute__((sentinel))\r
4805 \r
4806     ;\r
4807 # 161 "../include/apr_strings.h"\r
4808 char * apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,\r
4809                                  apr_size_t nvec, apr_size_t *nbytes);\r
4810 # 172 "../include/apr_strings.h"\r
4811 char * apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap);\r
4812 # 182 "../include/apr_strings.h"\r
4813 char * apr_psprintf(apr_pool_t *p, const char *fmt, ...)\r
4814         __attribute__((format(printf,2,3)));\r
4815 # 207 "../include/apr_strings.h"\r
4816 char * apr_cpystrn(char *dst, const char *src,\r
4817                                 apr_size_t dst_size);\r
4818 # 217 "../include/apr_strings.h"\r
4819 char * apr_collapse_spaces(char *dest, const char *src);\r
4820 # 226 "../include/apr_strings.h"\r
4821 apr_status_t apr_tokenize_to_argv(const char *arg_str,\r
4822                                                char ***argv_out,\r
4823                                                apr_pool_t *token_context);\r
4824 # 247 "../include/apr_strings.h"\r
4825 char * apr_strtok(char *str, const char *sep, char **last);\r
4826 # 279 "../include/apr_strings.h"\r
4827 int apr_snprintf(char *buf, apr_size_t len,\r
4828                                      const char *format, ...)\r
4829         __attribute__((format(printf,3,4)));\r
4830 # 291 "../include/apr_strings.h"\r
4831 int apr_vsnprintf(char *buf, apr_size_t len, const char *format,\r
4832                                va_list ap);\r
4833 # 301 "../include/apr_strings.h"\r
4834 char * apr_itoa(apr_pool_t *p, int n);\r
4835 \r
4836 \r
4837 \r
4838 \r
4839 \r
4840 \r
4841 \r
4842 char * apr_ltoa(apr_pool_t *p, long n);\r
4843 \r
4844 \r
4845 \r
4846 \r
4847 \r
4848 \r
4849 \r
4850 char * apr_off_t_toa(apr_pool_t *p, apr_off_t n);\r
4851 # 335 "../include/apr_strings.h"\r
4852 apr_status_t apr_strtoff(apr_off_t *offset, const char *buf,\r
4853                                       char **end, int base);\r
4854 # 353 "../include/apr_strings.h"\r
4855 apr_int64_t apr_strtoi64(const char *buf, char **end, int base);\r
4856 # 362 "../include/apr_strings.h"\r
4857 apr_int64_t apr_atoi64(const char *buf);\r
4858 # 372 "../include/apr_strings.h"\r
4859 char * apr_strfsize(apr_off_t size, char *buf);\r
4860 # 19 "./../test/testatomic.c" 2\r
4861 # 1 "../include/apr_thread_proc.h" 1\r
4862 # 26 "../include/apr_thread_proc.h"\r
4863 # 1 "../include/apr_file_io.h" 1\r
4864 # 27 "../include/apr_file_io.h"\r
4865 # 1 "../include/apr_time.h" 1\r
4866 # 40 "../include/apr_time.h"\r
4867                  extern const char apr_month_snames[12][4];\r
4868 \r
4869                  extern const char apr_day_snames[7][4];\r
4870 \r
4871 \r
4872 \r
4873 typedef apr_int64_t apr_time_t;\r
4874 # 56 "../include/apr_time.h"\r
4875 typedef apr_int64_t apr_interval_time_t;\r
4876 \r
4877 typedef apr_int32_t apr_short_interval_time_t;\r
4878 # 88 "../include/apr_time.h"\r
4879 apr_time_t apr_time_now(void);\r
4880 \r
4881 \r
4882 typedef struct apr_time_exp_t apr_time_exp_t;\r
4883 \r
4884 \r
4885 \r
4886 \r
4887 \r
4888 \r
4889 struct apr_time_exp_t {\r
4890 \r
4891     apr_int32_t tm_usec;\r
4892 \r
4893     apr_int32_t tm_sec;\r
4894 \r
4895     apr_int32_t tm_min;\r
4896 \r
4897     apr_int32_t tm_hour;\r
4898 \r
4899     apr_int32_t tm_mday;\r
4900 \r
4901     apr_int32_t tm_mon;\r
4902 \r
4903     apr_int32_t tm_year;\r
4904 \r
4905     apr_int32_t tm_wday;\r
4906 \r
4907     apr_int32_t tm_yday;\r
4908 \r
4909     apr_int32_t tm_isdst;\r
4910 \r
4911     apr_int32_t tm_gmtoff;\r
4912 };\r
4913 \r
4914 \r
4915 \r
4916 \r
4917 \r
4918 \r
4919 apr_status_t apr_time_ansi_put(apr_time_t *result,\r
4920                                                     time_t input);\r
4921 # 138 "../include/apr_time.h"\r
4922 apr_status_t apr_time_exp_tz(apr_time_exp_t *result,\r
4923                                           apr_time_t input,\r
4924                                           apr_int32_t offs);\r
4925 \r
4926 \r
4927 \r
4928 \r
4929 \r
4930 \r
4931 apr_status_t apr_time_exp_gmt(apr_time_exp_t *result,\r
4932                                            apr_time_t input);\r
4933 \r
4934 \r
4935 \r
4936 \r
4937 \r
4938 \r
4939 apr_status_t apr_time_exp_lt(apr_time_exp_t *result,\r
4940                                           apr_time_t input);\r
4941 \r
4942 \r
4943 \r
4944 \r
4945 \r
4946 \r
4947 \r
4948 apr_status_t apr_time_exp_get(apr_time_t *result,\r
4949                                            apr_time_exp_t *input);\r
4950 \r
4951 \r
4952 \r
4953 \r
4954 \r
4955 \r
4956 \r
4957 apr_status_t apr_time_exp_gmt_get(apr_time_t *result,\r
4958                                                apr_time_exp_t *input);\r
4959 \r
4960 \r
4961 \r
4962 \r
4963 \r
4964 \r
4965 void apr_sleep(apr_interval_time_t t);\r
4966 # 193 "../include/apr_time.h"\r
4967 apr_status_t apr_rfc822_date(char *date_str, apr_time_t t);\r
4968 # 207 "../include/apr_time.h"\r
4969 apr_status_t apr_ctime(char *date_str, apr_time_t t);\r
4970 # 217 "../include/apr_time.h"\r
4971 apr_status_t apr_strftime(char *s, apr_size_t *retsize,\r
4972                                        apr_size_t max, const char *format,\r
4973                                        apr_time_exp_t *tm);\r
4974 \r
4975 \r
4976 \r
4977 \r
4978 \r
4979 \r
4980 \r
4981 void apr_time_clock_hires(apr_pool_t *p);\r
4982 # 28 "../include/apr_file_io.h" 2\r
4983 \r
4984 # 1 "../include/apr_file_info.h" 1\r
4985 # 26 "../include/apr_file_info.h"\r
4986 # 1 "../include/apr_user.h" 1\r
4987 # 45 "../include/apr_user.h"\r
4988 typedef uid_t apr_uid_t;\r
4989 # 54 "../include/apr_user.h"\r
4990 typedef gid_t apr_gid_t;\r
4991 # 66 "../include/apr_user.h"\r
4992 apr_status_t apr_uid_current(apr_uid_t *userid,\r
4993                                           apr_gid_t *groupid,\r
4994                                           apr_pool_t *p);\r
4995 # 77 "../include/apr_user.h"\r
4996 apr_status_t apr_uid_name_get(char **username, apr_uid_t userid,\r
4997                                            apr_pool_t *p);\r
4998 # 88 "../include/apr_user.h"\r
4999 apr_status_t apr_uid_get(apr_uid_t *userid, apr_gid_t *groupid,\r
5000                                       const char *username, apr_pool_t *p);\r
5001 # 98 "../include/apr_user.h"\r
5002 apr_status_t apr_uid_homepath_get(char **dirname,\r
5003                                                const char *username,\r
5004                                                apr_pool_t *p);\r
5005 # 123 "../include/apr_user.h"\r
5006 apr_status_t apr_gid_name_get(char **groupname,\r
5007                                              apr_gid_t groupid, apr_pool_t *p);\r
5008 # 133 "../include/apr_user.h"\r
5009 apr_status_t apr_gid_get(apr_gid_t *groupid,\r
5010                                       const char *groupname, apr_pool_t *p);\r
5011 # 27 "../include/apr_file_info.h" 2\r
5012 \r
5013 # 1 "../include/apr_tables.h" 1\r
5014 # 56 "../include/apr_tables.h"\r
5015 typedef struct apr_table_t apr_table_t;\r
5016 \r
5017 \r
5018 typedef struct apr_array_header_t apr_array_header_t;\r
5019 \r
5020 \r
5021 struct apr_array_header_t {\r
5022 \r
5023     apr_pool_t *pool;\r
5024 \r
5025     int elt_size;\r
5026 \r
5027     int nelts;\r
5028 \r
5029     int nalloc;\r
5030 \r
5031     char *elts;\r
5032 };\r
5033 \r
5034 \r
5035 \r
5036 \r
5037 typedef struct apr_table_entry_t apr_table_entry_t;\r
5038 \r
5039 \r
5040 struct apr_table_entry_t {\r
5041 \r
5042     char *key;\r
5043 \r
5044 \r
5045 \r
5046     char *val;\r
5047 \r
5048 \r
5049     apr_uint32_t key_checksum;\r
5050 };\r
5051 \r
5052 \r
5053 \r
5054 \r
5055 \r
5056 \r
5057 const apr_array_header_t * apr_table_elts(const apr_table_t *t);\r
5058 \r
5059 \r
5060 \r
5061 \r
5062 \r
5063 \r
5064 int apr_is_empty_table(const apr_table_t *t);\r
5065 \r
5066 \r
5067 \r
5068 \r
5069 \r
5070 \r
5071 int apr_is_empty_array(const apr_array_header_t *a);\r
5072 # 121 "../include/apr_tables.h"\r
5073 apr_array_header_t * apr_array_make(apr_pool_t *p,\r
5074                                                  int nelts, int elt_size);\r
5075 # 131 "../include/apr_tables.h"\r
5076 void * apr_array_push(apr_array_header_t *arr);\r
5077 # 158 "../include/apr_tables.h"\r
5078 void * apr_array_pop(apr_array_header_t *arr);\r
5079 \r
5080 \r
5081 \r
5082 \r
5083 \r
5084 \r
5085 \r
5086 void apr_array_clear(apr_array_header_t *arr);\r
5087 \r
5088 \r
5089 \r
5090 \r
5091 \r
5092 \r
5093 \r
5094 void apr_array_cat(apr_array_header_t *dst,\r
5095            const apr_array_header_t *src);\r
5096 # 186 "../include/apr_tables.h"\r
5097 apr_array_header_t * apr_array_copy(apr_pool_t *p,\r
5098                                       const apr_array_header_t *arr);\r
5099 # 196 "../include/apr_tables.h"\r
5100 apr_array_header_t * apr_array_copy_hdr(apr_pool_t *p,\r
5101                                       const apr_array_header_t *arr);\r
5102 # 206 "../include/apr_tables.h"\r
5103 apr_array_header_t * apr_array_append(apr_pool_t *p,\r
5104                                       const apr_array_header_t *first,\r
5105                                       const apr_array_header_t *second);\r
5106 # 221 "../include/apr_tables.h"\r
5107 char * apr_array_pstrcat(apr_pool_t *p,\r
5108           const apr_array_header_t *arr,\r
5109           const char sep);\r
5110 # 232 "../include/apr_tables.h"\r
5111 apr_table_t * apr_table_make(apr_pool_t *p, int nelts);\r
5112 # 241 "../include/apr_tables.h"\r
5113 apr_table_t * apr_table_copy(apr_pool_t *p,\r
5114                                           const apr_table_t *t);\r
5115 # 252 "../include/apr_tables.h"\r
5116 apr_table_t * apr_table_clone(apr_pool_t *p,\r
5117                                            const apr_table_t *t);\r
5118 \r
5119 \r
5120 \r
5121 \r
5122 \r
5123 void apr_table_clear(apr_table_t *t);\r
5124 # 268 "../include/apr_tables.h"\r
5125 const char * apr_table_get(const apr_table_t *t, const char *key);\r
5126 # 279 "../include/apr_tables.h"\r
5127 const char * apr_table_getm(apr_pool_t *p, const apr_table_t *t,\r
5128                                          const char *key);\r
5129 # 291 "../include/apr_tables.h"\r
5130 void apr_table_set(apr_table_t *t, const char *key,\r
5131                                 const char *val);\r
5132 # 304 "../include/apr_tables.h"\r
5133 void apr_table_setn(apr_table_t *t, const char *key,\r
5134                                  const char *val);\r
5135 \r
5136 \r
5137 \r
5138 \r
5139 \r
5140 \r
5141 void apr_table_unset(apr_table_t *t, const char *key);\r
5142 # 323 "../include/apr_tables.h"\r
5143 void apr_table_merge(apr_table_t *t, const char *key,\r
5144                                   const char *val);\r
5145 # 335 "../include/apr_tables.h"\r
5146 void apr_table_mergen(apr_table_t *t, const char *key,\r
5147                                    const char *val);\r
5148 # 347 "../include/apr_tables.h"\r
5149 void apr_table_add(apr_table_t *t, const char *key,\r
5150                                 const char *val);\r
5151 # 360 "../include/apr_tables.h"\r
5152 void apr_table_addn(apr_table_t *t, const char *key,\r
5153                                  const char *val);\r
5154 # 370 "../include/apr_tables.h"\r
5155 apr_table_t * apr_table_overlay(apr_pool_t *p,\r
5156                                              const apr_table_t *overlay,\r
5157                                              const apr_table_t *base);\r
5158 # 384 "../include/apr_tables.h"\r
5159 typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,\r
5160                                                     const char *value);\r
5161 # 406 "../include/apr_tables.h"\r
5162 int apr_table_do(apr_table_do_callback_fn_t *comp,\r
5163                                      void *rec, const apr_table_t *t, ...)\r
5164 \r
5165     __attribute__((sentinel))\r
5166 \r
5167     ;\r
5168 # 432 "../include/apr_tables.h"\r
5169 int apr_table_vdo(apr_table_do_callback_fn_t *comp,\r
5170                                void *rec, const apr_table_t *t, va_list vp);\r
5171 # 478 "../include/apr_tables.h"\r
5172 void apr_table_overlap(apr_table_t *a, const apr_table_t *b,\r
5173                                      unsigned flags);\r
5174 # 491 "../include/apr_tables.h"\r
5175 void apr_table_compress(apr_table_t *t, unsigned flags);\r
5176 # 29 "../include/apr_file_info.h" 2\r
5177 # 62 "../include/apr_file_info.h"\r
5178 typedef enum {\r
5179     APR_NOFILE = 0,\r
5180     APR_REG,\r
5181     APR_DIR,\r
5182     APR_CHR,\r
5183     APR_BLK,\r
5184     APR_PIPE,\r
5185     APR_LNK,\r
5186     APR_SOCK,\r
5187     APR_UNKFILE = 127\r
5188 } apr_filetype_e;\r
5189 # 121 "../include/apr_file_info.h"\r
5190 typedef struct apr_dir_t apr_dir_t;\r
5191 \r
5192 \r
5193 \r
5194 typedef apr_int32_t apr_fileperms_t;\r
5195 # 135 "../include/apr_file_info.h"\r
5196 typedef dev_t apr_dev_t;\r
5197 \r
5198 \r
5199 \r
5200 \r
5201 \r
5202 \r
5203 \r
5204 typedef struct apr_finfo_t apr_finfo_t;\r
5205 # 174 "../include/apr_file_info.h"\r
5206 struct apr_finfo_t {\r
5207 \r
5208     apr_pool_t *pool;\r
5209 \r
5210 \r
5211     apr_int32_t valid;\r
5212 \r
5213     apr_fileperms_t protection;\r
5214 \r
5215 \r
5216 \r
5217 \r
5218     apr_filetype_e filetype;\r
5219 \r
5220     apr_uid_t user;\r
5221 \r
5222     apr_gid_t group;\r
5223 \r
5224     apr_ino_t inode;\r
5225 \r
5226     apr_dev_t device;\r
5227 \r
5228     apr_int32_t nlink;\r
5229 \r
5230     apr_off_t size;\r
5231 \r
5232     apr_off_t csize;\r
5233 \r
5234     apr_time_t atime;\r
5235 \r
5236     apr_time_t mtime;\r
5237 \r
5238     apr_time_t ctime;\r
5239 \r
5240     const char *fname;\r
5241 \r
5242     const char *name;\r
5243 \r
5244     struct apr_file_t *filehand;\r
5245 };\r
5246 # 229 "../include/apr_file_info.h"\r
5247 apr_status_t apr_stat(apr_finfo_t *finfo, const char *fname,\r
5248                                    apr_int32_t wanted, apr_pool_t *pool);\r
5249 # 244 "../include/apr_file_info.h"\r
5250 apr_status_t apr_dir_open(apr_dir_t **new_dir,\r
5251                                        const char *dirname,\r
5252                                        apr_pool_t *pool);\r
5253 \r
5254 \r
5255 \r
5256 \r
5257 \r
5258 apr_status_t apr_dir_close(apr_dir_t *thedir);\r
5259 # 267 "../include/apr_file_info.h"\r
5260 apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,\r
5261                                        apr_dir_t *thedir);\r
5262 \r
5263 \r
5264 \r
5265 \r
5266 \r
5267 apr_status_t apr_dir_rewind(apr_dir_t *thedir);\r
5268 # 336 "../include/apr_file_info.h"\r
5269 apr_status_t apr_filepath_root(const char **rootpath,\r
5270                                             const char **filepath,\r
5271                                             apr_int32_t flags,\r
5272                                             apr_pool_t *p);\r
5273 # 354 "../include/apr_file_info.h"\r
5274 apr_status_t apr_filepath_merge(char **newpath,\r
5275                                              const char *rootpath,\r
5276                                              const char *addpath,\r
5277                                              apr_int32_t flags,\r
5278                                              apr_pool_t *p);\r
5279 # 369 "../include/apr_file_info.h"\r
5280 apr_status_t apr_filepath_list_split(apr_array_header_t **pathelts,\r
5281                                                   const char *liststr,\r
5282                                                   apr_pool_t *p);\r
5283 # 382 "../include/apr_file_info.h"\r
5284 apr_status_t apr_filepath_list_merge(char **liststr,\r
5285                                                   apr_array_header_t *pathelts,\r
5286                                                   apr_pool_t *p);\r
5287 # 393 "../include/apr_file_info.h"\r
5288 apr_status_t apr_filepath_get(char **path, apr_int32_t flags,\r
5289                                            apr_pool_t *p);\r
5290 \r
5291 \r
5292 \r
5293 \r
5294 \r
5295 \r
5296 apr_status_t apr_filepath_set(const char *path, apr_pool_t *p);\r
5297 # 419 "../include/apr_file_info.h"\r
5298 apr_status_t apr_filepath_encoding(int *style, apr_pool_t *p);\r
5299 # 30 "../include/apr_file_io.h" 2\r
5300 # 1 "../include/apr_inherit.h" 1\r
5301 # 31 "../include/apr_file_io.h" 2\r
5302 \r
5303 \r
5304 \r
5305 # 1 "../include/apr_want.h" 1\r
5306 # 35 "../include/apr_file_io.h" 2\r
5307 # 180 "../include/apr_file_io.h"\r
5308 typedef apr_uint32_t apr_fileattrs_t;\r
5309 \r
5310 \r
5311 typedef int apr_seek_where_t;\r
5312 \r
5313 \r
5314 \r
5315 \r
5316 typedef struct apr_file_t apr_file_t;\r
5317 # 250 "../include/apr_file_io.h"\r
5318 apr_status_t apr_file_open(apr_file_t **newf, const char *fname,\r
5319                                         apr_int32_t flag, apr_fileperms_t perm,\r
5320                                         apr_pool_t *pool);\r
5321 \r
5322 \r
5323 \r
5324 \r
5325 \r
5326 apr_status_t apr_file_close(apr_file_t *file);\r
5327 # 267 "../include/apr_file_io.h"\r
5328 apr_status_t apr_file_remove(const char *path, apr_pool_t *pool);\r
5329 # 278 "../include/apr_file_io.h"\r
5330 apr_status_t apr_file_rename(const char *from_path,\r
5331                                           const char *to_path,\r
5332                                           apr_pool_t *pool);\r
5333 \r
5334 \r
5335 \r
5336 \r
5337 \r
5338 \r
5339 \r
5340 apr_status_t apr_file_link(const char *from_path,\r
5341                                           const char *to_path);\r
5342 # 303 "../include/apr_file_io.h"\r
5343 apr_status_t apr_file_copy(const char *from_path,\r
5344                                         const char *to_path,\r
5345                                         apr_fileperms_t perms,\r
5346                                         apr_pool_t *pool);\r
5347 # 319 "../include/apr_file_io.h"\r
5348 apr_status_t apr_file_append(const char *from_path,\r
5349                                           const char *to_path,\r
5350                                           apr_fileperms_t perms,\r
5351                                           apr_pool_t *pool);\r
5352 \r
5353 \r
5354 \r
5355 \r
5356 \r
5357 \r
5358 apr_status_t apr_file_eof(apr_file_t *fptr);\r
5359 # 346 "../include/apr_file_io.h"\r
5360 apr_status_t apr_file_open_stderr(apr_file_t **thefile,\r
5361                                                apr_pool_t *pool);\r
5362 # 356 "../include/apr_file_io.h"\r
5363 apr_status_t apr_file_open_stdout(apr_file_t **thefile,\r
5364                                                apr_pool_t *pool);\r
5365 # 366 "../include/apr_file_io.h"\r
5366 apr_status_t apr_file_open_stdin(apr_file_t **thefile,\r
5367                                               apr_pool_t *pool);\r
5368 # 386 "../include/apr_file_io.h"\r
5369 apr_status_t apr_file_open_flags_stderr(apr_file_t **thefile,\r
5370                                                      apr_int32_t flags,\r
5371                                                      apr_pool_t *pool);\r
5372 # 407 "../include/apr_file_io.h"\r
5373 apr_status_t apr_file_open_flags_stdout(apr_file_t **thefile,\r
5374                                                      apr_int32_t flags,\r
5375                                                      apr_pool_t *pool);\r
5376 # 428 "../include/apr_file_io.h"\r
5377 apr_status_t apr_file_open_flags_stdin(apr_file_t **thefile,\r
5378                                                      apr_int32_t flags,\r
5379                                                      apr_pool_t *pool);\r
5380 # 449 "../include/apr_file_io.h"\r
5381 apr_status_t apr_file_read(apr_file_t *thefile, void *buf,\r
5382                                         apr_size_t *nbytes);\r
5383 # 467 "../include/apr_file_io.h"\r
5384 apr_status_t apr_file_write(apr_file_t *thefile, const void *buf,\r
5385                                          apr_size_t *nbytes);\r
5386 # 485 "../include/apr_file_io.h"\r
5387 apr_status_t apr_file_writev(apr_file_t *thefile,\r
5388                                           const struct iovec *vec,\r
5389                                           apr_size_t nvec, apr_size_t *nbytes);\r
5390 # 509 "../include/apr_file_io.h"\r
5391 apr_status_t apr_file_read_full(apr_file_t *thefile, void *buf,\r
5392                                              apr_size_t nbytes,\r
5393                                              apr_size_t *bytes_read);\r
5394 # 533 "../include/apr_file_io.h"\r
5395 apr_status_t apr_file_write_full(apr_file_t *thefile,\r
5396                                               const void *buf,\r
5397                                               apr_size_t nbytes,\r
5398                                               apr_size_t *bytes_written);\r
5399 # 552 "../include/apr_file_io.h"\r
5400 apr_status_t apr_file_writev_full(apr_file_t *thefile,\r
5401                                                const struct iovec *vec,\r
5402                                                apr_size_t nvec,\r
5403                                                apr_size_t *nbytes);\r
5404 \r
5405 \r
5406 \r
5407 \r
5408 \r
5409 apr_status_t apr_file_putc(char ch, apr_file_t *thefile);\r
5410 \r
5411 \r
5412 \r
5413 \r
5414 \r
5415 \r
5416 apr_status_t apr_file_getc(char *ch, apr_file_t *thefile);\r
5417 \r
5418 \r
5419 \r
5420 \r
5421 \r
5422 \r
5423 apr_status_t apr_file_ungetc(char ch, apr_file_t *thefile);\r
5424 # 585 "../include/apr_file_io.h"\r
5425 apr_status_t apr_file_gets(char *str, int len,\r
5426                                         apr_file_t *thefile);\r
5427 \r
5428 \r
5429 \r
5430 \r
5431 \r
5432 \r
5433 apr_status_t apr_file_puts(const char *str, apr_file_t *thefile);\r
5434 \r
5435 \r
5436 \r
5437 \r
5438 \r
5439 apr_status_t apr_file_flush(apr_file_t *thefile);\r
5440 \r
5441 \r
5442 \r
5443 \r
5444 \r
5445 apr_status_t apr_file_sync(apr_file_t *thefile);\r
5446 \r
5447 \r
5448 \r
5449 \r
5450 \r
5451 apr_status_t apr_file_datasync(apr_file_t *thefile);\r
5452 # 620 "../include/apr_file_io.h"\r
5453 apr_status_t apr_file_dup(apr_file_t **new_file,\r
5454                                        apr_file_t *old_file,\r
5455                                        apr_pool_t *p);\r
5456 # 632 "../include/apr_file_io.h"\r
5457 apr_status_t apr_file_dup2(apr_file_t *new_file,\r
5458                                         apr_file_t *old_file,\r
5459                                         apr_pool_t *p);\r
5460 # 647 "../include/apr_file_io.h"\r
5461 apr_status_t apr_file_setaside(apr_file_t **new_file,\r
5462                                             apr_file_t *old_file,\r
5463                                             apr_pool_t *p);\r
5464 # 662 "../include/apr_file_io.h"\r
5465 apr_status_t apr_file_buffer_set(apr_file_t *thefile,\r
5466                                               char * buffer,\r
5467                                               apr_size_t bufsize);\r
5468 \r
5469 \r
5470 \r
5471 \r
5472 \r
5473 apr_size_t apr_file_buffer_size_get(apr_file_t *thefile);\r
5474 # 683 "../include/apr_file_io.h"\r
5475 apr_status_t apr_file_seek(apr_file_t *thefile,\r
5476                                    apr_seek_where_t where,\r
5477                                    apr_off_t *offset);\r
5478 # 700 "../include/apr_file_io.h"\r
5479 apr_status_t apr_file_pipe_create(apr_file_t **in,\r
5480                                                apr_file_t **out,\r
5481                                                apr_pool_t *pool);\r
5482 # 723 "../include/apr_file_io.h"\r
5483 apr_status_t apr_file_pipe_create_ex(apr_file_t **in,\r
5484                                                   apr_file_t **out,\r
5485                                                   apr_int32_t blocking,\r
5486                                                   apr_pool_t *pool);\r
5487 \r
5488 \r
5489 \r
5490 \r
5491 \r
5492 \r
5493 \r
5494 apr_status_t apr_file_namedpipe_create(const char *filename,\r
5495                                                     apr_fileperms_t perm,\r
5496                                                     apr_pool_t *pool);\r
5497 \r
5498 \r
5499 \r
5500 \r
5501 \r
5502 \r
5503 apr_status_t apr_file_pipe_timeout_get(apr_file_t *thepipe,\r
5504                                                apr_interval_time_t *timeout);\r
5505 \r
5506 \r
5507 \r
5508 \r
5509 \r
5510 \r
5511 \r
5512 apr_status_t apr_file_pipe_timeout_set(apr_file_t *thepipe,\r
5513                                                   apr_interval_time_t timeout);\r
5514 # 766 "../include/apr_file_io.h"\r
5515 apr_status_t apr_file_lock(apr_file_t *thefile, int type);\r
5516 \r
5517 \r
5518 \r
5519 \r
5520 \r
5521 apr_status_t apr_file_unlock(apr_file_t *thefile);\r
5522 # 781 "../include/apr_file_io.h"\r
5523 apr_status_t apr_file_name_get(const char **new_path,\r
5524                                             apr_file_t *thefile);\r
5525 \r
5526 \r
5527 \r
5528 \r
5529 \r
5530 \r
5531 \r
5532 apr_status_t apr_file_data_get(void **data, const char *key,\r
5533                                             apr_file_t *file);\r
5534 # 800 "../include/apr_file_io.h"\r
5535 apr_status_t apr_file_data_set(apr_file_t *file, void *data,\r
5536                                             const char *key,\r
5537                                             apr_status_t (*cleanup)(void *));\r
5538 # 811 "../include/apr_file_io.h"\r
5539 int apr_file_printf(apr_file_t *fptr,\r
5540                                         const char *format, ...)\r
5541         __attribute__((format(printf,2,3)));\r
5542 # 827 "../include/apr_file_io.h"\r
5543 apr_status_t apr_file_perms_set(const char *fname,\r
5544                                              apr_fileperms_t perms);\r
5545 # 846 "../include/apr_file_io.h"\r
5546 apr_status_t apr_file_attrs_set(const char *fname,\r
5547                                              apr_fileattrs_t attributes,\r
5548                                              apr_fileattrs_t attr_mask,\r
5549                                              apr_pool_t *pool);\r
5550 # 859 "../include/apr_file_io.h"\r
5551 apr_status_t apr_file_mtime_set(const char *fname,\r
5552                                              apr_time_t mtime,\r
5553                                              apr_pool_t *pool);\r
5554 \r
5555 \r
5556 \r
5557 \r
5558 \r
5559 \r
5560 \r
5561 apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,\r
5562                                        apr_pool_t *pool);\r
5563 # 879 "../include/apr_file_io.h"\r
5564 apr_status_t apr_dir_make_recursive(const char *path,\r
5565                                                  apr_fileperms_t perm,\r
5566                                                  apr_pool_t *pool);\r
5567 # 890 "../include/apr_file_io.h"\r
5568 apr_status_t apr_dir_remove(const char *path, apr_pool_t *pool);\r
5569 \r
5570 \r
5571 \r
5572 \r
5573 \r
5574 \r
5575 \r
5576 apr_status_t apr_file_info_get(apr_finfo_t *finfo,\r
5577                                             apr_int32_t wanted,\r
5578                                             apr_file_t *thefile);\r
5579 # 909 "../include/apr_file_io.h"\r
5580 apr_status_t apr_file_trunc(apr_file_t *fp, apr_off_t offset);\r
5581 \r
5582 \r
5583 \r
5584 \r
5585 \r
5586 \r
5587 apr_int32_t apr_file_flags_get(apr_file_t *f);\r
5588 \r
5589 \r
5590 \r
5591 \r
5592 apr_pool_t * apr_file_pool_get (const apr_file_t *thefile);\r
5593 \r
5594 \r
5595 \r
5596 \r
5597 \r
5598 apr_status_t apr_file_inherit_set( apr_file_t *thefile);\r
5599 \r
5600 \r
5601 \r
5602 \r
5603 apr_status_t apr_file_inherit_unset( apr_file_t *thefile);\r
5604 # 951 "../include/apr_file_io.h"\r
5605 apr_status_t apr_file_mktemp(apr_file_t **fp, char *templ,\r
5606                                           apr_int32_t flags, apr_pool_t *p);\r
5607 # 964 "../include/apr_file_io.h"\r
5608 apr_status_t apr_temp_dir_get(const char **temp_dir,\r
5609                                            apr_pool_t *p);\r
5610 # 27 "../include/apr_thread_proc.h" 2\r
5611 \r
5612 \r
5613 \r
5614 \r
5615 # 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4\r
5616 # 25 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
5617 # 1 "/usr/include/time.h" 1 3 4\r
5618 # 26 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4\r
5619 \r
5620 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
5621 # 28 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4\r
5622 # 55 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
5623 struct timezone\r
5624   {\r
5625     int tz_minuteswest;\r
5626     int tz_dsttime;\r
5627   };\r
5628 \r
5629 typedef struct timezone *__restrict __timezone_ptr_t;\r
5630 # 71 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
5631 extern int gettimeofday (struct timeval *__restrict __tv,\r
5632     __timezone_ptr_t __tz) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
5633 \r
5634 \r
5635 \r
5636 \r
5637 extern int settimeofday (const struct timeval *__tv,\r
5638     const struct timezone *__tz)\r
5639      __attribute__ ((__nothrow__ ));\r
5640 \r
5641 \r
5642 \r
5643 \r
5644 \r
5645 extern int adjtime (const struct timeval *__delta,\r
5646       struct timeval *__olddelta) __attribute__ ((__nothrow__ ));\r
5647 \r
5648 \r
5649 \r
5650 \r
5651 enum __itimer_which\r
5652   {\r
5653 \r
5654     ITIMER_REAL = 0,\r
5655 \r
5656 \r
5657     ITIMER_VIRTUAL = 1,\r
5658 \r
5659 \r
5660 \r
5661     ITIMER_PROF = 2\r
5662 \r
5663   };\r
5664 \r
5665 \r
5666 \r
5667 struct itimerval\r
5668   {\r
5669 \r
5670     struct timeval it_interval;\r
5671 \r
5672     struct timeval it_value;\r
5673   };\r
5674 \r
5675 \r
5676 \r
5677 \r
5678 \r
5679 \r
5680 typedef int __itimer_which_t;\r
5681 \r
5682 \r
5683 \r
5684 \r
5685 extern int getitimer (__itimer_which_t __which,\r
5686         struct itimerval *__value) __attribute__ ((__nothrow__ ));\r
5687 \r
5688 \r
5689 \r
5690 \r
5691 extern int setitimer (__itimer_which_t __which,\r
5692         const struct itimerval *__restrict __new,\r
5693         struct itimerval *__restrict __old) __attribute__ ((__nothrow__ ));\r
5694 \r
5695 \r
5696 \r
5697 \r
5698 extern int utimes (const char *__file, const struct timeval __tvp[2])\r
5699      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
5700 \r
5701 \r
5702 \r
5703 extern int lutimes (const char *__file, const struct timeval __tvp[2])\r
5704      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
5705 \r
5706 \r
5707 extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ ));\r
5708 # 32 "../include/apr_thread_proc.h" 2\r
5709 # 1 "/usr/include/x86_64-linux-gnu/sys/resource.h" 1 3 4\r
5710 # 24 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
5711 # 1 "/usr/include/x86_64-linux-gnu/bits/resource.h" 1 3 4\r
5712 # 31 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
5713 enum __rlimit_resource\r
5714 {\r
5715 \r
5716   RLIMIT_CPU = 0,\r
5717 \r
5718 \r
5719 \r
5720   RLIMIT_FSIZE = 1,\r
5721 \r
5722 \r
5723 \r
5724   RLIMIT_DATA = 2,\r
5725 \r
5726 \r
5727 \r
5728   RLIMIT_STACK = 3,\r
5729 \r
5730 \r
5731 \r
5732   RLIMIT_CORE = 4,\r
5733 \r
5734 \r
5735 \r
5736 \r
5737 \r
5738 \r
5739   __RLIMIT_RSS = 5,\r
5740 \r
5741 \r
5742 \r
5743   RLIMIT_NOFILE = 7,\r
5744   __RLIMIT_OFILE = RLIMIT_NOFILE,\r
5745 \r
5746 \r
5747 \r
5748 \r
5749   RLIMIT_AS = 9,\r
5750 \r
5751 \r
5752 \r
5753   __RLIMIT_NPROC = 6,\r
5754 \r
5755 \r
5756 \r
5757   __RLIMIT_MEMLOCK = 8,\r
5758 \r
5759 \r
5760 \r
5761   __RLIMIT_LOCKS = 10,\r
5762 \r
5763 \r
5764 \r
5765   __RLIMIT_SIGPENDING = 11,\r
5766 \r
5767 \r
5768 \r
5769   __RLIMIT_MSGQUEUE = 12,\r
5770 \r
5771 \r
5772 \r
5773 \r
5774 \r
5775   __RLIMIT_NICE = 13,\r
5776 \r
5777 \r
5778 \r
5779 \r
5780   __RLIMIT_RTPRIO = 14,\r
5781 \r
5782 \r
5783 \r
5784 \r
5785 \r
5786   __RLIMIT_RTTIME = 15,\r
5787 \r
5788 \r
5789   __RLIMIT_NLIMITS = 16,\r
5790   __RLIM_NLIMITS = __RLIMIT_NLIMITS\r
5791 \r
5792 \r
5793 };\r
5794 # 131 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
5795 typedef __rlim_t rlim_t;\r
5796 \r
5797 \r
5798 \r
5799 \r
5800 \r
5801 \r
5802 \r
5803 struct rlimit\r
5804   {\r
5805 \r
5806     rlim_t rlim_cur;\r
5807 \r
5808     rlim_t rlim_max;\r
5809   };\r
5810 # 158 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
5811 enum __rusage_who\r
5812 {\r
5813 \r
5814   RUSAGE_SELF = 0,\r
5815 \r
5816 \r
5817 \r
5818   RUSAGE_CHILDREN = -1\r
5819 # 176 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
5820 };\r
5821 \r
5822 \r
5823 \r
5824 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
5825 # 180 "/usr/include/x86_64-linux-gnu/bits/resource.h" 2 3 4\r
5826 \r
5827 \r
5828 \r
5829 \r
5830 \r
5831 \r
5832 \r
5833 struct rusage\r
5834   {\r
5835 \r
5836     struct timeval ru_utime;\r
5837 \r
5838     struct timeval ru_stime;\r
5839 \r
5840     __extension__ union\r
5841       {\r
5842  long int ru_maxrss;\r
5843  __syscall_slong_t __ru_maxrss_word;\r
5844       };\r
5845 \r
5846 \r
5847 \r
5848     __extension__ union\r
5849       {\r
5850  long int ru_ixrss;\r
5851  __syscall_slong_t __ru_ixrss_word;\r
5852       };\r
5853 \r
5854     __extension__ union\r
5855       {\r
5856  long int ru_idrss;\r
5857  __syscall_slong_t __ru_idrss_word;\r
5858       };\r
5859 \r
5860     __extension__ union\r
5861       {\r
5862  long int ru_isrss;\r
5863   __syscall_slong_t __ru_isrss_word;\r
5864       };\r
5865 \r
5866 \r
5867     __extension__ union\r
5868       {\r
5869  long int ru_minflt;\r
5870  __syscall_slong_t __ru_minflt_word;\r
5871       };\r
5872 \r
5873     __extension__ union\r
5874       {\r
5875  long int ru_majflt;\r
5876  __syscall_slong_t __ru_majflt_word;\r
5877       };\r
5878 \r
5879     __extension__ union\r
5880       {\r
5881  long int ru_nswap;\r
5882  __syscall_slong_t __ru_nswap_word;\r
5883       };\r
5884 \r
5885 \r
5886     __extension__ union\r
5887       {\r
5888  long int ru_inblock;\r
5889  __syscall_slong_t __ru_inblock_word;\r
5890       };\r
5891 \r
5892     __extension__ union\r
5893       {\r
5894  long int ru_oublock;\r
5895  __syscall_slong_t __ru_oublock_word;\r
5896       };\r
5897 \r
5898     __extension__ union\r
5899       {\r
5900  long int ru_msgsnd;\r
5901  __syscall_slong_t __ru_msgsnd_word;\r
5902       };\r
5903 \r
5904     __extension__ union\r
5905       {\r
5906  long int ru_msgrcv;\r
5907  __syscall_slong_t __ru_msgrcv_word;\r
5908       };\r
5909 \r
5910     __extension__ union\r
5911       {\r
5912  long int ru_nsignals;\r
5913  __syscall_slong_t __ru_nsignals_word;\r
5914       };\r
5915 \r
5916 \r
5917 \r
5918     __extension__ union\r
5919       {\r
5920  long int ru_nvcsw;\r
5921  __syscall_slong_t __ru_nvcsw_word;\r
5922       };\r
5923 \r
5924 \r
5925     __extension__ union\r
5926       {\r
5927  long int ru_nivcsw;\r
5928  __syscall_slong_t __ru_nivcsw_word;\r
5929       };\r
5930   };\r
5931 \r
5932 \r
5933 \r
5934 \r
5935 \r
5936 \r
5937 \r
5938 enum __priority_which\r
5939 {\r
5940   PRIO_PROCESS = 0,\r
5941 \r
5942   PRIO_PGRP = 1,\r
5943 \r
5944   PRIO_USER = 2\r
5945 \r
5946 };\r
5947 # 25 "/usr/include/x86_64-linux-gnu/sys/resource.h" 2 3 4\r
5948 # 42 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
5949 typedef int __rlimit_resource_t;\r
5950 typedef int __rusage_who_t;\r
5951 typedef int __priority_which_t;\r
5952 \r
5953 \r
5954 \r
5955 \r
5956 \r
5957 extern int getrlimit (__rlimit_resource_t __resource,\r
5958         struct rlimit *__rlimits) __attribute__ ((__nothrow__ ));\r
5959 # 69 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
5960 extern int setrlimit (__rlimit_resource_t __resource,\r
5961         const struct rlimit *__rlimits) __attribute__ ((__nothrow__ ));\r
5962 # 87 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
5963 extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__ ));\r
5964 \r
5965 \r
5966 \r
5967 \r
5968 \r
5969 extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__ ));\r
5970 \r
5971 \r
5972 \r
5973 extern int setpriority (__priority_which_t __which, id_t __who, int __prio)\r
5974      __attribute__ ((__nothrow__ ));\r
5975 # 33 "../include/apr_thread_proc.h" 2\r
5976 # 45 "../include/apr_thread_proc.h"\r
5977 typedef enum {\r
5978     APR_SHELLCMD,\r
5979     APR_PROGRAM,\r
5980     APR_PROGRAM_ENV,\r
5981     APR_PROGRAM_PATH,\r
5982     APR_SHELLCMD_ENV\r
5983 \r
5984 \r
5985 } apr_cmdtype_e;\r
5986 \r
5987 typedef enum {\r
5988     APR_WAIT,\r
5989     APR_NOWAIT\r
5990 } apr_wait_how_e;\r
5991 \r
5992 \r
5993 \r
5994 \r
5995 \r
5996 \r
5997 typedef enum {\r
5998     APR_PROC_EXIT = 1,\r
5999     APR_PROC_SIGNAL = 2,\r
6000     APR_PROC_SIGNAL_CORE = 4\r
6001 } apr_exit_why_e;\r
6002 # 133 "../include/apr_thread_proc.h"\r
6003 typedef struct apr_proc_t {\r
6004 \r
6005     pid_t pid;\r
6006 \r
6007     apr_file_t *in;\r
6008 \r
6009     apr_file_t *out;\r
6010 \r
6011     apr_file_t *err;\r
6012 # 161 "../include/apr_thread_proc.h"\r
6013 } apr_proc_t;\r
6014 # 173 "../include/apr_thread_proc.h"\r
6015 typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,\r
6016                                  const char *description);\r
6017 \r
6018 \r
6019 typedef struct apr_thread_t apr_thread_t;\r
6020 \r
6021 \r
6022 typedef struct apr_threadattr_t apr_threadattr_t;\r
6023 \r
6024 \r
6025 typedef struct apr_procattr_t apr_procattr_t;\r
6026 \r
6027 \r
6028 typedef struct apr_thread_once_t apr_thread_once_t;\r
6029 \r
6030 \r
6031 typedef struct apr_threadkey_t apr_threadkey_t;\r
6032 \r
6033 \r
6034 typedef struct apr_other_child_rec_t apr_other_child_rec_t;\r
6035 \r
6036 \r
6037 \r
6038 \r
6039 typedef void *( *apr_thread_start_t)(apr_thread_t*, void*);\r
6040 \r
6041 typedef enum {\r
6042     APR_KILL_NEVER,\r
6043 \r
6044 \r
6045     APR_KILL_ALWAYS,\r
6046     APR_KILL_AFTER_TIMEOUT,\r
6047     APR_JUST_WAIT,\r
6048     APR_KILL_ONLY_ONCE\r
6049 } apr_kill_conditions_e;\r
6050 # 218 "../include/apr_thread_proc.h"\r
6051 apr_status_t apr_threadattr_create(apr_threadattr_t **new_attr,\r
6052                                                 apr_pool_t *cont);\r
6053 \r
6054 \r
6055 \r
6056 \r
6057 \r
6058 \r
6059 apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,\r
6060                                                     apr_int32_t on);\r
6061 \r
6062 \r
6063 \r
6064 \r
6065 \r
6066 \r
6067 \r
6068 apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr);\r
6069 \r
6070 \r
6071 \r
6072 \r
6073 \r
6074 \r
6075 apr_status_t apr_threadattr_stacksize_set(apr_threadattr_t *attr,\r
6076                                                        apr_size_t stacksize);\r
6077 # 255 "../include/apr_thread_proc.h"\r
6078 apr_status_t apr_threadattr_guardsize_set(apr_threadattr_t *attr,\r
6079                                                        apr_size_t guardsize);\r
6080 # 266 "../include/apr_thread_proc.h"\r
6081 apr_status_t apr_thread_create(apr_thread_t **new_thread,\r
6082                                             apr_threadattr_t *attr,\r
6083                                             apr_thread_start_t func,\r
6084                                             void *data, apr_pool_t *cont);\r
6085 \r
6086 \r
6087 \r
6088 \r
6089 \r
6090 \r
6091 apr_status_t apr_thread_exit(apr_thread_t *thd,\r
6092                                           apr_status_t retval);\r
6093 \r
6094 \r
6095 \r
6096 \r
6097 \r
6098 \r
6099 apr_status_t apr_thread_join(apr_status_t *retval,\r
6100                                           apr_thread_t *thd);\r
6101 \r
6102 \r
6103 \r
6104 \r
6105 void apr_thread_yield(void);\r
6106 \r
6107 \r
6108 \r
6109 \r
6110 \r
6111 \r
6112 \r
6113 apr_status_t apr_thread_once_init(apr_thread_once_t **control,\r
6114                                                apr_pool_t *p);\r
6115 # 310 "../include/apr_thread_proc.h"\r
6116 apr_status_t apr_thread_once(apr_thread_once_t *control,\r
6117                                           void (*func)(void));\r
6118 \r
6119 \r
6120 \r
6121 \r
6122 \r
6123 apr_status_t apr_thread_detach(apr_thread_t *thd);\r
6124 \r
6125 \r
6126 \r
6127 \r
6128 \r
6129 \r
6130 \r
6131 apr_status_t apr_thread_data_get(void **data, const char *key,\r
6132                                              apr_thread_t *thread);\r
6133 # 335 "../include/apr_thread_proc.h"\r
6134 apr_status_t apr_thread_data_set(void *data, const char *key,\r
6135                                              apr_status_t (*cleanup) (void *),\r
6136                                              apr_thread_t *thread);\r
6137 \r
6138 \r
6139 \r
6140 \r
6141 \r
6142 \r
6143 \r
6144 apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,\r
6145                                                     void (*dest)(void *),\r
6146                                                     apr_pool_t *cont);\r
6147 \r
6148 \r
6149 \r
6150 \r
6151 \r
6152 \r
6153 apr_status_t apr_threadkey_private_get(void **new_mem,\r
6154                                                  apr_threadkey_t *key);\r
6155 \r
6156 \r
6157 \r
6158 \r
6159 \r
6160 \r
6161 apr_status_t apr_threadkey_private_set(void *priv,\r
6162                                                  apr_threadkey_t *key);\r
6163 \r
6164 \r
6165 \r
6166 \r
6167 \r
6168 apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key);\r
6169 \r
6170 \r
6171 \r
6172 \r
6173 \r
6174 \r
6175 \r
6176 apr_status_t apr_threadkey_data_get(void **data, const char *key,\r
6177                                                 apr_threadkey_t *threadkey);\r
6178 # 387 "../include/apr_thread_proc.h"\r
6179 apr_status_t apr_threadkey_data_set(void *data, const char *key,\r
6180                                                 apr_status_t (*cleanup) (void *),\r
6181                                                 apr_threadkey_t *threadkey);\r
6182 # 398 "../include/apr_thread_proc.h"\r
6183 apr_status_t apr_procattr_create(apr_procattr_t **new_attr,\r
6184                                                   apr_pool_t *cont);\r
6185 # 415 "../include/apr_thread_proc.h"\r
6186 apr_status_t apr_procattr_io_set(apr_procattr_t *attr,\r
6187                                              apr_int32_t in, apr_int32_t out,\r
6188                                              apr_int32_t err);\r
6189 # 434 "../include/apr_thread_proc.h"\r
6190 apr_status_t apr_procattr_child_in_set(struct apr_procattr_t *attr,\r
6191                                                   apr_file_t *child_in,\r
6192                                                   apr_file_t *parent_in);\r
6193 # 451 "../include/apr_thread_proc.h"\r
6194 apr_status_t apr_procattr_child_out_set(struct apr_procattr_t *attr,\r
6195                                                    apr_file_t *child_out,\r
6196                                                    apr_file_t *parent_out);\r
6197 # 468 "../include/apr_thread_proc.h"\r
6198 apr_status_t apr_procattr_child_err_set(struct apr_procattr_t *attr,\r
6199                                                    apr_file_t *child_err,\r
6200                                                    apr_file_t *parent_err);\r
6201 # 479 "../include/apr_thread_proc.h"\r
6202 apr_status_t apr_procattr_dir_set(apr_procattr_t *attr,\r
6203                                               const char *dir);\r
6204 # 493 "../include/apr_thread_proc.h"\r
6205 apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr,\r
6206                                                   apr_cmdtype_e cmd);\r
6207 \r
6208 \r
6209 \r
6210 \r
6211 \r
6212 \r
6213 apr_status_t apr_procattr_detach_set(apr_procattr_t *attr,\r
6214                                                  apr_int32_t detach);\r
6215 # 517 "../include/apr_thread_proc.h"\r
6216 apr_status_t apr_procattr_limit_set(apr_procattr_t *attr,\r
6217                                                 apr_int32_t what,\r
6218                                                 struct rlimit *limit);\r
6219 # 533 "../include/apr_thread_proc.h"\r
6220 apr_status_t apr_procattr_child_errfn_set(apr_procattr_t *attr,\r
6221                                                        apr_child_errfn_t *errfn);\r
6222 # 548 "../include/apr_thread_proc.h"\r
6223 apr_status_t apr_procattr_error_check_set(apr_procattr_t *attr,\r
6224                                                        apr_int32_t chk);\r
6225 # 558 "../include/apr_thread_proc.h"\r
6226 apr_status_t apr_procattr_addrspace_set(apr_procattr_t *attr,\r
6227                                                        apr_int32_t addrspace);\r
6228 # 569 "../include/apr_thread_proc.h"\r
6229 apr_status_t apr_procattr_user_set(apr_procattr_t *attr,\r
6230                                                 const char *username,\r
6231                                                 const char *password);\r
6232 \r
6233 \r
6234 \r
6235 \r
6236 \r
6237 \r
6238 apr_status_t apr_procattr_group_set(apr_procattr_t *attr,\r
6239                                                  const char *groupname);\r
6240 # 591 "../include/apr_thread_proc.h"\r
6241 apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont);\r
6242 # 610 "../include/apr_thread_proc.h"\r
6243 apr_status_t apr_proc_create(apr_proc_t *new_proc,\r
6244                                           const char *progname,\r
6245                                           const char * const *args,\r
6246                                           const char * const *env,\r
6247                                           apr_procattr_t *attr,\r
6248                                           apr_pool_t *pool);\r
6249 # 643 "../include/apr_thread_proc.h"\r
6250 apr_status_t apr_proc_wait(apr_proc_t *proc,\r
6251                                         int *exitcode, apr_exit_why_e *exitwhy,\r
6252                                         apr_wait_how_e waithow);\r
6253 # 673 "../include/apr_thread_proc.h"\r
6254 apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc,\r
6255                                                   int *exitcode,\r
6256                                                   apr_exit_why_e *exitwhy,\r
6257                                                   apr_wait_how_e waithow,\r
6258                                                   apr_pool_t *p);\r
6259 # 688 "../include/apr_thread_proc.h"\r
6260 apr_status_t apr_proc_detach(int daemonize);\r
6261 # 707 "../include/apr_thread_proc.h"\r
6262 void apr_proc_other_child_register(apr_proc_t *proc,\r
6263                                            void (*maintenance) (int reason,\r
6264                                                                 void *,\r
6265                                                                 int status),\r
6266                                            void *data, apr_file_t *write_fd,\r
6267                                            apr_pool_t *p);\r
6268 # 723 "../include/apr_thread_proc.h"\r
6269 void apr_proc_other_child_unregister(void *data);\r
6270 # 745 "../include/apr_thread_proc.h"\r
6271 apr_status_t apr_proc_other_child_alert(apr_proc_t *proc,\r
6272                                                      int reason,\r
6273                                                      int status);\r
6274 # 756 "../include/apr_thread_proc.h"\r
6275 void apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,\r
6276                                                int reason);\r
6277 \r
6278 \r
6279 \r
6280 \r
6281 \r
6282 \r
6283 \r
6284 void apr_proc_other_child_refresh_all(int reason);\r
6285 \r
6286 \r
6287 \r
6288 \r
6289 \r
6290 \r
6291 apr_status_t apr_proc_kill(apr_proc_t *proc, int sig);\r
6292 # 787 "../include/apr_thread_proc.h"\r
6293 void apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *proc,\r
6294                                            apr_kill_conditions_e how);\r
6295 # 798 "../include/apr_thread_proc.h"\r
6296 apr_status_t apr_setup_signal_thread(void);\r
6297 # 807 "../include/apr_thread_proc.h"\r
6298 apr_status_t apr_signal_thread(int(*signal_handler)(int signum));\r
6299 \r
6300 \r
6301 \r
6302 \r
6303 \r
6304 \r
6305 \r
6306 apr_pool_t * apr_thread_pool_get (const apr_thread_t *thethread);\r
6307 # 20 "./../test/testatomic.c" 2\r
6308 \r
6309 \r
6310 # 1 "../include/apr_atomic.h" 1\r
6311 # 47 "../include/apr_atomic.h"\r
6312 apr_status_t apr_atomic_init(apr_pool_t *p);\r
6313 # 59 "../include/apr_atomic.h"\r
6314 apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem);\r
6315 \r
6316 \r
6317 \r
6318 \r
6319 \r
6320 \r
6321 void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
6322 \r
6323 \r
6324 \r
6325 \r
6326 \r
6327 \r
6328 \r
6329 apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
6330 \r
6331 \r
6332 \r
6333 \r
6334 \r
6335 \r
6336 void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
6337 \r
6338 \r
6339 \r
6340 \r
6341 \r
6342 \r
6343 apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem);\r
6344 \r
6345 \r
6346 \r
6347 \r
6348 \r
6349 \r
6350 int apr_atomic_dec32(volatile apr_uint32_t *mem);\r
6351 # 105 "../include/apr_atomic.h"\r
6352 apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,\r
6353                               apr_uint32_t cmp);\r
6354 \r
6355 \r
6356 \r
6357 \r
6358 \r
6359 \r
6360 \r
6361 apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
6362 # 124 "../include/apr_atomic.h"\r
6363 void* apr_atomic_casptr(volatile void **mem, void *with, const void *cmp);\r
6364 \r
6365 \r
6366 \r
6367 \r
6368 \r
6369 \r
6370 \r
6371 void* apr_atomic_xchgptr(volatile void **mem, void *with);\r
6372 # 23 "./../test/testatomic.c" 2\r
6373 # 37 "./../test/testatomic.c"\r
6374 static void test_init(abts_case *tc, void *data)\r
6375 {\r
6376     apr_assert_success(tc, "Could not initliaze atomics", apr_atomic_init(p), 39);\r
6377 }\r
6378 \r
6379 static void test_set32(abts_case *tc, void *data)\r
6380 {\r
6381     apr_uint32_t y32;\r
6382     apr_atomic_set32(&y32, 2);\r
6383     abts_int_equal(tc, 2, y32, 46);\r
6384 }\r
6385 \r
6386 static void test_read32(abts_case *tc, void *data)\r
6387 {\r
6388     apr_uint32_t y32;\r
6389     apr_atomic_set32(&y32, 2);\r
6390     abts_int_equal(tc, 2, apr_atomic_read32(&y32), 53);\r
6391 }\r
6392 \r
6393 static void test_dec32(abts_case *tc, void *data)\r
6394 {\r
6395     apr_uint32_t y32;\r
6396     int rv;\r
6397 \r
6398     apr_atomic_set32(&y32, 2);\r
6399 \r
6400     rv = apr_atomic_dec32(&y32);\r
6401     abts_int_equal(tc, 1, y32, 64);\r
6402     abts_assert(tc, "atomic_dec returned zero when it shouldn't", rv != 0, 65);;\r
6403 \r
6404     rv = apr_atomic_dec32(&y32);\r
6405     abts_int_equal(tc, 0, y32, 68);\r
6406     abts_assert(tc, "atomic_dec didn't returned zero when it should", rv == 0, 69);;\r
6407 }\r
6408 \r
6409 static void test_xchg32(abts_case *tc, void *data)\r
6410 {\r
6411     apr_uint32_t oldval;\r
6412     apr_uint32_t y32;\r
6413 \r
6414     apr_atomic_set32(&y32, 100);\r
6415     oldval = apr_atomic_xchg32(&y32, 50);\r
6416 \r
6417     abts_int_equal(tc, 100, oldval, 80);\r
6418     abts_int_equal(tc, 50, y32, 81);\r
6419 }\r
6420 \r
6421 static void test_xchgptr(abts_case *tc, void *data)\r
6422 {\r
6423     int a;\r
6424     void *ref = "little piggy";\r
6425     volatile void *target_ptr = ref;\r
6426     void *old_ptr;\r
6427 \r
6428     old_ptr = apr_atomic_xchgptr(&target_ptr, &a);\r
6429     abts_ptr_equal(tc, ref, old_ptr, 92);\r
6430     abts_ptr_equal(tc, &a, (void *) target_ptr, 93);\r
6431 }\r
6432 \r
6433 static void test_cas_equal(abts_case *tc, void *data)\r
6434 {\r
6435     apr_uint32_t casval = 0;\r
6436     apr_uint32_t oldval;\r
6437 \r
6438     oldval = apr_atomic_cas32(&casval, 12, 0);\r
6439     abts_int_equal(tc, 0, oldval, 102);\r
6440     abts_int_equal(tc, 12, casval, 103);\r
6441 }\r
6442 \r
6443 static void test_cas_equal_nonnull(abts_case *tc, void *data)\r
6444 {\r
6445     apr_uint32_t casval = 12;\r
6446     apr_uint32_t oldval;\r
6447 \r
6448     oldval = apr_atomic_cas32(&casval, 23, 12);\r
6449     abts_int_equal(tc, 12, oldval, 112);\r
6450     abts_int_equal(tc, 23, casval, 113);\r
6451 }\r
6452 \r
6453 static void test_cas_notequal(abts_case *tc, void *data)\r
6454 {\r
6455     apr_uint32_t casval = 12;\r
6456     apr_uint32_t oldval;\r
6457 \r
6458     oldval = apr_atomic_cas32(&casval, 23, 2);\r
6459     abts_int_equal(tc, 12, oldval, 122);\r
6460     abts_int_equal(tc, 12, casval, 123);\r
6461 }\r
6462 \r
6463 static void test_casptr_equal(abts_case *tc, void *data)\r
6464 {\r
6465     int a;\r
6466     volatile void *target_ptr = ((void*)0);\r
6467     void *old_ptr;\r
6468 \r
6469     old_ptr = apr_atomic_casptr(&target_ptr, &a, ((void*)0));\r
6470     abts_ptr_equal(tc, ((void*)0), old_ptr, 133);\r
6471     abts_ptr_equal(tc, &a, (void *) target_ptr, 134);\r
6472 }\r
6473 \r
6474 static void test_casptr_equal_nonnull(abts_case *tc, void *data)\r
6475 {\r
6476     int a, b;\r
6477     volatile void *target_ptr = &a;\r
6478     void *old_ptr;\r
6479 \r
6480     old_ptr = apr_atomic_casptr(&target_ptr, &b, &a);\r
6481     abts_ptr_equal(tc, &a, old_ptr, 144);\r
6482     abts_ptr_equal(tc, &b, (void *) target_ptr, 145);\r
6483 }\r
6484 \r
6485 static void test_casptr_notequal(abts_case *tc, void *data)\r
6486 {\r
6487     int a, b;\r
6488     volatile void *target_ptr = &a;\r
6489     void *old_ptr;\r
6490 \r
6491     old_ptr = apr_atomic_casptr(&target_ptr, &a, &b);\r
6492     abts_ptr_equal(tc, &a, old_ptr, 155);\r
6493     abts_ptr_equal(tc, &a, (void *) target_ptr, 156);\r
6494 }\r
6495 \r
6496 static void test_add32(abts_case *tc, void *data)\r
6497 {\r
6498     apr_uint32_t oldval;\r
6499     apr_uint32_t y32;\r
6500 \r
6501     apr_atomic_set32(&y32, 23);\r
6502     oldval = apr_atomic_add32(&y32, 4);\r
6503     abts_int_equal(tc, 23, oldval, 166);\r
6504     abts_int_equal(tc, 27, y32, 167);\r
6505 }\r
6506 \r
6507 static void test_add32_neg(abts_case *tc, void *data)\r
6508 {\r
6509     apr_uint32_t oldval;\r
6510     apr_uint32_t y32;\r
6511 \r
6512     apr_atomic_set32(&y32, 23);\r
6513     oldval = apr_atomic_add32(&y32, -10);\r
6514     abts_int_equal(tc, 23, oldval, 177);\r
6515     abts_int_equal(tc, 13, y32, 178);\r
6516 }\r
6517 \r
6518 static void test_inc32(abts_case *tc, void *data)\r
6519 {\r
6520     apr_uint32_t oldval;\r
6521     apr_uint32_t y32;\r
6522 \r
6523     apr_atomic_set32(&y32, 23);\r
6524     oldval = apr_atomic_inc32(&y32);\r
6525     abts_int_equal(tc, 23, oldval, 188);\r
6526     abts_int_equal(tc, 24, y32, 189);\r
6527 }\r
6528 \r
6529 static void test_set_add_inc_sub(abts_case *tc, void *data)\r
6530 {\r
6531     apr_uint32_t y32;\r
6532 \r
6533     apr_atomic_set32(&y32, 0);\r
6534     apr_atomic_add32(&y32, 20);\r
6535     apr_atomic_inc32(&y32);\r
6536     apr_atomic_sub32(&y32, 10);\r
6537 \r
6538     abts_int_equal(tc, 11, y32, 201);\r
6539 }\r
6540 \r
6541 static void test_wrap_zero(abts_case *tc, void *data)\r
6542 {\r
6543     apr_uint32_t y32;\r
6544     apr_uint32_t rv;\r
6545     apr_uint32_t minus1 = -1;\r
6546     char *str;\r
6547 \r
6548     apr_atomic_set32(&y32, 0);\r
6549     rv = apr_atomic_dec32(&y32);\r
6550 \r
6551     abts_assert(tc, "apr_atomic_dec32 on zero returned zero.", rv != 0, 214);;\r
6552     str = apr_psprintf(p, "zero wrap failed: 0 - 1 = %d", y32);\r
6553     abts_assert(tc, str, y32 == minus1, 216);;\r
6554 }\r
6555 \r
6556 static void test_inc_neg1(abts_case *tc, void *data)\r
6557 {\r
6558     apr_uint32_t y32 = -1;\r
6559     apr_uint32_t minus1 = -1;\r
6560     apr_uint32_t rv;\r
6561     char *str;\r
6562 \r
6563     rv = apr_atomic_inc32(&y32);\r
6564 \r
6565     abts_assert(tc, "apr_atomic_inc32 didn't return the old value.", rv == minus1, 228);;\r
6566     str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);\r
6567     abts_assert(tc, str, y32 == 0, 230);;\r
6568 }\r
6569 \r
6570 \r
6571 \r
6572 \r
6573 void * thread_func_mutex(apr_thread_t *thd, void *data);\r
6574 void * thread_func_atomic(apr_thread_t *thd, void *data);\r
6575 \r
6576 apr_thread_mutex_t *thread_lock;\r
6577 volatile apr_uint32_t mutex_locks = 0;\r
6578 volatile apr_uint32_t atomic_ops = 0;\r
6579 apr_status_t exit_ret_val = 123;\r
6580 \r
6581 void * thread_func_mutex(apr_thread_t *thd, void *data)\r
6582 {\r
6583     int i;\r
6584 \r
6585     for (i = 0; i < 1; i++) {\r
6586         apr_thread_mutex_lock(thread_lock);\r
6587         mutex_locks++;\r
6588         apr_thread_mutex_unlock(thread_lock);\r
6589     }\r
6590     apr_thread_exit(thd, exit_ret_val);\r
6591     return ((void*)0);\r
6592 }\r
6593 \r
6594 void * thread_func_atomic(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_atomic_inc32(&atomic_ops);\r
6600         apr_atomic_add32(&atomic_ops, 2);\r
6601         apr_atomic_dec32(&atomic_ops);\r
6602         apr_atomic_dec32(&atomic_ops);\r
6603     }\r
6604     apr_thread_exit(thd, exit_ret_val);\r
6605     return ((void*)0);\r
6606 }\r
6607 \r
6608 static void test_atomics_threaded(abts_case *tc, void *data)\r
6609 {\r
6610     apr_thread_t *t1[2];\r
6611     apr_thread_t *t2[2];\r
6612     apr_status_t rv;\r
6613     int i;\r
6614 \r
6615 \r
6616 \r
6617 \r
6618 \r
6619     rv = apr_thread_mutex_create(&thread_lock, 0x0, p);\r
6620     apr_assert_success(tc, "Could not create lock", rv, 283);\r
6621 \r
6622     for (i = 0; i < 2; i++) {\r
6623         apr_status_t r1, r2;\r
6624         r1 = apr_thread_create(&t1[i], ((void*)0), thread_func_mutex, ((void*)0), p);\r
6625         r2 = apr_thread_create(&t2[i], ((void*)0), thread_func_atomic, ((void*)0), p);\r
6626         abts_assert(tc, "Failed creating threads", !r1 && !r2, 289);;\r
6627     }\r
6628 \r
6629     for (i = 0; i < 2; i++) {\r
6630         apr_status_t s1, s2;\r
6631         apr_thread_join(&s1, t1[i]);\r
6632         apr_thread_join(&s2, t2[i]);\r
6633 \r
6634         abts_assert(tc, "Invalid return value from thread_join", s1 == exit_ret_val && s2 == exit_ret_val, 298);;\r
6635 \r
6636     }\r
6637 \r
6638     abts_int_equal(tc, 2 * 1, mutex_locks, 301);\r
6639     abts_int_equal(tc, 2 * 1, apr_atomic_read32(&atomic_ops), 303);\r
6640 \r
6641 \r
6642     rv = apr_thread_mutex_destroy(thread_lock);\r
6643     abts_assert(tc, "Failed creating threads", rv == 0, 306);;\r
6644 }\r
6645 \r
6646 typedef struct tbox_t tbox_t;\r
6647 \r
6648 struct tbox_t {\r
6649     abts_case *tc;\r
6650     apr_uint32_t *mem;\r
6651     apr_uint32_t preval;\r
6652     apr_uint32_t postval;\r
6653     apr_uint32_t loop;\r
6654     void (*func)(tbox_t *box);\r
6655 };\r
6656 \r
6657 static __inline__ void busyloop_read32(tbox_t *tbox)\r
6658 {\r
6659     apr_uint32_t val;\r
6660 \r
6661     do {\r
6662         val = apr_atomic_read32(tbox->mem);\r
6663 \r
6664         if (val != tbox->preval)\r
6665             apr_thread_yield();\r
6666         else\r
6667             break;\r
6668     } while (1);\r
6669 }\r
6670 \r
6671 static void busyloop_set32(tbox_t *tbox)\r
6672 {\r
6673     do {\r
6674         busyloop_read32(tbox);\r
6675         apr_atomic_set32(tbox->mem, tbox->postval);\r
6676     } while (--tbox->loop);\r
6677 }\r
6678 \r
6679 static void busyloop_add32(tbox_t *tbox)\r
6680 {\r
6681     apr_uint32_t val;\r
6682 \r
6683     do {\r
6684         busyloop_read32(tbox);\r
6685         val = apr_atomic_add32(tbox->mem, tbox->postval);\r
6686         apr_thread_mutex_lock(thread_lock);\r
6687         abts_int_equal(tbox->tc, val, tbox->preval, 350);\r
6688         apr_thread_mutex_unlock(thread_lock);\r
6689     } while (--tbox->loop);\r
6690 }\r
6691 \r
6692 static void busyloop_sub32(tbox_t *tbox)\r
6693 {\r
6694     do {\r
6695         busyloop_read32(tbox);\r
6696         apr_atomic_sub32(tbox->mem, tbox->postval);\r
6697     } while (--tbox->loop);\r
6698 }\r
6699 \r
6700 static void busyloop_inc32(tbox_t *tbox)\r
6701 {\r
6702     apr_uint32_t val;\r
6703 \r
6704     do {\r
6705         busyloop_read32(tbox);\r
6706         val = apr_atomic_inc32(tbox->mem);\r
6707         apr_thread_mutex_lock(thread_lock);\r
6708         abts_int_equal(tbox->tc, val, tbox->preval, 371);\r
6709         apr_thread_mutex_unlock(thread_lock);\r
6710     } while (--tbox->loop);\r
6711 }\r
6712 \r
6713 static void busyloop_dec32(tbox_t *tbox)\r
6714 {\r
6715     apr_uint32_t val;\r
6716 \r
6717     do {\r
6718         busyloop_read32(tbox);\r
6719         val = apr_atomic_dec32(tbox->mem);\r
6720         apr_thread_mutex_lock(thread_lock);\r
6721         abts_int_nequal(tbox->tc, 0, val, 384);\r
6722         apr_thread_mutex_unlock(thread_lock);\r
6723     } while (--tbox->loop);\r
6724 }\r
6725 \r
6726 static void busyloop_cas32(tbox_t *tbox)\r
6727 {\r
6728     apr_uint32_t val;\r
6729 \r
6730     do {\r
6731         do {\r
6732             val = apr_atomic_cas32(tbox->mem, tbox->postval, tbox->preval);\r
6733 \r
6734             if (val != tbox->preval)\r
6735                 apr_thread_yield();\r
6736             else\r
6737                 break;\r
6738         } while (1);\r
6739     } while (--tbox->loop);\r
6740 }\r
6741 \r
6742 static void busyloop_xchg32(tbox_t *tbox)\r
6743 {\r
6744     apr_uint32_t val;\r
6745 \r
6746     do {\r
6747         busyloop_read32(tbox);\r
6748         val = apr_atomic_xchg32(tbox->mem, tbox->postval);\r
6749         apr_thread_mutex_lock(thread_lock);\r
6750         abts_int_equal(tbox->tc, val, tbox->preval, 413);\r
6751         apr_thread_mutex_unlock(thread_lock);\r
6752     } while (--tbox->loop);\r
6753 }\r
6754 \r
6755 static void * thread_func_busyloop(apr_thread_t *thd, void *data)\r
6756 {\r
6757     tbox_t *tbox = data;\r
6758 \r
6759     tbox->func(tbox);\r
6760 \r
6761     apr_thread_exit(thd, 0);\r
6762 \r
6763     return ((void*)0);\r
6764 }\r
6765 \r
6766 static void test_atomics_busyloop_threaded(abts_case *tc, void *data)\r
6767 {\r
6768     unsigned int i;\r
6769     apr_status_t rv;\r
6770     apr_uint32_t count = 0;\r
6771     tbox_t tbox[2];\r
6772     apr_thread_t *thread[2];\r
6773 \r
6774     rv = apr_thread_mutex_create(&thread_lock, 0x0, p);\r
6775     apr_assert_success(tc, "Could not create lock", rv, 438);\r
6776 \r
6777 \r
6778     for (i = 0; i < 2; i++) {\r
6779         tbox[i].tc = tc;\r
6780         tbox[i].mem = &count;\r
6781         tbox[i].loop = 50;\r
6782     }\r
6783 \r
6784     tbox[0].preval = 98;\r
6785     tbox[0].postval = 3891;\r
6786     tbox[0].func = busyloop_add32;\r
6787 \r
6788     tbox[1].preval = 3989;\r
6789     tbox[1].postval = 1010;\r
6790     tbox[1].func = busyloop_sub32;\r
6791 \r
6792     tbox[2].preval = 2979;\r
6793     tbox[2].postval = 0;\r
6794     tbox[2].func = busyloop_inc32;\r
6795 \r
6796     tbox[3].preval = 2980;\r
6797     tbox[3].postval = 16384;\r
6798     tbox[3].func = busyloop_set32;\r
6799 \r
6800     tbox[4].preval = 16384;\r
6801     tbox[4].postval = 0;\r
6802     tbox[4].func = busyloop_dec32;\r
6803 \r
6804     tbox[5].preval = 16383;\r
6805     tbox[5].postval = 1048576;\r
6806     tbox[5].func = busyloop_cas32;\r
6807 \r
6808     tbox[6].preval = 1048576;\r
6809     tbox[6].postval = 98;\r
6810     tbox[6].func = busyloop_xchg32;\r
6811 \r
6812 \r
6813     for (i = 0; i < 2; i++) {\r
6814         rv = apr_thread_create(&thread[i], ((void*)0), thread_func_busyloop,\r
6815                                &tbox[i], p);\r
6816         abts_assert(tc, "Failed creating thread", rv == 0, 479);;\r
6817     }\r
6818 \r
6819 \r
6820     apr_atomic_set32(tbox->mem, 98);\r
6821 \r
6822     for (i = 0; i < 2; i++) {\r
6823         apr_status_t retval;\r
6824         rv = apr_thread_join(&retval, thread[i]);\r
6825         abts_assert(tc, "Thread join failed", rv == 0, 488);;\r
6826         abts_assert(tc, "Invalid return value from thread_join", retval == 0, 489);;\r
6827     }\r
6828 \r
6829     abts_int_equal(tbox->tc, 98, count, 492);\r
6830 \r
6831     rv = apr_thread_mutex_destroy(thread_lock);\r
6832     abts_assert(tc, "Failed creating threads", rv == 0, 495);;\r
6833 }\r
6834 \r
6835 \r
6836 \r
6837 abts_suite *testatomic(abts_suite *suite)\r
6838 {\r
6839     suite = abts_add_suite(suite, "./../test/testatomic.c");\r
6840 \r
6841     abts_run_test(suite, test_init, ((void*)0));\r
6842     abts_run_test(suite, test_set32, ((void*)0));\r
6843     abts_run_test(suite, test_read32, ((void*)0));\r
6844     abts_run_test(suite, test_dec32, ((void*)0));\r
6845     abts_run_test(suite, test_xchg32, ((void*)0));\r
6846     abts_run_test(suite, test_xchgptr, ((void*)0));\r
6847     abts_run_test(suite, test_cas_equal, ((void*)0));\r
6848     abts_run_test(suite, test_cas_equal_nonnull, ((void*)0));\r
6849     abts_run_test(suite, test_cas_notequal, ((void*)0));\r
6850     abts_run_test(suite, test_casptr_equal, ((void*)0));\r
6851     abts_run_test(suite, test_casptr_equal_nonnull, ((void*)0));\r
6852     abts_run_test(suite, test_casptr_notequal, ((void*)0));\r
6853     abts_run_test(suite, test_add32, ((void*)0));\r
6854     abts_run_test(suite, test_add32_neg, ((void*)0));\r
6855     abts_run_test(suite, test_inc32, ((void*)0));\r
6856     abts_run_test(suite, test_set_add_inc_sub, ((void*)0));\r
6857     abts_run_test(suite, test_wrap_zero, ((void*)0));\r
6858     abts_run_test(suite, test_inc_neg1, ((void*)0));\r
6859 \r
6860 \r
6861     abts_run_test(suite, test_atomics_threaded, ((void*)0));\r
6862     abts_run_test(suite, test_atomics_busyloop_threaded, ((void*)0));\r
6863 \r
6864 \r
6865     return suite;\r
6866 }\r
6867 # 10 "main2.c" 2\r
6868 # 1 "./../test/testutil.c" 1\r
6869 # 20 "./../test/testutil.c"\r
6870 # 1 "./../test/abts.h" 1\r
6871 # 21 "./../test/testutil.c" 2\r
6872 # 1 "./../test/testutil.h" 1\r
6873 # 19 "./../test/testutil.h"\r
6874 # 1 "./../test/abts.h" 1\r
6875 # 20 "./../test/testutil.h" 2\r
6876 # 22 "./../test/testutil.c" 2\r
6877 \r
6878 \r
6879 apr_pool_t *p;\r
6880 \r
6881 void apr_assert_success(abts_case* tc, const char* context, apr_status_t rv,\r
6882                         int lineno)\r
6883 {\r
6884     if (rv == ((20000 + 50000) + 23)) {\r
6885         abts_not_impl(tc, context, lineno);\r
6886     } else if (rv != 0) {\r
6887         char buf[8096], ebuf[128];\r
6888         sprintf(buf, "%s (%d): %s\n", context, rv,\r
6889                 apr_strerror(rv, ebuf, sizeof ebuf));\r
6890         abts_fail(tc, buf, lineno);\r
6891     }\r
6892 }\r
6893 \r
6894 void initialize(void) {\r
6895     apr_initialize();\r
6896     atexit(apr_terminate);\r
6897 \r
6898     apr_pool_create_ex(&p, ((void*)0), ((void*)0), ((void*)0));\r
6899 }\r
6900 # 11 "main2.c" 2\r
6901 # 1 "./../locks/unix/thread_mutex.c" 1\r
6902 # 17 "./../locks/unix/thread_mutex.c"\r
6903 # 1 "../include/arch/unix/apr_arch_thread_mutex.h" 1\r
6904 # 21 "../include/arch/unix/apr_arch_thread_mutex.h"\r
6905 # 1 "../include/arch/unix/apr_private.h" 1\r
6906 # 999 "../include/arch/unix/apr_private.h"\r
6907 # 1 "../include/arch/unix/../apr_private_common.h" 1\r
6908 # 27 "../include/arch/unix/../apr_private_common.h"\r
6909 apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,\r
6910                                           const char *liststr,\r
6911                                           char separator,\r
6912                                           apr_pool_t *p);\r
6913 \r
6914 apr_status_t apr_filepath_list_merge_impl(char **liststr,\r
6915                                           apr_array_header_t *pathelts,\r
6916                                           char separator,\r
6917                                           apr_pool_t *p);\r
6918 # 1000 "../include/arch/unix/apr_private.h" 2\r
6919 # 22 "../include/arch/unix/apr_arch_thread_mutex.h" 2\r
6920 \r
6921 \r
6922 # 1 "../include/apr_portable.h" 1\r
6923 # 32 "../include/apr_portable.h"\r
6924 # 1 "../include/apr_network_io.h" 1\r
6925 # 31 "../include/apr_network_io.h"\r
6926 # 1 "/usr/include/netinet/in.h" 1 3 4\r
6927 # 22 "/usr/include/netinet/in.h" 3 4\r
6928 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 1 3 4\r
6929 # 23 "/usr/include/netinet/in.h" 2 3 4\r
6930 \r
6931 \r
6932 \r
6933 \r
6934 \r
6935 \r
6936 \r
6937 typedef uint32_t in_addr_t;\r
6938 struct in_addr\r
6939   {\r
6940     in_addr_t s_addr;\r
6941   };\r
6942 \r
6943 \r
6944 \r
6945 # 1 "/usr/include/x86_64-linux-gnu/bits/in.h" 1 3 4\r
6946 # 112 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4\r
6947 struct ip_opts\r
6948   {\r
6949     struct in_addr ip_dst;\r
6950     char ip_opts[40];\r
6951   };\r
6952 \r
6953 \r
6954 struct ip_mreqn\r
6955   {\r
6956     struct in_addr imr_multiaddr;\r
6957     struct in_addr imr_address;\r
6958     int imr_ifindex;\r
6959   };\r
6960 \r
6961 \r
6962 struct in_pktinfo\r
6963   {\r
6964     int ipi_ifindex;\r
6965     struct in_addr ipi_spec_dst;\r
6966     struct in_addr ipi_addr;\r
6967   };\r
6968 # 38 "/usr/include/netinet/in.h" 2 3 4\r
6969 \r
6970 \r
6971 enum\r
6972   {\r
6973     IPPROTO_IP = 0,\r
6974 \r
6975     IPPROTO_ICMP = 1,\r
6976 \r
6977     IPPROTO_IGMP = 2,\r
6978 \r
6979     IPPROTO_IPIP = 4,\r
6980 \r
6981     IPPROTO_TCP = 6,\r
6982 \r
6983     IPPROTO_EGP = 8,\r
6984 \r
6985     IPPROTO_PUP = 12,\r
6986 \r
6987     IPPROTO_UDP = 17,\r
6988 \r
6989     IPPROTO_IDP = 22,\r
6990 \r
6991     IPPROTO_TP = 29,\r
6992 \r
6993     IPPROTO_DCCP = 33,\r
6994 \r
6995     IPPROTO_IPV6 = 41,\r
6996 \r
6997     IPPROTO_RSVP = 46,\r
6998 \r
6999     IPPROTO_GRE = 47,\r
7000 \r
7001     IPPROTO_ESP = 50,\r
7002 \r
7003     IPPROTO_AH = 51,\r
7004 \r
7005     IPPROTO_MTP = 92,\r
7006 \r
7007     IPPROTO_BEETPH = 94,\r
7008 \r
7009     IPPROTO_ENCAP = 98,\r
7010 \r
7011     IPPROTO_PIM = 103,\r
7012 \r
7013     IPPROTO_COMP = 108,\r
7014 \r
7015     IPPROTO_SCTP = 132,\r
7016 \r
7017     IPPROTO_UDPLITE = 136,\r
7018 \r
7019     IPPROTO_RAW = 255,\r
7020 \r
7021     IPPROTO_MAX\r
7022   };\r
7023 \r
7024 \r
7025 \r
7026 \r
7027 \r
7028 enum\r
7029   {\r
7030     IPPROTO_HOPOPTS = 0,\r
7031 \r
7032     IPPROTO_ROUTING = 43,\r
7033 \r
7034     IPPROTO_FRAGMENT = 44,\r
7035 \r
7036     IPPROTO_ICMPV6 = 58,\r
7037 \r
7038     IPPROTO_NONE = 59,\r
7039 \r
7040     IPPROTO_DSTOPTS = 60,\r
7041 \r
7042     IPPROTO_MH = 135\r
7043 \r
7044   };\r
7045 \r
7046 \r
7047 \r
7048 typedef uint16_t in_port_t;\r
7049 \r
7050 \r
7051 enum\r
7052   {\r
7053     IPPORT_ECHO = 7,\r
7054     IPPORT_DISCARD = 9,\r
7055     IPPORT_SYSTAT = 11,\r
7056     IPPORT_DAYTIME = 13,\r
7057     IPPORT_NETSTAT = 15,\r
7058     IPPORT_FTP = 21,\r
7059     IPPORT_TELNET = 23,\r
7060     IPPORT_SMTP = 25,\r
7061     IPPORT_TIMESERVER = 37,\r
7062     IPPORT_NAMESERVER = 42,\r
7063     IPPORT_WHOIS = 43,\r
7064     IPPORT_MTP = 57,\r
7065 \r
7066     IPPORT_TFTP = 69,\r
7067     IPPORT_RJE = 77,\r
7068     IPPORT_FINGER = 79,\r
7069     IPPORT_TTYLINK = 87,\r
7070     IPPORT_SUPDUP = 95,\r
7071 \r
7072 \r
7073     IPPORT_EXECSERVER = 512,\r
7074     IPPORT_LOGINSERVER = 513,\r
7075     IPPORT_CMDSERVER = 514,\r
7076     IPPORT_EFSSERVER = 520,\r
7077 \r
7078 \r
7079     IPPORT_BIFFUDP = 512,\r
7080     IPPORT_WHOSERVER = 513,\r
7081     IPPORT_ROUTESERVER = 520,\r
7082 \r
7083 \r
7084     IPPORT_RESERVED = 1024,\r
7085 \r
7086 \r
7087     IPPORT_USERRESERVED = 5000\r
7088   };\r
7089 # 209 "/usr/include/netinet/in.h" 3 4\r
7090 struct in6_addr\r
7091   {\r
7092     union\r
7093       {\r
7094  uint8_t __u6_addr8[16];\r
7095 \r
7096  uint16_t __u6_addr16[8];\r
7097  uint32_t __u6_addr32[4];\r
7098 \r
7099       } __in6_u;\r
7100 \r
7101 \r
7102 \r
7103 \r
7104 \r
7105   };\r
7106 \r
7107 \r
7108 extern const struct in6_addr in6addr_any;\r
7109 extern const struct in6_addr in6addr_loopback;\r
7110 # 237 "/usr/include/netinet/in.h" 3 4\r
7111 struct sockaddr_in\r
7112   {\r
7113     sa_family_t sin_family;\r
7114     in_port_t sin_port;\r
7115     struct in_addr sin_addr;\r
7116 \r
7117 \r
7118     unsigned char sin_zero[sizeof (struct sockaddr) -\r
7119       (sizeof (unsigned short int)) -\r
7120       sizeof (in_port_t) -\r
7121       sizeof (struct in_addr)];\r
7122   };\r
7123 \r
7124 \r
7125 \r
7126 struct sockaddr_in6\r
7127   {\r
7128     sa_family_t sin6_family;\r
7129     in_port_t sin6_port;\r
7130     uint32_t sin6_flowinfo;\r
7131     struct in6_addr sin6_addr;\r
7132     uint32_t sin6_scope_id;\r
7133   };\r
7134 \r
7135 \r
7136 \r
7137 \r
7138 struct ip_mreq\r
7139   {\r
7140 \r
7141     struct in_addr imr_multiaddr;\r
7142 \r
7143 \r
7144     struct in_addr imr_interface;\r
7145   };\r
7146 \r
7147 struct ip_mreq_source\r
7148   {\r
7149 \r
7150     struct in_addr imr_multiaddr;\r
7151 \r
7152 \r
7153     struct in_addr imr_interface;\r
7154 \r
7155 \r
7156     struct in_addr imr_sourceaddr;\r
7157   };\r
7158 \r
7159 \r
7160 \r
7161 \r
7162 struct ipv6_mreq\r
7163   {\r
7164 \r
7165     struct in6_addr ipv6mr_multiaddr;\r
7166 \r
7167 \r
7168     unsigned int ipv6mr_interface;\r
7169   };\r
7170 \r
7171 \r
7172 \r
7173 \r
7174 struct group_req\r
7175   {\r
7176 \r
7177     uint32_t gr_interface;\r
7178 \r
7179 \r
7180     struct sockaddr_storage gr_group;\r
7181   };\r
7182 \r
7183 struct group_source_req\r
7184   {\r
7185 \r
7186     uint32_t gsr_interface;\r
7187 \r
7188 \r
7189     struct sockaddr_storage gsr_group;\r
7190 \r
7191 \r
7192     struct sockaddr_storage gsr_source;\r
7193   };\r
7194 \r
7195 \r
7196 \r
7197 struct ip_msfilter\r
7198   {\r
7199 \r
7200     struct in_addr imsf_multiaddr;\r
7201 \r
7202 \r
7203     struct in_addr imsf_interface;\r
7204 \r
7205 \r
7206     uint32_t imsf_fmode;\r
7207 \r
7208 \r
7209     uint32_t imsf_numsrc;\r
7210 \r
7211     struct in_addr imsf_slist[1];\r
7212   };\r
7213 \r
7214 \r
7215 \r
7216 \r
7217 \r
7218 struct group_filter\r
7219   {\r
7220 \r
7221     uint32_t gf_interface;\r
7222 \r
7223 \r
7224     struct sockaddr_storage gf_group;\r
7225 \r
7226 \r
7227     uint32_t gf_fmode;\r
7228 \r
7229 \r
7230     uint32_t gf_numsrc;\r
7231 \r
7232     struct sockaddr_storage gf_slist[1];\r
7233 };\r
7234 # 374 "/usr/include/netinet/in.h" 3 4\r
7235 extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
7236 extern uint16_t ntohs (uint16_t __netshort)\r
7237      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
7238 extern uint32_t htonl (uint32_t __hostlong)\r
7239      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
7240 extern uint16_t htons (uint16_t __hostshort)\r
7241      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
7242 \r
7243 \r
7244 \r
7245 \r
7246 \r
7247 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4\r
7248 # 386 "/usr/include/netinet/in.h" 2 3 4\r
7249 # 501 "/usr/include/netinet/in.h" 3 4\r
7250 extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ ));\r
7251 \r
7252 \r
7253 extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)\r
7254      __attribute__ ((__nothrow__ ));\r
7255 # 32 "../include/apr_network_io.h" 2\r
7256 # 108 "../include/apr_network_io.h"\r
7257 typedef enum {\r
7258     APR_SHUTDOWN_READ,\r
7259     APR_SHUTDOWN_WRITE,\r
7260     APR_SHUTDOWN_READWRITE\r
7261 } apr_shutdown_how_e;\r
7262 # 172 "../include/apr_network_io.h"\r
7263 typedef enum {\r
7264     APR_LOCAL,\r
7265     APR_REMOTE\r
7266 } apr_interface_e;\r
7267 # 193 "../include/apr_network_io.h"\r
7268 typedef struct apr_socket_t apr_socket_t;\r
7269 \r
7270 \r
7271 \r
7272 typedef struct apr_hdtr_t apr_hdtr_t;\r
7273 \r
7274 typedef struct in_addr apr_in_addr_t;\r
7275 \r
7276 typedef struct apr_ipsubnet_t apr_ipsubnet_t;\r
7277 \r
7278 \r
7279 typedef apr_uint16_t apr_port_t;\r
7280 \r
7281 \r
7282 \r
7283 \r
7284 typedef struct apr_sockaddr_t apr_sockaddr_t;\r
7285 \r
7286 \r
7287 \r
7288 struct apr_sockaddr_t {\r
7289 \r
7290     apr_pool_t *pool;\r
7291 \r
7292     char *hostname;\r
7293 \r
7294     char *servname;\r
7295 \r
7296     apr_port_t port;\r
7297 \r
7298     apr_int32_t family;\r
7299 \r
7300     apr_socklen_t salen;\r
7301 \r
7302     int ipaddr_len;\r
7303 \r
7304 \r
7305     int addr_str_len;\r
7306 \r
7307 \r
7308     void *ipaddr_ptr;\r
7309 \r
7310 \r
7311     apr_sockaddr_t *next;\r
7312 \r
7313     union {\r
7314 \r
7315         struct sockaddr_in sin;\r
7316 \r
7317 \r
7318         struct sockaddr_in6 sin6;\r
7319 \r
7320 \r
7321 \r
7322 \r
7323         struct sockaddr_storage sas;\r
7324 \r
7325     } sa;\r
7326 };\r
7327 # 263 "../include/apr_network_io.h"\r
7328 struct apr_hdtr_t {\r
7329 \r
7330     struct iovec* headers;\r
7331 \r
7332     int numheaders;\r
7333 \r
7334     struct iovec* trailers;\r
7335 \r
7336     int numtrailers;\r
7337 };\r
7338 # 287 "../include/apr_network_io.h"\r
7339 apr_status_t apr_socket_create(apr_socket_t **new_sock,\r
7340                                             int family, int type,\r
7341                                             int protocol,\r
7342                                             apr_pool_t *cont);\r
7343 # 305 "../include/apr_network_io.h"\r
7344 apr_status_t apr_socket_shutdown(apr_socket_t *thesocket,\r
7345                                               apr_shutdown_how_e how);\r
7346 \r
7347 \r
7348 \r
7349 \r
7350 \r
7351 apr_status_t apr_socket_close(apr_socket_t *thesocket);\r
7352 # 321 "../include/apr_network_io.h"\r
7353 apr_status_t apr_socket_bind(apr_socket_t *sock,\r
7354                                           apr_sockaddr_t *sa);\r
7355 # 331 "../include/apr_network_io.h"\r
7356 apr_status_t apr_socket_listen(apr_socket_t *sock,\r
7357                                             apr_int32_t backlog);\r
7358 # 345 "../include/apr_network_io.h"\r
7359 apr_status_t apr_socket_accept(apr_socket_t **new_sock,\r
7360                                             apr_socket_t *sock,\r
7361                                             apr_pool_t *connection_pool);\r
7362 \r
7363 \r
7364 \r
7365 \r
7366 \r
7367 \r
7368 \r
7369 apr_status_t apr_socket_connect(apr_socket_t *sock,\r
7370                                              apr_sockaddr_t *sa);\r
7371 # 370 "../include/apr_network_io.h"\r
7372 apr_status_t apr_socket_atreadeof(apr_socket_t *sock,\r
7373                                                int *atreadeof);\r
7374 # 396 "../include/apr_network_io.h"\r
7375 apr_status_t apr_sockaddr_info_get(apr_sockaddr_t **sa,\r
7376                                           const char *hostname,\r
7377                                           apr_int32_t family,\r
7378                                           apr_port_t port,\r
7379                                           apr_int32_t flags,\r
7380                                           apr_pool_t *p);\r
7381 # 411 "../include/apr_network_io.h"\r
7382 apr_status_t apr_getnameinfo(char **hostname,\r
7383                                           apr_sockaddr_t *sa,\r
7384                                           apr_int32_t flags);\r
7385 # 445 "../include/apr_network_io.h"\r
7386 apr_status_t apr_parse_addr_port(char **addr,\r
7387                                               char **scope_id,\r
7388                                               apr_port_t *port,\r
7389                                               const char *str,\r
7390                                               apr_pool_t *p);\r
7391 # 459 "../include/apr_network_io.h"\r
7392 apr_status_t apr_gethostname(char *buf, int len, apr_pool_t *cont);\r
7393 \r
7394 \r
7395 \r
7396 \r
7397 \r
7398 \r
7399 \r
7400 apr_status_t apr_socket_data_get(void **data, const char *key,\r
7401                                               apr_socket_t *sock);\r
7402 # 477 "../include/apr_network_io.h"\r
7403 apr_status_t apr_socket_data_set(apr_socket_t *sock, void *data,\r
7404                                               const char *key,\r
7405                                               apr_status_t (*cleanup)(void*));\r
7406 # 498 "../include/apr_network_io.h"\r
7407 apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf,\r
7408                                           apr_size_t *len);\r
7409 # 519 "../include/apr_network_io.h"\r
7410 apr_status_t apr_socket_sendv(apr_socket_t *sock,\r
7411                                            const struct iovec *vec,\r
7412                                            apr_int32_t nvec, apr_size_t *len);\r
7413 # 530 "../include/apr_network_io.h"\r
7414 apr_status_t apr_socket_sendto(apr_socket_t *sock,\r
7415                                             apr_sockaddr_t *where,\r
7416                                             apr_int32_t flags, const char *buf,\r
7417                                             apr_size_t *len);\r
7418 # 548 "../include/apr_network_io.h"\r
7419 apr_status_t apr_socket_recvfrom(apr_sockaddr_t *from,\r
7420                                               apr_socket_t *sock,\r
7421                                               apr_int32_t flags, char *buf,\r
7422                                               apr_size_t *len);\r
7423 # 573 "../include/apr_network_io.h"\r
7424 apr_status_t apr_socket_sendfile(apr_socket_t *sock,\r
7425                                               apr_file_t *file,\r
7426                                               apr_hdtr_t *hdtr,\r
7427                                               apr_off_t *offset,\r
7428                                               apr_size_t *len,\r
7429                                               apr_int32_t flags);\r
7430 # 601 "../include/apr_network_io.h"\r
7431 apr_status_t apr_socket_recv(apr_socket_t *sock,\r
7432                                    char *buf, apr_size_t *len);\r
7433 # 626 "../include/apr_network_io.h"\r
7434 apr_status_t apr_socket_opt_set(apr_socket_t *sock,\r
7435                                              apr_int32_t opt, apr_int32_t on);\r
7436 # 640 "../include/apr_network_io.h"\r
7437 apr_status_t apr_socket_timeout_set(apr_socket_t *sock,\r
7438                                                  apr_interval_time_t t);\r
7439 # 662 "../include/apr_network_io.h"\r
7440 apr_status_t apr_socket_opt_get(apr_socket_t *sock,\r
7441                                              apr_int32_t opt, apr_int32_t *on);\r
7442 \r
7443 \r
7444 \r
7445 \r
7446 \r
7447 \r
7448 apr_status_t apr_socket_timeout_get(apr_socket_t *sock,\r
7449                                                  apr_interval_time_t *t);\r
7450 \r
7451 \r
7452 \r
7453 \r
7454 \r
7455 \r
7456 \r
7457 apr_status_t apr_socket_atmark(apr_socket_t *sock,\r
7458                                             int *atmark);\r
7459 # 690 "../include/apr_network_io.h"\r
7460 apr_status_t apr_socket_addr_get(apr_sockaddr_t **sa,\r
7461                                               apr_interface_e which,\r
7462                                               apr_socket_t *sock);\r
7463 # 701 "../include/apr_network_io.h"\r
7464 apr_status_t apr_sockaddr_ip_get(char **addr,\r
7465                                               apr_sockaddr_t *sockaddr);\r
7466 \r
7467 \r
7468 \r
7469 \r
7470 \r
7471 \r
7472 apr_status_t apr_sockaddr_ip_getbuf(char *buf, apr_size_t buflen,\r
7473                                                  apr_sockaddr_t *sockaddr);\r
7474 # 722 "../include/apr_network_io.h"\r
7475 int apr_sockaddr_equal(const apr_sockaddr_t *addr1,\r
7476                                     const apr_sockaddr_t *addr2);\r
7477 # 733 "../include/apr_network_io.h"\r
7478 int apr_sockaddr_is_wildcard(const apr_sockaddr_t *addr);\r
7479 \r
7480 \r
7481 \r
7482 \r
7483 \r
7484 \r
7485 apr_status_t apr_socket_type_get(apr_socket_t *sock,\r
7486                                               int *type);\r
7487 \r
7488 \r
7489 \r
7490 \r
7491 \r
7492 \r
7493 apr_status_t apr_getservbyname(apr_sockaddr_t *sockaddr,\r
7494                                             const char *servname);\r
7495 # 758 "../include/apr_network_io.h"\r
7496 apr_status_t apr_ipsubnet_create(apr_ipsubnet_t **ipsub,\r
7497                                               const char *ipstr,\r
7498                                               const char *mask_or_numbits,\r
7499                                               apr_pool_t *p);\r
7500 # 770 "../include/apr_network_io.h"\r
7501 int apr_ipsubnet_test(apr_ipsubnet_t *ipsub, apr_sockaddr_t *sa);\r
7502 # 791 "../include/apr_network_io.h"\r
7503 apr_status_t apr_socket_protocol_get(apr_socket_t *sock,\r
7504                                                   int *protocol);\r
7505 \r
7506 \r
7507 \r
7508 \r
7509 apr_pool_t * apr_socket_pool_get (const apr_socket_t *thesocket);\r
7510 \r
7511 \r
7512 \r
7513 \r
7514 apr_status_t apr_socket_inherit_set( apr_socket_t *thesocket);\r
7515 \r
7516 \r
7517 \r
7518 \r
7519 apr_status_t apr_socket_inherit_unset( apr_socket_t *thesocket);\r
7520 # 823 "../include/apr_network_io.h"\r
7521 apr_status_t apr_mcast_join(apr_socket_t *sock,\r
7522                                          apr_sockaddr_t *join,\r
7523                                          apr_sockaddr_t *iface,\r
7524                                          apr_sockaddr_t *source);\r
7525 # 838 "../include/apr_network_io.h"\r
7526 apr_status_t apr_mcast_leave(apr_socket_t *sock,\r
7527                                           apr_sockaddr_t *addr,\r
7528                                           apr_sockaddr_t *iface,\r
7529                                           apr_sockaddr_t *source);\r
7530 # 850 "../include/apr_network_io.h"\r
7531 apr_status_t apr_mcast_hops(apr_socket_t *sock,\r
7532                                          apr_byte_t ttl);\r
7533 \r
7534 \r
7535 \r
7536 \r
7537 \r
7538 \r
7539 apr_status_t apr_mcast_loopback(apr_socket_t *sock,\r
7540                                              apr_byte_t opt);\r
7541 \r
7542 \r
7543 \r
7544 \r
7545 \r
7546 \r
7547 \r
7548 apr_status_t apr_mcast_interface(apr_socket_t *sock,\r
7549                                               apr_sockaddr_t *iface);\r
7550 # 33 "../include/apr_portable.h" 2\r
7551 \r
7552 # 1 "../include/apr_global_mutex.h" 1\r
7553 # 26 "../include/apr_global_mutex.h"\r
7554 # 1 "../include/apr_proc_mutex.h" 1\r
7555 # 44 "../include/apr_proc_mutex.h"\r
7556 typedef enum {\r
7557     APR_LOCK_FCNTL,\r
7558     APR_LOCK_FLOCK,\r
7559     APR_LOCK_SYSVSEM,\r
7560     APR_LOCK_PROC_PTHREAD,\r
7561     APR_LOCK_POSIXSEM,\r
7562     APR_LOCK_DEFAULT\r
7563 } apr_lockmech_e;\r
7564 \r
7565 \r
7566 typedef struct apr_proc_mutex_t apr_proc_mutex_t;\r
7567 # 79 "../include/apr_proc_mutex.h"\r
7568 apr_status_t apr_proc_mutex_create(apr_proc_mutex_t **mutex,\r
7569                                                 const char *fname,\r
7570                                                 apr_lockmech_e mech,\r
7571                                                 apr_pool_t *pool);\r
7572 # 95 "../include/apr_proc_mutex.h"\r
7573 apr_status_t apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,\r
7574                                                     const char *fname,\r
7575                                                     apr_pool_t *pool);\r
7576 \r
7577 \r
7578 \r
7579 \r
7580 \r
7581 \r
7582 apr_status_t apr_proc_mutex_lock(apr_proc_mutex_t *mutex);\r
7583 # 113 "../include/apr_proc_mutex.h"\r
7584 apr_status_t apr_proc_mutex_trylock(apr_proc_mutex_t *mutex);\r
7585 \r
7586 \r
7587 \r
7588 \r
7589 \r
7590 apr_status_t apr_proc_mutex_unlock(apr_proc_mutex_t *mutex);\r
7591 \r
7592 \r
7593 \r
7594 \r
7595 \r
7596 apr_status_t apr_proc_mutex_destroy(apr_proc_mutex_t *mutex);\r
7597 \r
7598 \r
7599 \r
7600 \r
7601 \r
7602 \r
7603 \r
7604 apr_status_t apr_proc_mutex_cleanup(void *mutex);\r
7605 \r
7606 \r
7607 \r
7608 \r
7609 \r
7610 \r
7611 const char * apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex);\r
7612 \r
7613 \r
7614 \r
7615 \r
7616 \r
7617 \r
7618 const char * apr_proc_mutex_name(apr_proc_mutex_t *mutex);\r
7619 \r
7620 \r
7621 \r
7622 \r
7623 const char * apr_proc_mutex_defname(void);\r
7624 \r
7625 \r
7626 \r
7627 \r
7628 \r
7629 apr_pool_t * apr_proc_mutex_pool_get (const apr_proc_mutex_t *theproc_mutex);\r
7630 # 27 "../include/apr_global_mutex.h" 2\r
7631 # 46 "../include/apr_global_mutex.h"\r
7632 typedef struct apr_global_mutex_t apr_global_mutex_t;\r
7633 # 74 "../include/apr_global_mutex.h"\r
7634 apr_status_t apr_global_mutex_create(apr_global_mutex_t **mutex,\r
7635                                                   const char *fname,\r
7636                                                   apr_lockmech_e mech,\r
7637                                                   apr_pool_t *pool);\r
7638 # 90 "../include/apr_global_mutex.h"\r
7639 apr_status_t apr_global_mutex_child_init(\r
7640                               apr_global_mutex_t **mutex,\r
7641                               const char *fname,\r
7642                               apr_pool_t *pool);\r
7643 \r
7644 \r
7645 \r
7646 \r
7647 \r
7648 \r
7649 apr_status_t apr_global_mutex_lock(apr_global_mutex_t *mutex);\r
7650 # 109 "../include/apr_global_mutex.h"\r
7651 apr_status_t apr_global_mutex_trylock(apr_global_mutex_t *mutex);\r
7652 \r
7653 \r
7654 \r
7655 \r
7656 \r
7657 apr_status_t apr_global_mutex_unlock(apr_global_mutex_t *mutex);\r
7658 \r
7659 \r
7660 \r
7661 \r
7662 \r
7663 apr_status_t apr_global_mutex_destroy(apr_global_mutex_t *mutex);\r
7664 \r
7665 \r
7666 \r
7667 \r
7668 \r
7669 const char * apr_global_mutex_lockfile(apr_global_mutex_t *mutex);\r
7670 \r
7671 \r
7672 \r
7673 \r
7674 \r
7675 \r
7676 \r
7677 const char * apr_global_mutex_name(apr_global_mutex_t *mutex);\r
7678 \r
7679 \r
7680 \r
7681 \r
7682 \r
7683 apr_pool_t * apr_global_mutex_pool_get (const apr_global_mutex_t *theglobal_mutex);\r
7684 # 35 "../include/apr_portable.h" 2\r
7685 \r
7686 \r
7687 # 1 "../include/apr_dso.h" 1\r
7688 # 44 "../include/apr_dso.h"\r
7689 typedef struct apr_dso_handle_t apr_dso_handle_t;\r
7690 \r
7691 \r
7692 \r
7693 \r
7694 typedef void * apr_dso_handle_sym_t;\r
7695 # 59 "../include/apr_dso.h"\r
7696 apr_status_t apr_dso_load(apr_dso_handle_t **res_handle,\r
7697                                        const char *path, apr_pool_t *ctx);\r
7698 \r
7699 \r
7700 \r
7701 \r
7702 \r
7703 apr_status_t apr_dso_unload(apr_dso_handle_t *handle);\r
7704 \r
7705 \r
7706 \r
7707 \r
7708 \r
7709 \r
7710 \r
7711 apr_status_t apr_dso_sym(apr_dso_handle_sym_t *ressym,\r
7712                                       apr_dso_handle_t *handle,\r
7713                                       const char *symname);\r
7714 \r
7715 \r
7716 \r
7717 \r
7718 \r
7719 \r
7720 \r
7721 const char * apr_dso_error(apr_dso_handle_t *dso, char *buf, apr_size_t bufsize);\r
7722 # 38 "../include/apr_portable.h" 2\r
7723 # 1 "../include/apr_shm.h" 1\r
7724 # 43 "../include/apr_shm.h"\r
7725 typedef struct apr_shm_t apr_shm_t;\r
7726 # 69 "../include/apr_shm.h"\r
7727 apr_status_t apr_shm_create(apr_shm_t **m,\r
7728                                          apr_size_t reqsize,\r
7729                                          const char *filename,\r
7730                                          apr_pool_t *pool);\r
7731 # 114 "../include/apr_shm.h"\r
7732 apr_status_t apr_shm_create_ex(apr_shm_t **m,\r
7733                                             apr_size_t reqsize,\r
7734                                             const char *filename,\r
7735                                             apr_pool_t *pool,\r
7736                                             apr_int32_t flags);\r
7737 # 135 "../include/apr_shm.h"\r
7738 apr_status_t apr_shm_remove(const char *filename,\r
7739                                          apr_pool_t *pool);\r
7740 \r
7741 \r
7742 \r
7743 \r
7744 \r
7745 apr_status_t apr_shm_destroy(apr_shm_t *m);\r
7746 # 153 "../include/apr_shm.h"\r
7747 apr_status_t apr_shm_attach(apr_shm_t **m,\r
7748                                          const char *filename,\r
7749                                          apr_pool_t *pool);\r
7750 # 167 "../include/apr_shm.h"\r
7751 apr_status_t apr_shm_attach_ex(apr_shm_t **m,\r
7752                                             const char *filename,\r
7753                                             apr_pool_t *pool,\r
7754                                             apr_int32_t flags);\r
7755 \r
7756 \r
7757 \r
7758 \r
7759 \r
7760 \r
7761 apr_status_t apr_shm_detach(apr_shm_t *m);\r
7762 # 188 "../include/apr_shm.h"\r
7763 void * apr_shm_baseaddr_get(const apr_shm_t *m);\r
7764 \r
7765 \r
7766 \r
7767 \r
7768 \r
7769 \r
7770 apr_size_t apr_shm_size_get(const apr_shm_t *m);\r
7771 \r
7772 \r
7773 \r
7774 \r
7775 apr_pool_t * apr_shm_pool_get (const apr_shm_t *theshm);\r
7776 # 39 "../include/apr_portable.h" 2\r
7777 \r
7778 \r
7779 # 1 "/usr/include/dirent.h" 1 3 4\r
7780 # 61 "/usr/include/dirent.h" 3 4\r
7781 # 1 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 1 3 4\r
7782 # 22 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 3 4\r
7783 struct dirent\r
7784   {\r
7785 \r
7786     __ino_t d_ino;\r
7787     __off_t d_off;\r
7788 \r
7789 \r
7790 \r
7791 \r
7792     unsigned short int d_reclen;\r
7793     unsigned char d_type;\r
7794     char d_name[256];\r
7795   };\r
7796 # 62 "/usr/include/dirent.h" 2 3 4\r
7797 # 97 "/usr/include/dirent.h" 3 4\r
7798 enum\r
7799   {\r
7800     DT_UNKNOWN = 0,\r
7801 \r
7802     DT_FIFO = 1,\r
7803 \r
7804     DT_CHR = 2,\r
7805 \r
7806     DT_DIR = 4,\r
7807 \r
7808     DT_BLK = 6,\r
7809 \r
7810     DT_REG = 8,\r
7811 \r
7812     DT_LNK = 10,\r
7813 \r
7814     DT_SOCK = 12,\r
7815 \r
7816     DT_WHT = 14\r
7817 \r
7818   };\r
7819 # 127 "/usr/include/dirent.h" 3 4\r
7820 typedef struct __dirstream DIR;\r
7821 \r
7822 \r
7823 \r
7824 \r
7825 \r
7826 \r
7827 extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1)));\r
7828 \r
7829 \r
7830 \r
7831 \r
7832 \r
7833 \r
7834 extern DIR *fdopendir (int __fd);\r
7835 \r
7836 \r
7837 \r
7838 \r
7839 \r
7840 \r
7841 \r
7842 extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));\r
7843 # 162 "/usr/include/dirent.h" 3 4\r
7844 extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));\r
7845 # 183 "/usr/include/dirent.h" 3 4\r
7846 extern int readdir_r (DIR *__restrict __dirp,\r
7847         struct dirent *__restrict __entry,\r
7848         struct dirent **__restrict __result)\r
7849      __attribute__ ((__nonnull__ (1, 2, 3)));\r
7850 # 208 "/usr/include/dirent.h" 3 4\r
7851 extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
7852 \r
7853 \r
7854 \r
7855 \r
7856 \r
7857 extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
7858 \r
7859 \r
7860 extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
7861 \r
7862 \r
7863 \r
7864 \r
7865 \r
7866 extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
7867 # 244 "/usr/include/dirent.h" 3 4\r
7868 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
7869 # 245 "/usr/include/dirent.h" 2 3 4\r
7870 # 254 "/usr/include/dirent.h" 3 4\r
7871 extern int scandir (const char *__restrict __dir,\r
7872       struct dirent ***__restrict __namelist,\r
7873       int (*__selector) (const struct dirent *),\r
7874       int (*__cmp) (const struct dirent **,\r
7875       const struct dirent **))\r
7876      __attribute__ ((__nonnull__ (1, 2)));\r
7877 # 324 "/usr/include/dirent.h" 3 4\r
7878 extern int alphasort (const struct dirent **__e1,\r
7879         const struct dirent **__e2)\r
7880      __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
7881 # 352 "/usr/include/dirent.h" 3 4\r
7882 extern __ssize_t getdirentries (int __fd, char *__restrict __buf,\r
7883     size_t __nbytes,\r
7884     __off_t *__restrict __basep)\r
7885      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
7886 # 42 "../include/apr_portable.h" 2\r
7887 \r
7888 \r
7889 # 1 "/usr/include/fcntl.h" 1 3 4\r
7890 # 35 "/usr/include/fcntl.h" 3 4\r
7891 # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 1 3 4\r
7892 # 35 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4\r
7893 struct flock\r
7894   {\r
7895     short int l_type;\r
7896     short int l_whence;\r
7897 \r
7898     __off_t l_start;\r
7899     __off_t l_len;\r
7900 \r
7901 \r
7902 \r
7903 \r
7904     __pid_t l_pid;\r
7905   };\r
7906 # 61 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4\r
7907 # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 1 3 4\r
7908 # 62 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 2 3 4\r
7909 # 36 "/usr/include/fcntl.h" 2 3 4\r
7910 # 67 "/usr/include/fcntl.h" 3 4\r
7911 # 1 "/usr/include/time.h" 1 3 4\r
7912 # 68 "/usr/include/fcntl.h" 2 3 4\r
7913 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4\r
7914 # 46 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
7915 struct stat\r
7916   {\r
7917     __dev_t st_dev;\r
7918 \r
7919 \r
7920 \r
7921 \r
7922     __ino_t st_ino;\r
7923 \r
7924 \r
7925 \r
7926 \r
7927 \r
7928 \r
7929 \r
7930     __nlink_t st_nlink;\r
7931     __mode_t st_mode;\r
7932 \r
7933     __uid_t st_uid;\r
7934     __gid_t st_gid;\r
7935 \r
7936     int __pad0;\r
7937 \r
7938     __dev_t st_rdev;\r
7939 \r
7940 \r
7941 \r
7942 \r
7943     __off_t st_size;\r
7944 \r
7945 \r
7946 \r
7947     __blksize_t st_blksize;\r
7948 \r
7949     __blkcnt_t st_blocks;\r
7950 # 91 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
7951     struct timespec st_atim;\r
7952     struct timespec st_mtim;\r
7953     struct timespec st_ctim;\r
7954 # 106 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
7955     __syscall_slong_t __glibc_reserved[3];\r
7956 # 115 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
7957   };\r
7958 # 69 "/usr/include/fcntl.h" 2 3 4\r
7959 # 137 "/usr/include/fcntl.h" 3 4\r
7960 extern int fcntl (int __fd, int __cmd, ...);\r
7961 # 146 "/usr/include/fcntl.h" 3 4\r
7962 extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));\r
7963 # 170 "/usr/include/fcntl.h" 3 4\r
7964 extern int openat (int __fd, const char *__file, int __oflag, ...)\r
7965      __attribute__ ((__nonnull__ (2)));\r
7966 # 192 "/usr/include/fcntl.h" 3 4\r
7967 extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1)));\r
7968 # 238 "/usr/include/fcntl.h" 3 4\r
7969 extern int posix_fadvise (int __fd, off_t __offset, off_t __len,\r
7970      int __advise) __attribute__ ((__nothrow__ ));\r
7971 # 260 "/usr/include/fcntl.h" 3 4\r
7972 extern int posix_fallocate (int __fd, off_t __offset, off_t __len);\r
7973 # 45 "../include/apr_portable.h" 2\r
7974 \r
7975 \r
7976 # 1 "/usr/include/pthread.h" 1 3 4\r
7977 # 23 "/usr/include/pthread.h" 3 4\r
7978 # 1 "/usr/include/sched.h" 1 3 4\r
7979 # 28 "/usr/include/sched.h" 3 4\r
7980 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
7981 # 29 "/usr/include/sched.h" 2 3 4\r
7982 \r
7983 \r
7984 \r
7985 # 1 "/usr/include/time.h" 1 3 4\r
7986 # 33 "/usr/include/sched.h" 2 3 4\r
7987 \r
7988 \r
7989 \r
7990 \r
7991 \r
7992 \r
7993 \r
7994 \r
7995 # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4\r
7996 # 72 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
7997 struct sched_param\r
7998   {\r
7999     int __sched_priority;\r
8000   };\r
8001 # 103 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
8002 struct __sched_param\r
8003   {\r
8004     int __sched_priority;\r
8005   };\r
8006 # 118 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
8007 typedef unsigned long int __cpu_mask;\r
8008 \r
8009 \r
8010 \r
8011 \r
8012 \r
8013 \r
8014 typedef struct\r
8015 {\r
8016   __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];\r
8017 } cpu_set_t;\r
8018 # 203 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
8019 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)\r
8020   __attribute__ ((__nothrow__ ));\r
8021 extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ )) ;\r
8022 extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ ));\r
8023 # 42 "/usr/include/sched.h" 2 3 4\r
8024 \r
8025 \r
8026 \r
8027 \r
8028 \r
8029 \r
8030 \r
8031 extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)\r
8032      __attribute__ ((__nothrow__ ));\r
8033 \r
8034 \r
8035 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ ));\r
8036 \r
8037 \r
8038 extern int sched_setscheduler (__pid_t __pid, int __policy,\r
8039           const struct sched_param *__param) __attribute__ ((__nothrow__ ));\r
8040 \r
8041 \r
8042 extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
8043 \r
8044 \r
8045 extern int sched_yield (void) __attribute__ ((__nothrow__ ));\r
8046 \r
8047 \r
8048 extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ ));\r
8049 \r
8050 \r
8051 extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ ));\r
8052 \r
8053 \r
8054 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ ));\r
8055 # 24 "/usr/include/pthread.h" 2 3 4\r
8056 # 1 "/usr/include/time.h" 1 3 4\r
8057 # 37 "/usr/include/time.h" 3 4\r
8058 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
8059 # 38 "/usr/include/time.h" 2 3 4\r
8060 \r
8061 \r
8062 \r
8063 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
8064 # 42 "/usr/include/time.h" 2 3 4\r
8065 # 133 "/usr/include/time.h" 3 4\r
8066 struct tm\r
8067 {\r
8068   int tm_sec;\r
8069   int tm_min;\r
8070   int tm_hour;\r
8071   int tm_mday;\r
8072   int tm_mon;\r
8073   int tm_year;\r
8074   int tm_wday;\r
8075   int tm_yday;\r
8076   int tm_isdst;\r
8077 \r
8078 \r
8079   long int tm_gmtoff;\r
8080   const char *tm_zone;\r
8081 \r
8082 \r
8083 \r
8084 \r
8085 };\r
8086 # 161 "/usr/include/time.h" 3 4\r
8087 struct itimerspec\r
8088   {\r
8089     struct timespec it_interval;\r
8090     struct timespec it_value;\r
8091   };\r
8092 \r
8093 \r
8094 struct sigevent;\r
8095 # 189 "/usr/include/time.h" 3 4\r
8096 extern clock_t clock (void) __attribute__ ((__nothrow__ ));\r
8097 \r
8098 \r
8099 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ ));\r
8100 \r
8101 \r
8102 extern double difftime (time_t __time1, time_t __time0)\r
8103      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
8104 \r
8105 \r
8106 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
8107 \r
8108 \r
8109 \r
8110 \r
8111 \r
8112 extern size_t strftime (char *__restrict __s, size_t __maxsize,\r
8113    const char *__restrict __format,\r
8114    const struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
8115 # 223 "/usr/include/time.h" 3 4\r
8116 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,\r
8117      const char *__restrict __format,\r
8118      const struct tm *__restrict __tp,\r
8119      __locale_t __loc) __attribute__ ((__nothrow__ ));\r
8120 # 239 "/usr/include/time.h" 3 4\r
8121 extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
8122 \r
8123 \r
8124 \r
8125 extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
8126 \r
8127 \r
8128 \r
8129 \r
8130 \r
8131 extern struct tm *gmtime_r (const time_t *__restrict __timer,\r
8132        struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
8133 \r
8134 \r
8135 \r
8136 extern struct tm *localtime_r (const time_t *__restrict __timer,\r
8137           struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
8138 \r
8139 \r
8140 \r
8141 \r
8142 \r
8143 extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ ));\r
8144 \r
8145 \r
8146 extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
8147 \r
8148 \r
8149 \r
8150 \r
8151 \r
8152 \r
8153 \r
8154 extern char *asctime_r (const struct tm *__restrict __tp,\r
8155    char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
8156 \r
8157 \r
8158 extern char *ctime_r (const time_t *__restrict __timer,\r
8159         char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
8160 \r
8161 \r
8162 \r
8163 \r
8164 extern char *__tzname[2];\r
8165 extern int __daylight;\r
8166 extern long int __timezone;\r
8167 \r
8168 \r
8169 \r
8170 \r
8171 extern char *tzname[2];\r
8172 \r
8173 \r
8174 \r
8175 extern void tzset (void) __attribute__ ((__nothrow__ ));\r
8176 \r
8177 \r
8178 \r
8179 extern int daylight;\r
8180 extern long int timezone;\r
8181 \r
8182 \r
8183 \r
8184 \r
8185 \r
8186 extern int stime (const time_t *__when) __attribute__ ((__nothrow__ ));\r
8187 # 319 "/usr/include/time.h" 3 4\r
8188 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
8189 \r
8190 \r
8191 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
8192 \r
8193 \r
8194 extern int dysize (int __year) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
8195 # 334 "/usr/include/time.h" 3 4\r
8196 extern int nanosleep (const struct timespec *__requested_time,\r
8197         struct timespec *__remaining);\r
8198 \r
8199 \r
8200 \r
8201 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ ));\r
8202 \r
8203 \r
8204 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ ));\r
8205 \r
8206 \r
8207 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)\r
8208      __attribute__ ((__nothrow__ ));\r
8209 \r
8210 \r
8211 \r
8212 \r
8213 \r
8214 \r
8215 extern int clock_nanosleep (clockid_t __clock_id, int __flags,\r
8216        const struct timespec *__req,\r
8217        struct timespec *__rem);\r
8218 \r
8219 \r
8220 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ ));\r
8221 \r
8222 \r
8223 \r
8224 \r
8225 extern int timer_create (clockid_t __clock_id,\r
8226     struct sigevent *__restrict __evp,\r
8227     timer_t *__restrict __timerid) __attribute__ ((__nothrow__ ));\r
8228 \r
8229 \r
8230 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ ));\r
8231 \r
8232 \r
8233 extern int timer_settime (timer_t __timerid, int __flags,\r
8234      const struct itimerspec *__restrict __value,\r
8235      struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ ));\r
8236 \r
8237 \r
8238 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)\r
8239      __attribute__ ((__nothrow__ ));\r
8240 \r
8241 \r
8242 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ ));\r
8243 # 25 "/usr/include/pthread.h" 2 3 4\r
8244 \r
8245 \r
8246 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4\r
8247 # 26 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4\r
8248 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
8249 # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4\r
8250 \r
8251 \r
8252 \r
8253 \r
8254 typedef long int __jmp_buf[8];\r
8255 # 28 "/usr/include/pthread.h" 2 3 4\r
8256 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
8257 # 29 "/usr/include/pthread.h" 2 3 4\r
8258 \r
8259 \r
8260 \r
8261 enum\r
8262 {\r
8263   PTHREAD_CREATE_JOINABLE,\r
8264 \r
8265   PTHREAD_CREATE_DETACHED\r
8266 \r
8267 };\r
8268 \r
8269 \r
8270 \r
8271 enum\r
8272 {\r
8273   PTHREAD_MUTEX_TIMED_NP,\r
8274   PTHREAD_MUTEX_RECURSIVE_NP,\r
8275   PTHREAD_MUTEX_ERRORCHECK_NP,\r
8276   PTHREAD_MUTEX_ADAPTIVE_NP\r
8277 \r
8278   ,\r
8279   PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,\r
8280   PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,\r
8281   PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,\r
8282   PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL\r
8283 \r
8284 \r
8285 \r
8286 \r
8287 \r
8288 };\r
8289 \r
8290 \r
8291 \r
8292 \r
8293 enum\r
8294 {\r
8295   PTHREAD_MUTEX_STALLED,\r
8296   PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,\r
8297   PTHREAD_MUTEX_ROBUST,\r
8298   PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST\r
8299 };\r
8300 \r
8301 \r
8302 \r
8303 \r
8304 \r
8305 enum\r
8306 {\r
8307   PTHREAD_PRIO_NONE,\r
8308   PTHREAD_PRIO_INHERIT,\r
8309   PTHREAD_PRIO_PROTECT\r
8310 };\r
8311 # 125 "/usr/include/pthread.h" 3 4\r
8312 enum\r
8313 {\r
8314   PTHREAD_RWLOCK_PREFER_READER_NP,\r
8315   PTHREAD_RWLOCK_PREFER_WRITER_NP,\r
8316   PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\r
8317   PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP\r
8318 };\r
8319 # 166 "/usr/include/pthread.h" 3 4\r
8320 enum\r
8321 {\r
8322   PTHREAD_INHERIT_SCHED,\r
8323 \r
8324   PTHREAD_EXPLICIT_SCHED\r
8325 \r
8326 };\r
8327 \r
8328 \r
8329 \r
8330 enum\r
8331 {\r
8332   PTHREAD_SCOPE_SYSTEM,\r
8333 \r
8334   PTHREAD_SCOPE_PROCESS\r
8335 \r
8336 };\r
8337 \r
8338 \r
8339 \r
8340 enum\r
8341 {\r
8342   PTHREAD_PROCESS_PRIVATE,\r
8343 \r
8344   PTHREAD_PROCESS_SHARED\r
8345 \r
8346 };\r
8347 # 201 "/usr/include/pthread.h" 3 4\r
8348 struct _pthread_cleanup_buffer\r
8349 {\r
8350   void (*__routine) (void *);\r
8351   void *__arg;\r
8352   int __canceltype;\r
8353   struct _pthread_cleanup_buffer *__prev;\r
8354 };\r
8355 \r
8356 \r
8357 enum\r
8358 {\r
8359   PTHREAD_CANCEL_ENABLE,\r
8360 \r
8361   PTHREAD_CANCEL_DISABLE\r
8362 \r
8363 };\r
8364 enum\r
8365 {\r
8366   PTHREAD_CANCEL_DEFERRED,\r
8367 \r
8368   PTHREAD_CANCEL_ASYNCHRONOUS\r
8369 \r
8370 };\r
8371 # 244 "/usr/include/pthread.h" 3 4\r
8372 extern int pthread_create (pthread_t *__restrict __newthread,\r
8373       const pthread_attr_t *__restrict __attr,\r
8374       void *(*__start_routine) (void *),\r
8375       void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));\r
8376 \r
8377 \r
8378 \r
8379 \r
8380 \r
8381 extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));\r
8382 \r
8383 \r
8384 \r
8385 \r
8386 \r
8387 \r
8388 \r
8389 extern int pthread_join (pthread_t __th, void **__thread_return);\r
8390 # 282 "/usr/include/pthread.h" 3 4\r
8391 extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ ));\r
8392 \r
8393 \r
8394 \r
8395 extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
8396 \r
8397 \r
8398 extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)\r
8399   __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
8400 \r
8401 \r
8402 \r
8403 \r
8404 \r
8405 \r
8406 \r
8407 extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8408 \r
8409 \r
8410 extern int pthread_attr_destroy (pthread_attr_t *__attr)\r
8411      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8412 \r
8413 \r
8414 extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,\r
8415      int *__detachstate)\r
8416      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8417 \r
8418 \r
8419 extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,\r
8420      int __detachstate)\r
8421      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8422 \r
8423 \r
8424 \r
8425 extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,\r
8426           size_t *__guardsize)\r
8427      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8428 \r
8429 \r
8430 extern int pthread_attr_setguardsize (pthread_attr_t *__attr,\r
8431           size_t __guardsize)\r
8432      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8433 \r
8434 \r
8435 \r
8436 extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,\r
8437            struct sched_param *__restrict __param)\r
8438      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8439 \r
8440 \r
8441 extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,\r
8442            const struct sched_param *__restrict\r
8443            __param) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8444 \r
8445 \r
8446 extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict\r
8447      __attr, int *__restrict __policy)\r
8448      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8449 \r
8450 \r
8451 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)\r
8452      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8453 \r
8454 \r
8455 extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict\r
8456       __attr, int *__restrict __inherit)\r
8457      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8458 \r
8459 \r
8460 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,\r
8461       int __inherit)\r
8462      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8463 \r
8464 \r
8465 \r
8466 extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,\r
8467       int *__restrict __scope)\r
8468      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8469 \r
8470 \r
8471 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)\r
8472      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8473 \r
8474 \r
8475 extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict\r
8476           __attr, void **__restrict __stackaddr)\r
8477      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));\r
8478 \r
8479 \r
8480 \r
8481 \r
8482 \r
8483 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,\r
8484           void *__stackaddr)\r
8485      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));\r
8486 \r
8487 \r
8488 extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict\r
8489           __attr, size_t *__restrict __stacksize)\r
8490      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8491 \r
8492 \r
8493 \r
8494 \r
8495 extern int pthread_attr_setstacksize (pthread_attr_t *__attr,\r
8496           size_t __stacksize)\r
8497      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8498 \r
8499 \r
8500 \r
8501 extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,\r
8502       void **__restrict __stackaddr,\r
8503       size_t *__restrict __stacksize)\r
8504      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3)));\r
8505 \r
8506 \r
8507 \r
8508 \r
8509 extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,\r
8510       size_t __stacksize) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8511 # 440 "/usr/include/pthread.h" 3 4\r
8512 extern int pthread_setschedparam (pthread_t __target_thread, int __policy,\r
8513       const struct sched_param *__param)\r
8514      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));\r
8515 \r
8516 \r
8517 extern int pthread_getschedparam (pthread_t __target_thread,\r
8518       int *__restrict __policy,\r
8519       struct sched_param *__restrict __param)\r
8520      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
8521 \r
8522 \r
8523 extern int pthread_setschedprio (pthread_t __target_thread, int __prio)\r
8524      __attribute__ ((__nothrow__ ));\r
8525 # 505 "/usr/include/pthread.h" 3 4\r
8526 extern int pthread_once (pthread_once_t *__once_control,\r
8527     void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));\r
8528 # 517 "/usr/include/pthread.h" 3 4\r
8529 extern int pthread_setcancelstate (int __state, int *__oldstate);\r
8530 \r
8531 \r
8532 \r
8533 extern int pthread_setcanceltype (int __type, int *__oldtype);\r
8534 \r
8535 \r
8536 extern int pthread_cancel (pthread_t __th);\r
8537 \r
8538 \r
8539 \r
8540 \r
8541 extern void pthread_testcancel (void);\r
8542 \r
8543 \r
8544 \r
8545 \r
8546 typedef struct\r
8547 {\r
8548   struct\r
8549   {\r
8550     __jmp_buf __cancel_jmp_buf;\r
8551     int __mask_was_saved;\r
8552   } __cancel_jmp_buf[1];\r
8553   void *__pad[4];\r
8554 } __pthread_unwind_buf_t __attribute__ ((__aligned__));\r
8555 # 551 "/usr/include/pthread.h" 3 4\r
8556 struct __pthread_cleanup_frame\r
8557 {\r
8558   void (*__cancel_routine) (void *);\r
8559   void *__cancel_arg;\r
8560   int __do_it;\r
8561   int __cancel_type;\r
8562 };\r
8563 # 691 "/usr/include/pthread.h" 3 4\r
8564 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)\r
8565                             ;\r
8566 # 703 "/usr/include/pthread.h" 3 4\r
8567 extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)\r
8568                          ;\r
8569 # 744 "/usr/include/pthread.h" 3 4\r
8570 extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)\r
8571                              __attribute__ ((__noreturn__))\r
8572 \r
8573      __attribute__ ((__weak__))\r
8574 \r
8575      ;\r
8576 \r
8577 \r
8578 \r
8579 struct __jmp_buf_tag;\r
8580 extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));\r
8581 \r
8582 \r
8583 \r
8584 \r
8585 \r
8586 extern int pthread_mutex_init (pthread_mutex_t *__mutex,\r
8587           const pthread_mutexattr_t *__mutexattr)\r
8588      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8589 \r
8590 \r
8591 extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)\r
8592      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8593 \r
8594 \r
8595 extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)\r
8596      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8597 \r
8598 \r
8599 extern int pthread_mutex_lock (pthread_mutex_t *__mutex)\r
8600      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8601 \r
8602 \r
8603 \r
8604 extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,\r
8605         const struct timespec *__restrict\r
8606         __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));\r
8607 \r
8608 \r
8609 \r
8610 extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)\r
8611      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8612 \r
8613 \r
8614 \r
8615 extern int pthread_mutex_getprioceiling (const pthread_mutex_t *\r
8616       __restrict __mutex,\r
8617       int *__restrict __prioceiling)\r
8618      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8619 \r
8620 \r
8621 \r
8622 extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,\r
8623       int __prioceiling,\r
8624       int *__restrict __old_ceiling)\r
8625      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));\r
8626 \r
8627 \r
8628 \r
8629 \r
8630 extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)\r
8631      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8632 # 817 "/usr/include/pthread.h" 3 4\r
8633 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)\r
8634      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8635 \r
8636 \r
8637 extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)\r
8638      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8639 \r
8640 \r
8641 extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *\r
8642       __restrict __attr,\r
8643       int *__restrict __pshared)\r
8644      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8645 \r
8646 \r
8647 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,\r
8648       int __pshared)\r
8649      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8650 \r
8651 \r
8652 \r
8653 extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict\r
8654           __attr, int *__restrict __kind)\r
8655      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8656 \r
8657 \r
8658 \r
8659 \r
8660 extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)\r
8661      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8662 \r
8663 \r
8664 \r
8665 extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *\r
8666        __restrict __attr,\r
8667        int *__restrict __protocol)\r
8668      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8669 \r
8670 \r
8671 \r
8672 extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,\r
8673        int __protocol)\r
8674      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8675 \r
8676 \r
8677 extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *\r
8678           __restrict __attr,\r
8679           int *__restrict __prioceiling)\r
8680      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8681 \r
8682 \r
8683 extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,\r
8684           int __prioceiling)\r
8685      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8686 \r
8687 \r
8688 \r
8689 extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,\r
8690      int *__robustness)\r
8691      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8692 \r
8693 \r
8694 \r
8695 \r
8696 \r
8697 \r
8698 \r
8699 extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,\r
8700      int __robustness)\r
8701      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8702 # 899 "/usr/include/pthread.h" 3 4\r
8703 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,\r
8704     const pthread_rwlockattr_t *__restrict\r
8705     __attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8706 \r
8707 \r
8708 extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)\r
8709      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8710 \r
8711 \r
8712 extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)\r
8713      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8714 \r
8715 \r
8716 extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)\r
8717   __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8718 \r
8719 \r
8720 \r
8721 extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,\r
8722            const struct timespec *__restrict\r
8723            __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));\r
8724 \r
8725 \r
8726 \r
8727 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)\r
8728      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8729 \r
8730 \r
8731 extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)\r
8732      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8733 \r
8734 \r
8735 \r
8736 extern int pthread_rwlock_timedwrlock (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_unlock (pthread_rwlock_t *__rwlock)\r
8743      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8744 \r
8745 \r
8746 \r
8747 \r
8748 \r
8749 extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)\r
8750      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8751 \r
8752 \r
8753 extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)\r
8754      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8755 \r
8756 \r
8757 extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *\r
8758        __restrict __attr,\r
8759        int *__restrict __pshared)\r
8760      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8761 \r
8762 \r
8763 extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,\r
8764        int __pshared)\r
8765      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8766 \r
8767 \r
8768 extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *\r
8769        __restrict __attr,\r
8770        int *__restrict __pref)\r
8771      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8772 \r
8773 \r
8774 extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,\r
8775        int __pref) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8776 \r
8777 \r
8778 \r
8779 \r
8780 \r
8781 \r
8782 \r
8783 extern int pthread_cond_init (pthread_cond_t *__restrict __cond,\r
8784          const pthread_condattr_t *__restrict __cond_attr)\r
8785      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8786 \r
8787 \r
8788 extern int pthread_cond_destroy (pthread_cond_t *__cond)\r
8789      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8790 \r
8791 \r
8792 extern int pthread_cond_signal (pthread_cond_t *__cond)\r
8793      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8794 \r
8795 \r
8796 extern int pthread_cond_broadcast (pthread_cond_t *__cond)\r
8797      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8798 \r
8799 \r
8800 \r
8801 \r
8802 \r
8803 \r
8804 extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,\r
8805          pthread_mutex_t *__restrict __mutex)\r
8806      __attribute__ ((__nonnull__ (1, 2)));\r
8807 # 1011 "/usr/include/pthread.h" 3 4\r
8808 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,\r
8809        pthread_mutex_t *__restrict __mutex,\r
8810        const struct timespec *__restrict __abstime)\r
8811      __attribute__ ((__nonnull__ (1, 2, 3)));\r
8812 \r
8813 \r
8814 \r
8815 \r
8816 extern int pthread_condattr_init (pthread_condattr_t *__attr)\r
8817      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8818 \r
8819 \r
8820 extern int pthread_condattr_destroy (pthread_condattr_t *__attr)\r
8821      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8822 \r
8823 \r
8824 extern int pthread_condattr_getpshared (const pthread_condattr_t *\r
8825      __restrict __attr,\r
8826      int *__restrict __pshared)\r
8827      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8828 \r
8829 \r
8830 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,\r
8831      int __pshared) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8832 \r
8833 \r
8834 \r
8835 extern int pthread_condattr_getclock (const pthread_condattr_t *\r
8836           __restrict __attr,\r
8837           __clockid_t *__restrict __clock_id)\r
8838      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8839 \r
8840 \r
8841 extern int pthread_condattr_setclock (pthread_condattr_t *__attr,\r
8842           __clockid_t __clock_id)\r
8843      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8844 # 1055 "/usr/include/pthread.h" 3 4\r
8845 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)\r
8846      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8847 \r
8848 \r
8849 extern int pthread_spin_destroy (pthread_spinlock_t *__lock)\r
8850      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8851 \r
8852 \r
8853 extern int pthread_spin_lock (pthread_spinlock_t *__lock)\r
8854      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8855 \r
8856 \r
8857 extern int pthread_spin_trylock (pthread_spinlock_t *__lock)\r
8858      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8859 \r
8860 \r
8861 extern int pthread_spin_unlock (pthread_spinlock_t *__lock)\r
8862      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8863 \r
8864 \r
8865 \r
8866 \r
8867 \r
8868 \r
8869 extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,\r
8870      const pthread_barrierattr_t *__restrict\r
8871      __attr, unsigned int __count)\r
8872      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8873 \r
8874 \r
8875 extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)\r
8876      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8877 \r
8878 \r
8879 extern int pthread_barrier_wait (pthread_barrier_t *__barrier)\r
8880      __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
8881 \r
8882 \r
8883 \r
8884 extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)\r
8885      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8886 \r
8887 \r
8888 extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)\r
8889      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8890 \r
8891 \r
8892 extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *\r
8893         __restrict __attr,\r
8894         int *__restrict __pshared)\r
8895      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
8896 \r
8897 \r
8898 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,\r
8899         int __pshared)\r
8900      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8901 # 1122 "/usr/include/pthread.h" 3 4\r
8902 extern int pthread_key_create (pthread_key_t *__key,\r
8903           void (*__destr_function) (void *))\r
8904      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
8905 \r
8906 \r
8907 extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ ));\r
8908 \r
8909 \r
8910 extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ ));\r
8911 \r
8912 \r
8913 extern int pthread_setspecific (pthread_key_t __key,\r
8914     const void *__pointer) __attribute__ ((__nothrow__ )) ;\r
8915 \r
8916 \r
8917 \r
8918 \r
8919 extern int pthread_getcpuclockid (pthread_t __thread_id,\r
8920       __clockid_t *__clock_id)\r
8921      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
8922 # 1156 "/usr/include/pthread.h" 3 4\r
8923 extern int pthread_atfork (void (*__prepare) (void),\r
8924       void (*__parent) (void),\r
8925       void (*__child) (void)) __attribute__ ((__nothrow__ ));\r
8926 # 48 "../include/apr_portable.h" 2\r
8927 # 127 "../include/apr_portable.h"\r
8928 struct apr_os_proc_mutex_t {\r
8929 \r
8930 \r
8931     int crossproc;\r
8932 \r
8933 \r
8934 \r
8935     pthread_mutex_t *pthread_interproc;\r
8936 \r
8937 \r
8938 \r
8939 \r
8940 \r
8941     pthread_mutex_t *intraproc;\r
8942 \r
8943 \r
8944 };\r
8945 \r
8946 typedef int apr_os_file_t;\r
8947 typedef DIR apr_os_dir_t;\r
8948 typedef int apr_os_sock_t;\r
8949 typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;\r
8950 \r
8951 \r
8952 \r
8953 typedef pthread_t apr_os_thread_t;\r
8954 typedef pthread_key_t apr_os_threadkey_t;\r
8955 \r
8956 \r
8957 typedef pid_t apr_os_proc_t;\r
8958 typedef struct timeval apr_os_imp_time_t;\r
8959 typedef struct tm apr_os_exp_time_t;\r
8960 # 169 "../include/apr_portable.h"\r
8961 typedef void * apr_os_dso_handle_t;\r
8962 \r
8963 typedef void* apr_os_shm_t;\r
8964 # 183 "../include/apr_portable.h"\r
8965 struct apr_os_sock_info_t {\r
8966     apr_os_sock_t *os_sock;\r
8967     struct sockaddr *local;\r
8968     struct sockaddr *remote;\r
8969     int family;\r
8970     int type;\r
8971     int protocol;\r
8972 };\r
8973 \r
8974 typedef struct apr_os_sock_info_t apr_os_sock_info_t;\r
8975 # 203 "../include/apr_portable.h"\r
8976     struct apr_os_global_mutex_t {\r
8977         apr_pool_t *pool;\r
8978         apr_proc_mutex_t *proc_mutex;\r
8979 \r
8980         apr_thread_mutex_t *thread_mutex;\r
8981 \r
8982     };\r
8983     typedef struct apr_os_global_mutex_t apr_os_global_mutex_t;\r
8984 \r
8985 apr_status_t apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex,\r
8986                                                 apr_global_mutex_t *pmutex);\r
8987 # 224 "../include/apr_portable.h"\r
8988 apr_status_t apr_os_file_get(apr_os_file_t *thefile,\r
8989                                           apr_file_t *file);\r
8990 \r
8991 \r
8992 \r
8993 \r
8994 \r
8995 \r
8996 apr_status_t apr_os_dir_get(apr_os_dir_t **thedir,\r
8997                                          apr_dir_t *dir);\r
8998 \r
8999 \r
9000 \r
9001 \r
9002 \r
9003 \r
9004 apr_status_t apr_os_sock_get(apr_os_sock_t *thesock,\r
9005                                           apr_socket_t *sock);\r
9006 \r
9007 \r
9008 \r
9009 \r
9010 \r
9011 \r
9012 apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,\r
9013                                                 apr_proc_mutex_t *pmutex);\r
9014 \r
9015 \r
9016 \r
9017 \r
9018 \r
9019 \r
9020 apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,\r
9021                                  apr_time_exp_t *aprtime);\r
9022 \r
9023 \r
9024 \r
9025 \r
9026 \r
9027 \r
9028 apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime,\r
9029                                               apr_time_t *aprtime);\r
9030 \r
9031 \r
9032 \r
9033 \r
9034 \r
9035 \r
9036 apr_status_t apr_os_shm_get(apr_os_shm_t *osshm,\r
9037                                          apr_shm_t *shm);\r
9038 # 285 "../include/apr_portable.h"\r
9039 apr_status_t apr_os_thread_get(apr_os_thread_t **thethd,\r
9040                                             apr_thread_t *thd);\r
9041 \r
9042 \r
9043 \r
9044 \r
9045 \r
9046 \r
9047 apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey,\r
9048                                                apr_threadkey_t *key);\r
9049 \r
9050 \r
9051 \r
9052 \r
9053 \r
9054 \r
9055 \r
9056 apr_status_t apr_os_thread_put(apr_thread_t **thd,\r
9057                                             apr_os_thread_t *thethd,\r
9058                                             apr_pool_t *cont);\r
9059 \r
9060 \r
9061 \r
9062 \r
9063 \r
9064 \r
9065 \r
9066 apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,\r
9067                                                apr_os_threadkey_t *thekey,\r
9068                                                apr_pool_t *cont);\r
9069 \r
9070 \r
9071 \r
9072 apr_os_thread_t apr_os_thread_current(void);\r
9073 \r
9074 \r
9075 \r
9076 \r
9077 \r
9078 \r
9079 \r
9080 int apr_os_thread_equal(apr_os_thread_t tid1,\r
9081                                      apr_os_thread_t tid2);\r
9082 # 341 "../include/apr_portable.h"\r
9083 apr_status_t apr_os_file_put(apr_file_t **file,\r
9084                                           apr_os_file_t *thefile,\r
9085                                           apr_int32_t flags, apr_pool_t *cont);\r
9086 # 353 "../include/apr_portable.h"\r
9087 apr_status_t apr_os_pipe_put(apr_file_t **file,\r
9088                                           apr_os_file_t *thefile,\r
9089                                           apr_pool_t *cont);\r
9090 # 367 "../include/apr_portable.h"\r
9091 apr_status_t apr_os_pipe_put_ex(apr_file_t **file,\r
9092                                              apr_os_file_t *thefile,\r
9093                                              int register_cleanup,\r
9094                                              apr_pool_t *cont);\r
9095 \r
9096 \r
9097 \r
9098 \r
9099 \r
9100 \r
9101 \r
9102 apr_status_t apr_os_dir_put(apr_dir_t **dir,\r
9103                                          apr_os_dir_t *thedir,\r
9104                                          apr_pool_t *cont);\r
9105 # 390 "../include/apr_portable.h"\r
9106 apr_status_t apr_os_sock_put(apr_socket_t **sock,\r
9107                                           apr_os_sock_t *thesock,\r
9108                                           apr_pool_t *cont);\r
9109 # 404 "../include/apr_portable.h"\r
9110 apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,\r
9111                                            apr_os_sock_info_t *os_sock_info,\r
9112                                            apr_pool_t *cont);\r
9113 \r
9114 \r
9115 \r
9116 \r
9117 \r
9118 \r
9119 \r
9120 apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,\r
9121                                                 apr_os_proc_mutex_t *ospmutex,\r
9122                                                 apr_pool_t *cont);\r
9123 \r
9124 \r
9125 \r
9126 \r
9127 \r
9128 \r
9129 \r
9130 apr_status_t apr_os_imp_time_put(apr_time_t *aprtime,\r
9131                                               apr_os_imp_time_t **ostime,\r
9132                                               apr_pool_t *cont);\r
9133 \r
9134 \r
9135 \r
9136 \r
9137 \r
9138 \r
9139 \r
9140 apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime,\r
9141                                               apr_os_exp_time_t **ostime,\r
9142                                               apr_pool_t *cont);\r
9143 # 447 "../include/apr_portable.h"\r
9144 apr_status_t apr_os_shm_put(apr_shm_t **shm,\r
9145                                          apr_os_shm_t *osshm,\r
9146                                          apr_pool_t *cont);\r
9147 # 463 "../include/apr_portable.h"\r
9148 apr_status_t apr_os_dso_handle_put(apr_dso_handle_t **dso,\r
9149                                                 apr_os_dso_handle_t thedso,\r
9150                                                 apr_pool_t *pool);\r
9151 \r
9152 \r
9153 \r
9154 \r
9155 \r
9156 \r
9157 apr_status_t apr_os_dso_handle_get(apr_os_dso_handle_t *dso,\r
9158                                                 apr_dso_handle_t *aprdso);\r
9159 # 491 "../include/apr_portable.h"\r
9160 const char* apr_os_default_encoding(apr_pool_t *pool);\r
9161 # 500 "../include/apr_portable.h"\r
9162 const char* apr_os_locale_encoding(apr_pool_t *pool);\r
9163 # 25 "../include/arch/unix/apr_arch_thread_mutex.h" 2\r
9164 \r
9165 \r
9166 \r
9167 \r
9168 \r
9169 \r
9170 \r
9171 struct apr_thread_mutex_t {\r
9172     apr_pool_t *pool;\r
9173     pthread_mutex_t mutex;\r
9174 };\r
9175 # 18 "./../locks/unix/thread_mutex.c" 2\r
9176 \r
9177 # 1 "../include/apr_want.h" 1\r
9178 # 20 "./../locks/unix/thread_mutex.c" 2\r
9179 \r
9180 \r
9181 \r
9182 static apr_status_t thread_mutex_cleanup(void *data)\r
9183 {\r
9184     apr_thread_mutex_t *mutex = data;\r
9185     apr_status_t rv;\r
9186 \r
9187     rv = pthread_mutex_destroy(&mutex->mutex);\r
9188 \r
9189 \r
9190 \r
9191 \r
9192 \r
9193     return rv;\r
9194 }\r
9195 \r
9196 apr_status_t apr_thread_mutex_create(apr_thread_mutex_t **mutex,\r
9197                                                   unsigned int flags,\r
9198                                                   apr_pool_t *pool)\r
9199 {\r
9200     apr_thread_mutex_t *new_mutex;\r
9201     apr_status_t rv;\r
9202 \r
9203 \r
9204 \r
9205 \r
9206 \r
9207 \r
9208 \r
9209     new_mutex = memset(apr_palloc(pool, sizeof(apr_thread_mutex_t)), 0, sizeof(apr_thread_mutex_t));\r
9210     new_mutex->pool = pool;\r
9211 \r
9212 \r
9213     if (flags & 0x1) {\r
9214         pthread_mutexattr_t mattr;\r
9215 \r
9216         rv = pthread_mutexattr_init(&mattr);\r
9217         if (rv) return rv;\r
9218 \r
9219         rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);\r
9220         if (rv) {\r
9221             pthread_mutexattr_destroy(&mattr);\r
9222             return rv;\r
9223         }\r
9224 \r
9225         rv = pthread_mutex_init(&new_mutex->mutex, &mattr);\r
9226 \r
9227         pthread_mutexattr_destroy(&mattr);\r
9228     } else\r
9229 \r
9230         rv = pthread_mutex_init(&new_mutex->mutex, ((void*)0));\r
9231 \r
9232     if (rv) {\r
9233 \r
9234 \r
9235 \r
9236         return rv;\r
9237     }\r
9238 \r
9239     apr_pool_cleanup_register(new_mutex->pool,\r
9240                               new_mutex, thread_mutex_cleanup,\r
9241                               apr_pool_cleanup_null);\r
9242 \r
9243     *mutex = new_mutex;\r
9244     return 0;\r
9245 }\r
9246 \r
9247 apr_status_t apr_thread_mutex_lock(apr_thread_mutex_t *mutex)\r
9248 {\r
9249     apr_status_t rv;\r
9250 \r
9251     rv = pthread_mutex_lock(&mutex->mutex);\r
9252 \r
9253 \r
9254 \r
9255 \r
9256 \r
9257 \r
9258     return rv;\r
9259 }\r
9260 \r
9261 apr_status_t apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)\r
9262 {\r
9263     apr_status_t rv;\r
9264 \r
9265     rv = pthread_mutex_trylock(&mutex->mutex);\r
9266     if (rv) {\r
9267 \r
9268 \r
9269 \r
9270         return (rv == 16) ? ((20000 + 50000) + 25) : rv;\r
9271     }\r
9272 \r
9273     return 0;\r
9274 }\r
9275 \r
9276 apr_status_t apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)\r
9277 {\r
9278     apr_status_t status;\r
9279 \r
9280     status = pthread_mutex_unlock(&mutex->mutex);\r
9281 \r
9282 \r
9283 \r
9284 \r
9285 \r
9286 \r
9287     return status;\r
9288 }\r
9289 \r
9290 apr_status_t apr_thread_mutex_destroy(apr_thread_mutex_t *mutex)\r
9291 {\r
9292     return apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup);\r
9293 }\r
9294 \r
9295 apr_pool_t * apr_thread_mutex_pool_get (const apr_thread_mutex_t *thethread_mutex) { return thethread_mutex->pool; }\r
9296 # 12 "main2.c" 2\r
9297 # 1 "./../locks/unix/proc_mutex.c" 1\r
9298 # 19 "./../locks/unix/proc_mutex.c"\r
9299 # 1 "../include/arch/unix/apr_arch_proc_mutex.h" 1\r
9300 # 23 "../include/arch/unix/apr_arch_proc_mutex.h"\r
9301 # 1 "../include/apr_lib.h" 1\r
9302 # 32 "../include/apr_lib.h"\r
9303 # 1 "/usr/include/ctype.h" 1 3 4\r
9304 # 46 "/usr/include/ctype.h" 3 4\r
9305 enum\r
9306 {\r
9307   _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),\r
9308   _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),\r
9309   _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),\r
9310   _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),\r
9311   _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),\r
9312   _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),\r
9313   _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),\r
9314   _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),\r
9315   _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),\r
9316   _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),\r
9317   _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),\r
9318   _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))\r
9319 };\r
9320 # 79 "/usr/include/ctype.h" 3 4\r
9321 extern const unsigned short int **__ctype_b_loc (void)\r
9322      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
9323 extern const __int32_t **__ctype_tolower_loc (void)\r
9324      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
9325 extern const __int32_t **__ctype_toupper_loc (void)\r
9326      __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
9327 # 110 "/usr/include/ctype.h" 3 4\r
9328 extern int isalnum (int) __attribute__ ((__nothrow__ ));\r
9329 extern int isalpha (int) __attribute__ ((__nothrow__ ));\r
9330 extern int iscntrl (int) __attribute__ ((__nothrow__ ));\r
9331 extern int isdigit (int) __attribute__ ((__nothrow__ ));\r
9332 extern int islower (int) __attribute__ ((__nothrow__ ));\r
9333 extern int isgraph (int) __attribute__ ((__nothrow__ ));\r
9334 extern int isprint (int) __attribute__ ((__nothrow__ ));\r
9335 extern int ispunct (int) __attribute__ ((__nothrow__ ));\r
9336 extern int isspace (int) __attribute__ ((__nothrow__ ));\r
9337 extern int isupper (int) __attribute__ ((__nothrow__ ));\r
9338 extern int isxdigit (int) __attribute__ ((__nothrow__ ));\r
9339 \r
9340 \r
9341 \r
9342 extern int tolower (int __c) __attribute__ ((__nothrow__ ));\r
9343 \r
9344 \r
9345 extern int toupper (int __c) __attribute__ ((__nothrow__ ));\r
9346 # 136 "/usr/include/ctype.h" 3 4\r
9347 extern int isblank (int) __attribute__ ((__nothrow__ ));\r
9348 # 150 "/usr/include/ctype.h" 3 4\r
9349 extern int isascii (int __c) __attribute__ ((__nothrow__ ));\r
9350 \r
9351 \r
9352 \r
9353 extern int toascii (int __c) __attribute__ ((__nothrow__ ));\r
9354 \r
9355 \r
9356 \r
9357 extern int _toupper (int) __attribute__ ((__nothrow__ ));\r
9358 extern int _tolower (int) __attribute__ ((__nothrow__ ));\r
9359 # 271 "/usr/include/ctype.h" 3 4\r
9360 extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9361 extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9362 extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9363 extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9364 extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9365 extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9366 extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9367 extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9368 extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9369 extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9370 extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9371 \r
9372 extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
9373 \r
9374 \r
9375 \r
9376 extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
9377 extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
9378 \r
9379 \r
9380 extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
9381 extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
9382 # 33 "../include/apr_lib.h" 2\r
9383 # 59 "../include/apr_lib.h"\r
9384 typedef struct apr_vformatter_buff_t apr_vformatter_buff_t;\r
9385 \r
9386 \r
9387 \r
9388 \r
9389 struct apr_vformatter_buff_t {\r
9390 \r
9391     char *curpos;\r
9392 \r
9393     char *endpos;\r
9394 };\r
9395 # 84 "../include/apr_lib.h"\r
9396 const char * apr_filepath_name_get(const char *pathname);\r
9397 # 174 "../include/apr_lib.h"\r
9398 int apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *b),\r
9399            apr_vformatter_buff_t *c, const char *fmt,\r
9400            va_list ap);\r
9401 # 189 "../include/apr_lib.h"\r
9402 apr_status_t apr_password_get(const char *prompt, char *pwbuf,\r
9403                                            apr_size_t *bufsize);\r
9404 # 24 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9405 \r
9406 \r
9407 \r
9408 \r
9409 # 1 "../include/arch/unix/apr_arch_file_io.h" 1\r
9410 # 41 "../include/arch/unix/apr_arch_file_io.h"\r
9411 # 1 "/usr/include/errno.h" 1 3 4\r
9412 # 42 "../include/arch/unix/apr_arch_file_io.h" 2\r
9413 \r
9414 \r
9415 \r
9416 \r
9417 \r
9418 # 1 "/usr/include/strings.h" 1 3 4\r
9419 # 48 "../include/arch/unix/apr_arch_file_io.h" 2\r
9420 \r
9421 \r
9422 \r
9423 \r
9424 \r
9425 # 1 "/usr/include/x86_64-linux-gnu/sys/stat.h" 1 3 4\r
9426 # 105 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9427 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4\r
9428 # 106 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4\r
9429 # 209 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9430 extern int stat (const char *__restrict __file,\r
9431    struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
9432 \r
9433 \r
9434 \r
9435 extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9436 # 238 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9437 extern int fstatat (int __fd, const char *__restrict __file,\r
9438       struct stat *__restrict __buf, int __flag)\r
9439      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
9440 # 263 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9441 extern int lstat (const char *__restrict __file,\r
9442     struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
9443 # 284 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9444 extern int chmod (const char *__file, __mode_t __mode)\r
9445      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9446 \r
9447 \r
9448 \r
9449 \r
9450 \r
9451 extern int lchmod (const char *__file, __mode_t __mode)\r
9452      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9453 \r
9454 \r
9455 \r
9456 \r
9457 extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ ));\r
9458 \r
9459 \r
9460 \r
9461 \r
9462 \r
9463 extern int fchmodat (int __fd, const char *__file, __mode_t __mode,\r
9464        int __flag)\r
9465      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
9466 \r
9467 \r
9468 \r
9469 \r
9470 \r
9471 \r
9472 extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ ));\r
9473 # 321 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9474 extern int mkdir (const char *__path, __mode_t __mode)\r
9475      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9476 \r
9477 \r
9478 \r
9479 \r
9480 \r
9481 extern int mkdirat (int __fd, const char *__path, __mode_t __mode)\r
9482      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9483 \r
9484 \r
9485 \r
9486 \r
9487 \r
9488 \r
9489 extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)\r
9490      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9491 \r
9492 \r
9493 \r
9494 \r
9495 \r
9496 extern int mknodat (int __fd, const char *__path, __mode_t __mode,\r
9497       __dev_t __dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9498 \r
9499 \r
9500 \r
9501 \r
9502 \r
9503 extern int mkfifo (const char *__path, __mode_t __mode)\r
9504      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
9505 \r
9506 \r
9507 \r
9508 \r
9509 \r
9510 extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)\r
9511      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9512 \r
9513 \r
9514 \r
9515 \r
9516 \r
9517 extern int utimensat (int __fd, const char *__path,\r
9518         const struct timespec __times[2],\r
9519         int __flags)\r
9520      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
9521 \r
9522 \r
9523 \r
9524 \r
9525 extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ ));\r
9526 # 399 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9527 extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)\r
9528      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));\r
9529 extern int __xstat (int __ver, const char *__filename,\r
9530       struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
9531 extern int __lxstat (int __ver, const char *__filename,\r
9532        struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
9533 extern int __fxstatat (int __ver, int __fildes, const char *__filename,\r
9534          struct stat *__stat_buf, int __flag)\r
9535      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4)));\r
9536 # 442 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
9537 extern int __xmknod (int __ver, const char *__path, __mode_t __mode,\r
9538        __dev_t *__dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
9539 \r
9540 extern int __xmknodat (int __ver, int __fd, const char *__path,\r
9541          __mode_t __mode, __dev_t *__dev)\r
9542      __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 5)));\r
9543 # 54 "../include/arch/unix/apr_arch_file_io.h" 2\r
9544 # 75 "../include/arch/unix/apr_arch_file_io.h"\r
9545 # 1 "/usr/include/x86_64-linux-gnu/sys/param.h" 1 3 4\r
9546 # 23 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4\r
9547 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
9548 # 24 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4\r
9549 \r
9550 \r
9551 \r
9552 \r
9553 \r
9554 \r
9555 \r
9556 # 1 "/usr/include/x86_64-linux-gnu/bits/param.h" 1 3 4\r
9557 # 28 "/usr/include/x86_64-linux-gnu/bits/param.h" 3 4\r
9558 # 1 "/usr/include/linux/param.h" 1 3 4\r
9559 \r
9560 \r
9561 \r
9562 # 1 "/usr/include/x86_64-linux-gnu/asm/param.h" 1 3 4\r
9563 # 1 "/usr/include/asm-generic/param.h" 1 3 4\r
9564 # 2 "/usr/include/x86_64-linux-gnu/asm/param.h" 2 3 4\r
9565 # 5 "/usr/include/linux/param.h" 2 3 4\r
9566 # 29 "/usr/include/x86_64-linux-gnu/bits/param.h" 2 3 4\r
9567 # 32 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4\r
9568 # 76 "../include/arch/unix/apr_arch_file_io.h" 2\r
9569 # 93 "../include/arch/unix/apr_arch_file_io.h"\r
9570 struct apr_file_t {\r
9571     apr_pool_t *pool;\r
9572     int filedes;\r
9573     char *fname;\r
9574     apr_int32_t flags;\r
9575     int eof_hit;\r
9576     int is_pipe;\r
9577     apr_interval_time_t timeout;\r
9578     int buffered;\r
9579     enum {BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;\r
9580     int ungetchar;\r
9581 \r
9582 \r
9583 \r
9584 \r
9585 \r
9586     char *buffer;\r
9587     apr_size_t bufpos;\r
9588     apr_size_t bufsize;\r
9589     unsigned long dataRead;\r
9590     int direction;\r
9591     apr_off_t filePtr;\r
9592 \r
9593     struct apr_thread_mutex_t *thlock;\r
9594 \r
9595 };\r
9596 # 142 "../include/arch/unix/apr_arch_file_io.h"\r
9597 typedef struct stat struct_stat;\r
9598 # 151 "../include/arch/unix/apr_arch_file_io.h"\r
9599 struct apr_dir_t {\r
9600     apr_pool_t *pool;\r
9601     char *dirname;\r
9602     DIR *dirstruct;\r
9603 \r
9604 \r
9605 \r
9606     struct dirent *entry;\r
9607 \r
9608 };\r
9609 \r
9610 apr_status_t apr_unix_file_cleanup(void *);\r
9611 apr_status_t apr_unix_child_file_cleanup(void *);\r
9612 \r
9613 mode_t apr_unix_perms2mode(apr_fileperms_t perms);\r
9614 apr_fileperms_t apr_unix_mode2perms(mode_t mode);\r
9615 \r
9616 apr_status_t apr_file_flush_locked(apr_file_t *thefile);\r
9617 apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,\r
9618                                       apr_file_t *thefile);\r
9619 # 29 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9620 # 42 "../include/arch/unix/apr_arch_proc_mutex.h"\r
9621 # 1 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 1 3 4\r
9622 # 28 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 3 4\r
9623 # 1 "/usr/include/x86_64-linux-gnu/bits/ipctypes.h" 1 3 4\r
9624 # 28 "/usr/include/x86_64-linux-gnu/bits/ipctypes.h" 3 4\r
9625 typedef int __ipc_pid_t;\r
9626 # 29 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 2 3 4\r
9627 # 1 "/usr/include/x86_64-linux-gnu/bits/ipc.h" 1 3 4\r
9628 # 42 "/usr/include/x86_64-linux-gnu/bits/ipc.h" 3 4\r
9629 struct ipc_perm\r
9630   {\r
9631     __key_t __key;\r
9632     __uid_t uid;\r
9633     __gid_t gid;\r
9634     __uid_t cuid;\r
9635     __gid_t cgid;\r
9636     unsigned short int mode;\r
9637     unsigned short int __pad1;\r
9638     unsigned short int __seq;\r
9639     unsigned short int __pad2;\r
9640     __syscall_ulong_t __glibc_reserved1;\r
9641     __syscall_ulong_t __glibc_reserved2;\r
9642   };\r
9643 # 30 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 2 3 4\r
9644 # 54 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 3 4\r
9645 extern key_t ftok (const char *__pathname, int __proj_id) __attribute__ ((__nothrow__ ));\r
9646 # 43 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9647 \r
9648 \r
9649 # 1 "/usr/include/x86_64-linux-gnu/sys/sem.h" 1 3 4\r
9650 # 24 "/usr/include/x86_64-linux-gnu/sys/sem.h" 3 4\r
9651 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
9652 # 25 "/usr/include/x86_64-linux-gnu/sys/sem.h" 2 3 4\r
9653 \r
9654 \r
9655 \r
9656 \r
9657 \r
9658 # 1 "/usr/include/x86_64-linux-gnu/bits/sem.h" 1 3 4\r
9659 # 38 "/usr/include/x86_64-linux-gnu/bits/sem.h" 3 4\r
9660 struct semid_ds\r
9661 {\r
9662   struct ipc_perm sem_perm;\r
9663   __time_t sem_otime;\r
9664   __syscall_ulong_t __glibc_reserved1;\r
9665   __time_t sem_ctime;\r
9666   __syscall_ulong_t __glibc_reserved2;\r
9667   __syscall_ulong_t sem_nsems;\r
9668   __syscall_ulong_t __glibc_reserved3;\r
9669   __syscall_ulong_t __glibc_reserved4;\r
9670 };\r
9671 # 72 "/usr/include/x86_64-linux-gnu/bits/sem.h" 3 4\r
9672 struct seminfo\r
9673 {\r
9674   int semmap;\r
9675   int semmni;\r
9676   int semmns;\r
9677   int semmnu;\r
9678   int semmsl;\r
9679   int semopm;\r
9680   int semume;\r
9681   int semusz;\r
9682   int semvmx;\r
9683   int semaem;\r
9684 };\r
9685 # 31 "/usr/include/x86_64-linux-gnu/sys/sem.h" 2 3 4\r
9686 # 41 "/usr/include/x86_64-linux-gnu/sys/sem.h" 3 4\r
9687 struct sembuf\r
9688 {\r
9689   unsigned short int sem_num;\r
9690   short int sem_op;\r
9691   short int sem_flg;\r
9692 };\r
9693 \r
9694 \r
9695 \r
9696 \r
9697 \r
9698 extern int semctl (int __semid, int __semnum, int __cmd, ...) __attribute__ ((__nothrow__ ));\r
9699 \r
9700 \r
9701 extern int semget (key_t __key, int __nsems, int __semflg) __attribute__ ((__nothrow__ ));\r
9702 \r
9703 \r
9704 extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __attribute__ ((__nothrow__ ));\r
9705 # 46 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9706 \r
9707 \r
9708 # 1 "/usr/include/x86_64-linux-gnu/sys/file.h" 1 3 4\r
9709 # 50 "/usr/include/x86_64-linux-gnu/sys/file.h" 3 4\r
9710 extern int flock (int __fd, int __operation) __attribute__ ((__nothrow__ ));\r
9711 # 49 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9712 # 60 "../include/arch/unix/apr_arch_proc_mutex.h"\r
9713 # 1 "/usr/include/x86_64-linux-gnu/sys/mman.h" 1 3 4\r
9714 # 25 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9715 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
9716 # 26 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4\r
9717 # 41 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9718 # 1 "/usr/include/x86_64-linux-gnu/bits/mman.h" 1 3 4\r
9719 # 45 "/usr/include/x86_64-linux-gnu/bits/mman.h" 3 4\r
9720 # 1 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 1 3 4\r
9721 # 46 "/usr/include/x86_64-linux-gnu/bits/mman.h" 2 3 4\r
9722 # 42 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4\r
9723 # 57 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9724 extern void *mmap (void *__addr, size_t __len, int __prot,\r
9725      int __flags, int __fd, __off_t __offset) __attribute__ ((__nothrow__ ));\r
9726 # 76 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9727 extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
9728 \r
9729 \r
9730 \r
9731 \r
9732 extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__ ));\r
9733 \r
9734 \r
9735 \r
9736 \r
9737 \r
9738 \r
9739 \r
9740 extern int msync (void *__addr, size_t __len, int __flags);\r
9741 \r
9742 \r
9743 \r
9744 \r
9745 extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ ));\r
9746 \r
9747 \r
9748 \r
9749 extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ ));\r
9750 \r
9751 \r
9752 \r
9753 \r
9754 extern int mlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
9755 \r
9756 \r
9757 extern int munlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
9758 \r
9759 \r
9760 \r
9761 \r
9762 extern int mlockall (int __flags) __attribute__ ((__nothrow__ ));\r
9763 \r
9764 \r
9765 \r
9766 extern int munlockall (void) __attribute__ ((__nothrow__ ));\r
9767 \r
9768 \r
9769 \r
9770 \r
9771 \r
9772 \r
9773 \r
9774 extern int mincore (void *__start, size_t __len, unsigned char *__vec)\r
9775      __attribute__ ((__nothrow__ ));\r
9776 # 144 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
9777 extern int shm_open (const char *__name, int __oflag, mode_t __mode);\r
9778 \r
9779 \r
9780 extern int shm_unlink (const char *__name);\r
9781 # 61 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9782 \r
9783 \r
9784 \r
9785 \r
9786 \r
9787 # 1 "/usr/include/semaphore.h" 1 3 4\r
9788 # 29 "/usr/include/semaphore.h" 3 4\r
9789 # 1 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 1 3 4\r
9790 # 23 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4\r
9791 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
9792 # 24 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 2 3 4\r
9793 # 36 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4\r
9794 typedef union\r
9795 {\r
9796   char __size[32];\r
9797   long int __align;\r
9798 } sem_t;\r
9799 # 30 "/usr/include/semaphore.h" 2 3 4\r
9800 \r
9801 \r
9802 \r
9803 \r
9804 \r
9805 \r
9806 extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)\r
9807      __attribute__ ((__nothrow__ ));\r
9808 \r
9809 extern int sem_destroy (sem_t *__sem) __attribute__ ((__nothrow__ ));\r
9810 \r
9811 \r
9812 extern sem_t *sem_open (const char *__name, int __oflag, ...) __attribute__ ((__nothrow__ ));\r
9813 \r
9814 \r
9815 extern int sem_close (sem_t *__sem) __attribute__ ((__nothrow__ ));\r
9816 \r
9817 \r
9818 extern int sem_unlink (const char *__name) __attribute__ ((__nothrow__ ));\r
9819 \r
9820 \r
9821 \r
9822 \r
9823 \r
9824 extern int sem_wait (sem_t *__sem);\r
9825 \r
9826 \r
9827 \r
9828 \r
9829 \r
9830 \r
9831 extern int sem_timedwait (sem_t *__restrict __sem,\r
9832      const struct timespec *__restrict __abstime);\r
9833 \r
9834 \r
9835 \r
9836 extern int sem_trywait (sem_t *__sem) __attribute__ ((__nothrow__));\r
9837 \r
9838 \r
9839 extern int sem_post (sem_t *__sem) __attribute__ ((__nothrow__));\r
9840 \r
9841 \r
9842 extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)\r
9843      __attribute__ ((__nothrow__ ));\r
9844 # 67 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
9845 \r
9846 \r
9847 \r
9848 struct apr_proc_mutex_unix_lock_methods_t {\r
9849     unsigned int flags;\r
9850     apr_status_t (*create)(apr_proc_mutex_t *, const char *);\r
9851     apr_status_t (*acquire)(apr_proc_mutex_t *);\r
9852     apr_status_t (*tryacquire)(apr_proc_mutex_t *);\r
9853     apr_status_t (*release)(apr_proc_mutex_t *);\r
9854     apr_status_t (*cleanup)(void *);\r
9855     apr_status_t (*child_init)(apr_proc_mutex_t **, apr_pool_t *, const char *);\r
9856     const char *name;\r
9857 };\r
9858 typedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lock_methods_t;\r
9859 \r
9860 \r
9861 \r
9862 \r
9863 \r
9864 union semun {\r
9865     int val;\r
9866     struct semid_ds *buf;\r
9867     unsigned short *array;\r
9868 };\r
9869 \r
9870 \r
9871 struct apr_proc_mutex_t {\r
9872     apr_pool_t *pool;\r
9873     const apr_proc_mutex_unix_lock_methods_t *meth;\r
9874     const apr_proc_mutex_unix_lock_methods_t *inter_meth;\r
9875     int curr_locked;\r
9876     char *fname;\r
9877 \r
9878     apr_file_t *interproc;\r
9879 \r
9880 \r
9881     sem_t *psem_interproc;\r
9882 \r
9883 \r
9884     pthread_mutex_t *pthread_interproc;\r
9885 \r
9886 };\r
9887 \r
9888 void apr_proc_mutex_unix_setup_lock(void);\r
9889 # 20 "./../locks/unix/proc_mutex.c" 2\r
9890 \r
9891 # 1 "../include/apr_hash.h" 1\r
9892 # 52 "../include/apr_hash.h"\r
9893 typedef struct apr_hash_t apr_hash_t;\r
9894 \r
9895 \r
9896 \r
9897 \r
9898 typedef struct apr_hash_index_t apr_hash_index_t;\r
9899 \r
9900 \r
9901 \r
9902 \r
9903 \r
9904 \r
9905 \r
9906 typedef unsigned int (*apr_hashfunc_t)(const char *key, apr_ssize_t *klen);\r
9907 \r
9908 \r
9909 \r
9910 \r
9911 unsigned int apr_hashfunc_default(const char *key,\r
9912                                                       apr_ssize_t *klen);\r
9913 \r
9914 \r
9915 \r
9916 \r
9917 \r
9918 \r
9919 apr_hash_t * apr_hash_make(apr_pool_t *pool);\r
9920 \r
9921 \r
9922 \r
9923 \r
9924 \r
9925 \r
9926 \r
9927 apr_hash_t * apr_hash_make_custom(apr_pool_t *pool,\r
9928                                                apr_hashfunc_t hash_func);\r
9929 # 96 "../include/apr_hash.h"\r
9930 apr_hash_t * apr_hash_copy(apr_pool_t *pool,\r
9931                                         const apr_hash_t *h);\r
9932 # 107 "../include/apr_hash.h"\r
9933 void apr_hash_set(apr_hash_t *ht, const void *key,\r
9934                                apr_ssize_t klen, const void *val);\r
9935 # 117 "../include/apr_hash.h"\r
9936 void * apr_hash_get(apr_hash_t *ht, const void *key,\r
9937                                  apr_ssize_t klen);\r
9938 # 147 "../include/apr_hash.h"\r
9939 apr_hash_index_t * apr_hash_first(apr_pool_t *p, apr_hash_t *ht);\r
9940 \r
9941 \r
9942 \r
9943 \r
9944 \r
9945 \r
9946 \r
9947 apr_hash_index_t * apr_hash_next(apr_hash_index_t *hi);\r
9948 # 166 "../include/apr_hash.h"\r
9949 void apr_hash_this(apr_hash_index_t *hi, const void **key,\r
9950                                 apr_ssize_t *klen, void **val);\r
9951 \r
9952 \r
9953 \r
9954 \r
9955 \r
9956 \r
9957 const void* apr_hash_this_key(apr_hash_index_t *hi);\r
9958 \r
9959 \r
9960 \r
9961 \r
9962 \r
9963 \r
9964 apr_ssize_t apr_hash_this_key_len(apr_hash_index_t *hi);\r
9965 \r
9966 \r
9967 \r
9968 \r
9969 \r
9970 \r
9971 void* apr_hash_this_val(apr_hash_index_t *hi);\r
9972 \r
9973 \r
9974 \r
9975 \r
9976 \r
9977 \r
9978 unsigned int apr_hash_count(apr_hash_t *ht);\r
9979 \r
9980 \r
9981 \r
9982 \r
9983 \r
9984 void apr_hash_clear(apr_hash_t *ht);\r
9985 # 212 "../include/apr_hash.h"\r
9986 apr_hash_t * apr_hash_overlay(apr_pool_t *p,\r
9987                                            const apr_hash_t *overlay,\r
9988                                            const apr_hash_t *base);\r
9989 # 230 "../include/apr_hash.h"\r
9990 apr_hash_t * apr_hash_merge(apr_pool_t *p,\r
9991                                          const apr_hash_t *h1,\r
9992                                          const apr_hash_t *h2,\r
9993                                          void * (*merger)(apr_pool_t *p,\r
9994                                                      const void *key,\r
9995                                                      apr_ssize_t klen,\r
9996                                                      const void *h1_val,\r
9997                                                      const void *h2_val,\r
9998                                                      const void *data),\r
9999                                          const void *data);\r
10000 # 252 "../include/apr_hash.h"\r
10001 typedef int (apr_hash_do_callback_fn_t)(void *rec, const void *key,\r
10002                                                    apr_ssize_t klen,\r
10003                                                    const void *value);\r
10004 # 268 "../include/apr_hash.h"\r
10005 int apr_hash_do(apr_hash_do_callback_fn_t *comp,\r
10006                              void *rec, const apr_hash_t *ht);\r
10007 \r
10008 \r
10009 \r
10010 \r
10011 apr_pool_t * apr_hash_pool_get (const apr_hash_t *thehash);\r
10012 # 22 "./../locks/unix/proc_mutex.c" 2\r
10013 \r
10014 apr_status_t apr_proc_mutex_destroy(apr_proc_mutex_t *mutex)\r
10015 {\r
10016     return apr_pool_cleanup_run(mutex->pool, mutex, apr_proc_mutex_cleanup);\r
10017 }\r
10018 \r
10019 \r
10020 \r
10021 static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex,\r
10022                                              apr_pool_t *cont,\r
10023                                              const char *fname)\r
10024 {\r
10025     return 0;\r
10026 }\r
10027 # 44 "./../locks/unix/proc_mutex.c"\r
10028 static apr_status_t proc_mutex_posix_cleanup(void *mutex_)\r
10029 {\r
10030     apr_proc_mutex_t *mutex = mutex_;\r
10031 \r
10032     if (sem_close(mutex->psem_interproc) < 0) {\r
10033         return (*__errno_location ());\r
10034     }\r
10035 \r
10036     return 0;\r
10037 }\r
10038 \r
10039 static unsigned int rshash (char *p) {\r
10040 \r
10041    unsigned int b = 378551;\r
10042    unsigned int a = 63689;\r
10043    unsigned int retval = 0;\r
10044 \r
10045    for( ; *p; p++)\r
10046    {\r
10047       retval = retval * a + (*p);\r
10048       a *= b;\r
10049    }\r
10050 \r
10051    return retval;\r
10052 }\r
10053 \r
10054 static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,\r
10055                                             const char *fname)\r
10056 {\r
10057 \r
10058     sem_t *psem;\r
10059     char semname[32];\r
10060 \r
10061     new_mutex->interproc = apr_palloc(new_mutex->pool,\r
10062                                       sizeof(*new_mutex->interproc));\r
10063 # 101 "./../locks/unix/proc_mutex.c"\r
10064     if (fname) {\r
10065         apr_ssize_t flen = strlen(fname);\r
10066         char *p = apr_pstrndup(new_mutex->pool, fname, strlen(fname));\r
10067         unsigned int h1, h2;\r
10068         h1 = (apr_hashfunc_default((const char *)p, &flen) & 0xffffffff);\r
10069         h2 = (rshash(p) & 0xffffffff);\r
10070         apr_snprintf(semname, sizeof(semname), "/ApR.%xH%x", h1, h2);\r
10071     } else {\r
10072         apr_time_t now;\r
10073         unsigned long sec;\r
10074         unsigned long usec;\r
10075         now = apr_time_now();\r
10076         sec = ((now) / 1000000L);\r
10077         usec = ((now) % 1000000L);\r
10078         apr_snprintf(semname, sizeof(semname), "/ApR.%lxZ%lx", sec, usec);\r
10079     }\r
10080     psem = sem_open(semname, 0100 | 0200, 0644, 1);\r
10081     if (psem == (sem_t *)((sem_t *) 0)) {\r
10082         if ((*__errno_location ()) == 36) {\r
10083 \r
10084             semname[13] = '\0';\r
10085         } else {\r
10086             return (*__errno_location ());\r
10087         }\r
10088         psem = sem_open(semname, 0100 | 0200, 0644, 1);\r
10089     }\r
10090 \r
10091     if (psem == (sem_t *)((sem_t *) 0)) {\r
10092         return (*__errno_location ());\r
10093     }\r
10094 \r
10095     sem_unlink(semname);\r
10096     new_mutex->psem_interproc = psem;\r
10097     new_mutex->fname = apr_pstrdup(new_mutex->pool, semname);\r
10098     apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,\r
10099                               apr_proc_mutex_cleanup,\r
10100                               apr_pool_cleanup_null);\r
10101     return 0;\r
10102 }\r
10103 \r
10104 static apr_status_t proc_mutex_posix_acquire(apr_proc_mutex_t *mutex)\r
10105 {\r
10106     if (sem_wait(mutex->psem_interproc) < 0) {\r
10107         return (*__errno_location ());\r
10108     }\r
10109     mutex->curr_locked = 1;\r
10110     return 0;\r
10111 }\r
10112 \r
10113 static apr_status_t proc_mutex_posix_tryacquire(apr_proc_mutex_t *mutex)\r
10114 {\r
10115     if (sem_trywait(mutex->psem_interproc) < 0) {\r
10116         if ((*__errno_location ()) == 11) {\r
10117             return ((20000 + 50000) + 25);\r
10118         }\r
10119         return (*__errno_location ());\r
10120     }\r
10121     mutex->curr_locked = 1;\r
10122     return 0;\r
10123 }\r
10124 \r
10125 static apr_status_t proc_mutex_posix_release(apr_proc_mutex_t *mutex)\r
10126 {\r
10127     mutex->curr_locked = 0;\r
10128     if (sem_post(mutex->psem_interproc) < 0) {\r
10129 \r
10130 \r
10131         return (*__errno_location ());\r
10132     }\r
10133     return 0;\r
10134 }\r
10135 \r
10136 static const apr_proc_mutex_unix_lock_methods_t mutex_posixsem_methods =\r
10137 {\r
10138 \r
10139 \r
10140 \r
10141     0,\r
10142 \r
10143     proc_mutex_posix_create,\r
10144     proc_mutex_posix_acquire,\r
10145     proc_mutex_posix_tryacquire,\r
10146     proc_mutex_posix_release,\r
10147     proc_mutex_posix_cleanup,\r
10148     proc_mutex_no_child_init,\r
10149     "posixsem"\r
10150 };\r
10151 \r
10152 \r
10153 \r
10154 \r
10155 \r
10156 static struct sembuf proc_mutex_op_on;\r
10157 static struct sembuf proc_mutex_op_try;\r
10158 static struct sembuf proc_mutex_op_off;\r
10159 \r
10160 static void proc_mutex_sysv_setup(void)\r
10161 {\r
10162     proc_mutex_op_on.sem_num = 0;\r
10163     proc_mutex_op_on.sem_op = -1;\r
10164     proc_mutex_op_on.sem_flg = 0x1000;\r
10165     proc_mutex_op_try.sem_num = 0;\r
10166     proc_mutex_op_try.sem_op = -1;\r
10167     proc_mutex_op_try.sem_flg = 0x1000 | 04000;\r
10168     proc_mutex_op_off.sem_num = 0;\r
10169     proc_mutex_op_off.sem_op = 1;\r
10170     proc_mutex_op_off.sem_flg = 0x1000;\r
10171 }\r
10172 \r
10173 static apr_status_t proc_mutex_sysv_cleanup(void *mutex_)\r
10174 {\r
10175     apr_proc_mutex_t *mutex=mutex_;\r
10176     union semun ick;\r
10177 \r
10178     if (mutex->interproc->filedes != -1) {\r
10179         ick.val = 0;\r
10180         semctl(mutex->interproc->filedes, 0, 0, ick);\r
10181     }\r
10182     return 0;\r
10183 }\r
10184 \r
10185 static apr_status_t proc_mutex_sysv_create(apr_proc_mutex_t *new_mutex,\r
10186                                            const char *fname)\r
10187 {\r
10188     union semun ick;\r
10189     apr_status_t rv;\r
10190 \r
10191     new_mutex->interproc = apr_palloc(new_mutex->pool, sizeof(*new_mutex->interproc));\r
10192     new_mutex->interproc->filedes = semget(((__key_t) 0), 1, 01000 | 0600);\r
10193 \r
10194     if (new_mutex->interproc->filedes < 0) {\r
10195         rv = (*__errno_location ());\r
10196         proc_mutex_sysv_cleanup(new_mutex);\r
10197         return rv;\r
10198     }\r
10199     ick.val = 1;\r
10200     if (semctl(new_mutex->interproc->filedes, 0, 16, ick) < 0) {\r
10201         rv = (*__errno_location ());\r
10202         proc_mutex_sysv_cleanup(new_mutex);\r
10203         return rv;\r
10204     }\r
10205     new_mutex->curr_locked = 0;\r
10206     apr_pool_cleanup_register(new_mutex->pool,\r
10207                               (void *)new_mutex, apr_proc_mutex_cleanup,\r
10208                               apr_pool_cleanup_null);\r
10209     return 0;\r
10210 }\r
10211 \r
10212 static apr_status_t proc_mutex_sysv_acquire(apr_proc_mutex_t *mutex)\r
10213 {\r
10214     int rc;\r
10215 \r
10216     do {\r
10217         rc = semop(mutex->interproc->filedes, &proc_mutex_op_on, 1);\r
10218     } while (rc < 0 && (*__errno_location ()) == 4);\r
10219     if (rc < 0) {\r
10220         return (*__errno_location ());\r
10221     }\r
10222     mutex->curr_locked = 1;\r
10223     return 0;\r
10224 }\r
10225 \r
10226 static apr_status_t proc_mutex_sysv_tryacquire(apr_proc_mutex_t *mutex)\r
10227 {\r
10228     int rc;\r
10229 \r
10230     do {\r
10231         rc = semop(mutex->interproc->filedes, &proc_mutex_op_try, 1);\r
10232     } while (rc < 0 && (*__errno_location ()) == 4);\r
10233     if (rc < 0) {\r
10234         if ((*__errno_location ()) == 11) {\r
10235             return ((20000 + 50000) + 25);\r
10236         }\r
10237         return (*__errno_location ());\r
10238     }\r
10239     mutex->curr_locked = 1;\r
10240     return 0;\r
10241 }\r
10242 \r
10243 static apr_status_t proc_mutex_sysv_release(apr_proc_mutex_t *mutex)\r
10244 {\r
10245     int rc;\r
10246 \r
10247     mutex->curr_locked = 0;\r
10248     do {\r
10249         rc = semop(mutex->interproc->filedes, &proc_mutex_op_off, 1);\r
10250     } while (rc < 0 && (*__errno_location ()) == 4);\r
10251     if (rc < 0) {\r
10252         return (*__errno_location ());\r
10253     }\r
10254     return 0;\r
10255 }\r
10256 \r
10257 static const apr_proc_mutex_unix_lock_methods_t mutex_sysv_methods =\r
10258 {\r
10259 \r
10260 \r
10261 \r
10262     0,\r
10263 \r
10264     proc_mutex_sysv_create,\r
10265     proc_mutex_sysv_acquire,\r
10266     proc_mutex_sysv_tryacquire,\r
10267     proc_mutex_sysv_release,\r
10268     proc_mutex_sysv_cleanup,\r
10269     proc_mutex_no_child_init,\r
10270     "sysvsem"\r
10271 };\r
10272 \r
10273 \r
10274 \r
10275 \r
10276 \r
10277 static apr_status_t proc_mutex_proc_pthread_cleanup(void *mutex_)\r
10278 {\r
10279     apr_proc_mutex_t *mutex=mutex_;\r
10280     apr_status_t rv;\r
10281 \r
10282     if (mutex->curr_locked == 1) {\r
10283         if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {\r
10284 \r
10285 \r
10286 \r
10287             return rv;\r
10288         }\r
10289     }\r
10290 \r
10291     if (mutex->curr_locked != -1) {\r
10292         if ((rv = pthread_mutex_destroy(mutex->pthread_interproc))) {\r
10293 \r
10294 \r
10295 \r
10296             return rv;\r
10297         }\r
10298     }\r
10299     if (munmap((caddr_t)mutex->pthread_interproc, sizeof(pthread_mutex_t))) {\r
10300         return (*__errno_location ());\r
10301     }\r
10302     return 0;\r
10303 }\r
10304 \r
10305 static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,\r
10306                                                    const char *fname)\r
10307 {\r
10308     apr_status_t rv;\r
10309     int fd;\r
10310     pthread_mutexattr_t mattr;\r
10311 \r
10312     fd = open("/dev/zero", 02);\r
10313     if (fd < 0) {\r
10314         return (*__errno_location ());\r
10315     }\r
10316 \r
10317     new_mutex->pthread_interproc = (pthread_mutex_t *)mmap(\r
10318                                        (caddr_t) 0,\r
10319                                        sizeof(pthread_mutex_t),\r
10320                                        0x1 | 0x2, 0x01,\r
10321                                        fd, 0);\r
10322     if (new_mutex->pthread_interproc == (pthread_mutex_t *) (caddr_t) -1) {\r
10323         close(fd);\r
10324         return (*__errno_location ());\r
10325     }\r
10326     close(fd);\r
10327 \r
10328     new_mutex->curr_locked = -1;\r
10329 \r
10330     if ((rv = pthread_mutexattr_init(&mattr))) {\r
10331 \r
10332 \r
10333 \r
10334         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10335         return rv;\r
10336     }\r
10337     if ((rv = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))) {\r
10338 \r
10339 \r
10340 \r
10341         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10342         pthread_mutexattr_destroy(&mattr);\r
10343         return rv;\r
10344     }\r
10345 \r
10346 \r
10347     if ((rv = pthread_mutexattr_setrobust_np(&mattr,\r
10348                                                PTHREAD_MUTEX_ROBUST_NP))) {\r
10349 \r
10350 \r
10351 \r
10352         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10353         pthread_mutexattr_destroy(&mattr);\r
10354         return rv;\r
10355     }\r
10356     if ((rv = pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT))) {\r
10357 \r
10358 \r
10359 \r
10360         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10361         pthread_mutexattr_destroy(&mattr);\r
10362         return rv;\r
10363     }\r
10364 \r
10365 \r
10366     if ((rv = pthread_mutex_init(new_mutex->pthread_interproc, &mattr))) {\r
10367 \r
10368 \r
10369 \r
10370         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10371         pthread_mutexattr_destroy(&mattr);\r
10372         return rv;\r
10373     }\r
10374 \r
10375     new_mutex->curr_locked = 0;\r
10376 \r
10377     if ((rv = pthread_mutexattr_destroy(&mattr))) {\r
10378 \r
10379 \r
10380 \r
10381         proc_mutex_proc_pthread_cleanup(new_mutex);\r
10382         return rv;\r
10383     }\r
10384 \r
10385     apr_pool_cleanup_register(new_mutex->pool,\r
10386                               (void *)new_mutex,\r
10387                               apr_proc_mutex_cleanup,\r
10388                               apr_pool_cleanup_null);\r
10389     return 0;\r
10390 }\r
10391 \r
10392 static apr_status_t proc_mutex_proc_pthread_acquire(apr_proc_mutex_t *mutex)\r
10393 {\r
10394     apr_status_t rv;\r
10395 \r
10396     if ((rv = pthread_mutex_lock(mutex->pthread_interproc))) {\r
10397 \r
10398 \r
10399 \r
10400 \r
10401 \r
10402         if (rv == 130) {\r
10403             pthread_mutex_consistent_np(mutex->pthread_interproc);\r
10404         }\r
10405         else\r
10406             return rv;\r
10407 \r
10408 \r
10409 \r
10410     }\r
10411     mutex->curr_locked = 1;\r
10412     return 0;\r
10413 }\r
10414 \r
10415 static apr_status_t proc_mutex_proc_pthread_tryacquire(apr_proc_mutex_t *mutex)\r
10416 {\r
10417     apr_status_t rv;\r
10418 \r
10419     if ((rv = pthread_mutex_trylock(mutex->pthread_interproc))) {\r
10420 \r
10421 \r
10422 \r
10423         if (rv == 16) {\r
10424             return ((20000 + 50000) + 25);\r
10425         }\r
10426 \r
10427 \r
10428         if (rv == 130) {\r
10429             pthread_mutex_consistent_np(mutex->pthread_interproc);\r
10430             rv = 0;\r
10431         }\r
10432         else\r
10433             return rv;\r
10434 \r
10435 \r
10436 \r
10437     }\r
10438     mutex->curr_locked = 1;\r
10439     return rv;\r
10440 }\r
10441 \r
10442 static apr_status_t proc_mutex_proc_pthread_release(apr_proc_mutex_t *mutex)\r
10443 {\r
10444     apr_status_t rv;\r
10445 \r
10446     mutex->curr_locked = 0;\r
10447     if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {\r
10448 \r
10449 \r
10450 \r
10451         return rv;\r
10452     }\r
10453     return 0;\r
10454 }\r
10455 \r
10456 static const apr_proc_mutex_unix_lock_methods_t mutex_proc_pthread_methods =\r
10457 {\r
10458     1,\r
10459     proc_mutex_proc_pthread_create,\r
10460     proc_mutex_proc_pthread_acquire,\r
10461     proc_mutex_proc_pthread_tryacquire,\r
10462     proc_mutex_proc_pthread_release,\r
10463     proc_mutex_proc_pthread_cleanup,\r
10464     proc_mutex_no_child_init,\r
10465     "pthread"\r
10466 };\r
10467 \r
10468 \r
10469 \r
10470 \r
10471 \r
10472 static struct flock proc_mutex_lock_it;\r
10473 static struct flock proc_mutex_unlock_it;\r
10474 \r
10475 static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *);\r
10476 \r
10477 static void proc_mutex_fcntl_setup(void)\r
10478 {\r
10479     proc_mutex_lock_it.l_whence = 0;\r
10480     proc_mutex_lock_it.l_start = 0;\r
10481     proc_mutex_lock_it.l_len = 0;\r
10482     proc_mutex_lock_it.l_type = 1;\r
10483     proc_mutex_lock_it.l_pid = 0;\r
10484     proc_mutex_unlock_it.l_whence = 0;\r
10485     proc_mutex_unlock_it.l_start = 0;\r
10486     proc_mutex_unlock_it.l_len = 0;\r
10487     proc_mutex_unlock_it.l_type = 2;\r
10488     proc_mutex_unlock_it.l_pid = 0;\r
10489 }\r
10490 \r
10491 static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)\r
10492 {\r
10493     apr_status_t status;\r
10494     apr_proc_mutex_t *mutex=mutex_;\r
10495 \r
10496     if (mutex->curr_locked == 1) {\r
10497         status = proc_mutex_fcntl_release(mutex);\r
10498         if (status != 0)\r
10499             return status;\r
10500     }\r
10501 \r
10502     return apr_file_close(mutex->interproc);\r
10503 }\r
10504 \r
10505 static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,\r
10506                                             const char *fname)\r
10507 {\r
10508     int rv;\r
10509 \r
10510     if (fname) {\r
10511         new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);\r
10512         rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
10513                            0x00004 | 0x00002 | 0x00040,\r
10514                            0x0400 | 0x0200 | 0x0040 | 0x0004,\r
10515                            new_mutex->pool);\r
10516     }\r
10517     else {\r
10518         new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");\r
10519         rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,\r
10520                              0x00004 | 0x00002 | 0x00040,\r
10521                              new_mutex->pool);\r
10522     }\r
10523 \r
10524     if (rv != 0) {\r
10525         return rv;\r
10526     }\r
10527 \r
10528     new_mutex->curr_locked = 0;\r
10529     unlink(new_mutex->fname);\r
10530     apr_pool_cleanup_register(new_mutex->pool,\r
10531                               (void*)new_mutex,\r
10532                               apr_proc_mutex_cleanup,\r
10533                               apr_pool_cleanup_null);\r
10534     return 0;\r
10535 }\r
10536 \r
10537 static apr_status_t proc_mutex_fcntl_acquire(apr_proc_mutex_t *mutex)\r
10538 {\r
10539     int rc;\r
10540 \r
10541     do {\r
10542         rc = fcntl(mutex->interproc->filedes, 7, &proc_mutex_lock_it);\r
10543     } while (rc < 0 && (*__errno_location ()) == 4);\r
10544     if (rc < 0) {\r
10545         return (*__errno_location ());\r
10546     }\r
10547     mutex->curr_locked=1;\r
10548     return 0;\r
10549 }\r
10550 \r
10551 static apr_status_t proc_mutex_fcntl_tryacquire(apr_proc_mutex_t *mutex)\r
10552 {\r
10553     int rc;\r
10554 \r
10555     do {\r
10556         rc = fcntl(mutex->interproc->filedes, 6, &proc_mutex_lock_it);\r
10557     } while (rc < 0 && (*__errno_location ()) == 4);\r
10558     if (rc < 0) {\r
10559 \r
10560 \r
10561 \r
10562         if ((*__errno_location ()) == 11) {\r
10563 \r
10564             return ((20000 + 50000) + 25);\r
10565         }\r
10566         return (*__errno_location ());\r
10567     }\r
10568     mutex->curr_locked = 1;\r
10569     return 0;\r
10570 }\r
10571 \r
10572 static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *mutex)\r
10573 {\r
10574     int rc;\r
10575 \r
10576     mutex->curr_locked=0;\r
10577     do {\r
10578         rc = fcntl(mutex->interproc->filedes, 7, &proc_mutex_unlock_it);\r
10579     } while (rc < 0 && (*__errno_location ()) == 4);\r
10580     if (rc < 0) {\r
10581         return (*__errno_location ());\r
10582     }\r
10583     return 0;\r
10584 }\r
10585 \r
10586 static const apr_proc_mutex_unix_lock_methods_t mutex_fcntl_methods =\r
10587 {\r
10588 \r
10589 \r
10590 \r
10591     0,\r
10592 \r
10593     proc_mutex_fcntl_create,\r
10594     proc_mutex_fcntl_acquire,\r
10595     proc_mutex_fcntl_tryacquire,\r
10596     proc_mutex_fcntl_release,\r
10597     proc_mutex_fcntl_cleanup,\r
10598     proc_mutex_no_child_init,\r
10599     "fcntl"\r
10600 };\r
10601 \r
10602 \r
10603 \r
10604 \r
10605 \r
10606 static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *);\r
10607 \r
10608 static apr_status_t proc_mutex_flock_cleanup(void *mutex_)\r
10609 {\r
10610     apr_status_t status;\r
10611     apr_proc_mutex_t *mutex=mutex_;\r
10612 \r
10613     if (mutex->curr_locked == 1) {\r
10614         status = proc_mutex_flock_release(mutex);\r
10615         if (status != 0)\r
10616             return status;\r
10617     }\r
10618     if (mutex->interproc) {\r
10619         apr_file_close(mutex->interproc);\r
10620     }\r
10621     unlink(mutex->fname);\r
10622     return 0;\r
10623 }\r
10624 \r
10625 static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,\r
10626                                             const char *fname)\r
10627 {\r
10628     int rv;\r
10629 \r
10630     if (fname) {\r
10631         new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);\r
10632         rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
10633                            0x00004 | 0x00002 | 0x00040,\r
10634                            0x0400 | 0x0200,\r
10635                            new_mutex->pool);\r
10636     }\r
10637     else {\r
10638         new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");\r
10639         rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,\r
10640                              0x00004 | 0x00002 | 0x00040,\r
10641                              new_mutex->pool);\r
10642     }\r
10643 \r
10644     if (rv != 0) {\r
10645         proc_mutex_flock_cleanup(new_mutex);\r
10646         return (*__errno_location ());\r
10647     }\r
10648     new_mutex->curr_locked = 0;\r
10649     apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,\r
10650                               apr_proc_mutex_cleanup,\r
10651                               apr_pool_cleanup_null);\r
10652     return 0;\r
10653 }\r
10654 \r
10655 static apr_status_t proc_mutex_flock_acquire(apr_proc_mutex_t *mutex)\r
10656 {\r
10657     int rc;\r
10658 \r
10659     do {\r
10660         rc = flock(mutex->interproc->filedes, 2);\r
10661     } while (rc < 0 && (*__errno_location ()) == 4);\r
10662     if (rc < 0) {\r
10663         return (*__errno_location ());\r
10664     }\r
10665     mutex->curr_locked = 1;\r
10666     return 0;\r
10667 }\r
10668 \r
10669 static apr_status_t proc_mutex_flock_tryacquire(apr_proc_mutex_t *mutex)\r
10670 {\r
10671     int rc;\r
10672 \r
10673     do {\r
10674         rc = flock(mutex->interproc->filedes, 2 | 4);\r
10675     } while (rc < 0 && (*__errno_location ()) == 4);\r
10676     if (rc < 0) {\r
10677         if ((*__errno_location ()) == 11 || (*__errno_location ()) == 11) {\r
10678             return ((20000 + 50000) + 25);\r
10679         }\r
10680         return (*__errno_location ());\r
10681     }\r
10682     mutex->curr_locked = 1;\r
10683     return 0;\r
10684 }\r
10685 \r
10686 static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *mutex)\r
10687 {\r
10688     int rc;\r
10689 \r
10690     mutex->curr_locked = 0;\r
10691     do {\r
10692         rc = flock(mutex->interproc->filedes, 8);\r
10693     } while (rc < 0 && (*__errno_location ()) == 4);\r
10694     if (rc < 0) {\r
10695         return (*__errno_location ());\r
10696     }\r
10697     return 0;\r
10698 }\r
10699 \r
10700 static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex,\r
10701                                                 apr_pool_t *pool,\r
10702                                                 const char *fname)\r
10703 {\r
10704     apr_proc_mutex_t *new_mutex;\r
10705     int rv;\r
10706 \r
10707     new_mutex = (apr_proc_mutex_t *)apr_palloc(pool, sizeof(apr_proc_mutex_t));\r
10708 \r
10709     memcpy(new_mutex, *mutex, sizeof *new_mutex);\r
10710     new_mutex->pool = pool;\r
10711     if (!fname) {\r
10712         fname = (*mutex)->fname;\r
10713     }\r
10714     new_mutex->fname = apr_pstrdup(pool, fname);\r
10715     rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
10716                        0x00002, 0, new_mutex->pool);\r
10717     if (rv != 0) {\r
10718         return rv;\r
10719     }\r
10720     *mutex = new_mutex;\r
10721     return 0;\r
10722 }\r
10723 \r
10724 static const apr_proc_mutex_unix_lock_methods_t mutex_flock_methods =\r
10725 {\r
10726 \r
10727 \r
10728 \r
10729     0,\r
10730 \r
10731     proc_mutex_flock_create,\r
10732     proc_mutex_flock_acquire,\r
10733     proc_mutex_flock_tryacquire,\r
10734     proc_mutex_flock_release,\r
10735     proc_mutex_flock_cleanup,\r
10736     proc_mutex_flock_child_init,\r
10737     "flock"\r
10738 };\r
10739 \r
10740 \r
10741 \r
10742 void apr_proc_mutex_unix_setup_lock(void)\r
10743 {\r
10744 \r
10745 \r
10746     proc_mutex_sysv_setup();\r
10747 \r
10748 \r
10749     proc_mutex_fcntl_setup();\r
10750 \r
10751 }\r
10752 \r
10753 static apr_status_t proc_mutex_choose_method(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech)\r
10754 {\r
10755     switch (mech) {\r
10756     case APR_LOCK_FCNTL:\r
10757 \r
10758         new_mutex->inter_meth = &mutex_fcntl_methods;\r
10759 \r
10760 \r
10761 \r
10762         break;\r
10763     case APR_LOCK_FLOCK:\r
10764 \r
10765         new_mutex->inter_meth = &mutex_flock_methods;\r
10766 \r
10767 \r
10768 \r
10769         break;\r
10770     case APR_LOCK_SYSVSEM:\r
10771 \r
10772         new_mutex->inter_meth = &mutex_sysv_methods;\r
10773 \r
10774 \r
10775 \r
10776         break;\r
10777     case APR_LOCK_POSIXSEM:\r
10778 \r
10779         new_mutex->inter_meth = &mutex_posixsem_methods;\r
10780 \r
10781 \r
10782 \r
10783         break;\r
10784     case APR_LOCK_PROC_PTHREAD:\r
10785 \r
10786         new_mutex->inter_meth = &mutex_proc_pthread_methods;\r
10787 \r
10788 \r
10789 \r
10790         break;\r
10791     case APR_LOCK_DEFAULT:\r
10792 \r
10793 \r
10794 \r
10795         new_mutex->inter_meth = &mutex_sysv_methods;\r
10796 # 842 "./../locks/unix/proc_mutex.c"\r
10797         break;\r
10798     default:\r
10799         return ((20000 + 50000) + 23);\r
10800     }\r
10801     return 0;\r
10802 }\r
10803 \r
10804 const char * apr_proc_mutex_defname(void)\r
10805 {\r
10806     apr_status_t rv;\r
10807     apr_proc_mutex_t mutex;\r
10808 \r
10809     if ((rv = proc_mutex_choose_method(&mutex, APR_LOCK_DEFAULT)) != 0) {\r
10810         return "unknown";\r
10811     }\r
10812     mutex.meth = mutex.inter_meth;\r
10813 \r
10814     return apr_proc_mutex_name(&mutex);\r
10815 }\r
10816 \r
10817 static apr_status_t proc_mutex_create(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech, const char *fname)\r
10818 {\r
10819     apr_status_t rv;\r
10820 \r
10821     if ((rv = proc_mutex_choose_method(new_mutex, mech)) != 0) {\r
10822         return rv;\r
10823     }\r
10824 \r
10825     new_mutex->meth = new_mutex->inter_meth;\r
10826 \r
10827     if ((rv = new_mutex->meth->create(new_mutex, fname)) != 0) {\r
10828         return rv;\r
10829     }\r
10830 \r
10831     return 0;\r
10832 }\r
10833 \r
10834 apr_status_t apr_proc_mutex_create(apr_proc_mutex_t **mutex,\r
10835                                                 const char *fname,\r
10836                                                 apr_lockmech_e mech,\r
10837                                                 apr_pool_t *pool)\r
10838 {\r
10839     apr_proc_mutex_t *new_mutex;\r
10840     apr_status_t rv;\r
10841 \r
10842     new_mutex = memset(apr_palloc(pool, sizeof(apr_proc_mutex_t)), 0, sizeof(apr_proc_mutex_t));\r
10843     new_mutex->pool = pool;\r
10844 \r
10845     if ((rv = proc_mutex_create(new_mutex, mech, fname)) != 0)\r
10846         return rv;\r
10847 \r
10848     *mutex = new_mutex;\r
10849     return 0;\r
10850 }\r
10851 \r
10852 apr_status_t apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,\r
10853                                                     const char *fname,\r
10854                                                     apr_pool_t *pool)\r
10855 {\r
10856     return (*mutex)->meth->child_init(mutex, pool, fname);\r
10857 }\r
10858 \r
10859 apr_status_t apr_proc_mutex_lock(apr_proc_mutex_t *mutex)\r
10860 {\r
10861     return mutex->meth->acquire(mutex);\r
10862 }\r
10863 \r
10864 apr_status_t apr_proc_mutex_trylock(apr_proc_mutex_t *mutex)\r
10865 {\r
10866     return mutex->meth->tryacquire(mutex);\r
10867 }\r
10868 \r
10869 apr_status_t apr_proc_mutex_unlock(apr_proc_mutex_t *mutex)\r
10870 {\r
10871     return mutex->meth->release(mutex);\r
10872 }\r
10873 \r
10874 apr_status_t apr_proc_mutex_cleanup(void *mutex)\r
10875 {\r
10876     return ((apr_proc_mutex_t *)mutex)->meth->cleanup(mutex);\r
10877 }\r
10878 \r
10879 const char * apr_proc_mutex_name(apr_proc_mutex_t *mutex)\r
10880 {\r
10881     return mutex->meth->name;\r
10882 }\r
10883 \r
10884 const char * apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)\r
10885 {\r
10886 \r
10887 \r
10888 \r
10889     if (mutex->meth == &mutex_flock_methods) {\r
10890         return mutex->fname;\r
10891     }\r
10892 \r
10893 \r
10894     if (mutex->meth == &mutex_fcntl_methods) {\r
10895         return mutex->fname;\r
10896     }\r
10897 \r
10898     return ((void*)0);\r
10899 }\r
10900 \r
10901 apr_pool_t * apr_proc_mutex_pool_get (const apr_proc_mutex_t *theproc_mutex) { return theproc_mutex->pool; }\r
10902 \r
10903 \r
10904 \r
10905 apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,\r
10906                                                 apr_proc_mutex_t *pmutex)\r
10907 {\r
10908 \r
10909     if (pmutex->interproc) {\r
10910         ospmutex->crossproc = pmutex->interproc->filedes;\r
10911     }\r
10912     else {\r
10913         ospmutex->crossproc = -1;\r
10914     }\r
10915 \r
10916 \r
10917     ospmutex->pthread_interproc = pmutex->pthread_interproc;\r
10918 \r
10919     return 0;\r
10920 }\r
10921 \r
10922 apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,\r
10923                                                 apr_os_proc_mutex_t *ospmutex,\r
10924                                                 apr_pool_t *pool)\r
10925 {\r
10926     if (pool == ((void*)0)) {\r
10927         return (20000 + 2);\r
10928     }\r
10929     if ((*pmutex) == ((void*)0)) {\r
10930         (*pmutex) = (apr_proc_mutex_t *)memset(apr_palloc(pool, sizeof(apr_proc_mutex_t)), 0, sizeof(apr_proc_mutex_t));\r
10931 \r
10932         (*pmutex)->pool = pool;\r
10933     }\r
10934 \r
10935     apr_os_file_put(&(*pmutex)->interproc, &ospmutex->crossproc, 0, pool);\r
10936 \r
10937 \r
10938     (*pmutex)->pthread_interproc = ospmutex->pthread_interproc;\r
10939 \r
10940     return 0;\r
10941 }\r
10942 # 13 "main2.c" 2\r
10943 # 1 "./../memory/unix/apr_pools.c" 1\r
10944 # 31 "./../memory/unix/apr_pools.c"\r
10945 # 1 "../include/apr_want.h" 1\r
10946 # 32 "./../memory/unix/apr_pools.c" 2\r
10947 # 1 "../include/apr_env.h" 1\r
10948 # 42 "../include/apr_env.h"\r
10949 apr_status_t apr_env_get(char **value, const char *envvar,\r
10950                                       apr_pool_t *pool);\r
10951 \r
10952 \r
10953 \r
10954 \r
10955 \r
10956 \r
10957 \r
10958 apr_status_t apr_env_set(const char *envvar, const char *value,\r
10959                                       apr_pool_t *pool);\r
10960 \r
10961 \r
10962 \r
10963 \r
10964 \r
10965 \r
10966 apr_status_t apr_env_delete(const char *envvar, apr_pool_t *pool);\r
10967 # 33 "./../memory/unix/apr_pools.c" 2\r
10968 # 85 "./../memory/unix/apr_pools.c"\r
10969 struct apr_allocator_t {\r
10970 \r
10971     apr_uint32_t max_index;\r
10972 \r
10973 \r
10974 \r
10975 \r
10976 \r
10977     apr_uint32_t max_free_index;\r
10978 \r
10979 \r
10980 \r
10981 \r
10982     apr_uint32_t current_free_index;\r
10983 \r
10984     apr_thread_mutex_t *mutex;\r
10985 \r
10986     apr_pool_t *owner;\r
10987 # 113 "./../memory/unix/apr_pools.c"\r
10988     apr_memnode_t *free[20];\r
10989 };\r
10990 # 123 "./../memory/unix/apr_pools.c"\r
10991 apr_status_t apr_allocator_create(apr_allocator_t **allocator)\r
10992 {\r
10993     apr_allocator_t *new_allocator;\r
10994 \r
10995     *allocator = ((void*)0);\r
10996 \r
10997     if ((new_allocator = malloc((((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0))\r
10998         return 12;\r
10999 \r
11000     memset(new_allocator, 0, (((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)));\r
11001     new_allocator->max_free_index = 0;\r
11002 \r
11003     *allocator = new_allocator;\r
11004 \r
11005     return 0;\r
11006 }\r
11007 \r
11008 void apr_allocator_destroy(apr_allocator_t *allocator)\r
11009 {\r
11010     apr_uint32_t index;\r
11011     apr_memnode_t *node, **ref;\r
11012 \r
11013     for (index = 0; index < 20; index++) {\r
11014         ref = &allocator->free[index];\r
11015         while ((node = *ref) != ((void*)0)) {\r
11016             *ref = node->next;\r
11017 \r
11018 \r
11019 \r
11020             free(node);\r
11021 \r
11022         }\r
11023     }\r
11024 \r
11025     free(allocator);\r
11026 }\r
11027 \r
11028 \r
11029 void apr_allocator_mutex_set(apr_allocator_t *allocator,\r
11030                                           apr_thread_mutex_t *mutex)\r
11031 {\r
11032     allocator->mutex = mutex;\r
11033 }\r
11034 \r
11035 apr_thread_mutex_t * apr_allocator_mutex_get(\r
11036                                       apr_allocator_t *allocator)\r
11037 {\r
11038     return allocator->mutex;\r
11039 }\r
11040 \r
11041 \r
11042 void apr_allocator_owner_set(apr_allocator_t *allocator,\r
11043                                           apr_pool_t *pool)\r
11044 {\r
11045     allocator->owner = pool;\r
11046 }\r
11047 \r
11048 apr_pool_t * apr_allocator_owner_get(apr_allocator_t *allocator)\r
11049 {\r
11050     return allocator->owner;\r
11051 }\r
11052 \r
11053 void apr_allocator_max_free_set(apr_allocator_t *allocator,\r
11054                                              apr_size_t in_size)\r
11055 {\r
11056     apr_uint32_t max_free_index;\r
11057     apr_uint32_t size = (apr_uint32_t)in_size;\r
11058 \r
11059 \r
11060     apr_thread_mutex_t *mutex;\r
11061 \r
11062     mutex = apr_allocator_mutex_get(allocator);\r
11063     if (mutex != ((void*)0))\r
11064         apr_thread_mutex_lock(mutex);\r
11065 \r
11066 \r
11067     max_free_index = (((size) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) >> 12;\r
11068     allocator->current_free_index += max_free_index;\r
11069     allocator->current_free_index -= allocator->max_free_index;\r
11070     allocator->max_free_index = max_free_index;\r
11071     if (allocator->current_free_index > max_free_index)\r
11072         allocator->current_free_index = max_free_index;\r
11073 \r
11074 \r
11075     if (mutex != ((void*)0))\r
11076         apr_thread_mutex_unlock(mutex);\r
11077 \r
11078 }\r
11079 \r
11080 static __inline__\r
11081 apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)\r
11082 {\r
11083     apr_memnode_t *node, **ref;\r
11084     apr_uint32_t max_index;\r
11085     apr_size_t size, i, index;\r
11086 \r
11087 \r
11088 \r
11089 \r
11090     size = (((in_size + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1))) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1));\r
11091     if (size < in_size) {\r
11092         return ((void*)0);\r
11093     }\r
11094     if (size < (2 * (1 << 12)))\r
11095         size = (2 * (1 << 12));\r
11096 \r
11097 \r
11098 \r
11099 \r
11100     index = (size >> 12) - 1;\r
11101 \r
11102     if (index > (4294967295U)) {\r
11103         return ((void*)0);\r
11104     }\r
11105 \r
11106 \r
11107 \r
11108 \r
11109     if (index <= allocator->max_index) {\r
11110 \r
11111         if (allocator->mutex)\r
11112             apr_thread_mutex_lock(allocator->mutex);\r
11113 # 257 "./../memory/unix/apr_pools.c"\r
11114         max_index = allocator->max_index;\r
11115         ref = &allocator->free[index];\r
11116         i = index;\r
11117         while (*ref == ((void*)0) && i < max_index) {\r
11118            ref++;\r
11119            i++;\r
11120         }\r
11121 \r
11122         if ((node = *ref) != ((void*)0)) {\r
11123 \r
11124 \r
11125 \r
11126 \r
11127 \r
11128             if ((*ref = node->next) == ((void*)0) && i >= max_index) {\r
11129                 do {\r
11130                     ref--;\r
11131                     max_index--;\r
11132                 }\r
11133                 while (*ref == ((void*)0) && max_index > 0);\r
11134 \r
11135                 allocator->max_index = max_index;\r
11136             }\r
11137 \r
11138             allocator->current_free_index += node->index + 1;\r
11139             if (allocator->current_free_index > allocator->max_free_index)\r
11140                 allocator->current_free_index = allocator->max_free_index;\r
11141 \r
11142 \r
11143             if (allocator->mutex)\r
11144                 apr_thread_mutex_unlock(allocator->mutex);\r
11145 \r
11146 \r
11147             node->next = ((void*)0);\r
11148             node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
11149 \r
11150             return node;\r
11151         }\r
11152 \r
11153 \r
11154         if (allocator->mutex)\r
11155             apr_thread_mutex_unlock(allocator->mutex);\r
11156 \r
11157     }\r
11158 \r
11159 \r
11160 \r
11161 \r
11162     else if (allocator->free[0]) {\r
11163 \r
11164         if (allocator->mutex)\r
11165             apr_thread_mutex_lock(allocator->mutex);\r
11166 \r
11167 \r
11168 \r
11169 \r
11170 \r
11171         ref = &allocator->free[0];\r
11172         while ((node = *ref) != ((void*)0) && index > node->index)\r
11173             ref = &node->next;\r
11174 \r
11175         if (node) {\r
11176             *ref = node->next;\r
11177 \r
11178             allocator->current_free_index += node->index + 1;\r
11179             if (allocator->current_free_index > allocator->max_free_index)\r
11180                 allocator->current_free_index = allocator->max_free_index;\r
11181 \r
11182 \r
11183             if (allocator->mutex)\r
11184                 apr_thread_mutex_unlock(allocator->mutex);\r
11185 \r
11186 \r
11187             node->next = ((void*)0);\r
11188             node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
11189 \r
11190             return node;\r
11191         }\r
11192 \r
11193 \r
11194         if (allocator->mutex)\r
11195             apr_thread_mutex_unlock(allocator->mutex);\r
11196 \r
11197     }\r
11198 # 349 "./../memory/unix/apr_pools.c"\r
11199     if ((node = malloc(size)) == ((void*)0))\r
11200 \r
11201         return ((void*)0);\r
11202 \r
11203     node->next = ((void*)0);\r
11204     node->index = (apr_uint32_t)index;\r
11205     node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
11206     node->endp = (char *)node + size;\r
11207 \r
11208     return node;\r
11209 }\r
11210 \r
11211 static __inline__\r
11212 void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)\r
11213 {\r
11214     apr_memnode_t *next, *freelist = ((void*)0);\r
11215     apr_uint32_t index, max_index;\r
11216     apr_uint32_t max_free_index, current_free_index;\r
11217 \r
11218 \r
11219     if (allocator->mutex)\r
11220         apr_thread_mutex_lock(allocator->mutex);\r
11221 \r
11222 \r
11223     max_index = allocator->max_index;\r
11224     max_free_index = allocator->max_free_index;\r
11225     current_free_index = allocator->current_free_index;\r
11226 \r
11227 \r
11228 \r
11229 \r
11230     do {\r
11231         next = node->next;\r
11232         index = node->index;\r
11233 \r
11234         if (max_free_index != 0\r
11235             && index + 1 > current_free_index) {\r
11236             node->next = freelist;\r
11237             freelist = node;\r
11238         }\r
11239         else if (index < 20) {\r
11240 \r
11241 \r
11242 \r
11243             if ((node->next = allocator->free[index]) == ((void*)0)\r
11244                 && index > max_index) {\r
11245                 max_index = index;\r
11246             }\r
11247             allocator->free[index] = node;\r
11248             if (current_free_index >= index + 1)\r
11249                 current_free_index -= index + 1;\r
11250             else\r
11251                 current_free_index = 0;\r
11252         }\r
11253         else {\r
11254 \r
11255 \r
11256 \r
11257             node->next = allocator->free[0];\r
11258             allocator->free[0] = node;\r
11259             if (current_free_index >= index + 1)\r
11260                 current_free_index -= index + 1;\r
11261             else\r
11262                 current_free_index = 0;\r
11263         }\r
11264     } while ((node = next) != ((void*)0));\r
11265 \r
11266     allocator->max_index = max_index;\r
11267     allocator->current_free_index = current_free_index;\r
11268 \r
11269 \r
11270     if (allocator->mutex)\r
11271         apr_thread_mutex_unlock(allocator->mutex);\r
11272 \r
11273 \r
11274     while (freelist != ((void*)0)) {\r
11275         node = freelist;\r
11276         freelist = node->next;\r
11277 \r
11278 \r
11279 \r
11280         free(node);\r
11281 \r
11282     }\r
11283 }\r
11284 \r
11285 apr_memnode_t * apr_allocator_alloc(apr_allocator_t *allocator,\r
11286                                                  apr_size_t size)\r
11287 {\r
11288     return allocator_alloc(allocator, size);\r
11289 }\r
11290 \r
11291 void apr_allocator_free(apr_allocator_t *allocator,\r
11292                                      apr_memnode_t *node)\r
11293 {\r
11294     allocator_free(allocator, node);\r
11295 }\r
11296 # 467 "./../memory/unix/apr_pools.c"\r
11297 typedef struct cleanup_t cleanup_t;\r
11298 \r
11299 \r
11300 struct process_chain {\r
11301 \r
11302     apr_proc_t *proc;\r
11303     apr_kill_conditions_e kill_how;\r
11304 \r
11305     struct process_chain *next;\r
11306 };\r
11307 # 500 "./../memory/unix/apr_pools.c"\r
11308 struct apr_pool_t {\r
11309     apr_pool_t *parent;\r
11310     apr_pool_t *child;\r
11311     apr_pool_t *sibling;\r
11312     apr_pool_t **ref;\r
11313     cleanup_t *cleanups;\r
11314     cleanup_t *free_cleanups;\r
11315     apr_allocator_t *allocator;\r
11316     struct process_chain *subprocesses;\r
11317     apr_abortfunc_t abort_fn;\r
11318     apr_hash_t *user_data;\r
11319     const char *tag;\r
11320 \r
11321 \r
11322     apr_memnode_t *active;\r
11323     apr_memnode_t *self;\r
11324     char *self_first_avail;\r
11325 # 535 "./../memory/unix/apr_pools.c"\r
11326     cleanup_t *pre_cleanups;\r
11327 };\r
11328 # 545 "./../memory/unix/apr_pools.c"\r
11329 static apr_byte_t apr_pools_initialized = 0;\r
11330 static apr_pool_t *global_pool = ((void*)0);\r
11331 \r
11332 \r
11333 static apr_allocator_t *global_allocator = ((void*)0);\r
11334 # 560 "./../memory/unix/apr_pools.c"\r
11335 static void run_cleanups(cleanup_t **c);\r
11336 static void free_proc_chain(struct process_chain *procs);\r
11337 # 572 "./../memory/unix/apr_pools.c"\r
11338 apr_status_t apr_pool_initialize(void)\r
11339 {\r
11340     apr_status_t rv;\r
11341 \r
11342     if (apr_pools_initialized++)\r
11343         return 0;\r
11344 # 587 "./../memory/unix/apr_pools.c"\r
11345     if ((rv = apr_allocator_create(&global_allocator)) != 0) {\r
11346         apr_pools_initialized = 0;\r
11347         return rv;\r
11348     }\r
11349 \r
11350     if ((rv = apr_pool_create_ex(&global_pool, ((void*)0), ((void*)0),\r
11351                                  global_allocator)) != 0) {\r
11352         apr_allocator_destroy(global_allocator);\r
11353         global_allocator = ((void*)0);\r
11354         apr_pools_initialized = 0;\r
11355         return rv;\r
11356     }\r
11357 \r
11358     apr_pool_tag(global_pool, "apr_global_pool");\r
11359 \r
11360 \r
11361 \r
11362 \r
11363 \r
11364 \r
11365 \r
11366     if ((rv = apr_atomic_init(global_pool)) != 0) {\r
11367         return rv;\r
11368     }\r
11369 \r
11370 \r
11371     {\r
11372         apr_thread_mutex_t *mutex;\r
11373 \r
11374         if ((rv = apr_thread_mutex_create(&mutex,\r
11375                                           0x0,\r
11376                                           global_pool)) != 0) {\r
11377             return rv;\r
11378         }\r
11379 \r
11380         apr_allocator_mutex_set(global_allocator, mutex);\r
11381     }\r
11382 \r
11383 \r
11384     apr_allocator_owner_set(global_allocator, global_pool);\r
11385 \r
11386     return 0;\r
11387 }\r
11388 \r
11389 void apr_pool_terminate(void)\r
11390 {\r
11391     if (!apr_pools_initialized)\r
11392         return;\r
11393 \r
11394     if (--apr_pools_initialized)\r
11395         return;\r
11396 \r
11397     apr_pool_destroy(global_pool);\r
11398     global_pool = ((void*)0);\r
11399 \r
11400     global_allocator = ((void*)0);\r
11401 }\r
11402 # 668 "./../memory/unix/apr_pools.c"\r
11403 void * apr_palloc(apr_pool_t *pool, apr_size_t in_size)\r
11404 {\r
11405     apr_memnode_t *active, *node;\r
11406     void *mem;\r
11407     apr_size_t size, free_index;\r
11408 \r
11409     size = (((in_size) + ((8) - 1)) & ~((8) - 1));\r
11410     if (size < in_size) {\r
11411         if (pool->abort_fn)\r
11412             pool->abort_fn(12);\r
11413 \r
11414         return ((void*)0);\r
11415     }\r
11416     active = pool->active;\r
11417 \r
11418 \r
11419     if (size <= ((apr_size_t)(active->endp - active->first_avail))) {\r
11420         mem = active->first_avail;\r
11421         active->first_avail += size;\r
11422 \r
11423         return mem;\r
11424     }\r
11425 \r
11426     node = active->next;\r
11427     if (size <= ((apr_size_t)(node->endp - node->first_avail))) {\r
11428         do { *node->ref = node->next; node->next->ref = node->ref; } while (0);\r
11429     }\r
11430     else {\r
11431         if ((node = allocator_alloc(pool->allocator, size)) == ((void*)0)) {\r
11432             if (pool->abort_fn)\r
11433                 pool->abort_fn(12);\r
11434 \r
11435             return ((void*)0);\r
11436         }\r
11437     }\r
11438 \r
11439     node->free_index = 0;\r
11440 \r
11441     mem = node->first_avail;\r
11442     node->first_avail += size;\r
11443 \r
11444     do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
11445 \r
11446     pool->active = node;\r
11447 \r
11448     free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
11449 \r
11450 \r
11451     active->free_index = (apr_uint32_t)free_index;\r
11452     node = active->next;\r
11453     if (free_index >= node->free_index)\r
11454         return mem;\r
11455 \r
11456     do {\r
11457         node = node->next;\r
11458     }\r
11459     while (free_index < node->free_index);\r
11460 \r
11461     do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
11462     do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
11463 \r
11464     return mem;\r
11465 }\r
11466 # 740 "./../memory/unix/apr_pools.c"\r
11467 void * apr_pcalloc(apr_pool_t *pool, apr_size_t size);\r
11468 void * apr_pcalloc(apr_pool_t *pool, apr_size_t size)\r
11469 {\r
11470     void *mem;\r
11471 \r
11472     if ((mem = apr_palloc(pool, size)) != ((void*)0)) {\r
11473         memset(mem, 0, size);\r
11474     }\r
11475 \r
11476     return mem;\r
11477 }\r
11478 \r
11479 \r
11480 \r
11481 \r
11482 \r
11483 \r
11484 void apr_pool_clear(apr_pool_t *pool)\r
11485 {\r
11486     apr_memnode_t *active;\r
11487 \r
11488 \r
11489     run_cleanups(&pool->pre_cleanups);\r
11490     pool->pre_cleanups = ((void*)0);\r
11491 \r
11492 \r
11493 \r
11494 \r
11495     while (pool->child)\r
11496         apr_pool_destroy(pool->child);\r
11497 \r
11498 \r
11499     run_cleanups(&pool->cleanups);\r
11500     pool->cleanups = ((void*)0);\r
11501     pool->free_cleanups = ((void*)0);\r
11502 \r
11503 \r
11504     free_proc_chain(pool->subprocesses);\r
11505     pool->subprocesses = ((void*)0);\r
11506 \r
11507 \r
11508     pool->user_data = ((void*)0);\r
11509 \r
11510 \r
11511 \r
11512 \r
11513     active = pool->active = pool->self;\r
11514     active->first_avail = pool->self_first_avail;\r
11515 \r
11516     if (active->next == active)\r
11517         return;\r
11518 \r
11519     *active->ref = ((void*)0);\r
11520     allocator_free(pool->allocator, active->next);\r
11521     active->next = active;\r
11522     active->ref = &active->next;\r
11523 }\r
11524 \r
11525 void apr_pool_destroy(apr_pool_t *pool)\r
11526 {\r
11527     apr_memnode_t *active;\r
11528     apr_allocator_t *allocator;\r
11529 \r
11530 \r
11531     run_cleanups(&pool->pre_cleanups);\r
11532     pool->pre_cleanups = ((void*)0);\r
11533 \r
11534 \r
11535 \r
11536 \r
11537     while (pool->child)\r
11538         apr_pool_destroy(pool->child);\r
11539 \r
11540 \r
11541     run_cleanups(&pool->cleanups);\r
11542 \r
11543 \r
11544     free_proc_chain(pool->subprocesses);\r
11545 \r
11546 \r
11547     if (pool->parent) {\r
11548 \r
11549         apr_thread_mutex_t *mutex;\r
11550 \r
11551         if ((mutex = apr_allocator_mutex_get(pool->parent->allocator)) != ((void*)0))\r
11552             apr_thread_mutex_lock(mutex);\r
11553 \r
11554 \r
11555         if ((*pool->ref = pool->sibling) != ((void*)0))\r
11556             pool->sibling->ref = pool->ref;\r
11557 \r
11558 \r
11559         if (mutex)\r
11560             apr_thread_mutex_unlock(mutex);\r
11561 \r
11562     }\r
11563 \r
11564 \r
11565 \r
11566 \r
11567     allocator = pool->allocator;\r
11568     active = pool->self;\r
11569     *active->ref = ((void*)0);\r
11570 \r
11571 \r
11572     if (apr_allocator_owner_get(allocator) == pool) {\r
11573 \r
11574 \r
11575 \r
11576         apr_allocator_mutex_set(allocator, ((void*)0));\r
11577     }\r
11578 \r
11579 \r
11580 \r
11581 \r
11582 \r
11583     allocator_free(allocator, active);\r
11584 \r
11585 \r
11586 \r
11587 \r
11588 \r
11589 \r
11590     if (apr_allocator_owner_get(allocator) == pool) {\r
11591         apr_allocator_destroy(allocator);\r
11592     }\r
11593 }\r
11594 \r
11595 apr_status_t apr_pool_create_ex(apr_pool_t **newpool,\r
11596                                              apr_pool_t *parent,\r
11597                                              apr_abortfunc_t abort_fn,\r
11598                                              apr_allocator_t *allocator)\r
11599 {\r
11600     apr_pool_t *pool;\r
11601     apr_memnode_t *node;\r
11602 \r
11603     *newpool = ((void*)0);\r
11604 \r
11605     if (!parent)\r
11606         parent = global_pool;\r
11607 \r
11608 \r
11609 \r
11610 \r
11611 \r
11612     if (!abort_fn && parent)\r
11613         abort_fn = parent->abort_fn;\r
11614 \r
11615     if (allocator == ((void*)0))\r
11616         allocator = parent->allocator;\r
11617 \r
11618     if ((node = allocator_alloc(allocator,\r
11619                                 (2 * (1 << 12)) - (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
11620         if (abort_fn)\r
11621             abort_fn(12);\r
11622 \r
11623         return 12;\r
11624     }\r
11625 \r
11626     node->next = node;\r
11627     node->ref = &node->next;\r
11628 \r
11629     pool = (apr_pool_t *)node->first_avail;\r
11630     node->first_avail = pool->self_first_avail = (char *)pool + (((sizeof(apr_pool_t)) + ((8) - 1)) & ~((8) - 1));\r
11631 \r
11632     pool->allocator = allocator;\r
11633     pool->active = pool->self = node;\r
11634     pool->abort_fn = abort_fn;\r
11635     pool->child = ((void*)0);\r
11636     pool->cleanups = ((void*)0);\r
11637     pool->free_cleanups = ((void*)0);\r
11638     pool->pre_cleanups = ((void*)0);\r
11639     pool->subprocesses = ((void*)0);\r
11640     pool->user_data = ((void*)0);\r
11641     pool->tag = ((void*)0);\r
11642 \r
11643 \r
11644 \r
11645 \r
11646 \r
11647     if ((pool->parent = parent) != ((void*)0)) {\r
11648 \r
11649         apr_thread_mutex_t *mutex;\r
11650 \r
11651         if ((mutex = apr_allocator_mutex_get(parent->allocator)) != ((void*)0))\r
11652             apr_thread_mutex_lock(mutex);\r
11653 \r
11654 \r
11655         if ((pool->sibling = parent->child) != ((void*)0))\r
11656             pool->sibling->ref = &pool->sibling;\r
11657 \r
11658         parent->child = pool;\r
11659         pool->ref = &parent->child;\r
11660 \r
11661 \r
11662         if (mutex)\r
11663             apr_thread_mutex_unlock(mutex);\r
11664 \r
11665     }\r
11666     else {\r
11667         pool->sibling = ((void*)0);\r
11668         pool->ref = ((void*)0);\r
11669     }\r
11670 \r
11671     *newpool = pool;\r
11672 \r
11673     return 0;\r
11674 }\r
11675 \r
11676 \r
11677 \r
11678 apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool,\r
11679                                                   apr_abortfunc_t abort_fn,\r
11680                                                   apr_allocator_t *allocator)\r
11681 {\r
11682     return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
11683 }\r
11684 \r
11685 apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool,\r
11686                                                   apr_abortfunc_t abort_fn,\r
11687                                                   apr_allocator_t *allocator)\r
11688 {\r
11689     apr_pool_t *pool;\r
11690     apr_memnode_t *node;\r
11691     apr_allocator_t *pool_allocator;\r
11692 \r
11693     *newpool = ((void*)0);\r
11694 \r
11695     if (!apr_pools_initialized)\r
11696         return (20000 + 2);\r
11697     if ((pool_allocator = allocator) == ((void*)0)) {\r
11698         if ((pool_allocator = malloc((((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
11699             if (abort_fn)\r
11700                 abort_fn(12);\r
11701 \r
11702             return 12;\r
11703         }\r
11704         memset(pool_allocator, 0, (((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)));\r
11705         pool_allocator->max_free_index = 0;\r
11706     }\r
11707     if ((node = allocator_alloc(pool_allocator,\r
11708                                 (2 * (1 << 12)) - (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
11709         if (abort_fn)\r
11710             abort_fn(12);\r
11711 \r
11712         return 12;\r
11713     }\r
11714 \r
11715     node->next = node;\r
11716     node->ref = &node->next;\r
11717 \r
11718     pool = (apr_pool_t *)node->first_avail;\r
11719     node->first_avail = pool->self_first_avail = (char *)pool + (((sizeof(apr_pool_t)) + ((8) - 1)) & ~((8) - 1));\r
11720 \r
11721     pool->allocator = pool_allocator;\r
11722     pool->active = pool->self = node;\r
11723     pool->abort_fn = abort_fn;\r
11724     pool->child = ((void*)0);\r
11725     pool->cleanups = ((void*)0);\r
11726     pool->free_cleanups = ((void*)0);\r
11727     pool->pre_cleanups = ((void*)0);\r
11728     pool->subprocesses = ((void*)0);\r
11729     pool->user_data = ((void*)0);\r
11730     pool->tag = ((void*)0);\r
11731     pool->parent = ((void*)0);\r
11732     pool->sibling = ((void*)0);\r
11733     pool->ref = ((void*)0);\r
11734 \r
11735 \r
11736 \r
11737 \r
11738     if (!allocator)\r
11739         pool_allocator->owner = pool;\r
11740     *newpool = pool;\r
11741 \r
11742     return 0;\r
11743 }\r
11744 # 1036 "./../memory/unix/apr_pools.c"\r
11745 struct psprintf_data {\r
11746     apr_vformatter_buff_t vbuff;\r
11747     apr_memnode_t *node;\r
11748     apr_pool_t *pool;\r
11749     apr_byte_t got_a_new_node;\r
11750     apr_memnode_t *free;\r
11751 };\r
11752 \r
11753 \r
11754 \r
11755 static int psprintf_flush(apr_vformatter_buff_t *vbuff)\r
11756 {\r
11757     struct psprintf_data *ps = (struct psprintf_data *)vbuff;\r
11758     apr_memnode_t *node, *active;\r
11759     apr_size_t cur_len, size;\r
11760     char *strp;\r
11761     apr_pool_t *pool;\r
11762     apr_size_t free_index;\r
11763 \r
11764     pool = ps->pool;\r
11765     active = ps->node;\r
11766     strp = ps->vbuff.curpos;\r
11767     cur_len = strp - active->first_avail;\r
11768     size = cur_len << 1;\r
11769 \r
11770 \r
11771 \r
11772 \r
11773 \r
11774 \r
11775     if (size < 32)\r
11776         size = 32;\r
11777 \r
11778     node = active->next;\r
11779     if (!ps->got_a_new_node && size <= ((apr_size_t)(node->endp - node->first_avail))) {\r
11780 \r
11781         do { *node->ref = node->next; node->next->ref = node->ref; } while (0);\r
11782         do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
11783 \r
11784         node->free_index = 0;\r
11785 \r
11786         pool->active = node;\r
11787 \r
11788         free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
11789 \r
11790 \r
11791         active->free_index = (apr_uint32_t)free_index;\r
11792         node = active->next;\r
11793         if (free_index < node->free_index) {\r
11794             do {\r
11795                 node = node->next;\r
11796             }\r
11797             while (free_index < node->free_index);\r
11798 \r
11799             do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
11800             do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
11801         }\r
11802 \r
11803         node = pool->active;\r
11804     }\r
11805     else {\r
11806         if ((node = allocator_alloc(pool->allocator, size)) == ((void*)0))\r
11807             return -1;\r
11808 \r
11809         if (ps->got_a_new_node) {\r
11810             active->next = ps->free;\r
11811             ps->free = active;\r
11812         }\r
11813 \r
11814         ps->got_a_new_node = 1;\r
11815     }\r
11816 \r
11817     memcpy(node->first_avail, active->first_avail, cur_len);\r
11818 \r
11819     ps->node = node;\r
11820     ps->vbuff.curpos = node->first_avail + cur_len;\r
11821     ps->vbuff.endpos = node->endp - 1;\r
11822 \r
11823     return 0;\r
11824 }\r
11825 \r
11826 char * apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)\r
11827 {\r
11828     struct psprintf_data ps;\r
11829     char *strp;\r
11830     apr_size_t size;\r
11831     apr_memnode_t *active, *node;\r
11832     apr_size_t free_index;\r
11833 \r
11834     ps.node = active = pool->active;\r
11835     ps.pool = pool;\r
11836     ps.vbuff.curpos = ps.node->first_avail;\r
11837 \r
11838 \r
11839     ps.vbuff.endpos = ps.node->endp - 1;\r
11840     ps.got_a_new_node = 0;\r
11841     ps.free = ((void*)0);\r
11842 \r
11843 \r
11844 \r
11845 \r
11846     if (ps.node->first_avail == ps.node->endp) {\r
11847         if (psprintf_flush(&ps.vbuff) == -1) {\r
11848             if (pool->abort_fn) {\r
11849                 pool->abort_fn(12);\r
11850             }\r
11851 \r
11852             return ((void*)0);\r
11853         }\r
11854     }\r
11855 \r
11856     if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) {\r
11857         if (pool->abort_fn)\r
11858             pool->abort_fn(12);\r
11859 \r
11860         return ((void*)0);\r
11861     }\r
11862 \r
11863     strp = ps.vbuff.curpos;\r
11864     *strp++ = '\0';\r
11865 \r
11866     size = strp - ps.node->first_avail;\r
11867     size = (((size) + ((8) - 1)) & ~((8) - 1));\r
11868     strp = ps.node->first_avail;\r
11869     ps.node->first_avail += size;\r
11870 \r
11871     if (ps.free)\r
11872         allocator_free(pool->allocator, ps.free);\r
11873 \r
11874 \r
11875 \r
11876 \r
11877     if (!ps.got_a_new_node)\r
11878         return strp;\r
11879 \r
11880     active = pool->active;\r
11881     node = ps.node;\r
11882 \r
11883     node->free_index = 0;\r
11884 \r
11885     do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
11886 \r
11887     pool->active = node;\r
11888 \r
11889     free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
11890 \r
11891 \r
11892     active->free_index = (apr_uint32_t)free_index;\r
11893     node = active->next;\r
11894 \r
11895     if (free_index >= node->free_index)\r
11896         return strp;\r
11897 \r
11898     do {\r
11899         node = node->next;\r
11900     }\r
11901     while (free_index < node->free_index);\r
11902 \r
11903     do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
11904     do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
11905 \r
11906     return strp;\r
11907 }\r
11908 # 2049 "./../memory/unix/apr_pools.c"\r
11909 char * apr_psprintf(apr_pool_t *p, const char *fmt, ...)\r
11910 {\r
11911     va_list ap;\r
11912     char *res;\r
11913 \r
11914     __builtin_va_start(ap, fmt);\r
11915     res = apr_pvsprintf(p, fmt, ap);\r
11916     __builtin_va_end(ap);\r
11917     return res;\r
11918 }\r
11919 \r
11920 \r
11921 \r
11922 \r
11923 \r
11924 void apr_pool_abort_set(apr_abortfunc_t abort_fn,\r
11925                                      apr_pool_t *pool)\r
11926 {\r
11927     pool->abort_fn = abort_fn;\r
11928 }\r
11929 \r
11930 apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)\r
11931 {\r
11932     return pool->abort_fn;\r
11933 }\r
11934 \r
11935 apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)\r
11936 {\r
11937 \r
11938 \r
11939 \r
11940 \r
11941 \r
11942 \r
11943 \r
11944     return pool->parent;\r
11945 }\r
11946 \r
11947 apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)\r
11948 {\r
11949     return pool->allocator;\r
11950 }\r
11951 \r
11952 \r
11953 \r
11954 \r
11955 int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)\r
11956 {\r
11957     if (a == ((void*)0))\r
11958         return 1;\r
11959 # 2108 "./../memory/unix/apr_pools.c"\r
11960     while (b) {\r
11961         if (a == b)\r
11962             return 1;\r
11963 \r
11964         b = b->parent;\r
11965     }\r
11966 \r
11967     return 0;\r
11968 }\r
11969 \r
11970 void apr_pool_tag(apr_pool_t *pool, const char *tag)\r
11971 {\r
11972     pool->tag = tag;\r
11973 }\r
11974 \r
11975 \r
11976 \r
11977 \r
11978 \r
11979 \r
11980 apr_status_t apr_pool_userdata_set(const void *data, const char *key,\r
11981                                                 apr_status_t (*cleanup) (void *),\r
11982                                                 apr_pool_t *pool)\r
11983 {\r
11984 \r
11985 \r
11986 \r
11987 \r
11988     if (pool->user_data == ((void*)0))\r
11989         pool->user_data = apr_hash_make(pool);\r
11990 \r
11991     if (apr_hash_get(pool->user_data, key, (-1)) == ((void*)0)) {\r
11992         char *new_key = apr_pstrdup(pool, key);\r
11993         apr_hash_set(pool->user_data, new_key, (-1), data);\r
11994     }\r
11995     else {\r
11996         apr_hash_set(pool->user_data, key, (-1), data);\r
11997     }\r
11998 \r
11999     if (cleanup)\r
12000         apr_pool_cleanup_register(pool, data, cleanup, cleanup);\r
12001 \r
12002     return 0;\r
12003 }\r
12004 \r
12005 apr_status_t apr_pool_userdata_setn(const void *data,\r
12006                               const char *key,\r
12007                               apr_status_t (*cleanup)(void *),\r
12008                               apr_pool_t *pool)\r
12009 {\r
12010 \r
12011 \r
12012 \r
12013 \r
12014     if (pool->user_data == ((void*)0))\r
12015         pool->user_data = apr_hash_make(pool);\r
12016 \r
12017     apr_hash_set(pool->user_data, key, (-1), data);\r
12018 \r
12019     if (cleanup)\r
12020         apr_pool_cleanup_register(pool, data, cleanup, cleanup);\r
12021 \r
12022     return 0;\r
12023 }\r
12024 \r
12025 apr_status_t apr_pool_userdata_get(void **data, const char *key,\r
12026                                                 apr_pool_t *pool)\r
12027 {\r
12028 \r
12029 \r
12030 \r
12031 \r
12032     if (pool->user_data == ((void*)0)) {\r
12033         *data = ((void*)0);\r
12034     }\r
12035     else {\r
12036         *data = apr_hash_get(pool->user_data, key, (-1));\r
12037     }\r
12038 \r
12039     return 0;\r
12040 }\r
12041 \r
12042 \r
12043 \r
12044 \r
12045 \r
12046 \r
12047 struct cleanup_t {\r
12048     struct cleanup_t *next;\r
12049     const void *data;\r
12050     apr_status_t (*plain_cleanup_fn)(void *data);\r
12051     apr_status_t (*child_cleanup_fn)(void *data);\r
12052 };\r
12053 \r
12054 void apr_pool_cleanup_register(apr_pool_t *p, const void *data,\r
12055                       apr_status_t (*plain_cleanup_fn)(void *data),\r
12056                       apr_status_t (*child_cleanup_fn)(void *data))\r
12057 {\r
12058     cleanup_t *c;\r
12059 \r
12060 \r
12061 \r
12062 \r
12063 \r
12064     if (p != ((void*)0)) {\r
12065         if (p->free_cleanups) {\r
12066 \r
12067             c = p->free_cleanups;\r
12068             p->free_cleanups = c->next;\r
12069         } else {\r
12070             c = apr_palloc(p, sizeof(cleanup_t));\r
12071         }\r
12072         c->data = data;\r
12073         c->plain_cleanup_fn = plain_cleanup_fn;\r
12074         c->child_cleanup_fn = child_cleanup_fn;\r
12075         c->next = p->cleanups;\r
12076         p->cleanups = c;\r
12077     }\r
12078 }\r
12079 \r
12080 void apr_pool_pre_cleanup_register(apr_pool_t *p, const void *data,\r
12081                       apr_status_t (*plain_cleanup_fn)(void *data))\r
12082 {\r
12083     cleanup_t *c;\r
12084 \r
12085 \r
12086 \r
12087 \r
12088 \r
12089     if (p != ((void*)0)) {\r
12090         if (p->free_cleanups) {\r
12091 \r
12092             c = p->free_cleanups;\r
12093             p->free_cleanups = c->next;\r
12094         } else {\r
12095             c = apr_palloc(p, sizeof(cleanup_t));\r
12096         }\r
12097         c->data = data;\r
12098         c->plain_cleanup_fn = plain_cleanup_fn;\r
12099         c->next = p->pre_cleanups;\r
12100         p->pre_cleanups = c;\r
12101     }\r
12102 }\r
12103 \r
12104 void apr_pool_cleanup_kill(apr_pool_t *p, const void *data,\r
12105                       apr_status_t (*cleanup_fn)(void *))\r
12106 {\r
12107     cleanup_t *c, **lastp;\r
12108 \r
12109 \r
12110 \r
12111 \r
12112 \r
12113     if (p == ((void*)0))\r
12114         return;\r
12115 \r
12116     c = p->cleanups;\r
12117     lastp = &p->cleanups;\r
12118     while (c) {\r
12119 # 2276 "./../memory/unix/apr_pools.c"\r
12120         if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {\r
12121             *lastp = c->next;\r
12122 \r
12123             c->next = p->free_cleanups;\r
12124             p->free_cleanups = c;\r
12125             break;\r
12126         }\r
12127 \r
12128         lastp = &c->next;\r
12129         c = c->next;\r
12130     }\r
12131 \r
12132 \r
12133     c = p->pre_cleanups;\r
12134     lastp = &p->pre_cleanups;\r
12135     while (c) {\r
12136 # 2301 "./../memory/unix/apr_pools.c"\r
12137         if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {\r
12138             *lastp = c->next;\r
12139 \r
12140             c->next = p->free_cleanups;\r
12141             p->free_cleanups = c;\r
12142             break;\r
12143         }\r
12144 \r
12145         lastp = &c->next;\r
12146         c = c->next;\r
12147     }\r
12148 \r
12149 }\r
12150 \r
12151 void apr_pool_child_cleanup_set(apr_pool_t *p, const void *data,\r
12152                       apr_status_t (*plain_cleanup_fn)(void *),\r
12153                       apr_status_t (*child_cleanup_fn)(void *))\r
12154 {\r
12155     cleanup_t *c;\r
12156 \r
12157 \r
12158 \r
12159 \r
12160 \r
12161     if (p == ((void*)0))\r
12162         return;\r
12163 \r
12164     c = p->cleanups;\r
12165     while (c) {\r
12166         if (c->data == data && c->plain_cleanup_fn == plain_cleanup_fn) {\r
12167             c->child_cleanup_fn = child_cleanup_fn;\r
12168             break;\r
12169         }\r
12170 \r
12171         c = c->next;\r
12172     }\r
12173 }\r
12174 \r
12175 apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data,\r
12176                               apr_status_t (*cleanup_fn)(void *))\r
12177 {\r
12178     apr_pool_cleanup_kill(p, data, cleanup_fn);\r
12179     return (*cleanup_fn)(data);\r
12180 }\r
12181 \r
12182 static void run_cleanups(cleanup_t **cref)\r
12183 {\r
12184     cleanup_t *c = *cref;\r
12185 \r
12186     while (c) {\r
12187         *cref = c->next;\r
12188         (*c->plain_cleanup_fn)((void *)c->data);\r
12189         c = *cref;\r
12190     }\r
12191 }\r
12192 \r
12193 \r
12194 \r
12195 static void run_child_cleanups(cleanup_t **cref)\r
12196 {\r
12197     cleanup_t *c = *cref;\r
12198 \r
12199     while (c) {\r
12200         *cref = c->next;\r
12201         (*c->child_cleanup_fn)((void *)c->data);\r
12202         c = *cref;\r
12203     }\r
12204 }\r
12205 \r
12206 static void cleanup_pool_for_exec(apr_pool_t *p)\r
12207 {\r
12208     run_child_cleanups(&p->cleanups);\r
12209 \r
12210     for (p = p->child; p; p = p->sibling)\r
12211         cleanup_pool_for_exec(p);\r
12212 }\r
12213 \r
12214 void apr_pool_cleanup_for_exec(void)\r
12215 {\r
12216     cleanup_pool_for_exec(global_pool);\r
12217 }\r
12218 # 2402 "./../memory/unix/apr_pools.c"\r
12219 apr_status_t apr_pool_cleanup_null(void *data)\r
12220 {\r
12221 \r
12222     return 0;\r
12223 }\r
12224 # 2415 "./../memory/unix/apr_pools.c"\r
12225 void apr_pool_note_subprocess(apr_pool_t *pool, apr_proc_t *proc,\r
12226                                            apr_kill_conditions_e how)\r
12227 {\r
12228     struct process_chain *pc = apr_palloc(pool, sizeof(struct process_chain));\r
12229 \r
12230     pc->proc = proc;\r
12231     pc->kill_how = how;\r
12232     pc->next = pool->subprocesses;\r
12233     pool->subprocesses = pc;\r
12234 }\r
12235 \r
12236 static void free_proc_chain(struct process_chain *procs)\r
12237 {\r
12238 \r
12239 \r
12240 \r
12241 \r
12242     struct process_chain *pc;\r
12243     int need_timeout = 0;\r
12244     apr_time_t timeout_interval;\r
12245 \r
12246     if (!procs)\r
12247         return;\r
12248 # 2448 "./../memory/unix/apr_pools.c"\r
12249     for (pc = procs; pc; pc = pc->next) {\r
12250         if (apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_NOWAIT) != ((20000 + 50000) + 6))\r
12251             pc->kill_how = APR_KILL_NEVER;\r
12252     }\r
12253 \r
12254 \r
12255     for (pc = procs; pc; pc = pc->next) {\r
12256 \r
12257         if ((pc->kill_how == APR_KILL_AFTER_TIMEOUT)\r
12258             || (pc->kill_how == APR_KILL_ONLY_ONCE)) {\r
12259 \r
12260 \r
12261 \r
12262 \r
12263 \r
12264 \r
12265             if (apr_proc_kill(pc->proc, 15) == 0)\r
12266                 need_timeout = 1;\r
12267         }\r
12268         else if (pc->kill_how == APR_KILL_ALWAYS) {\r
12269 \r
12270 \r
12271 \r
12272 \r
12273 \r
12274             apr_proc_kill(pc->proc, 9);\r
12275         }\r
12276     }\r
12277 \r
12278 \r
12279 \r
12280 \r
12281 \r
12282     if (need_timeout) {\r
12283         timeout_interval = 46875;\r
12284         apr_sleep(timeout_interval);\r
12285 \r
12286         do {\r
12287 \r
12288             need_timeout = 0;\r
12289             for (pc = procs; pc; pc = pc->next) {\r
12290                 if (pc->kill_how == APR_KILL_AFTER_TIMEOUT) {\r
12291                     if (apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_NOWAIT)\r
12292                             == ((20000 + 50000) + 6))\r
12293                         need_timeout = 1;\r
12294                     else\r
12295                         pc->kill_how = APR_KILL_NEVER;\r
12296                 }\r
12297             }\r
12298             if (need_timeout) {\r
12299                 if (timeout_interval >= 3000000) {\r
12300                     break;\r
12301                 }\r
12302                 apr_sleep(timeout_interval);\r
12303                 timeout_interval *= 2;\r
12304             }\r
12305         } while (need_timeout);\r
12306     }\r
12307 \r
12308 \r
12309 \r
12310 \r
12311 \r
12312     for (pc = procs; pc; pc = pc->next) {\r
12313         if (pc->kill_how == APR_KILL_AFTER_TIMEOUT)\r
12314             apr_proc_kill(pc->proc, 9);\r
12315     }\r
12316 \r
12317 \r
12318     for (pc = procs; pc; pc = pc->next) {\r
12319         if (pc->kill_how != APR_KILL_NEVER)\r
12320             (void)apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_WAIT);\r
12321     }\r
12322 }\r
12323 # 2530 "./../memory/unix/apr_pools.c"\r
12324 void * apr_palloc_debug(apr_pool_t *pool, apr_size_t size,\r
12325                                      const char *file_line)\r
12326 {\r
12327     return apr_palloc(pool, size);\r
12328 }\r
12329 \r
12330 void * apr_pcalloc_debug(apr_pool_t *pool, apr_size_t size,\r
12331                                       const char *file_line)\r
12332 {\r
12333     return apr_pcalloc(pool, size);\r
12334 }\r
12335 \r
12336 void apr_pool_clear_debug(apr_pool_t *pool,\r
12337                                        const char *file_line)\r
12338 {\r
12339     apr_pool_clear(pool);\r
12340 }\r
12341 \r
12342 void apr_pool_destroy_debug(apr_pool_t *pool,\r
12343                                          const char *file_line)\r
12344 {\r
12345     apr_pool_destroy(pool);\r
12346 }\r
12347 \r
12348 apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool,\r
12349                                                    apr_pool_t *parent,\r
12350                                                    apr_abortfunc_t abort_fn,\r
12351                                                    apr_allocator_t *allocator,\r
12352                                                    const char *file_line)\r
12353 {\r
12354     return apr_pool_create_ex(newpool, parent, abort_fn, allocator);\r
12355 }\r
12356 \r
12357 apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool,\r
12358                                                    apr_abortfunc_t abort_fn,\r
12359                                                    apr_allocator_t *allocator,\r
12360                                                    const char *file_line)\r
12361 {\r
12362     return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
12363 }\r
12364 \r
12365 apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,\r
12366                                                    apr_abortfunc_t abort_fn,\r
12367                                                    apr_allocator_t *allocator,\r
12368                                                    const char *file_line)\r
12369 {\r
12370     return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
12371 }\r
12372 # 14 "main2.c" 2\r
12373 # 1 "./../misc/unix/start.c" 1\r
12374 # 20 "./../misc/unix/start.c"\r
12375 # 1 "../include/apr_signal.h" 1\r
12376 # 57 "../include/apr_signal.h"\r
12377 typedef void apr_sigfunc_t(int);\r
12378 \r
12379 \r
12380 \r
12381 \r
12382 \r
12383 \r
12384 apr_sigfunc_t * apr_signal(int signo, apr_sigfunc_t * func);\r
12385 # 80 "../include/apr_signal.h"\r
12386 const char * apr_signal_description_get(int signum);\r
12387 \r
12388 \r
12389 \r
12390 \r
12391 \r
12392 \r
12393 void apr_signal_init(apr_pool_t *pglobal);\r
12394 \r
12395 \r
12396 \r
12397 \r
12398 \r
12399 \r
12400 apr_status_t apr_signal_block(int signum);\r
12401 \r
12402 \r
12403 \r
12404 \r
12405 \r
12406 \r
12407 apr_status_t apr_signal_unblock(int signum);\r
12408 # 21 "./../misc/unix/start.c" 2\r
12409 \r
12410 \r
12411 \r
12412 # 1 "../include/arch/unix/apr_arch_internal_time.h" 1\r
12413 # 22 "../include/arch/unix/apr_arch_internal_time.h"\r
12414 void apr_unix_setup_time(void);\r
12415 # 25 "./../misc/unix/start.c" 2\r
12416 \r
12417 \r
12418 apr_status_t apr_app_initialize(int *argc,\r
12419                                              const char * const * *argv,\r
12420                                              const char * const * *env)\r
12421 {\r
12422 \r
12423 \r
12424 \r
12425 \r
12426 \r
12427     return apr_initialize();\r
12428 }\r
12429 \r
12430 static int initialized = 0;\r
12431 \r
12432 apr_status_t apr_initialize(void)\r
12433 {\r
12434     apr_pool_t *pool;\r
12435     apr_status_t status;\r
12436 \r
12437     if (initialized++) {\r
12438         return 0;\r
12439     }\r
12440 \r
12441 \r
12442     apr_proc_mutex_unix_setup_lock();\r
12443     apr_unix_setup_time();\r
12444 \r
12445 \r
12446     if ((status = apr_pool_initialize()) != 0)\r
12447         return status;\r
12448 \r
12449     if (apr_pool_create_ex(&pool, ((void*)0), ((void*)0), ((void*)0)) != 0) {\r
12450         return (20000 + 2);\r
12451     }\r
12452 \r
12453     apr_pool_tag(pool, "apr_initialize");\r
12454 # 71 "./../misc/unix/start.c"\r
12455     apr_signal_init(pool);\r
12456 \r
12457     return 0;\r
12458 }\r
12459 \r
12460 void apr_terminate(void)\r
12461 {\r
12462     initialized--;\r
12463     if (initialized) {\r
12464         return;\r
12465     }\r
12466     apr_pool_terminate();\r
12467 \r
12468 }\r
12469 \r
12470 void apr_terminate2(void)\r
12471 {\r
12472     apr_terminate();\r
12473 }\r
12474 # 15 "main2.c" 2\r
12475 # 1 "./../time/unix/time.c" 1\r
12476 # 43 "./../time/unix/time.c"\r
12477 static apr_int32_t get_offset(struct tm *tm)\r
12478 {\r
12479 \r
12480     return tm->tm_gmtoff;\r
12481 # 64 "./../time/unix/time.c"\r
12482 }\r
12483 \r
12484 apr_status_t apr_time_ansi_put(apr_time_t *result,\r
12485                                             time_t input)\r
12486 {\r
12487     *result = (apr_time_t)input * 1000000L;\r
12488     return 0;\r
12489 }\r
12490 \r
12491 \r
12492 apr_time_t apr_time_now(void)\r
12493 {\r
12494     struct timeval tv;\r
12495     gettimeofday(&tv, ((void*)0));\r
12496     return tv.tv_sec * 1000000L + tv.tv_usec;\r
12497 }\r
12498 \r
12499 static void explode_time(apr_time_exp_t *xt, apr_time_t t,\r
12500                          apr_int32_t offset, int use_localtime)\r
12501 {\r
12502     struct tm tm;\r
12503     time_t tt = (t / 1000000L) + offset;\r
12504     xt->tm_usec = t % 1000000L;\r
12505 \r
12506 \r
12507     if (use_localtime)\r
12508         localtime_r(&tt, &tm);\r
12509     else\r
12510         gmtime_r(&tt, &tm);\r
12511 \r
12512 \r
12513 \r
12514 \r
12515 \r
12516 \r
12517 \r
12518     xt->tm_sec = tm.tm_sec;\r
12519     xt->tm_min = tm.tm_min;\r
12520     xt->tm_hour = tm.tm_hour;\r
12521     xt->tm_mday = tm.tm_mday;\r
12522     xt->tm_mon = tm.tm_mon;\r
12523     xt->tm_year = tm.tm_year;\r
12524     xt->tm_wday = tm.tm_wday;\r
12525     xt->tm_yday = tm.tm_yday;\r
12526     xt->tm_isdst = tm.tm_isdst;\r
12527     xt->tm_gmtoff = get_offset(&tm);\r
12528 }\r
12529 \r
12530 apr_status_t apr_time_exp_tz(apr_time_exp_t *result,\r
12531                                           apr_time_t input, apr_int32_t offs)\r
12532 {\r
12533     explode_time(result, input, offs, 0);\r
12534     result->tm_gmtoff = offs;\r
12535     return 0;\r
12536 }\r
12537 \r
12538 apr_status_t apr_time_exp_gmt(apr_time_exp_t *result,\r
12539                                            apr_time_t input)\r
12540 {\r
12541     return apr_time_exp_tz(result, input, 0);\r
12542 }\r
12543 \r
12544 apr_status_t apr_time_exp_lt(apr_time_exp_t *result,\r
12545                                                 apr_time_t input)\r
12546 {\r
12547 \r
12548 \r
12549 \r
12550 \r
12551     explode_time(result, input, 0, 1);\r
12552     return 0;\r
12553 \r
12554 }\r
12555 \r
12556 apr_status_t apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt)\r
12557 {\r
12558     apr_time_t year = xt->tm_year;\r
12559     apr_time_t days;\r
12560     static const int dayoffset[12] =\r
12561     {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};\r
12562 \r
12563 \r
12564 \r
12565     if (xt->tm_mon < 2)\r
12566         year--;\r
12567 \r
12568 \r
12569 \r
12570     days = year * 365 + year / 4 - year / 100 + (year / 100 + 3) / 4;\r
12571     days += dayoffset[xt->tm_mon] + xt->tm_mday - 1;\r
12572     days -= 25508;\r
12573     days = ((days * 24 + xt->tm_hour) * 60 + xt->tm_min) * 60 + xt->tm_sec;\r
12574 \r
12575     if (days < 0) {\r
12576         return (20000 + 4);\r
12577     }\r
12578     *t = days * 1000000L + xt->tm_usec;\r
12579     return 0;\r
12580 }\r
12581 \r
12582 apr_status_t apr_time_exp_gmt_get(apr_time_t *t,\r
12583                                                apr_time_exp_t *xt)\r
12584 {\r
12585     apr_status_t status = apr_time_exp_get(t, xt);\r
12586     if (status == 0)\r
12587         *t -= (apr_time_t) xt->tm_gmtoff * 1000000L;\r
12588     return status;\r
12589 }\r
12590 \r
12591 apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime,\r
12592                                               apr_time_t *aprtime)\r
12593 {\r
12594     (*ostime)->tv_usec = *aprtime % 1000000L;\r
12595     (*ostime)->tv_sec = *aprtime / 1000000L;\r
12596     return 0;\r
12597 }\r
12598 \r
12599 apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,\r
12600                                               apr_time_exp_t *aprtime)\r
12601 {\r
12602     (*ostime)->tm_sec = aprtime->tm_sec;\r
12603     (*ostime)->tm_min = aprtime->tm_min;\r
12604     (*ostime)->tm_hour = aprtime->tm_hour;\r
12605     (*ostime)->tm_mday = aprtime->tm_mday;\r
12606     (*ostime)->tm_mon = aprtime->tm_mon;\r
12607     (*ostime)->tm_year = aprtime->tm_year;\r
12608     (*ostime)->tm_wday = aprtime->tm_wday;\r
12609     (*ostime)->tm_yday = aprtime->tm_yday;\r
12610     (*ostime)->tm_isdst = aprtime->tm_isdst;\r
12611 \r
12612 \r
12613     (*ostime)->tm_gmtoff = aprtime->tm_gmtoff;\r
12614 \r
12615 \r
12616 \r
12617 \r
12618     return 0;\r
12619 }\r
12620 \r
12621 apr_status_t apr_os_imp_time_put(apr_time_t *aprtime,\r
12622                                               apr_os_imp_time_t **ostime,\r
12623                                               apr_pool_t *cont)\r
12624 {\r
12625     *aprtime = (*ostime)->tv_sec * 1000000L + (*ostime)->tv_usec;\r
12626     return 0;\r
12627 }\r
12628 \r
12629 apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime,\r
12630                                               apr_os_exp_time_t **ostime,\r
12631                                               apr_pool_t *cont)\r
12632 {\r
12633     aprtime->tm_sec = (*ostime)->tm_sec;\r
12634     aprtime->tm_min = (*ostime)->tm_min;\r
12635     aprtime->tm_hour = (*ostime)->tm_hour;\r
12636     aprtime->tm_mday = (*ostime)->tm_mday;\r
12637     aprtime->tm_mon = (*ostime)->tm_mon;\r
12638     aprtime->tm_year = (*ostime)->tm_year;\r
12639     aprtime->tm_wday = (*ostime)->tm_wday;\r
12640     aprtime->tm_yday = (*ostime)->tm_yday;\r
12641     aprtime->tm_isdst = (*ostime)->tm_isdst;\r
12642 \r
12643 \r
12644     aprtime->tm_gmtoff = (*ostime)->tm_gmtoff;\r
12645 \r
12646 \r
12647 \r
12648 \r
12649     return 0;\r
12650 }\r
12651 \r
12652 void apr_sleep(apr_interval_time_t t)\r
12653 {\r
12654 \r
12655 \r
12656 \r
12657 \r
12658 \r
12659 \r
12660 \r
12661     struct timeval tv;\r
12662     tv.tv_usec = t % 1000000L;\r
12663     tv.tv_sec = t / 1000000L;\r
12664     select(0, ((void*)0), ((void*)0), ((void*)0), &tv);\r
12665 \r
12666 }\r
12667 # 296 "./../time/unix/time.c"\r
12668 void apr_unix_setup_time(void)\r
12669 {\r
12670 # 339 "./../time/unix/time.c"\r
12671 }\r
12672 \r
12673 \r
12674 \r
12675 \r
12676 void apr_time_clock_hires(apr_pool_t *p)\r
12677 {\r
12678     return;\r
12679 }\r
12680 # 16 "main2.c" 2\r
12681 # 1 "./../atomic/unix/builtins.c" 1\r
12682 # 17 "./../atomic/unix/builtins.c"\r
12683 # 1 "../include/arch/unix/apr_arch_atomic.h" 1\r
12684 # 18 "./../atomic/unix/builtins.c" 2\r
12685 \r
12686 \r
12687 \r
12688 apr_status_t apr_atomic_init(apr_pool_t *p)\r
12689 {\r
12690     return 0;\r
12691 }\r
12692 \r
12693 apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem)\r
12694 {\r
12695     return *mem;\r
12696 }\r
12697 \r
12698 void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
12699 {\r
12700     *mem = val;\r
12701 }\r
12702 \r
12703 apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
12704 {\r
12705     return __sync_fetch_and_add(mem, val);\r
12706 }\r
12707 \r
12708 void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
12709 {\r
12710     __sync_fetch_and_sub(mem, val);\r
12711 }\r
12712 \r
12713 apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)\r
12714 {\r
12715     return __sync_fetch_and_add(mem, 1);\r
12716 }\r
12717 \r
12718 int apr_atomic_dec32(volatile apr_uint32_t *mem)\r
12719 {\r
12720     return __sync_sub_and_fetch(mem, 1);\r
12721 }\r
12722 \r
12723 apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,\r
12724                                            apr_uint32_t cmp)\r
12725 {\r
12726     return __sync_val_compare_and_swap(mem, cmp, with);\r
12727 }\r
12728 \r
12729 apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
12730 {\r
12731     __sync_synchronize();\r
12732 \r
12733     return __sync_lock_test_and_set(mem, val);\r
12734 }\r
12735 \r
12736 void* apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)\r
12737 {\r
12738     return (void*) __sync_val_compare_and_swap(mem, cmp, with);\r
12739 }\r
12740 \r
12741 void* apr_atomic_xchgptr(volatile void **mem, void *with)\r
12742 {\r
12743     __sync_synchronize();\r
12744 \r
12745     return (void*) __sync_lock_test_and_set(mem, with);\r
12746 }\r
12747 # 17 "main2.c" 2\r
12748 # 1 "./../threadproc/unix/signals.c" 1\r
12749 # 18 "./../threadproc/unix/signals.c"\r
12750 # 1 "../include/arch/unix/apr_arch_threadproc.h" 1\r
12751 # 55 "../include/arch/unix/apr_arch_threadproc.h"\r
12752 struct apr_thread_t {\r
12753     apr_pool_t *pool;\r
12754     pthread_t *td;\r
12755     void *data;\r
12756     apr_thread_start_t func;\r
12757     apr_status_t exitval;\r
12758 };\r
12759 \r
12760 struct apr_threadattr_t {\r
12761     apr_pool_t *pool;\r
12762     pthread_attr_t attr;\r
12763 };\r
12764 \r
12765 struct apr_threadkey_t {\r
12766     apr_pool_t *pool;\r
12767     pthread_key_t key;\r
12768 };\r
12769 \r
12770 struct apr_thread_once_t {\r
12771     pthread_once_t once;\r
12772 };\r
12773 \r
12774 \r
12775 \r
12776 struct apr_procattr_t {\r
12777     apr_pool_t *pool;\r
12778     apr_file_t *parent_in;\r
12779     apr_file_t *child_in;\r
12780     apr_file_t *parent_out;\r
12781     apr_file_t *child_out;\r
12782     apr_file_t *parent_err;\r
12783     apr_file_t *child_err;\r
12784     char *currdir;\r
12785     apr_int32_t cmdtype;\r
12786     apr_int32_t detached;\r
12787 \r
12788     struct rlimit *limit_cpu;\r
12789 \r
12790 \r
12791     struct rlimit *limit_mem;\r
12792 \r
12793 \r
12794     struct rlimit *limit_nproc;\r
12795 \r
12796 \r
12797     struct rlimit *limit_nofile;\r
12798 \r
12799     apr_child_errfn_t *errfn;\r
12800     apr_int32_t errchk;\r
12801     apr_uid_t uid;\r
12802     apr_gid_t gid;\r
12803 };\r
12804 # 19 "./../threadproc/unix/signals.c" 2\r
12805 \r
12806 \r
12807 \r
12808 \r
12809 \r
12810 # 1 "/usr/include/assert.h" 1 3 4\r
12811 # 69 "/usr/include/assert.h" 3 4\r
12812 extern void __assert_fail (const char *__assertion, const char *__file,\r
12813       unsigned int __line, const char *__function)\r
12814      __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
12815 \r
12816 \r
12817 extern void __assert_perror_fail (int __errnum, const char *__file,\r
12818       unsigned int __line, const char *__function)\r
12819      __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
12820 \r
12821 \r
12822 \r
12823 \r
12824 extern void __assert (const char *__assertion, const char *__file, int __line)\r
12825      __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\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 # 18 "main2.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 # 19 "main2.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 # 20 "main2.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_2(abts_case *tc, void *data)\r
13784 {\r
13785     apr_thread_t *t2[2];\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\"", "main2.c", 45, __PRETTY_FUNCTION__));\r
13795 \r
13796     for (i = 0; i < 2; i++) {\r
13797         apr_status_t r2;\r
13798         r2 = apr_thread_create(&t2[i], ((void*)0), thread_func_atomic, ((void*)0), p);\r
13799         ((!r2 && "Failed creating threads") ? (void) (0) : __assert_fail ("!r2 && \"Failed creating threads\"", "main2.c", 50, __PRETTY_FUNCTION__));\r
13800     }\r
13801 \r
13802     for (i = 0; i < 2; i++) {\r
13803         apr_status_t s2;\r
13804         apr_thread_join(&s2, t2[i]);\r
13805 \r
13806         ((s2 == exit_ret_val && "Invalid return value from thread_join") ? (void) (0) : __assert_fail ("s2 == exit_ret_val && \"Invalid return value from thread_join\"", "main2.c", 58, __PRETTY_FUNCTION__));\r
13807 \r
13808     }\r
13809 \r
13810     abts_int_equal(tc, 2 * 1, apr_atomic_read32(&atomic_ops), 62);\r
13811 \r
13812 \r
13813     rv = apr_thread_mutex_destroy(thread_lock);\r
13814     ((rv == 0 && "Failed creating threads") ? (void) (0) : __assert_fail ("rv == 0 && \"Failed creating threads\"", "main2.c", 65, __PRETTY_FUNCTION__));\r
13815 }\r
13816 \r
13817 int main(int argc, char *argv[]){\r
13818 \r
13819   initialize();\r
13820 \r
13821   abts_case tc;\r
13822   tc.failed = 0;\r
13823   tc.suite = ((void*)0);\r
13824   test_atomics_threaded_2(&tc,((void*)0));\r
13825 \r
13826   return 0;\r
13827 }\r