1 /* Adapted from the sources of the Apache Portable Runtime library version 1.5.1:
\r
2 * https://apr.apache.org/
\r
10 # 1 "<command line>" 1
\r
14 # 1 "/usr/include/assert.h" 1 3 4
\r
15 # 35 "/usr/include/assert.h" 3 4
\r
16 # 1 "/usr/include/features.h" 1 3 4
\r
17 # 352 "/usr/include/features.h" 3 4
\r
18 # 1 "/usr/include/stdc-predef.h" 1 3 4
\r
19 # 353 "/usr/include/features.h" 2 3 4
\r
20 # 374 "/usr/include/features.h" 3 4
\r
21 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4
\r
22 # 385 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4
\r
23 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
24 # 386 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
\r
25 # 375 "/usr/include/features.h" 2 3 4
\r
26 # 398 "/usr/include/features.h" 3 4
\r
27 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4
\r
28 # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4
\r
29 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4
\r
30 # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4
\r
31 # 399 "/usr/include/features.h" 2 3 4
\r
32 # 36 "/usr/include/assert.h" 2 3 4
\r
33 # 69 "/usr/include/assert.h" 3 4
\r
34 extern void __assert_fail (const char *__assertion, const char *__file,
\r
35 unsigned int __line, const char *__function)
\r
36 __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
\r
39 extern void __assert_perror_fail (int __errnum, const char *__file,
\r
40 unsigned int __line, const char *__function)
\r
41 __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
\r
46 extern void __assert (const char *__assertion, const char *__file, int __line)
\r
47 __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
\r
53 # 1 "./../test/abts.h" 1
\r
54 # 21 "./../test/abts.h"
\r
55 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 1 3
\r
56 # 30 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 3
\r
57 typedef __builtin_va_list va_list;
\r
58 # 50 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 3
\r
59 typedef __builtin_va_list __gnuc_va_list;
\r
60 # 22 "./../test/abts.h" 2
\r
61 # 1 "/usr/include/stdio.h" 1 3 4
\r
62 # 33 "/usr/include/stdio.h" 3 4
\r
63 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
64 # 58 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 3 4
\r
65 typedef long unsigned int size_t;
\r
66 # 34 "/usr/include/stdio.h" 2 3 4
\r
68 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4
\r
69 # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
\r
70 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
71 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
\r
74 typedef unsigned char __u_char;
\r
75 typedef unsigned short int __u_short;
\r
76 typedef unsigned int __u_int;
\r
77 typedef unsigned long int __u_long;
\r
80 typedef signed char __int8_t;
\r
81 typedef unsigned char __uint8_t;
\r
82 typedef signed short int __int16_t;
\r
83 typedef unsigned short int __uint16_t;
\r
84 typedef signed int __int32_t;
\r
85 typedef unsigned int __uint32_t;
\r
87 typedef signed long int __int64_t;
\r
88 typedef unsigned long int __uint64_t;
\r
96 typedef long int __quad_t;
\r
97 typedef unsigned long int __u_quad_t;
\r
98 # 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
\r
99 # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4
\r
100 # 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
\r
103 typedef unsigned long int __dev_t;
\r
104 typedef unsigned int __uid_t;
\r
105 typedef unsigned int __gid_t;
\r
106 typedef unsigned long int __ino_t;
\r
107 typedef unsigned long int __ino64_t;
\r
108 typedef unsigned int __mode_t;
\r
109 typedef unsigned long int __nlink_t;
\r
110 typedef long int __off_t;
\r
111 typedef long int __off64_t;
\r
112 typedef int __pid_t;
\r
113 typedef struct { int __val[2]; } __fsid_t;
\r
114 typedef long int __clock_t;
\r
115 typedef unsigned long int __rlim_t;
\r
116 typedef unsigned long int __rlim64_t;
\r
117 typedef unsigned int __id_t;
\r
118 typedef long int __time_t;
\r
119 typedef unsigned int __useconds_t;
\r
120 typedef long int __suseconds_t;
\r
122 typedef int __daddr_t;
\r
123 typedef int __key_t;
\r
126 typedef int __clockid_t;
\r
129 typedef void * __timer_t;
\r
132 typedef long int __blksize_t;
\r
137 typedef long int __blkcnt_t;
\r
138 typedef long int __blkcnt64_t;
\r
141 typedef unsigned long int __fsblkcnt_t;
\r
142 typedef unsigned long int __fsblkcnt64_t;
\r
145 typedef unsigned long int __fsfilcnt_t;
\r
146 typedef unsigned long int __fsfilcnt64_t;
\r
149 typedef long int __fsword_t;
\r
151 typedef long int __ssize_t;
\r
154 typedef long int __syscall_slong_t;
\r
156 typedef unsigned long int __syscall_ulong_t;
\r
160 typedef __off64_t __loff_t;
\r
161 typedef __quad_t *__qaddr_t;
\r
162 typedef char *__caddr_t;
\r
165 typedef long int __intptr_t;
\r
168 typedef unsigned int __socklen_t;
\r
169 # 36 "/usr/include/stdio.h" 2 3 4
\r
182 typedef struct _IO_FILE FILE;
\r
183 # 64 "/usr/include/stdio.h" 3 4
\r
184 typedef struct _IO_FILE __FILE;
\r
185 # 74 "/usr/include/stdio.h" 3 4
\r
186 # 1 "/usr/include/libio.h" 1 3 4
\r
187 # 31 "/usr/include/libio.h" 3 4
\r
188 # 1 "/usr/include/_G_config.h" 1 3 4
\r
189 # 15 "/usr/include/_G_config.h" 3 4
\r
190 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
191 # 16 "/usr/include/_G_config.h" 2 3 4
\r
196 # 1 "/usr/include/wchar.h" 1 3 4
\r
197 # 82 "/usr/include/wchar.h" 3 4
\r
204 unsigned int __wch;
\r
211 # 21 "/usr/include/_G_config.h" 2 3 4
\r
215 __mbstate_t __state;
\r
220 __mbstate_t __state;
\r
222 # 32 "/usr/include/libio.h" 2 3 4
\r
223 # 144 "/usr/include/libio.h" 3 4
\r
224 struct _IO_jump_t; struct _IO_FILE;
\r
225 # 154 "/usr/include/libio.h" 3 4
\r
226 typedef void _IO_lock_t;
\r
232 struct _IO_marker {
\r
233 struct _IO_marker *_next;
\r
234 struct _IO_FILE *_sbuf;
\r
239 # 177 "/usr/include/libio.h" 3 4
\r
243 enum __codecvt_result
\r
250 # 245 "/usr/include/libio.h" 3 4
\r
257 char* _IO_read_ptr;
\r
258 char* _IO_read_end;
\r
259 char* _IO_read_base;
\r
260 char* _IO_write_base;
\r
261 char* _IO_write_ptr;
\r
262 char* _IO_write_end;
\r
263 char* _IO_buf_base;
\r
266 char *_IO_save_base;
\r
267 char *_IO_backup_base;
\r
268 char *_IO_save_end;
\r
270 struct _IO_marker *_markers;
\r
272 struct _IO_FILE *_chain;
\r
280 __off_t _old_offset;
\r
284 unsigned short _cur_column;
\r
285 signed char _vtable_offset;
\r
291 # 293 "/usr/include/libio.h" 3 4
\r
293 # 302 "/usr/include/libio.h" 3 4
\r
302 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
\r
307 typedef struct _IO_FILE _IO_FILE;
\r
310 struct _IO_FILE_plus;
\r
312 extern struct _IO_FILE_plus _IO_2_1_stdin_;
\r
313 extern struct _IO_FILE_plus _IO_2_1_stdout_;
\r
314 extern struct _IO_FILE_plus _IO_2_1_stderr_;
\r
315 # 338 "/usr/include/libio.h" 3 4
\r
316 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
\r
324 typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,
\r
333 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
\r
336 typedef int __io_close_fn (void *__cookie);
\r
337 # 390 "/usr/include/libio.h" 3 4
\r
338 extern int __underflow (_IO_FILE *);
\r
339 extern int __uflow (_IO_FILE *);
\r
340 extern int __overflow (_IO_FILE *, int);
\r
341 # 434 "/usr/include/libio.h" 3 4
\r
342 extern int _IO_getc (_IO_FILE *__fp);
\r
343 extern int _IO_putc (int __c, _IO_FILE *__fp);
\r
344 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ ));
\r
345 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ ));
\r
347 extern int _IO_peekc_locked (_IO_FILE *__fp);
\r
353 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));
\r
354 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));
\r
355 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));
\r
356 # 464 "/usr/include/libio.h" 3 4
\r
357 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
\r
358 __gnuc_va_list, int *__restrict);
\r
359 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
\r
361 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
\r
362 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
\r
364 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
\r
365 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
\r
367 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ ));
\r
368 # 75 "/usr/include/stdio.h" 2 3 4
\r
373 typedef __gnuc_va_list va_list;
\r
374 # 90 "/usr/include/stdio.h" 3 4
\r
375 typedef __off_t off_t;
\r
376 # 102 "/usr/include/stdio.h" 3 4
\r
377 typedef __ssize_t ssize_t;
\r
385 typedef _G_fpos_t fpos_t;
\r
386 # 164 "/usr/include/stdio.h" 3 4
\r
387 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4
\r
388 # 165 "/usr/include/stdio.h" 2 3 4
\r
392 extern struct _IO_FILE *stdin;
\r
393 extern struct _IO_FILE *stdout;
\r
394 extern struct _IO_FILE *stderr;
\r
402 extern int remove (const char *__filename) __attribute__ ((__nothrow__ ));
\r
404 extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ ));
\r
409 extern int renameat (int __oldfd, const char *__old, int __newfd,
\r
410 const char *__new) __attribute__ ((__nothrow__ ));
\r
411 # 195 "/usr/include/stdio.h" 3 4
\r
412 extern FILE *tmpfile (void) ;
\r
413 # 209 "/usr/include/stdio.h" 3 4
\r
414 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ )) ;
\r
420 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ )) ;
\r
421 # 227 "/usr/include/stdio.h" 3 4
\r
422 extern char *tempnam (const char *__dir, const char *__pfx)
\r
423 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;
\r
424 # 237 "/usr/include/stdio.h" 3 4
\r
425 extern int fclose (FILE *__stream);
\r
430 extern int fflush (FILE *__stream);
\r
431 # 252 "/usr/include/stdio.h" 3 4
\r
432 extern int fflush_unlocked (FILE *__stream);
\r
433 # 272 "/usr/include/stdio.h" 3 4
\r
434 extern FILE *fopen (const char *__restrict __filename,
\r
435 const char *__restrict __modes) ;
\r
440 extern FILE *freopen (const char *__restrict __filename,
\r
441 const char *__restrict __modes,
\r
442 FILE *__restrict __stream) ;
\r
443 # 306 "/usr/include/stdio.h" 3 4
\r
444 extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ )) ;
\r
445 # 319 "/usr/include/stdio.h" 3 4
\r
446 extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
\r
447 __attribute__ ((__nothrow__ )) ;
\r
452 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ )) ;
\r
459 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ ));
\r
463 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
\r
464 int __modes, size_t __n) __attribute__ ((__nothrow__ ));
\r
470 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
\r
471 size_t __size) __attribute__ ((__nothrow__ ));
\r
474 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ ));
\r
475 # 356 "/usr/include/stdio.h" 3 4
\r
476 extern int fprintf (FILE *__restrict __stream,
\r
477 const char *__restrict __format, ...);
\r
482 extern int printf (const char *__restrict __format, ...);
\r
484 extern int sprintf (char *__restrict __s,
\r
485 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
\r
491 extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
\r
492 __gnuc_va_list __arg);
\r
497 extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
\r
499 extern int vsprintf (char *__restrict __s, const char *__restrict __format,
\r
500 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
\r
506 extern int snprintf (char *__restrict __s, size_t __maxlen,
\r
507 const char *__restrict __format, ...)
\r
508 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
\r
510 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
\r
511 const char *__restrict __format, __gnuc_va_list __arg)
\r
512 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
\r
513 # 412 "/usr/include/stdio.h" 3 4
\r
514 extern int vdprintf (int __fd, const char *__restrict __fmt,
\r
515 __gnuc_va_list __arg)
\r
516 __attribute__ ((__format__ (__printf__, 2, 0)));
\r
517 extern int dprintf (int __fd, const char *__restrict __fmt, ...)
\r
518 __attribute__ ((__format__ (__printf__, 2, 3)));
\r
519 # 425 "/usr/include/stdio.h" 3 4
\r
520 extern int fscanf (FILE *__restrict __stream,
\r
521 const char *__restrict __format, ...) ;
\r
526 extern int scanf (const char *__restrict __format, ...) ;
\r
528 extern int sscanf (const char *__restrict __s,
\r
529 const char *__restrict __format, ...) __attribute__ ((__nothrow__ ));
\r
530 # 443 "/usr/include/stdio.h" 3 4
\r
531 extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") ;
\r
534 extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") ;
\r
536 extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ ));
\r
537 # 471 "/usr/include/stdio.h" 3 4
\r
538 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
\r
539 __gnuc_va_list __arg)
\r
540 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
\r
546 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
\r
547 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
\r
550 extern int vsscanf (const char *__restrict __s,
\r
551 const char *__restrict __format, __gnuc_va_list __arg)
\r
552 __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__scanf__, 2, 0)));
\r
553 # 494 "/usr/include/stdio.h" 3 4
\r
554 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
\r
558 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
\r
559 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
\r
561 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
\r
562 extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ ))
\r
566 __attribute__ ((__format__ (__scanf__, 2, 0)));
\r
567 # 531 "/usr/include/stdio.h" 3 4
\r
568 extern int fgetc (FILE *__stream);
\r
569 extern int getc (FILE *__stream);
\r
575 extern int getchar (void);
\r
576 # 550 "/usr/include/stdio.h" 3 4
\r
577 extern int getc_unlocked (FILE *__stream);
\r
578 extern int getchar_unlocked (void);
\r
579 # 561 "/usr/include/stdio.h" 3 4
\r
580 extern int fgetc_unlocked (FILE *__stream);
\r
581 # 573 "/usr/include/stdio.h" 3 4
\r
582 extern int fputc (int __c, FILE *__stream);
\r
583 extern int putc (int __c, FILE *__stream);
\r
589 extern int putchar (int __c);
\r
590 # 594 "/usr/include/stdio.h" 3 4
\r
591 extern int fputc_unlocked (int __c, FILE *__stream);
\r
599 extern int putc_unlocked (int __c, FILE *__stream);
\r
600 extern int putchar_unlocked (int __c);
\r
607 extern int getw (FILE *__stream);
\r
610 extern int putw (int __w, FILE *__stream);
\r
611 # 622 "/usr/include/stdio.h" 3 4
\r
612 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
\r
614 # 638 "/usr/include/stdio.h" 3 4
\r
615 extern char *gets (char *__s) __attribute__ ((__deprecated__));
\r
616 # 665 "/usr/include/stdio.h" 3 4
\r
617 extern __ssize_t __getdelim (char **__restrict __lineptr,
\r
618 size_t *__restrict __n, int __delimiter,
\r
619 FILE *__restrict __stream) ;
\r
620 extern __ssize_t getdelim (char **__restrict __lineptr,
\r
621 size_t *__restrict __n, int __delimiter,
\r
622 FILE *__restrict __stream) ;
\r
630 extern __ssize_t getline (char **__restrict __lineptr,
\r
631 size_t *__restrict __n,
\r
632 FILE *__restrict __stream) ;
\r
633 # 689 "/usr/include/stdio.h" 3 4
\r
634 extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
\r
640 extern int puts (const char *__s);
\r
647 extern int ungetc (int __c, FILE *__stream);
\r
654 extern size_t fread (void *__restrict __ptr, size_t __size,
\r
655 size_t __n, FILE *__restrict __stream) ;
\r
660 extern size_t fwrite (const void *__restrict __ptr, size_t __size,
\r
661 size_t __n, FILE *__restrict __s);
\r
662 # 737 "/usr/include/stdio.h" 3 4
\r
663 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
\r
664 size_t __n, FILE *__restrict __stream) ;
\r
665 extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
\r
666 size_t __n, FILE *__restrict __stream);
\r
667 # 749 "/usr/include/stdio.h" 3 4
\r
668 extern int fseek (FILE *__stream, long int __off, int __whence);
\r
673 extern long int ftell (FILE *__stream) ;
\r
678 extern void rewind (FILE *__stream);
\r
679 # 773 "/usr/include/stdio.h" 3 4
\r
680 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
\r
685 extern __off_t ftello (FILE *__stream) ;
\r
686 # 798 "/usr/include/stdio.h" 3 4
\r
687 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
\r
692 extern int fsetpos (FILE *__stream, const fpos_t *__pos);
\r
693 # 826 "/usr/include/stdio.h" 3 4
\r
694 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ ));
\r
696 extern int feof (FILE *__stream) __attribute__ ((__nothrow__ )) ;
\r
698 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ )) ;
\r
703 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ ));
\r
704 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;
\r
705 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;
\r
706 # 846 "/usr/include/stdio.h" 3 4
\r
707 extern void perror (const char *__s);
\r
715 # 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4
\r
716 # 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4
\r
717 extern int sys_nerr;
\r
718 extern const char *const sys_errlist[];
\r
719 # 854 "/usr/include/stdio.h" 2 3 4
\r
724 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ )) ;
\r
729 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;
\r
730 # 873 "/usr/include/stdio.h" 3 4
\r
731 extern FILE *popen (const char *__command, const char *__modes) ;
\r
737 extern int pclose (FILE *__stream);
\r
743 extern char *ctermid (char *__s) __attribute__ ((__nothrow__ ));
\r
744 # 913 "/usr/include/stdio.h" 3 4
\r
745 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ ));
\r
749 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ )) ;
\r
752 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ ));
\r
753 # 23 "./../test/abts.h" 2
\r
754 # 1 "/usr/include/stdlib.h" 1 3 4
\r
755 # 32 "/usr/include/stdlib.h" 3 4
\r
756 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
757 # 86 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 3 4
\r
758 typedef int wchar_t;
\r
759 # 33 "/usr/include/stdlib.h" 2 3 4
\r
768 # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4
\r
769 # 50 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4
\r
776 # 42 "/usr/include/stdlib.h" 2 3 4
\r
777 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4
\r
778 # 64 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4
\r
779 # 1 "/usr/include/endian.h" 1 3 4
\r
780 # 36 "/usr/include/endian.h" 3 4
\r
781 # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4
\r
782 # 37 "/usr/include/endian.h" 2 3 4
\r
783 # 60 "/usr/include/endian.h" 3 4
\r
784 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4
\r
785 # 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4
\r
786 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
787 # 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4
\r
794 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4
\r
795 # 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4
\r
796 # 61 "/usr/include/endian.h" 2 3 4
\r
797 # 65 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 2 3 4
\r
805 unsigned int __w_termsig:7;
\r
806 unsigned int __w_coredump:1;
\r
807 unsigned int __w_retcode:8;
\r
816 } __wait_terminated;
\r
820 unsigned int __w_stopval:8;
\r
821 unsigned int __w_stopsig:8;
\r
831 # 43 "/usr/include/stdlib.h" 2 3 4
\r
832 # 67 "/usr/include/stdlib.h" 3 4
\r
835 union wait *__uptr;
\r
837 } __WAIT_STATUS __attribute__ ((__transparent_union__));
\r
838 # 97 "/usr/include/stdlib.h" 3 4
\r
859 __extension__ typedef struct
\r
861 long long int quot;
\r
864 # 139 "/usr/include/stdlib.h" 3 4
\r
865 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ )) ;
\r
870 extern double atof (const char *__nptr)
\r
871 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
\r
873 extern int atoi (const char *__nptr)
\r
874 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
\r
876 extern long int atol (const char *__nptr)
\r
877 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
\r
883 __extension__ extern long long int atoll (const char *__nptr)
\r
884 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
\r
890 extern double strtod (const char *__restrict __nptr,
\r
891 char **__restrict __endptr)
\r
892 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
898 extern float strtof (const char *__restrict __nptr,
\r
899 char **__restrict __endptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
901 extern long double strtold (const char *__restrict __nptr,
\r
902 char **__restrict __endptr)
\r
903 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
909 extern long int strtol (const char *__restrict __nptr,
\r
910 char **__restrict __endptr, int __base)
\r
911 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
913 extern unsigned long int strtoul (const char *__restrict __nptr,
\r
914 char **__restrict __endptr, int __base)
\r
915 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
921 extern long long int strtoq (const char *__restrict __nptr,
\r
922 char **__restrict __endptr, int __base)
\r
923 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
926 extern unsigned long long int strtouq (const char *__restrict __nptr,
\r
927 char **__restrict __endptr, int __base)
\r
928 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
935 extern long long int strtoll (const char *__restrict __nptr,
\r
936 char **__restrict __endptr, int __base)
\r
937 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
940 extern unsigned long long int strtoull (const char *__restrict __nptr,
\r
941 char **__restrict __endptr, int __base)
\r
942 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
943 # 305 "/usr/include/stdlib.h" 3 4
\r
944 extern char *l64a (long int __n) __attribute__ ((__nothrow__ )) ;
\r
947 extern long int a64l (const char *__s)
\r
948 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
\r
954 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4
\r
955 # 33 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
956 typedef __u_char u_char;
\r
957 typedef __u_short u_short;
\r
958 typedef __u_int u_int;
\r
959 typedef __u_long u_long;
\r
960 typedef __quad_t quad_t;
\r
961 typedef __u_quad_t u_quad_t;
\r
962 typedef __fsid_t fsid_t;
\r
967 typedef __loff_t loff_t;
\r
971 typedef __ino_t ino_t;
\r
972 # 60 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
973 typedef __dev_t dev_t;
\r
978 typedef __gid_t gid_t;
\r
983 typedef __mode_t mode_t;
\r
988 typedef __nlink_t nlink_t;
\r
993 typedef __uid_t uid_t;
\r
994 # 98 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
995 typedef __pid_t pid_t;
\r
1001 typedef __id_t id_t;
\r
1002 # 115 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
1003 typedef __daddr_t daddr_t;
\r
1004 typedef __caddr_t caddr_t;
\r
1010 typedef __key_t key_t;
\r
1011 # 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
1012 # 1 "/usr/include/time.h" 1 3 4
\r
1013 # 59 "/usr/include/time.h" 3 4
\r
1014 typedef __clock_t clock_t;
\r
1015 # 75 "/usr/include/time.h" 3 4
\r
1016 typedef __time_t time_t;
\r
1017 # 91 "/usr/include/time.h" 3 4
\r
1018 typedef __clockid_t clockid_t;
\r
1019 # 103 "/usr/include/time.h" 3 4
\r
1020 typedef __timer_t timer_t;
\r
1021 # 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
\r
1022 # 146 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
1023 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
1024 # 147 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
\r
1028 typedef unsigned long int ulong;
\r
1029 typedef unsigned short int ushort;
\r
1030 typedef unsigned int uint;
\r
1031 # 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
1032 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
\r
1033 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
\r
1034 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
\r
1035 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
\r
1038 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
\r
1039 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
\r
1040 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
\r
1041 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
\r
1043 typedef int register_t __attribute__ ((__mode__ (__word__)));
\r
1044 # 219 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
1045 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4
\r
1046 # 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
\r
1047 # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4
\r
1048 # 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4
\r
1049 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
1050 # 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4
\r
1051 # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
\r
1054 # 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4
\r
1055 # 22 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4
\r
1056 typedef int __sig_atomic_t;
\r
1063 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
\r
1065 # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
\r
1069 typedef __sigset_t sigset_t;
\r
1076 # 1 "/usr/include/time.h" 1 3 4
\r
1077 # 120 "/usr/include/time.h" 3 4
\r
1081 __syscall_slong_t tv_nsec;
\r
1083 # 44 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
\r
1085 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4
\r
1086 # 30 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4
\r
1090 __suseconds_t tv_usec;
\r
1092 # 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
\r
1095 typedef __suseconds_t suseconds_t;
\r
1101 typedef long int __fd_mask;
\r
1102 # 64 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
\r
1111 __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
\r
1121 typedef __fd_mask fd_mask;
\r
1122 # 106 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
\r
1123 extern int select (int __nfds, fd_set *__restrict __readfds,
\r
1124 fd_set *__restrict __writefds,
\r
1125 fd_set *__restrict __exceptfds,
\r
1126 struct timeval *__restrict __timeout);
\r
1127 # 118 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
\r
1128 extern int pselect (int __nfds, fd_set *__restrict __readfds,
\r
1129 fd_set *__restrict __writefds,
\r
1130 fd_set *__restrict __exceptfds,
\r
1131 const struct timespec *__restrict __timeout,
\r
1132 const __sigset_t *__restrict __sigmask);
\r
1133 # 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
\r
1136 # 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4
\r
1137 # 26 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4
\r
1139 extern unsigned int gnu_dev_major (unsigned long long int __dev)
\r
1140 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
1142 extern unsigned int gnu_dev_minor (unsigned long long int __dev)
\r
1143 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
1145 extern unsigned long long int gnu_dev_makedev (unsigned int __major,
\r
1146 unsigned int __minor)
\r
1147 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
1148 # 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
\r
1154 typedef __blksize_t blksize_t;
\r
1161 typedef __blkcnt_t blkcnt_t;
\r
1165 typedef __fsblkcnt_t fsblkcnt_t;
\r
1169 typedef __fsfilcnt_t fsfilcnt_t;
\r
1170 # 270 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
\r
1171 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4
\r
1172 # 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
\r
1173 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
1174 # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4
\r
1175 # 60 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
\r
1176 typedef unsigned long int pthread_t;
\r
1179 union pthread_attr_t
\r
1185 typedef union pthread_attr_t pthread_attr_t;
\r
1191 typedef struct __pthread_internal_list
\r
1193 struct __pthread_internal_list *__prev;
\r
1194 struct __pthread_internal_list *__next;
\r
1195 } __pthread_list_t;
\r
1196 # 90 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
\r
1199 struct __pthread_mutex_s
\r
1202 unsigned int __count;
\r
1205 unsigned int __nusers;
\r
1213 __pthread_list_t __list;
\r
1214 # 124 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
\r
1218 } pthread_mutex_t;
\r
1224 } pthread_mutexattr_t;
\r
1234 unsigned int __futex;
\r
1235 __extension__ unsigned long long int __total_seq;
\r
1236 __extension__ unsigned long long int __wakeup_seq;
\r
1237 __extension__ unsigned long long int __woken_seq;
\r
1239 unsigned int __nwaiters;
\r
1240 unsigned int __broadcast_seq;
\r
1243 __extension__ long long int __align;
\r
1250 } pthread_condattr_t;
\r
1254 typedef unsigned int pthread_key_t;
\r
1258 typedef int pthread_once_t;
\r
1270 unsigned int __nr_readers;
\r
1271 unsigned int __readers_wakeup;
\r
1272 unsigned int __writer_wakeup;
\r
1273 unsigned int __nr_readers_queued;
\r
1274 unsigned int __nr_writers_queued;
\r
1277 unsigned long int __pad1;
\r
1278 unsigned long int __pad2;
\r
1281 unsigned int __flags;
\r
1284 # 211 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
\r
1287 } pthread_rwlock_t;
\r
1293 } pthread_rwlockattr_t;
\r
1299 typedef volatile int pthread_spinlock_t;
\r
1308 } pthread_barrier_t;
\r
1314 } pthread_barrierattr_t;
\r
1315 # 271 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
\r
1316 # 315 "/usr/include/stdlib.h" 2 3 4
\r
1323 extern long int random (void) __attribute__ ((__nothrow__ ));
\r
1326 extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ ));
\r
1332 extern char *initstate (unsigned int __seed, char *__statebuf,
\r
1333 size_t __statelen) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
1337 extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1345 struct random_data
\r
1356 extern int random_r (struct random_data *__restrict __buf,
\r
1357 int32_t *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1359 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
\r
1360 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
1362 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
\r
1363 size_t __statelen,
\r
1364 struct random_data *__restrict __buf)
\r
1365 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));
\r
1367 extern int setstate_r (char *__restrict __statebuf,
\r
1368 struct random_data *__restrict __buf)
\r
1369 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1376 extern int rand (void) __attribute__ ((__nothrow__ ));
\r
1378 extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ ));
\r
1383 extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ ));
\r
1391 extern double drand48 (void) __attribute__ ((__nothrow__ ));
\r
1392 extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1395 extern long int lrand48 (void) __attribute__ ((__nothrow__ ));
\r
1396 extern long int nrand48 (unsigned short int __xsubi[3])
\r
1397 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1400 extern long int mrand48 (void) __attribute__ ((__nothrow__ ));
\r
1401 extern long int jrand48 (unsigned short int __xsubi[3])
\r
1402 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1405 extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ ));
\r
1406 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
\r
1407 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1408 extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1414 struct drand48_data
\r
1416 unsigned short int __x[3];
\r
1417 unsigned short int __old_x[3];
\r
1418 unsigned short int __c;
\r
1419 unsigned short int __init;
\r
1420 __extension__ unsigned long long int __a;
\r
1425 extern int drand48_r (struct drand48_data *__restrict __buffer,
\r
1426 double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1427 extern int erand48_r (unsigned short int __xsubi[3],
\r
1428 struct drand48_data *__restrict __buffer,
\r
1429 double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1432 extern int lrand48_r (struct drand48_data *__restrict __buffer,
\r
1433 long int *__restrict __result)
\r
1434 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1435 extern int nrand48_r (unsigned short int __xsubi[3],
\r
1436 struct drand48_data *__restrict __buffer,
\r
1437 long int *__restrict __result)
\r
1438 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1441 extern int mrand48_r (struct drand48_data *__restrict __buffer,
\r
1442 long int *__restrict __result)
\r
1443 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1444 extern int jrand48_r (unsigned short int __xsubi[3],
\r
1445 struct drand48_data *__restrict __buffer,
\r
1446 long int *__restrict __result)
\r
1447 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1450 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
\r
1451 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
1453 extern int seed48_r (unsigned short int __seed16v[3],
\r
1454 struct drand48_data *__buffer) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1456 extern int lcong48_r (unsigned short int __param[7],
\r
1457 struct drand48_data *__buffer)
\r
1458 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1459 # 466 "/usr/include/stdlib.h" 3 4
\r
1460 extern void *malloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;
\r
1462 extern void *calloc (size_t __nmemb, size_t __size)
\r
1463 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;
\r
1464 # 480 "/usr/include/stdlib.h" 3 4
\r
1465 extern void *realloc (void *__ptr, size_t __size)
\r
1466 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
\r
1468 extern void free (void *__ptr) __attribute__ ((__nothrow__ ));
\r
1473 extern void cfree (void *__ptr) __attribute__ ((__nothrow__ ));
\r
1478 # 1 "/usr/include/alloca.h" 1 3 4
\r
1479 # 24 "/usr/include/alloca.h" 3 4
\r
1480 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
1481 # 25 "/usr/include/alloca.h" 2 3 4
\r
1489 extern void *alloca (size_t __size) __attribute__ ((__nothrow__ ));
\r
1490 # 493 "/usr/include/stdlib.h" 2 3 4
\r
1496 extern void *valloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;
\r
1501 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
\r
1502 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
1503 # 515 "/usr/include/stdlib.h" 3 4
\r
1504 extern void abort (void) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
\r
1508 extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1509 # 535 "/usr/include/stdlib.h" 3 4
\r
1510 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
\r
1511 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1518 extern void exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
\r
1519 # 557 "/usr/include/stdlib.h" 3 4
\r
1520 extern void _Exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
\r
1527 extern char *getenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
1528 # 578 "/usr/include/stdlib.h" 3 4
\r
1529 extern int putenv (char *__string) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1535 extern int setenv (const char *__name, const char *__value, int __replace)
\r
1536 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
1539 extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1546 extern int clearenv (void) __attribute__ ((__nothrow__ ));
\r
1547 # 606 "/usr/include/stdlib.h" 3 4
\r
1548 extern char *mktemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1549 # 620 "/usr/include/stdlib.h" 3 4
\r
1550 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
\r
1551 # 642 "/usr/include/stdlib.h" 3 4
\r
1552 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
\r
1553 # 663 "/usr/include/stdlib.h" 3 4
\r
1554 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
1555 # 717 "/usr/include/stdlib.h" 3 4
\r
1556 extern int system (const char *__command) ;
\r
1557 # 734 "/usr/include/stdlib.h" 3 4
\r
1558 extern char *realpath (const char *__restrict __name,
\r
1559 char *__restrict __resolved) __attribute__ ((__nothrow__ )) ;
\r
1566 typedef int (*__compar_fn_t) (const void *, const void *);
\r
1567 # 755 "/usr/include/stdlib.h" 3 4
\r
1568 extern void *bsearch (const void *__key, const void *__base,
\r
1569 size_t __nmemb, size_t __size, __compar_fn_t __compar)
\r
1570 __attribute__ ((__nonnull__ (1, 2, 5))) ;
\r
1578 extern void qsort (void *__base, size_t __nmemb, size_t __size,
\r
1579 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
\r
1580 # 775 "/usr/include/stdlib.h" 3 4
\r
1581 extern int abs (int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;
\r
1582 extern long int labs (long int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;
\r
1586 __extension__ extern long long int llabs (long long int __x)
\r
1587 __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;
\r
1595 extern div_t div (int __numer, int __denom)
\r
1596 __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;
\r
1597 extern ldiv_t ldiv (long int __numer, long int __denom)
\r
1598 __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;
\r
1603 __extension__ extern lldiv_t lldiv (long long int __numer,
\r
1604 long long int __denom)
\r
1605 __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;
\r
1606 # 812 "/usr/include/stdlib.h" 3 4
\r
1607 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
\r
1608 int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;
\r
1613 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
\r
1614 int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;
\r
1619 extern char *gcvt (double __value, int __ndigit, char *__buf)
\r
1620 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) ;
\r
1625 extern char *qecvt (long double __value, int __ndigit,
\r
1626 int *__restrict __decpt, int *__restrict __sign)
\r
1627 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;
\r
1628 extern char *qfcvt (long double __value, int __ndigit,
\r
1629 int *__restrict __decpt, int *__restrict __sign)
\r
1630 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;
\r
1631 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
\r
1632 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) ;
\r
1637 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
\r
1638 int *__restrict __sign, char *__restrict __buf,
\r
1639 size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));
\r
1640 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
\r
1641 int *__restrict __sign, char *__restrict __buf,
\r
1642 size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));
\r
1644 extern int qecvt_r (long double __value, int __ndigit,
\r
1645 int *__restrict __decpt, int *__restrict __sign,
\r
1646 char *__restrict __buf, size_t __len)
\r
1647 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));
\r
1648 extern int qfcvt_r (long double __value, int __ndigit,
\r
1649 int *__restrict __decpt, int *__restrict __sign,
\r
1650 char *__restrict __buf, size_t __len)
\r
1651 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));
\r
1658 extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ ));
\r
1661 extern int mbtowc (wchar_t *__restrict __pwc,
\r
1662 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));
\r
1665 extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ ));
\r
1669 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
\r
1670 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));
\r
1672 extern size_t wcstombs (char *__restrict __s,
\r
1673 const wchar_t *__restrict __pwcs, size_t __n)
\r
1674 __attribute__ ((__nothrow__ ));
\r
1675 # 888 "/usr/include/stdlib.h" 3 4
\r
1676 extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
1677 # 899 "/usr/include/stdlib.h" 3 4
\r
1678 extern int getsubopt (char **__restrict __optionp,
\r
1679 char *const *__restrict __tokens,
\r
1680 char **__restrict __valuep)
\r
1681 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3))) ;
\r
1682 # 951 "/usr/include/stdlib.h" 3 4
\r
1683 extern int getloadavg (double __loadavg[], int __nelem)
\r
1684 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1688 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4
\r
1689 # 956 "/usr/include/stdlib.h" 2 3 4
\r
1690 # 24 "./../test/abts.h" 2
\r
1691 # 1 "/usr/include/string.h" 1 3 4
\r
1692 # 32 "/usr/include/string.h" 3 4
\r
1693 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
1694 # 33 "/usr/include/string.h" 2 3 4
\r
1695 # 46 "/usr/include/string.h" 3 4
\r
1696 extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
\r
1697 size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1700 extern void *memmove (void *__dest, const void *__src, size_t __n)
\r
1701 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1708 extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
\r
1709 int __c, size_t __n)
\r
1710 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1716 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1719 extern int memcmp (const void *__s1, const void *__s2, size_t __n)
\r
1720 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1721 # 96 "/usr/include/string.h" 3 4
\r
1722 extern void *memchr (const void *__s, int __c, size_t __n)
\r
1723 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
\r
1724 # 129 "/usr/include/string.h" 3 4
\r
1725 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
\r
1726 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1728 extern char *strncpy (char *__restrict __dest,
\r
1729 const char *__restrict __src, size_t __n)
\r
1730 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1733 extern char *strcat (char *__restrict __dest, const char *__restrict __src)
\r
1734 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1736 extern char *strncat (char *__restrict __dest, const char *__restrict __src,
\r
1737 size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1740 extern int strcmp (const char *__s1, const char *__s2)
\r
1741 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1743 extern int strncmp (const char *__s1, const char *__s2, size_t __n)
\r
1744 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1747 extern int strcoll (const char *__s1, const char *__s2)
\r
1748 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1750 extern size_t strxfrm (char *__restrict __dest,
\r
1751 const char *__restrict __src, size_t __n)
\r
1752 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
1760 # 1 "/usr/include/xlocale.h" 1 3 4
\r
1761 # 27 "/usr/include/xlocale.h" 3 4
\r
1762 typedef struct __locale_struct
\r
1765 struct __locale_data *__locales[13];
\r
1768 const unsigned short int *__ctype_b;
\r
1769 const int *__ctype_tolower;
\r
1770 const int *__ctype_toupper;
\r
1773 const char *__names[13];
\r
1777 typedef __locale_t locale_t;
\r
1778 # 164 "/usr/include/string.h" 2 3 4
\r
1781 extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)
\r
1782 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
\r
1784 extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
\r
1785 __locale_t __l) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));
\r
1791 extern char *strdup (const char *__s)
\r
1792 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
\r
1799 extern char *strndup (const char *__string, size_t __n)
\r
1800 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
\r
1801 # 236 "/usr/include/string.h" 3 4
\r
1802 extern char *strchr (const char *__s, int __c)
\r
1803 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
\r
1804 # 263 "/usr/include/string.h" 3 4
\r
1805 extern char *strrchr (const char *__s, int __c)
\r
1806 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
\r
1807 # 285 "/usr/include/string.h" 3 4
\r
1808 extern size_t strcspn (const char *__s, const char *__reject)
\r
1809 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1812 extern size_t strspn (const char *__s, const char *__accept)
\r
1813 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1814 # 315 "/usr/include/string.h" 3 4
\r
1815 extern char *strpbrk (const char *__s, const char *__accept)
\r
1816 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1817 # 342 "/usr/include/string.h" 3 4
\r
1818 extern char *strstr (const char *__haystack, const char *__needle)
\r
1819 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1824 extern char *strtok (char *__restrict __s, const char *__restrict __delim)
\r
1825 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
1830 extern char *__strtok_r (char *__restrict __s,
\r
1831 const char *__restrict __delim,
\r
1832 char **__restrict __save_ptr)
\r
1833 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
\r
1835 extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
\r
1836 char **__restrict __save_ptr)
\r
1837 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
\r
1838 # 399 "/usr/include/string.h" 3 4
\r
1839 extern size_t strlen (const char *__s)
\r
1840 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
\r
1846 extern size_t strnlen (const char *__string, size_t __maxlen)
\r
1847 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
\r
1853 extern char *strerror (int __errnum) __attribute__ ((__nothrow__ ));
\r
1854 # 427 "/usr/include/string.h" 3 4
\r
1855 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
1856 # 445 "/usr/include/string.h" 3 4
\r
1857 extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ ));
\r
1863 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1867 extern void bcopy (const void *__src, void *__dest, size_t __n)
\r
1868 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1871 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1874 extern int bcmp (const void *__s1, const void *__s2, size_t __n)
\r
1875 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1876 # 489 "/usr/include/string.h" 3 4
\r
1877 extern char *index (const char *__s, int __c)
\r
1878 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
\r
1879 # 517 "/usr/include/string.h" 3 4
\r
1880 extern char *rindex (const char *__s, int __c)
\r
1881 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
\r
1886 extern int ffs (int __i) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
1887 # 534 "/usr/include/string.h" 3 4
\r
1888 extern int strcasecmp (const char *__s1, const char *__s2)
\r
1889 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1892 extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
\r
1893 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
1894 # 557 "/usr/include/string.h" 3 4
\r
1895 extern char *strsep (char **__restrict __stringp,
\r
1896 const char *__restrict __delim)
\r
1897 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1902 extern char *strsignal (int __sig) __attribute__ ((__nothrow__ ));
\r
1905 extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
\r
1906 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1907 extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
\r
1908 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1912 extern char *__stpncpy (char *__restrict __dest,
\r
1913 const char *__restrict __src, size_t __n)
\r
1914 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1915 extern char *stpncpy (char *__restrict __dest,
\r
1916 const char *__restrict __src, size_t __n)
\r
1917 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
1918 # 25 "./../test/abts.h" 2
\r
1922 # 1 "/usr/include/unistd.h" 1 3 4
\r
1923 # 202 "/usr/include/unistd.h" 3 4
\r
1924 # 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4
\r
1925 # 203 "/usr/include/unistd.h" 2 3 4
\r
1929 # 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4
\r
1930 # 22 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4
\r
1931 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
1932 # 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4
\r
1933 # 207 "/usr/include/unistd.h" 2 3 4
\r
1934 # 226 "/usr/include/unistd.h" 3 4
\r
1935 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
1936 # 227 "/usr/include/unistd.h" 2 3 4
\r
1937 # 255 "/usr/include/unistd.h" 3 4
\r
1938 typedef __useconds_t useconds_t;
\r
1939 # 267 "/usr/include/unistd.h" 3 4
\r
1940 typedef __intptr_t intptr_t;
\r
1947 typedef __socklen_t socklen_t;
\r
1948 # 287 "/usr/include/unistd.h" 3 4
\r
1949 extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
1950 # 304 "/usr/include/unistd.h" 3 4
\r
1951 extern int faccessat (int __fd, const char *__file, int __type, int __flag)
\r
1952 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;
\r
1953 # 334 "/usr/include/unistd.h" 3 4
\r
1954 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ ));
\r
1955 # 353 "/usr/include/unistd.h" 3 4
\r
1956 extern int close (int __fd);
\r
1963 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
\r
1969 extern ssize_t write (int __fd, const void *__buf, size_t __n) ;
\r
1970 # 376 "/usr/include/unistd.h" 3 4
\r
1971 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
\r
1972 __off_t __offset) ;
\r
1979 extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
\r
1980 __off_t __offset) ;
\r
1981 # 417 "/usr/include/unistd.h" 3 4
\r
1982 extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ )) ;
\r
1983 # 432 "/usr/include/unistd.h" 3 4
\r
1984 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ ));
\r
1985 # 444 "/usr/include/unistd.h" 3 4
\r
1986 extern unsigned int sleep (unsigned int __seconds);
\r
1994 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
\r
1995 __attribute__ ((__nothrow__ ));
\r
2002 extern int usleep (__useconds_t __useconds);
\r
2003 # 469 "/usr/include/unistd.h" 3 4
\r
2004 extern int pause (void);
\r
2008 extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
\r
2009 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
2013 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ )) ;
\r
2018 extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
\r
2019 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
2026 extern int fchownat (int __fd, const char *__file, __uid_t __owner,
\r
2027 __gid_t __group, int __flag)
\r
2028 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;
\r
2032 extern int chdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
2036 extern int fchdir (int __fd) __attribute__ ((__nothrow__ )) ;
\r
2037 # 511 "/usr/include/unistd.h" 3 4
\r
2038 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ )) ;
\r
2039 # 525 "/usr/include/unistd.h" 3 4
\r
2040 extern char *getwd (char *__buf)
\r
2041 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;
\r
2046 extern int dup (int __fd) __attribute__ ((__nothrow__ )) ;
\r
2049 extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ ));
\r
2050 # 543 "/usr/include/unistd.h" 3 4
\r
2051 extern char **__environ;
\r
2059 extern int execve (const char *__path, char *const __argv[],
\r
2060 char *const __envp[]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
2065 extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
\r
2066 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
2071 extern int execv (const char *__path, char *const __argv[])
\r
2072 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
2076 extern int execle (const char *__path, const char *__arg, ...)
\r
2077 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
2081 extern int execl (const char *__path, const char *__arg, ...)
\r
2082 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
2086 extern int execvp (const char *__file, char *const __argv[])
\r
2087 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
2092 extern int execlp (const char *__file, const char *__arg, ...)
\r
2093 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
2094 # 598 "/usr/include/unistd.h" 3 4
\r
2095 extern int nice (int __inc) __attribute__ ((__nothrow__ )) ;
\r
2100 extern void _exit (int __status) __attribute__ ((__noreturn__));
\r
2107 # 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4
\r
2108 # 24 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4
\r
2123 _PC_CHOWN_RESTRICTED,
\r
2139 _PC_REC_INCR_XFER_SIZE,
\r
2141 _PC_REC_MAX_XFER_SIZE,
\r
2143 _PC_REC_MIN_XFER_SIZE,
\r
2145 _PC_REC_XFER_ALIGN,
\r
2147 _PC_ALLOC_SIZE_MIN,
\r
2176 _SC_REALTIME_SIGNALS,
\r
2178 _SC_PRIORITY_SCHEDULING,
\r
2182 _SC_ASYNCHRONOUS_IO,
\r
2184 _SC_PRIORITIZED_IO,
\r
2186 _SC_SYNCHRONIZED_IO,
\r
2194 _SC_MEMLOCK_RANGE,
\r
2196 _SC_MEMORY_PROTECTION,
\r
2198 _SC_MESSAGE_PASSING,
\r
2202 _SC_SHARED_MEMORY_OBJECTS,
\r
2204 _SC_AIO_LISTIO_MAX,
\r
2208 _SC_AIO_PRIO_DELTA_MAX,
\r
2210 _SC_DELAYTIMER_MAX,
\r
2223 _SC_SEM_NSEMS_MAX,
\r
2225 _SC_SEM_VALUE_MAX,
\r
2240 _SC_BC_STRING_MAX,
\r
2242 _SC_COLL_WEIGHTS_MAX,
\r
2244 _SC_EQUIV_CLASS_MAX,
\r
2246 _SC_EXPR_NEST_MAX,
\r
2252 _SC_CHARCLASS_NAME_MAX,
\r
2286 _SC_IOV_MAX = _SC_UIO_MAXIOV,
\r
2288 _SC_PII_INTERNET_STREAM,
\r
2290 _SC_PII_INTERNET_DGRAM,
\r
2304 _SC_THREAD_SAFE_FUNCTIONS,
\r
2306 _SC_GETGR_R_SIZE_MAX,
\r
2308 _SC_GETPW_R_SIZE_MAX,
\r
2310 _SC_LOGIN_NAME_MAX,
\r
2314 _SC_THREAD_DESTRUCTOR_ITERATIONS,
\r
2316 _SC_THREAD_KEYS_MAX,
\r
2318 _SC_THREAD_STACK_MIN,
\r
2320 _SC_THREAD_THREADS_MAX,
\r
2322 _SC_THREAD_ATTR_STACKADDR,
\r
2324 _SC_THREAD_ATTR_STACKSIZE,
\r
2326 _SC_THREAD_PRIORITY_SCHEDULING,
\r
2328 _SC_THREAD_PRIO_INHERIT,
\r
2330 _SC_THREAD_PRIO_PROTECT,
\r
2332 _SC_THREAD_PROCESS_SHARED,
\r
2335 _SC_NPROCESSORS_CONF,
\r
2337 _SC_NPROCESSORS_ONLN,
\r
2348 _SC_XOPEN_VERSION,
\r
2350 _SC_XOPEN_XCU_VERSION,
\r
2356 _SC_XOPEN_ENH_I18N,
\r
2425 _SC_XBS5_ILP32_OFF32,
\r
2427 _SC_XBS5_ILP32_OFFBIG,
\r
2429 _SC_XBS5_LP64_OFF64,
\r
2431 _SC_XBS5_LPBIG_OFFBIG,
\r
2436 _SC_XOPEN_REALTIME,
\r
2438 _SC_XOPEN_REALTIME_THREADS,
\r
2441 _SC_ADVISORY_INFO,
\r
2447 _SC_C_LANG_SUPPORT,
\r
2449 _SC_C_LANG_SUPPORT_R,
\r
2451 _SC_CLOCK_SELECTION,
\r
2455 _SC_THREAD_CPUTIME,
\r
2459 _SC_DEVICE_SPECIFIC,
\r
2461 _SC_DEVICE_SPECIFIC_R,
\r
2469 _SC_FILE_ATTRIBUTES,
\r
2475 _SC_MONOTONIC_CLOCK,
\r
2477 _SC_MULTI_PROCESS,
\r
2479 _SC_SINGLE_PROCESS,
\r
2483 _SC_READER_WRITER_LOCKS,
\r
2489 _SC_REGEX_VERSION,
\r
2497 _SC_SPORADIC_SERVER,
\r
2499 _SC_THREAD_SPORADIC_SERVER,
\r
2501 _SC_SYSTEM_DATABASE,
\r
2503 _SC_SYSTEM_DATABASE_R,
\r
2507 _SC_TYPED_MEMORY_OBJECTS,
\r
2511 _SC_USER_GROUPS_R,
\r
2515 _SC_2_PBS_ACCOUNTING,
\r
2519 _SC_2_PBS_MESSAGE,
\r
2527 _SC_2_PBS_CHECKPOINT,
\r
2530 _SC_V6_ILP32_OFF32,
\r
2532 _SC_V6_ILP32_OFFBIG,
\r
2534 _SC_V6_LP64_OFF64,
\r
2536 _SC_V6_LPBIG_OFFBIG,
\r
2539 _SC_HOST_NAME_MAX,
\r
2543 _SC_TRACE_EVENT_FILTER,
\r
2545 _SC_TRACE_INHERIT,
\r
2550 _SC_LEVEL1_ICACHE_SIZE,
\r
2552 _SC_LEVEL1_ICACHE_ASSOC,
\r
2554 _SC_LEVEL1_ICACHE_LINESIZE,
\r
2556 _SC_LEVEL1_DCACHE_SIZE,
\r
2558 _SC_LEVEL1_DCACHE_ASSOC,
\r
2560 _SC_LEVEL1_DCACHE_LINESIZE,
\r
2562 _SC_LEVEL2_CACHE_SIZE,
\r
2564 _SC_LEVEL2_CACHE_ASSOC,
\r
2566 _SC_LEVEL2_CACHE_LINESIZE,
\r
2568 _SC_LEVEL3_CACHE_SIZE,
\r
2570 _SC_LEVEL3_CACHE_ASSOC,
\r
2572 _SC_LEVEL3_CACHE_LINESIZE,
\r
2574 _SC_LEVEL4_CACHE_SIZE,
\r
2576 _SC_LEVEL4_CACHE_ASSOC,
\r
2578 _SC_LEVEL4_CACHE_LINESIZE,
\r
2582 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
\r
2587 _SC_V7_ILP32_OFF32,
\r
2589 _SC_V7_ILP32_OFFBIG,
\r
2591 _SC_V7_LP64_OFF64,
\r
2593 _SC_V7_LPBIG_OFFBIG,
\r
2599 _SC_TRACE_EVENT_NAME_MAX,
\r
2601 _SC_TRACE_NAME_MAX,
\r
2603 _SC_TRACE_SYS_MAX,
\r
2605 _SC_TRACE_USER_EVENT_MAX,
\r
2608 _SC_XOPEN_STREAMS,
\r
2611 _SC_THREAD_ROBUST_PRIO_INHERIT,
\r
2613 _SC_THREAD_ROBUST_PRIO_PROTECT
\r
2623 _CS_V6_WIDTH_RESTRICTED_ENVS,
\r
2627 _CS_GNU_LIBC_VERSION,
\r
2629 _CS_GNU_LIBPTHREAD_VERSION,
\r
2632 _CS_V5_WIDTH_RESTRICTED_ENVS,
\r
2636 _CS_V7_WIDTH_RESTRICTED_ENVS,
\r
2640 _CS_LFS_CFLAGS = 1000,
\r
2646 _CS_LFS_LINTFLAGS,
\r
2650 _CS_LFS64_LDFLAGS,
\r
2654 _CS_LFS64_LINTFLAGS,
\r
2657 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
\r
2659 _CS_XBS5_ILP32_OFF32_LDFLAGS,
\r
2661 _CS_XBS5_ILP32_OFF32_LIBS,
\r
2663 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
\r
2665 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
\r
2667 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
\r
2669 _CS_XBS5_ILP32_OFFBIG_LIBS,
\r
2671 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
\r
2673 _CS_XBS5_LP64_OFF64_CFLAGS,
\r
2675 _CS_XBS5_LP64_OFF64_LDFLAGS,
\r
2677 _CS_XBS5_LP64_OFF64_LIBS,
\r
2679 _CS_XBS5_LP64_OFF64_LINTFLAGS,
\r
2681 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
\r
2683 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
\r
2685 _CS_XBS5_LPBIG_OFFBIG_LIBS,
\r
2687 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
\r
2690 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
\r
2692 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
\r
2694 _CS_POSIX_V6_ILP32_OFF32_LIBS,
\r
2696 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
\r
2698 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
\r
2700 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
\r
2702 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
\r
2704 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
\r
2706 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
\r
2708 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
\r
2710 _CS_POSIX_V6_LP64_OFF64_LIBS,
\r
2712 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
\r
2714 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
\r
2716 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
\r
2718 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
\r
2720 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
\r
2723 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
\r
2725 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
\r
2727 _CS_POSIX_V7_ILP32_OFF32_LIBS,
\r
2729 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
\r
2731 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
\r
2733 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
\r
2735 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
\r
2737 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
\r
2739 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
\r
2741 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
\r
2743 _CS_POSIX_V7_LP64_OFF64_LIBS,
\r
2745 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
\r
2747 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
\r
2749 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
\r
2751 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
\r
2753 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
\r
2761 # 610 "/usr/include/unistd.h" 2 3 4
\r
2764 extern long int pathconf (const char *__path, int __name)
\r
2765 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
2768 extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ ));
\r
2771 extern long int sysconf (int __name) __attribute__ ((__nothrow__ ));
\r
2775 extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ ));
\r
2780 extern __pid_t getpid (void) __attribute__ ((__nothrow__ ));
\r
2783 extern __pid_t getppid (void) __attribute__ ((__nothrow__ ));
\r
2786 extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ ));
\r
2789 extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));
\r
2791 extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));
\r
2798 extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ ));
\r
2799 # 660 "/usr/include/unistd.h" 3 4
\r
2800 extern int setpgrp (void) __attribute__ ((__nothrow__ ));
\r
2807 extern __pid_t setsid (void) __attribute__ ((__nothrow__ ));
\r
2811 extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ ));
\r
2815 extern __uid_t getuid (void) __attribute__ ((__nothrow__ ));
\r
2818 extern __uid_t geteuid (void) __attribute__ ((__nothrow__ ));
\r
2821 extern __gid_t getgid (void) __attribute__ ((__nothrow__ ));
\r
2824 extern __gid_t getegid (void) __attribute__ ((__nothrow__ ));
\r
2829 extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ )) ;
\r
2830 # 700 "/usr/include/unistd.h" 3 4
\r
2831 extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ )) ;
\r
2836 extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ )) ;
\r
2841 extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ )) ;
\r
2848 extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ )) ;
\r
2853 extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ )) ;
\r
2858 extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ )) ;
\r
2859 # 756 "/usr/include/unistd.h" 3 4
\r
2860 extern __pid_t fork (void) __attribute__ ((__nothrow__));
\r
2868 extern __pid_t vfork (void) __attribute__ ((__nothrow__ ));
\r
2874 extern char *ttyname (int __fd) __attribute__ ((__nothrow__ ));
\r
2878 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
\r
2879 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;
\r
2883 extern int isatty (int __fd) __attribute__ ((__nothrow__ ));
\r
2889 extern int ttyslot (void) __attribute__ ((__nothrow__ ));
\r
2894 extern int link (const char *__from, const char *__to)
\r
2895 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;
\r
2900 extern int linkat (int __fromfd, const char *__from, int __tofd,
\r
2901 const char *__to, int __flags)
\r
2902 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4))) ;
\r
2907 extern int symlink (const char *__from, const char *__to)
\r
2908 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;
\r
2913 extern ssize_t readlink (const char *__restrict __path,
\r
2914 char *__restrict __buf, size_t __len)
\r
2915 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;
\r
2920 extern int symlinkat (const char *__from, int __tofd,
\r
2921 const char *__to) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3))) ;
\r
2924 extern ssize_t readlinkat (int __fd, const char *__restrict __path,
\r
2925 char *__restrict __buf, size_t __len)
\r
2926 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3))) ;
\r
2930 extern int unlink (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
2934 extern int unlinkat (int __fd, const char *__name, int __flag)
\r
2935 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
2939 extern int rmdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
2943 extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ ));
\r
2946 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ ));
\r
2953 extern char *getlogin (void);
\r
2961 extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
\r
2966 extern int setlogin (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
2967 # 871 "/usr/include/unistd.h" 3 4
\r
2968 # 1 "/usr/include/getopt.h" 1 3 4
\r
2969 # 57 "/usr/include/getopt.h" 3 4
\r
2970 extern char *optarg;
\r
2971 # 71 "/usr/include/getopt.h" 3 4
\r
2972 extern int optind;
\r
2977 extern int opterr;
\r
2981 extern int optopt;
\r
2982 # 150 "/usr/include/getopt.h" 3 4
\r
2983 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
\r
2984 __attribute__ ((__nothrow__ ));
\r
2985 # 872 "/usr/include/unistd.h" 2 3 4
\r
2993 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
3000 extern int sethostname (const char *__name, size_t __len)
\r
3001 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
3005 extern int sethostid (long int __id) __attribute__ ((__nothrow__ )) ;
\r
3011 extern int getdomainname (char *__name, size_t __len)
\r
3012 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
3013 extern int setdomainname (const char *__name, size_t __len)
\r
3014 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
3020 extern int vhangup (void) __attribute__ ((__nothrow__ ));
\r
3023 extern int revoke (const char *__file) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
3031 extern int profil (unsigned short int *__sample_buffer, size_t __size,
\r
3032 size_t __offset, unsigned int __scale)
\r
3033 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
3039 extern int acct (const char *__name) __attribute__ ((__nothrow__ ));
\r
3043 extern char *getusershell (void) __attribute__ ((__nothrow__ ));
\r
3044 extern void endusershell (void) __attribute__ ((__nothrow__ ));
\r
3045 extern void setusershell (void) __attribute__ ((__nothrow__ ));
\r
3051 extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ )) ;
\r
3058 extern int chroot (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
3062 extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
\r
3070 extern int fsync (int __fd);
\r
3071 # 969 "/usr/include/unistd.h" 3 4
\r
3072 extern long int gethostid (void);
\r
3075 extern void sync (void) __attribute__ ((__nothrow__ ));
\r
3081 extern int getpagesize (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
3086 extern int getdtablesize (void) __attribute__ ((__nothrow__ ));
\r
3087 # 993 "/usr/include/unistd.h" 3 4
\r
3088 extern int truncate (const char *__file, __off_t __length)
\r
3089 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;
\r
3090 # 1016 "/usr/include/unistd.h" 3 4
\r
3091 extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ )) ;
\r
3092 # 1037 "/usr/include/unistd.h" 3 4
\r
3093 extern int brk (void *__addr) __attribute__ ((__nothrow__ )) ;
\r
3099 extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ ));
\r
3100 # 1058 "/usr/include/unistd.h" 3 4
\r
3101 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ ));
\r
3102 # 1081 "/usr/include/unistd.h" 3 4
\r
3103 extern int lockf (int __fd, int __cmd, __off_t __len) ;
\r
3104 # 1112 "/usr/include/unistd.h" 3 4
\r
3105 extern int fdatasync (int __fildes);
\r
3106 # 29 "./../test/abts.h" 2
\r
3107 # 41 "./../test/abts.h"
\r
3108 struct sub_suite {
\r
3114 struct sub_suite *next;
\r
3116 typedef struct sub_suite sub_suite;
\r
3118 struct abts_suite {
\r
3122 typedef struct abts_suite abts_suite;
\r
3124 struct abts_case {
\r
3128 typedef struct abts_case abts_case;
\r
3130 typedef void (*test_func)(abts_case *tc, void *data);
\r
3134 abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name);
\r
3135 void abts_run_test(abts_suite *ts, test_func f, void *value);
\r
3136 void abts_log_message(const char *fmt, ...);
\r
3138 void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno);
\r
3139 void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno);
\r
3140 void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno);
\r
3141 void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,
\r
3142 size_t n, int lineno);
\r
3143 void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno);
\r
3144 void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno);
\r
3145 void abts_true(abts_case *tc, int condition, int lineno);
\r
3146 void abts_fail(abts_case *tc, const char *message, int lineno);
\r
3147 void abts_not_impl(abts_case *tc, const char *message, int lineno);
\r
3148 void abts_assert(abts_case *tc, const char *message, int condition, int lineno);
\r
3149 void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno);
\r
3150 # 99 "./../test/abts.h"
\r
3151 abts_suite *run_tests(abts_suite *suite);
\r
3152 abts_suite *run_tests1(abts_suite *suite);
\r
3154 # 1 "./../test/testutil.h" 1
\r
3155 # 17 "./../test/testutil.h"
\r
3156 # 1 "../include/apr_pools.h" 1
\r
3157 # 43 "../include/apr_pools.h"
\r
3158 # 1 "../include/apr.h" 1
\r
3159 # 168 "../include/apr.h"
\r
3160 # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4
\r
3161 # 26 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3162 # 1 "/usr/include/x86_64-linux-gnu/sys/uio.h" 1 3 4
\r
3163 # 28 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4
\r
3164 # 1 "/usr/include/x86_64-linux-gnu/bits/uio.h" 1 3 4
\r
3165 # 43 "/usr/include/x86_64-linux-gnu/bits/uio.h" 3 4
\r
3171 # 29 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4
\r
3172 # 39 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4
\r
3173 extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
\r
3175 # 50 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4
\r
3176 extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
\r
3178 # 65 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4
\r
3179 extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
\r
3180 __off_t __offset) ;
\r
3181 # 77 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4
\r
3182 extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
\r
3183 __off_t __offset) ;
\r
3184 # 27 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
\r
3186 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
3187 # 29 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
\r
3188 # 38 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3189 # 1 "/usr/include/x86_64-linux-gnu/bits/socket.h" 1 3 4
\r
3190 # 27 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
\r
3191 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
3192 # 28 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
\r
3193 # 38 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
\r
3194 # 1 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 1 3 4
\r
3195 # 24 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 3 4
\r
3196 enum __socket_type
\r
3208 SOCK_SEQPACKET = 5,
\r
3221 SOCK_CLOEXEC = 02000000,
\r
3224 SOCK_NONBLOCK = 00004000
\r
3228 # 39 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
\r
3229 # 146 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
\r
3230 # 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4
\r
3231 # 28 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 3 4
\r
3232 typedef unsigned short int sa_family_t;
\r
3233 # 147 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
\r
3238 sa_family_t sa_family;
\r
3241 # 162 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
\r
3242 struct sockaddr_storage
\r
3244 sa_family_t ss_family;
\r
3245 unsigned long int __ss_align;
\r
3246 char __ss_padding[(128 - (2 * sizeof (unsigned long int)))];
\r
3257 MSG_DONTROUTE = 0x04,
\r
3264 MSG_CTRUNC = 0x08,
\r
3270 MSG_DONTWAIT = 0x40,
\r
3274 MSG_WAITALL = 0x100,
\r
3280 MSG_CONFIRM = 0x800,
\r
3284 MSG_ERRQUEUE = 0x2000,
\r
3286 MSG_NOSIGNAL = 0x4000,
\r
3288 MSG_MORE = 0x8000,
\r
3290 MSG_WAITFORONE = 0x10000,
\r
3292 MSG_FASTOPEN = 0x20000000,
\r
3295 MSG_CMSG_CLOEXEC = 0x40000000
\r
3307 socklen_t msg_namelen;
\r
3309 struct iovec *msg_iov;
\r
3310 size_t msg_iovlen;
\r
3312 void *msg_control;
\r
3313 size_t msg_controllen;
\r
3332 __extension__ unsigned char __cmsg_data [];
\r
3335 # 272 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
\r
3336 extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
\r
3337 struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ ));
\r
3338 # 299 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
\r
3348 # 345 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
\r
3349 # 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 1 3 4
\r
3350 # 1 "/usr/include/asm-generic/socket.h" 1 3 4
\r
3354 # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4
\r
3355 # 1 "/usr/include/asm-generic/sockios.h" 1 3 4
\r
3356 # 2 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 2 3 4
\r
3357 # 5 "/usr/include/asm-generic/socket.h" 2 3 4
\r
3358 # 2 "/usr/include/x86_64-linux-gnu/asm/socket.h" 2 3 4
\r
3359 # 346 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
\r
3360 # 379 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
\r
3366 # 39 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
\r
3373 unsigned short int sa_family;
\r
3374 unsigned char sa_data[14];
\r
3389 # 113 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3390 extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ ));
\r
3396 extern int socketpair (int __domain, int __type, int __protocol,
\r
3397 int __fds[2]) __attribute__ ((__nothrow__ ));
\r
3400 extern int bind (int __fd, const struct sockaddr * __addr, socklen_t __len)
\r
3401 __attribute__ ((__nothrow__ ));
\r
3404 extern int getsockname (int __fd, struct sockaddr *__restrict __addr,
\r
3405 socklen_t *__restrict __len) __attribute__ ((__nothrow__ ));
\r
3406 # 137 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3407 extern int connect (int __fd, const struct sockaddr * __addr, socklen_t __len);
\r
3411 extern int getpeername (int __fd, struct sockaddr *__restrict __addr,
\r
3412 socklen_t *__restrict __len) __attribute__ ((__nothrow__ ));
\r
3419 extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);
\r
3426 extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);
\r
3433 extern ssize_t sendto (int __fd, const void *__buf, size_t __n,
\r
3434 int __flags, const struct sockaddr * __addr,
\r
3435 socklen_t __addr_len);
\r
3436 # 174 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3437 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
\r
3438 int __flags, struct sockaddr *__restrict __addr,
\r
3439 socklen_t *__restrict __addr_len);
\r
3447 extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
\r
3449 # 202 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3450 extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
\r
3451 # 219 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3452 extern int getsockopt (int __fd, int __level, int __optname,
\r
3453 void *__restrict __optval,
\r
3454 socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ ));
\r
3459 extern int setsockopt (int __fd, int __level, int __optname,
\r
3460 const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ ));
\r
3466 extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ ));
\r
3467 # 243 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3468 extern int accept (int __fd, struct sockaddr *__restrict __addr,
\r
3469 socklen_t *__restrict __addr_len);
\r
3470 # 261 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
\r
3471 extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ ));
\r
3476 extern int sockatmark (int __fd) __attribute__ ((__nothrow__ ));
\r
3484 extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ ));
\r
3485 # 169 "../include/apr.h" 2
\r
3486 # 178 "../include/apr.h"
\r
3487 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 1 3
\r
3488 # 61 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 3
\r
3489 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 1 3 4
\r
3498 # 1 "/usr/include/stdint.h" 1 3 4
\r
3499 # 26 "/usr/include/stdint.h" 3 4
\r
3500 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4
\r
3501 # 27 "/usr/include/stdint.h" 2 3 4
\r
3502 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
3503 # 28 "/usr/include/stdint.h" 2 3 4
\r
3504 # 48 "/usr/include/stdint.h" 3 4
\r
3505 typedef unsigned char uint8_t;
\r
3506 typedef unsigned short int uint16_t;
\r
3508 typedef unsigned int uint32_t;
\r
3512 typedef unsigned long int uint64_t;
\r
3513 # 65 "/usr/include/stdint.h" 3 4
\r
3514 typedef signed char int_least8_t;
\r
3515 typedef short int int_least16_t;
\r
3516 typedef int int_least32_t;
\r
3518 typedef long int int_least64_t;
\r
3525 typedef unsigned char uint_least8_t;
\r
3526 typedef unsigned short int uint_least16_t;
\r
3527 typedef unsigned int uint_least32_t;
\r
3529 typedef unsigned long int uint_least64_t;
\r
3530 # 90 "/usr/include/stdint.h" 3 4
\r
3531 typedef signed char int_fast8_t;
\r
3533 typedef long int int_fast16_t;
\r
3534 typedef long int int_fast32_t;
\r
3535 typedef long int int_fast64_t;
\r
3536 # 103 "/usr/include/stdint.h" 3 4
\r
3537 typedef unsigned char uint_fast8_t;
\r
3539 typedef unsigned long int uint_fast16_t;
\r
3540 typedef unsigned long int uint_fast32_t;
\r
3541 typedef unsigned long int uint_fast64_t;
\r
3542 # 122 "/usr/include/stdint.h" 3 4
\r
3543 typedef unsigned long int uintptr_t;
\r
3544 # 134 "/usr/include/stdint.h" 3 4
\r
3545 typedef long int intmax_t;
\r
3546 typedef unsigned long int uintmax_t;
\r
3547 # 10 "/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 2 3 4
\r
3548 # 62 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 2 3
\r
3549 # 179 "../include/apr.h" 2
\r
3553 # 1 "/usr/include/x86_64-linux-gnu/sys/wait.h" 1 3 4
\r
3554 # 29 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4
\r
3555 # 1 "/usr/include/signal.h" 1 3 4
\r
3556 # 32 "/usr/include/signal.h" 3 4
\r
3557 # 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4
\r
3558 # 102 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4
\r
3559 extern int __sigismember (const __sigset_t *, int);
\r
3560 extern int __sigaddset (__sigset_t *, int);
\r
3561 extern int __sigdelset (__sigset_t *, int);
\r
3562 # 33 "/usr/include/signal.h" 2 3 4
\r
3570 typedef __sig_atomic_t sig_atomic_t;
\r
3571 # 57 "/usr/include/signal.h" 3 4
\r
3572 # 1 "/usr/include/x86_64-linux-gnu/bits/signum.h" 1 3 4
\r
3573 # 58 "/usr/include/signal.h" 2 3 4
\r
3574 # 75 "/usr/include/signal.h" 3 4
\r
3575 # 1 "/usr/include/time.h" 1 3 4
\r
3576 # 76 "/usr/include/signal.h" 2 3 4
\r
3581 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 1 3 4
\r
3582 # 24 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4
\r
3583 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
3584 # 25 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 2 3 4
\r
3592 typedef union sigval
\r
3597 # 58 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4
\r
3598 typedef __clock_t __sigchld_clock_t;
\r
3611 int _pad[((128 / sizeof (int)) - 4)];
\r
3625 sigval_t si_sigval;
\r
3633 sigval_t si_sigval;
\r
3642 __sigchld_clock_t si_utime;
\r
3643 __sigchld_clock_t si_stime;
\r
3650 short int si_addr_lsb;
\r
3665 unsigned int _arch;
\r
3669 # 153 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4
\r
3801 # 307 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4
\r
3802 typedef struct sigevent
\r
3804 sigval_t sigev_value;
\r
3810 int _pad[((64 / sizeof (int)) - 4)];
\r
3818 void (*_function) (sigval_t);
\r
3819 pthread_attr_t *_attribute;
\r
3838 SIGEV_THREAD_ID = 4
\r
3841 # 81 "/usr/include/signal.h" 2 3 4
\r
3846 typedef void (*__sighandler_t) (int);
\r
3851 extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
\r
3852 __attribute__ ((__nothrow__ ));
\r
3853 # 102 "/usr/include/signal.h" 3 4
\r
3854 extern __sighandler_t signal (int __sig, __sighandler_t __handler)
\r
3855 __attribute__ ((__nothrow__ ));
\r
3856 # 127 "/usr/include/signal.h" 3 4
\r
3857 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ ));
\r
3864 extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ ));
\r
3869 extern int raise (int __sig) __attribute__ ((__nothrow__ ));
\r
3874 extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
\r
3875 __attribute__ ((__nothrow__ ));
\r
3876 extern int gsignal (int __sig) __attribute__ ((__nothrow__ ));
\r
3881 extern void psignal (int __sig, const char *__s);
\r
3886 extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
\r
3887 # 167 "/usr/include/signal.h" 3 4
\r
3888 extern int __sigpause (int __sig_or_mask, int __is_sig);
\r
3889 # 189 "/usr/include/signal.h" 3 4
\r
3890 extern int sigblock (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));
\r
3893 extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));
\r
3896 extern int siggetmask (void) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));
\r
3897 # 209 "/usr/include/signal.h" 3 4
\r
3898 typedef __sighandler_t sig_t;
\r
3904 extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
3907 extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
3910 extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
3913 extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
3916 extern int sigismember (const sigset_t *__set, int __signo)
\r
3917 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
3918 # 245 "/usr/include/signal.h" 3 4
\r
3919 # 1 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 1 3 4
\r
3920 # 24 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 3 4
\r
3928 __sighandler_t sa_handler;
\r
3930 void (*sa_sigaction) (int, siginfo_t *, void *);
\r
3932 __sigaction_handler;
\r
3940 __sigset_t sa_mask;
\r
3946 void (*sa_restorer) (void);
\r
3948 # 246 "/usr/include/signal.h" 2 3 4
\r
3951 extern int sigprocmask (int __how, const sigset_t *__restrict __set,
\r
3952 sigset_t *__restrict __oset) __attribute__ ((__nothrow__ ));
\r
3959 extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
\r
3962 extern int sigaction (int __sig, const struct sigaction *__restrict __act,
\r
3963 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ ));
\r
3966 extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
3973 extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
\r
3974 __attribute__ ((__nonnull__ (1, 2)));
\r
3981 extern int sigwaitinfo (const sigset_t *__restrict __set,
\r
3982 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
\r
3989 extern int sigtimedwait (const sigset_t *__restrict __set,
\r
3990 siginfo_t *__restrict __info,
\r
3991 const struct timespec *__restrict __timeout)
\r
3992 __attribute__ ((__nonnull__ (1)));
\r
3996 extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
\r
3997 __attribute__ ((__nothrow__ ));
\r
3998 # 303 "/usr/include/signal.h" 3 4
\r
3999 extern const char *const _sys_siglist[65];
\r
4000 extern const char *const sys_siglist[65];
\r
4005 __sighandler_t sv_handler;
\r
4011 # 327 "/usr/include/signal.h" 3 4
\r
4012 extern int sigvec (int __sig, const struct sigvec *__vec,
\r
4013 struct sigvec *__ovec) __attribute__ ((__nothrow__ ));
\r
4018 # 1 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 1 3 4
\r
4019 # 29 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4
\r
4020 struct _fpx_sw_bytes
\r
4022 __uint32_t magic1;
\r
4023 __uint32_t extended_size;
\r
4024 __uint64_t xstate_bv;
\r
4025 __uint32_t xstate_size;
\r
4026 __uint32_t padding[7];
\r
4031 unsigned short significand[4];
\r
4032 unsigned short exponent;
\r
4037 unsigned short significand[4];
\r
4038 unsigned short exponent;
\r
4039 unsigned short padding[3];
\r
4044 __uint32_t element[4];
\r
4046 # 121 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4
\r
4057 __uint32_t mxcr_mask;
\r
4058 struct _fpxreg _st[8];
\r
4059 struct _xmmreg _xmm[16];
\r
4060 __uint32_t padding[24];
\r
4082 __uint64_t eflags;
\r
4083 unsigned short cs;
\r
4084 unsigned short gs;
\r
4085 unsigned short fs;
\r
4086 unsigned short __pad0;
\r
4088 __uint64_t trapno;
\r
4089 __uint64_t oldmask;
\r
4091 __extension__ union
\r
4093 struct _fpstate * fpstate;
\r
4094 __uint64_t __fpstate_word;
\r
4096 __uint64_t __reserved1 [8];
\r
4103 __uint64_t xstate_bv;
\r
4104 __uint64_t reserved1[2];
\r
4105 __uint64_t reserved2[5];
\r
4108 struct _ymmh_state
\r
4110 __uint32_t ymmh_space[64];
\r
4115 struct _fpstate fpstate;
\r
4116 struct _xsave_hdr xstate_hdr;
\r
4117 struct _ymmh_state ymmh;
\r
4119 # 333 "/usr/include/signal.h" 2 3 4
\r
4122 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ ));
\r
4130 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
4131 # 343 "/usr/include/signal.h" 2 3 4
\r
4136 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ ));
\r
4139 # 1 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 1 3 4
\r
4140 # 25 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4
\r
4156 # 49 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4
\r
4157 typedef struct sigaltstack
\r
4163 # 350 "/usr/include/signal.h" 2 3 4
\r
4166 # 1 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 1 3 4
\r
4167 # 22 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4
\r
4168 # 1 "/usr/include/signal.h" 1 3 4
\r
4169 # 23 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 2 3 4
\r
4178 __extension__ typedef long long int greg_t;
\r
4184 typedef greg_t gregset_t[23];
\r
4185 # 92 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4
\r
4186 struct _libc_fpxreg
\r
4188 unsigned short int significand[4];
\r
4189 unsigned short int exponent;
\r
4190 unsigned short int padding[3];
\r
4193 struct _libc_xmmreg
\r
4195 __uint32_t element[4];
\r
4198 struct _libc_fpstate
\r
4208 __uint32_t mxcr_mask;
\r
4209 struct _libc_fpxreg _st[8];
\r
4210 struct _libc_xmmreg _xmm[16];
\r
4211 __uint32_t padding[24];
\r
4215 typedef struct _libc_fpstate *fpregset_t;
\r
4222 fpregset_t fpregs;
\r
4223 __extension__ unsigned long long __reserved1 [8];
\r
4227 typedef struct ucontext
\r
4229 unsigned long int uc_flags;
\r
4230 struct ucontext *uc_link;
\r
4232 mcontext_t uc_mcontext;
\r
4233 __sigset_t uc_sigmask;
\r
4234 struct _libc_fpstate __fpregs_mem;
\r
4236 # 353 "/usr/include/signal.h" 2 3 4
\r
4242 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
\r
4243 __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));
\r
4247 extern int sigaltstack (const struct sigaltstack *__restrict __ss,
\r
4248 struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__ ));
\r
4249 # 388 "/usr/include/signal.h" 3 4
\r
4250 # 1 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 1 3 4
\r
4251 # 30 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 3 4
\r
4252 extern int pthread_sigmask (int __how,
\r
4253 const __sigset_t *__restrict __newmask,
\r
4254 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ ));
\r
4257 extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ ));
\r
4258 # 389 "/usr/include/signal.h" 2 3 4
\r
4265 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ ));
\r
4267 extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ ));
\r
4268 # 30 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4
\r
4269 # 102 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4
\r
4270 extern __pid_t wait (__WAIT_STATUS __stat_loc);
\r
4271 # 125 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4
\r
4272 extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
\r
4273 # 135 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4
\r
4274 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 1 3 4
\r
4275 # 24 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4
\r
4276 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
4277 # 25 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 2 3 4
\r
4278 # 136 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4
\r
4279 # 148 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4
\r
4280 extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
\r
4294 extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,
\r
4295 struct rusage * __usage) __attribute__ ((__nothrow__));
\r
4300 extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,
\r
4301 struct rusage *__usage) __attribute__ ((__nothrow__));
\r
4302 # 183 "../include/apr.h" 2
\r
4303 # 193 "../include/apr.h"
\r
4304 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 1 3
\r
4305 # 37 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 3
\r
4306 # 1 "/usr/include/limits.h" 1 3 4
\r
4307 # 143 "/usr/include/limits.h" 3 4
\r
4308 # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4
\r
4309 # 160 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4
\r
4310 # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4
\r
4311 # 38 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4
\r
4312 # 1 "/usr/include/linux/limits.h" 1 3 4
\r
4313 # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4
\r
4314 # 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4
\r
4315 # 144 "/usr/include/limits.h" 2 3 4
\r
4319 # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4
\r
4320 # 148 "/usr/include/limits.h" 2 3 4
\r
4321 # 38 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 2 3
\r
4322 # 194 "../include/apr.h" 2
\r
4323 # 309 "../include/apr.h"
\r
4324 typedef unsigned char apr_byte_t;
\r
4326 typedef short apr_int16_t;
\r
4327 typedef unsigned short apr_uint16_t;
\r
4329 typedef int apr_int32_t;
\r
4330 typedef unsigned int apr_uint32_t;
\r
4331 # 352 "../include/apr.h"
\r
4332 typedef long apr_int64_t;
\r
4333 typedef unsigned long apr_uint64_t;
\r
4336 typedef size_t apr_size_t;
\r
4337 typedef ssize_t apr_ssize_t;
\r
4338 typedef off_t apr_off_t;
\r
4339 typedef socklen_t apr_socklen_t;
\r
4340 typedef ino_t apr_ino_t;
\r
4343 typedef apr_uint64_t apr_uintptr_t;
\r
4344 # 44 "../include/apr_pools.h" 2
\r
4345 # 1 "../include/apr_errno.h" 1
\r
4346 # 28 "../include/apr_errno.h"
\r
4347 # 1 "/usr/include/errno.h" 1 3 4
\r
4348 # 35 "/usr/include/errno.h" 3 4
\r
4349 # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4
\r
4350 # 24 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4
\r
4351 # 1 "/usr/include/linux/errno.h" 1 3 4
\r
4352 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4
\r
4353 # 1 "/usr/include/asm-generic/errno.h" 1 3 4
\r
4357 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
\r
4358 # 5 "/usr/include/asm-generic/errno.h" 2 3 4
\r
4359 # 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4
\r
4360 # 2 "/usr/include/linux/errno.h" 2 3 4
\r
4361 # 25 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4
\r
4362 # 50 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4
\r
4363 extern int *__errno_location (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
4364 # 36 "/usr/include/errno.h" 2 3 4
\r
4365 # 29 "../include/apr_errno.h" 2
\r
4366 # 44 "../include/apr_errno.h"
\r
4367 typedef int apr_status_t;
\r
4375 char * apr_strerror(apr_status_t statcode, char *buf,
\r
4376 apr_size_t bufsize);
\r
4377 # 45 "../include/apr_pools.h" 2
\r
4378 # 1 "../include/apr_general.h" 1
\r
4379 # 29 "../include/apr_general.h"
\r
4380 # 1 "../include/apr_pools.h" 1
\r
4381 # 30 "../include/apr_general.h" 2
\r
4382 # 68 "../include/apr_general.h"
\r
4383 typedef int apr_signum_t;
\r
4384 # 177 "../include/apr_general.h"
\r
4385 apr_status_t apr_initialize(void);
\r
4386 # 191 "../include/apr_general.h"
\r
4387 apr_status_t apr_app_initialize(int *argc,
\r
4388 char const * const * *argv,
\r
4389 char const * const * *env);
\r
4390 # 205 "../include/apr_general.h"
\r
4391 void apr_terminate(void);
\r
4392 # 216 "../include/apr_general.h"
\r
4393 void apr_terminate2(void);
\r
4394 # 233 "../include/apr_general.h"
\r
4395 apr_status_t apr_generate_random_bytes(unsigned char * buf,
\r
4396 apr_size_t length);
\r
4397 # 46 "../include/apr_pools.h" 2
\r
4399 # 1 "../include/apr_want.h" 1
\r
4400 # 48 "../include/apr_pools.h" 2
\r
4401 # 60 "../include/apr_pools.h"
\r
4402 typedef struct apr_pool_t apr_pool_t;
\r
4403 # 148 "../include/apr_pools.h"
\r
4404 typedef int (*apr_abortfunc_t)(int retcode);
\r
4405 # 164 "../include/apr_pools.h"
\r
4406 apr_status_t apr_pool_initialize(void);
\r
4414 void apr_pool_terminate(void);
\r
4422 # 1 "../include/apr_allocator.h" 1
\r
4423 # 28 "../include/apr_allocator.h"
\r
4424 # 1 "../include/apr_want.h" 1
\r
4425 # 29 "../include/apr_allocator.h" 2
\r
4426 # 41 "../include/apr_allocator.h"
\r
4427 typedef struct apr_allocator_t apr_allocator_t;
\r
4429 typedef struct apr_memnode_t apr_memnode_t;
\r
4430 # 54 "../include/apr_allocator.h"
\r
4431 struct apr_memnode_t {
\r
4432 apr_memnode_t *next;
\r
4433 apr_memnode_t **ref;
\r
4434 apr_uint32_t index;
\r
4435 apr_uint32_t free_index;
\r
4436 char *first_avail;
\r
4439 # 74 "../include/apr_allocator.h"
\r
4440 apr_status_t apr_allocator_create(apr_allocator_t **allocator)
\r
4441 __attribute__((nonnull(1)));
\r
4449 void apr_allocator_destroy(apr_allocator_t *allocator)
\r
4450 __attribute__((nonnull(1)));
\r
4458 apr_memnode_t * apr_allocator_alloc(apr_allocator_t *allocator,
\r
4460 __attribute__((nonnull(1)));
\r
4461 # 103 "../include/apr_allocator.h"
\r
4462 void apr_allocator_free(apr_allocator_t *allocator,
\r
4463 apr_memnode_t *memnode)
\r
4464 __attribute__((nonnull(1,2)));
\r
4467 # 1 "../include/apr_pools.h" 1
\r
4468 # 108 "../include/apr_allocator.h" 2
\r
4469 # 120 "../include/apr_allocator.h"
\r
4470 void apr_allocator_owner_set(apr_allocator_t *allocator,
\r
4472 __attribute__((nonnull(1)));
\r
4478 apr_pool_t * apr_allocator_owner_get(apr_allocator_t *allocator)
\r
4479 __attribute__((nonnull(1)));
\r
4487 void apr_allocator_max_free_set(apr_allocator_t *allocator,
\r
4489 __attribute__((nonnull(1)));
\r
4492 # 1 "../include/apr_thread_mutex.h" 1
\r
4493 # 41 "../include/apr_thread_mutex.h"
\r
4494 typedef struct apr_thread_mutex_t apr_thread_mutex_t;
\r
4502 # 1 "../include/apr_pools.h" 1
\r
4503 # 49 "../include/apr_thread_mutex.h" 2
\r
4504 # 65 "../include/apr_thread_mutex.h"
\r
4505 apr_status_t apr_thread_mutex_create(apr_thread_mutex_t **mutex,
\r
4506 unsigned int flags,
\r
4507 apr_pool_t *pool);
\r
4513 apr_status_t apr_thread_mutex_lock(apr_thread_mutex_t *mutex);
\r
4514 # 82 "../include/apr_thread_mutex.h"
\r
4515 apr_status_t apr_thread_mutex_trylock(apr_thread_mutex_t *mutex);
\r
4521 apr_status_t apr_thread_mutex_unlock(apr_thread_mutex_t *mutex);
\r
4527 apr_status_t apr_thread_mutex_destroy(apr_thread_mutex_t *mutex);
\r
4533 apr_pool_t * apr_thread_mutex_pool_get (const apr_thread_mutex_t *thethread_mutex);
\r
4534 # 142 "../include/apr_allocator.h" 2
\r
4542 void apr_allocator_mutex_set(apr_allocator_t *allocator,
\r
4543 apr_thread_mutex_t *mutex)
\r
4544 __attribute__((nonnull(1)));
\r
4550 apr_thread_mutex_t * apr_allocator_mutex_get(
\r
4551 apr_allocator_t *allocator)
\r
4552 __attribute__((nonnull(1)));
\r
4553 # 180 "../include/apr_pools.h" 2
\r
4554 # 196 "../include/apr_pools.h"
\r
4555 apr_status_t apr_pool_create_ex(apr_pool_t **newpool,
\r
4556 apr_pool_t *parent,
\r
4557 apr_abortfunc_t abort_fn,
\r
4558 apr_allocator_t *allocator)
\r
4559 __attribute__((nonnull(1)));
\r
4565 apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool,
\r
4566 apr_abortfunc_t abort_fn,
\r
4567 apr_allocator_t *allocator);
\r
4568 # 226 "../include/apr_pools.h"
\r
4569 apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool,
\r
4570 apr_abortfunc_t abort_fn,
\r
4571 apr_allocator_t *allocator)
\r
4572 __attribute__((nonnull(1)));
\r
4573 # 247 "../include/apr_pools.h"
\r
4574 apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool,
\r
4575 apr_pool_t *parent,
\r
4576 apr_abortfunc_t abort_fn,
\r
4577 apr_allocator_t *allocator,
\r
4578 const char *file_line)
\r
4579 __attribute__((nonnull(1)));
\r
4580 # 264 "../include/apr_pools.h"
\r
4581 apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool,
\r
4582 apr_abortfunc_t abort_fn,
\r
4583 apr_allocator_t *allocator,
\r
4584 const char *file_line);
\r
4585 # 284 "../include/apr_pools.h"
\r
4586 apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,
\r
4587 apr_abortfunc_t abort_fn,
\r
4588 apr_allocator_t *allocator,
\r
4589 const char *file_line)
\r
4590 __attribute__((nonnull(1)));
\r
4591 # 354 "../include/apr_pools.h"
\r
4592 apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)
\r
4593 __attribute__((nonnull(1)));
\r
4594 # 365 "../include/apr_pools.h"
\r
4595 void apr_pool_clear(apr_pool_t *p) __attribute__((nonnull(1)));
\r
4596 # 380 "../include/apr_pools.h"
\r
4597 void apr_pool_clear_debug(apr_pool_t *p,
\r
4598 const char *file_line)
\r
4599 __attribute__((nonnull(1)));
\r
4600 # 395 "../include/apr_pools.h"
\r
4601 void apr_pool_destroy(apr_pool_t *p) __attribute__((nonnull(1)));
\r
4602 # 410 "../include/apr_pools.h"
\r
4603 void apr_pool_destroy_debug(apr_pool_t *p,
\r
4604 const char *file_line)
\r
4605 __attribute__((nonnull(1)));
\r
4606 # 430 "../include/apr_pools.h"
\r
4607 void * apr_palloc(apr_pool_t *p, apr_size_t size)
\r
4611 __attribute__((nonnull(1)));
\r
4612 # 444 "../include/apr_pools.h"
\r
4613 void * apr_palloc_debug(apr_pool_t *p, apr_size_t size,
\r
4614 const char *file_line)
\r
4618 __attribute__((nonnull(1)));
\r
4619 # 476 "../include/apr_pools.h"
\r
4620 void * apr_pcalloc_debug(apr_pool_t *p, apr_size_t size,
\r
4621 const char *file_line)
\r
4622 __attribute__((nonnull(1)));
\r
4623 # 498 "../include/apr_pools.h"
\r
4624 void apr_pool_abort_set(apr_abortfunc_t abortfunc,
\r
4626 __attribute__((nonnull(2)));
\r
4633 apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)
\r
4634 __attribute__((nonnull(1)));
\r
4641 apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)
\r
4642 __attribute__((nonnull(1)));
\r
4643 # 529 "../include/apr_pools.h"
\r
4644 int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
\r
4651 void apr_pool_tag(apr_pool_t *pool, const char *tag)
\r
4652 __attribute__((nonnull(1)));
\r
4653 # 563 "../include/apr_pools.h"
\r
4654 apr_status_t apr_pool_userdata_set(const void *data,
\r
4656 apr_status_t (*cleanup)(void *),
\r
4658 __attribute__((nonnull(2,4)));
\r
4659 # 588 "../include/apr_pools.h"
\r
4660 apr_status_t apr_pool_userdata_setn(
\r
4661 const void *data, const char *key,
\r
4662 apr_status_t (*cleanup)(void *),
\r
4664 __attribute__((nonnull(2,4)));
\r
4672 apr_status_t apr_pool_userdata_get(void **data, const char *key,
\r
4674 __attribute__((nonnull(1,2,3)));
\r
4675 # 628 "../include/apr_pools.h"
\r
4676 void apr_pool_cleanup_register(
\r
4677 apr_pool_t *p, const void *data,
\r
4678 apr_status_t (*plain_cleanup)(void *),
\r
4679 apr_status_t (*child_cleanup)(void *))
\r
4680 __attribute__((nonnull(3,4)));
\r
4681 # 646 "../include/apr_pools.h"
\r
4682 void apr_pool_pre_cleanup_register(
\r
4683 apr_pool_t *p, const void *data,
\r
4684 apr_status_t (*plain_cleanup)(void *))
\r
4685 __attribute__((nonnull(3)));
\r
4686 # 663 "../include/apr_pools.h"
\r
4687 void apr_pool_cleanup_kill(apr_pool_t *p, const void *data,
\r
4688 apr_status_t (*cleanup)(void *))
\r
4689 __attribute__((nonnull(3)));
\r
4690 # 679 "../include/apr_pools.h"
\r
4691 void apr_pool_child_cleanup_set(
\r
4692 apr_pool_t *p, const void *data,
\r
4693 apr_status_t (*plain_cleanup)(void *),
\r
4694 apr_status_t (*child_cleanup)(void *))
\r
4695 __attribute__((nonnull(3,4)));
\r
4696 # 696 "../include/apr_pools.h"
\r
4697 apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data,
\r
4698 apr_status_t (*cleanup)(void *))
\r
4699 __attribute__((nonnull(3)));
\r
4700 # 707 "../include/apr_pools.h"
\r
4701 apr_status_t apr_pool_cleanup_null(void *data);
\r
4709 void apr_pool_cleanup_for_exec(void);
\r
4710 # 18 "./../test/testutil.h" 2
\r
4712 # 1 "./../test/abts.h" 1
\r
4713 # 20 "./../test/testutil.h" 2
\r
4714 # 52 "./../test/testutil.h"
\r
4715 extern apr_pool_t *p;
\r
4719 void apr_assert_success(abts_case* tc, const char *context,
\r
4720 apr_status_t rv, int lineno);
\r
4724 void initialize(void);
\r
4726 abts_suite *testatomic(abts_suite *suite);
\r
4727 abts_suite *testdir(abts_suite *suite);
\r
4728 abts_suite *testdso(abts_suite *suite);
\r
4729 abts_suite *testdup(abts_suite *suite);
\r
4730 abts_suite *testescape(abts_suite *suite);
\r
4731 abts_suite *testenv(abts_suite *suite);
\r
4732 abts_suite *testfile(abts_suite *suite);
\r
4733 abts_suite *testfilecopy(abts_suite *suite);
\r
4734 abts_suite *testfileinfo(abts_suite *suite);
\r
4735 abts_suite *testflock(abts_suite *suite);
\r
4736 abts_suite *testfmt(abts_suite *suite);
\r
4737 abts_suite *testfnmatch(abts_suite *suite);
\r
4738 abts_suite *testgetopt(abts_suite *suite);
\r
4739 abts_suite *testglobalmutex(abts_suite *suite);
\r
4740 abts_suite *testhash(abts_suite *suite);
\r
4741 abts_suite *testipsub(abts_suite *suite);
\r
4742 abts_suite *testlock(abts_suite *suite);
\r
4743 abts_suite *testcond(abts_suite *suite);
\r
4744 abts_suite *testlfs(abts_suite *suite);
\r
4745 abts_suite *testmmap(abts_suite *suite);
\r
4746 abts_suite *testnames(abts_suite *suite);
\r
4747 abts_suite *testoc(abts_suite *suite);
\r
4748 abts_suite *testpath(abts_suite *suite);
\r
4749 abts_suite *testpipe(abts_suite *suite);
\r
4750 abts_suite *testpoll(abts_suite *suite);
\r
4751 abts_suite *testpool(abts_suite *suite);
\r
4752 abts_suite *testproc(abts_suite *suite);
\r
4753 abts_suite *testprocmutex(abts_suite *suite);
\r
4754 abts_suite *testrand(abts_suite *suite);
\r
4755 abts_suite *testsleep(abts_suite *suite);
\r
4756 abts_suite *testshm(abts_suite *suite);
\r
4757 abts_suite *testsock(abts_suite *suite);
\r
4758 abts_suite *testsockets(abts_suite *suite);
\r
4759 abts_suite *testsockopt(abts_suite *suite);
\r
4760 abts_suite *teststr(abts_suite *suite);
\r
4761 abts_suite *teststrnatcmp(abts_suite *suite);
\r
4762 abts_suite *testtable(abts_suite *suite);
\r
4763 abts_suite *testtemp(abts_suite *suite);
\r
4764 abts_suite *testthread(abts_suite *suite);
\r
4765 abts_suite *testtime(abts_suite *suite);
\r
4766 abts_suite *testud(abts_suite *suite);
\r
4767 abts_suite *testuser(abts_suite *suite);
\r
4768 abts_suite *testvsn(abts_suite *suite);
\r
4771 # 1 "./../test/testatomic.c" 1
\r
4772 # 17 "./../test/testatomic.c"
\r
4773 # 1 "./../test/testutil.h" 1
\r
4774 # 19 "./../test/testutil.h"
\r
4775 # 1 "./../test/abts.h" 1
\r
4776 # 20 "./../test/testutil.h" 2
\r
4777 # 18 "./../test/testatomic.c" 2
\r
4778 # 1 "../include/apr_strings.h" 1
\r
4779 # 52 "../include/apr_strings.h"
\r
4780 # 1 "../include/apr_want.h" 1
\r
4781 # 53 "../include/apr_strings.h" 2
\r
4782 # 76 "../include/apr_strings.h"
\r
4783 int apr_strnatcmp(char const *a, char const *b);
\r
4784 # 87 "../include/apr_strings.h"
\r
4785 int apr_strnatcasecmp(char const *a, char const *b);
\r
4793 char * apr_pstrdup(apr_pool_t *p, const char *s);
\r
4794 # 109 "../include/apr_strings.h"
\r
4795 char * apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n)
\r
4800 # 125 "../include/apr_strings.h"
\r
4801 char * apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n);
\r
4802 # 135 "../include/apr_strings.h"
\r
4803 void * apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n)
\r
4815 char * apr_pstrcat(apr_pool_t *p, ...)
\r
4817 __attribute__((sentinel))
\r
4820 # 161 "../include/apr_strings.h"
\r
4821 char * apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,
\r
4822 apr_size_t nvec, apr_size_t *nbytes);
\r
4823 # 172 "../include/apr_strings.h"
\r
4824 char * apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap);
\r
4825 # 182 "../include/apr_strings.h"
\r
4826 char * apr_psprintf(apr_pool_t *p, const char *fmt, ...)
\r
4827 __attribute__((format(printf,2,3)));
\r
4828 # 207 "../include/apr_strings.h"
\r
4829 char * apr_cpystrn(char *dst, const char *src,
\r
4830 apr_size_t dst_size);
\r
4831 # 217 "../include/apr_strings.h"
\r
4832 char * apr_collapse_spaces(char *dest, const char *src);
\r
4833 # 226 "../include/apr_strings.h"
\r
4834 apr_status_t apr_tokenize_to_argv(const char *arg_str,
\r
4836 apr_pool_t *token_context);
\r
4837 # 247 "../include/apr_strings.h"
\r
4838 char * apr_strtok(char *str, const char *sep, char **last);
\r
4839 # 279 "../include/apr_strings.h"
\r
4840 int apr_snprintf(char *buf, apr_size_t len,
\r
4841 const char *format, ...)
\r
4842 __attribute__((format(printf,3,4)));
\r
4843 # 291 "../include/apr_strings.h"
\r
4844 int apr_vsnprintf(char *buf, apr_size_t len, const char *format,
\r
4846 # 301 "../include/apr_strings.h"
\r
4847 char * apr_itoa(apr_pool_t *p, int n);
\r
4855 char * apr_ltoa(apr_pool_t *p, long n);
\r
4863 char * apr_off_t_toa(apr_pool_t *p, apr_off_t n);
\r
4864 # 335 "../include/apr_strings.h"
\r
4865 apr_status_t apr_strtoff(apr_off_t *offset, const char *buf,
\r
4866 char **end, int base);
\r
4867 # 353 "../include/apr_strings.h"
\r
4868 apr_int64_t apr_strtoi64(const char *buf, char **end, int base);
\r
4869 # 362 "../include/apr_strings.h"
\r
4870 apr_int64_t apr_atoi64(const char *buf);
\r
4871 # 372 "../include/apr_strings.h"
\r
4872 char * apr_strfsize(apr_off_t size, char *buf);
\r
4873 # 19 "./../test/testatomic.c" 2
\r
4874 # 1 "../include/apr_thread_proc.h" 1
\r
4875 # 26 "../include/apr_thread_proc.h"
\r
4876 # 1 "../include/apr_file_io.h" 1
\r
4877 # 27 "../include/apr_file_io.h"
\r
4878 # 1 "../include/apr_time.h" 1
\r
4879 # 40 "../include/apr_time.h"
\r
4880 extern const char apr_month_snames[12][4];
\r
4882 extern const char apr_day_snames[7][4];
\r
4886 typedef apr_int64_t apr_time_t;
\r
4887 # 56 "../include/apr_time.h"
\r
4888 typedef apr_int64_t apr_interval_time_t;
\r
4890 typedef apr_int32_t apr_short_interval_time_t;
\r
4891 # 88 "../include/apr_time.h"
\r
4892 apr_time_t apr_time_now(void);
\r
4895 typedef struct apr_time_exp_t apr_time_exp_t;
\r
4902 struct apr_time_exp_t {
\r
4904 apr_int32_t tm_usec;
\r
4906 apr_int32_t tm_sec;
\r
4908 apr_int32_t tm_min;
\r
4910 apr_int32_t tm_hour;
\r
4912 apr_int32_t tm_mday;
\r
4914 apr_int32_t tm_mon;
\r
4916 apr_int32_t tm_year;
\r
4918 apr_int32_t tm_wday;
\r
4920 apr_int32_t tm_yday;
\r
4922 apr_int32_t tm_isdst;
\r
4924 apr_int32_t tm_gmtoff;
\r
4932 apr_status_t apr_time_ansi_put(apr_time_t *result,
\r
4934 # 138 "../include/apr_time.h"
\r
4935 apr_status_t apr_time_exp_tz(apr_time_exp_t *result,
\r
4937 apr_int32_t offs);
\r
4944 apr_status_t apr_time_exp_gmt(apr_time_exp_t *result,
\r
4945 apr_time_t input);
\r
4952 apr_status_t apr_time_exp_lt(apr_time_exp_t *result,
\r
4953 apr_time_t input);
\r
4961 apr_status_t apr_time_exp_get(apr_time_t *result,
\r
4962 apr_time_exp_t *input);
\r
4970 apr_status_t apr_time_exp_gmt_get(apr_time_t *result,
\r
4971 apr_time_exp_t *input);
\r
4978 void apr_sleep(apr_interval_time_t t);
\r
4979 # 193 "../include/apr_time.h"
\r
4980 apr_status_t apr_rfc822_date(char *date_str, apr_time_t t);
\r
4981 # 207 "../include/apr_time.h"
\r
4982 apr_status_t apr_ctime(char *date_str, apr_time_t t);
\r
4983 # 217 "../include/apr_time.h"
\r
4984 apr_status_t apr_strftime(char *s, apr_size_t *retsize,
\r
4985 apr_size_t max, const char *format,
\r
4986 apr_time_exp_t *tm);
\r
4994 void apr_time_clock_hires(apr_pool_t *p);
\r
4995 # 28 "../include/apr_file_io.h" 2
\r
4997 # 1 "../include/apr_file_info.h" 1
\r
4998 # 26 "../include/apr_file_info.h"
\r
4999 # 1 "../include/apr_user.h" 1
\r
5000 # 45 "../include/apr_user.h"
\r
5001 typedef uid_t apr_uid_t;
\r
5002 # 54 "../include/apr_user.h"
\r
5003 typedef gid_t apr_gid_t;
\r
5004 # 66 "../include/apr_user.h"
\r
5005 apr_status_t apr_uid_current(apr_uid_t *userid,
\r
5006 apr_gid_t *groupid,
\r
5008 # 77 "../include/apr_user.h"
\r
5009 apr_status_t apr_uid_name_get(char **username, apr_uid_t userid,
\r
5011 # 88 "../include/apr_user.h"
\r
5012 apr_status_t apr_uid_get(apr_uid_t *userid, apr_gid_t *groupid,
\r
5013 const char *username, apr_pool_t *p);
\r
5014 # 98 "../include/apr_user.h"
\r
5015 apr_status_t apr_uid_homepath_get(char **dirname,
\r
5016 const char *username,
\r
5018 # 123 "../include/apr_user.h"
\r
5019 apr_status_t apr_gid_name_get(char **groupname,
\r
5020 apr_gid_t groupid, apr_pool_t *p);
\r
5021 # 133 "../include/apr_user.h"
\r
5022 apr_status_t apr_gid_get(apr_gid_t *groupid,
\r
5023 const char *groupname, apr_pool_t *p);
\r
5024 # 27 "../include/apr_file_info.h" 2
\r
5026 # 1 "../include/apr_tables.h" 1
\r
5027 # 56 "../include/apr_tables.h"
\r
5028 typedef struct apr_table_t apr_table_t;
\r
5031 typedef struct apr_array_header_t apr_array_header_t;
\r
5034 struct apr_array_header_t {
\r
5050 typedef struct apr_table_entry_t apr_table_entry_t;
\r
5053 struct apr_table_entry_t {
\r
5062 apr_uint32_t key_checksum;
\r
5070 const apr_array_header_t * apr_table_elts(const apr_table_t *t);
\r
5077 int apr_is_empty_table(const apr_table_t *t);
\r
5084 int apr_is_empty_array(const apr_array_header_t *a);
\r
5085 # 121 "../include/apr_tables.h"
\r
5086 apr_array_header_t * apr_array_make(apr_pool_t *p,
\r
5087 int nelts, int elt_size);
\r
5088 # 131 "../include/apr_tables.h"
\r
5089 void * apr_array_push(apr_array_header_t *arr);
\r
5090 # 158 "../include/apr_tables.h"
\r
5091 void * apr_array_pop(apr_array_header_t *arr);
\r
5099 void apr_array_clear(apr_array_header_t *arr);
\r
5107 void apr_array_cat(apr_array_header_t *dst,
\r
5108 const apr_array_header_t *src);
\r
5109 # 186 "../include/apr_tables.h"
\r
5110 apr_array_header_t * apr_array_copy(apr_pool_t *p,
\r
5111 const apr_array_header_t *arr);
\r
5112 # 196 "../include/apr_tables.h"
\r
5113 apr_array_header_t * apr_array_copy_hdr(apr_pool_t *p,
\r
5114 const apr_array_header_t *arr);
\r
5115 # 206 "../include/apr_tables.h"
\r
5116 apr_array_header_t * apr_array_append(apr_pool_t *p,
\r
5117 const apr_array_header_t *first,
\r
5118 const apr_array_header_t *second);
\r
5119 # 221 "../include/apr_tables.h"
\r
5120 char * apr_array_pstrcat(apr_pool_t *p,
\r
5121 const apr_array_header_t *arr,
\r
5123 # 232 "../include/apr_tables.h"
\r
5124 apr_table_t * apr_table_make(apr_pool_t *p, int nelts);
\r
5125 # 241 "../include/apr_tables.h"
\r
5126 apr_table_t * apr_table_copy(apr_pool_t *p,
\r
5127 const apr_table_t *t);
\r
5128 # 252 "../include/apr_tables.h"
\r
5129 apr_table_t * apr_table_clone(apr_pool_t *p,
\r
5130 const apr_table_t *t);
\r
5136 void apr_table_clear(apr_table_t *t);
\r
5137 # 268 "../include/apr_tables.h"
\r
5138 const char * apr_table_get(const apr_table_t *t, const char *key);
\r
5139 # 279 "../include/apr_tables.h"
\r
5140 const char * apr_table_getm(apr_pool_t *p, const apr_table_t *t,
\r
5142 # 291 "../include/apr_tables.h"
\r
5143 void apr_table_set(apr_table_t *t, const char *key,
\r
5145 # 304 "../include/apr_tables.h"
\r
5146 void apr_table_setn(apr_table_t *t, const char *key,
\r
5154 void apr_table_unset(apr_table_t *t, const char *key);
\r
5155 # 323 "../include/apr_tables.h"
\r
5156 void apr_table_merge(apr_table_t *t, const char *key,
\r
5158 # 335 "../include/apr_tables.h"
\r
5159 void apr_table_mergen(apr_table_t *t, const char *key,
\r
5161 # 347 "../include/apr_tables.h"
\r
5162 void apr_table_add(apr_table_t *t, const char *key,
\r
5164 # 360 "../include/apr_tables.h"
\r
5165 void apr_table_addn(apr_table_t *t, const char *key,
\r
5167 # 370 "../include/apr_tables.h"
\r
5168 apr_table_t * apr_table_overlay(apr_pool_t *p,
\r
5169 const apr_table_t *overlay,
\r
5170 const apr_table_t *base);
\r
5171 # 384 "../include/apr_tables.h"
\r
5172 typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,
\r
5173 const char *value);
\r
5174 # 406 "../include/apr_tables.h"
\r
5175 int apr_table_do(apr_table_do_callback_fn_t *comp,
\r
5176 void *rec, const apr_table_t *t, ...)
\r
5178 __attribute__((sentinel))
\r
5181 # 432 "../include/apr_tables.h"
\r
5182 int apr_table_vdo(apr_table_do_callback_fn_t *comp,
\r
5183 void *rec, const apr_table_t *t, va_list vp);
\r
5184 # 478 "../include/apr_tables.h"
\r
5185 void apr_table_overlap(apr_table_t *a, const apr_table_t *b,
\r
5187 # 491 "../include/apr_tables.h"
\r
5188 void apr_table_compress(apr_table_t *t, unsigned flags);
\r
5189 # 29 "../include/apr_file_info.h" 2
\r
5190 # 62 "../include/apr_file_info.h"
\r
5202 # 121 "../include/apr_file_info.h"
\r
5203 typedef struct apr_dir_t apr_dir_t;
\r
5207 typedef apr_int32_t apr_fileperms_t;
\r
5208 # 135 "../include/apr_file_info.h"
\r
5209 typedef dev_t apr_dev_t;
\r
5217 typedef struct apr_finfo_t apr_finfo_t;
\r
5218 # 174 "../include/apr_file_info.h"
\r
5219 struct apr_finfo_t {
\r
5224 apr_int32_t valid;
\r
5226 apr_fileperms_t protection;
\r
5231 apr_filetype_e filetype;
\r
5241 apr_int32_t nlink;
\r
5253 const char *fname;
\r
5257 struct apr_file_t *filehand;
\r
5259 # 229 "../include/apr_file_info.h"
\r
5260 apr_status_t apr_stat(apr_finfo_t *finfo, const char *fname,
\r
5261 apr_int32_t wanted, apr_pool_t *pool);
\r
5262 # 244 "../include/apr_file_info.h"
\r
5263 apr_status_t apr_dir_open(apr_dir_t **new_dir,
\r
5264 const char *dirname,
\r
5265 apr_pool_t *pool);
\r
5271 apr_status_t apr_dir_close(apr_dir_t *thedir);
\r
5272 # 267 "../include/apr_file_info.h"
\r
5273 apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
\r
5274 apr_dir_t *thedir);
\r
5280 apr_status_t apr_dir_rewind(apr_dir_t *thedir);
\r
5281 # 336 "../include/apr_file_info.h"
\r
5282 apr_status_t apr_filepath_root(const char **rootpath,
\r
5283 const char **filepath,
\r
5284 apr_int32_t flags,
\r
5286 # 354 "../include/apr_file_info.h"
\r
5287 apr_status_t apr_filepath_merge(char **newpath,
\r
5288 const char *rootpath,
\r
5289 const char *addpath,
\r
5290 apr_int32_t flags,
\r
5292 # 369 "../include/apr_file_info.h"
\r
5293 apr_status_t apr_filepath_list_split(apr_array_header_t **pathelts,
\r
5294 const char *liststr,
\r
5296 # 382 "../include/apr_file_info.h"
\r
5297 apr_status_t apr_filepath_list_merge(char **liststr,
\r
5298 apr_array_header_t *pathelts,
\r
5300 # 393 "../include/apr_file_info.h"
\r
5301 apr_status_t apr_filepath_get(char **path, apr_int32_t flags,
\r
5309 apr_status_t apr_filepath_set(const char *path, apr_pool_t *p);
\r
5310 # 419 "../include/apr_file_info.h"
\r
5311 apr_status_t apr_filepath_encoding(int *style, apr_pool_t *p);
\r
5312 # 30 "../include/apr_file_io.h" 2
\r
5313 # 1 "../include/apr_inherit.h" 1
\r
5314 # 31 "../include/apr_file_io.h" 2
\r
5318 # 1 "../include/apr_want.h" 1
\r
5319 # 35 "../include/apr_file_io.h" 2
\r
5320 # 180 "../include/apr_file_io.h"
\r
5321 typedef apr_uint32_t apr_fileattrs_t;
\r
5324 typedef int apr_seek_where_t;
\r
5329 typedef struct apr_file_t apr_file_t;
\r
5330 # 250 "../include/apr_file_io.h"
\r
5331 apr_status_t apr_file_open(apr_file_t **newf, const char *fname,
\r
5332 apr_int32_t flag, apr_fileperms_t perm,
\r
5333 apr_pool_t *pool);
\r
5339 apr_status_t apr_file_close(apr_file_t *file);
\r
5340 # 267 "../include/apr_file_io.h"
\r
5341 apr_status_t apr_file_remove(const char *path, apr_pool_t *pool);
\r
5342 # 278 "../include/apr_file_io.h"
\r
5343 apr_status_t apr_file_rename(const char *from_path,
\r
5344 const char *to_path,
\r
5345 apr_pool_t *pool);
\r
5353 apr_status_t apr_file_link(const char *from_path,
\r
5354 const char *to_path);
\r
5355 # 303 "../include/apr_file_io.h"
\r
5356 apr_status_t apr_file_copy(const char *from_path,
\r
5357 const char *to_path,
\r
5358 apr_fileperms_t perms,
\r
5359 apr_pool_t *pool);
\r
5360 # 319 "../include/apr_file_io.h"
\r
5361 apr_status_t apr_file_append(const char *from_path,
\r
5362 const char *to_path,
\r
5363 apr_fileperms_t perms,
\r
5364 apr_pool_t *pool);
\r
5371 apr_status_t apr_file_eof(apr_file_t *fptr);
\r
5372 # 346 "../include/apr_file_io.h"
\r
5373 apr_status_t apr_file_open_stderr(apr_file_t **thefile,
\r
5374 apr_pool_t *pool);
\r
5375 # 356 "../include/apr_file_io.h"
\r
5376 apr_status_t apr_file_open_stdout(apr_file_t **thefile,
\r
5377 apr_pool_t *pool);
\r
5378 # 366 "../include/apr_file_io.h"
\r
5379 apr_status_t apr_file_open_stdin(apr_file_t **thefile,
\r
5380 apr_pool_t *pool);
\r
5381 # 386 "../include/apr_file_io.h"
\r
5382 apr_status_t apr_file_open_flags_stderr(apr_file_t **thefile,
\r
5383 apr_int32_t flags,
\r
5384 apr_pool_t *pool);
\r
5385 # 407 "../include/apr_file_io.h"
\r
5386 apr_status_t apr_file_open_flags_stdout(apr_file_t **thefile,
\r
5387 apr_int32_t flags,
\r
5388 apr_pool_t *pool);
\r
5389 # 428 "../include/apr_file_io.h"
\r
5390 apr_status_t apr_file_open_flags_stdin(apr_file_t **thefile,
\r
5391 apr_int32_t flags,
\r
5392 apr_pool_t *pool);
\r
5393 # 449 "../include/apr_file_io.h"
\r
5394 apr_status_t apr_file_read(apr_file_t *thefile, void *buf,
\r
5395 apr_size_t *nbytes);
\r
5396 # 467 "../include/apr_file_io.h"
\r
5397 apr_status_t apr_file_write(apr_file_t *thefile, const void *buf,
\r
5398 apr_size_t *nbytes);
\r
5399 # 485 "../include/apr_file_io.h"
\r
5400 apr_status_t apr_file_writev(apr_file_t *thefile,
\r
5401 const struct iovec *vec,
\r
5402 apr_size_t nvec, apr_size_t *nbytes);
\r
5403 # 509 "../include/apr_file_io.h"
\r
5404 apr_status_t apr_file_read_full(apr_file_t *thefile, void *buf,
\r
5405 apr_size_t nbytes,
\r
5406 apr_size_t *bytes_read);
\r
5407 # 533 "../include/apr_file_io.h"
\r
5408 apr_status_t apr_file_write_full(apr_file_t *thefile,
\r
5410 apr_size_t nbytes,
\r
5411 apr_size_t *bytes_written);
\r
5412 # 552 "../include/apr_file_io.h"
\r
5413 apr_status_t apr_file_writev_full(apr_file_t *thefile,
\r
5414 const struct iovec *vec,
\r
5416 apr_size_t *nbytes);
\r
5422 apr_status_t apr_file_putc(char ch, apr_file_t *thefile);
\r
5429 apr_status_t apr_file_getc(char *ch, apr_file_t *thefile);
\r
5436 apr_status_t apr_file_ungetc(char ch, apr_file_t *thefile);
\r
5437 # 585 "../include/apr_file_io.h"
\r
5438 apr_status_t apr_file_gets(char *str, int len,
\r
5439 apr_file_t *thefile);
\r
5446 apr_status_t apr_file_puts(const char *str, apr_file_t *thefile);
\r
5452 apr_status_t apr_file_flush(apr_file_t *thefile);
\r
5458 apr_status_t apr_file_sync(apr_file_t *thefile);
\r
5464 apr_status_t apr_file_datasync(apr_file_t *thefile);
\r
5465 # 620 "../include/apr_file_io.h"
\r
5466 apr_status_t apr_file_dup(apr_file_t **new_file,
\r
5467 apr_file_t *old_file,
\r
5469 # 632 "../include/apr_file_io.h"
\r
5470 apr_status_t apr_file_dup2(apr_file_t *new_file,
\r
5471 apr_file_t *old_file,
\r
5473 # 647 "../include/apr_file_io.h"
\r
5474 apr_status_t apr_file_setaside(apr_file_t **new_file,
\r
5475 apr_file_t *old_file,
\r
5477 # 662 "../include/apr_file_io.h"
\r
5478 apr_status_t apr_file_buffer_set(apr_file_t *thefile,
\r
5480 apr_size_t bufsize);
\r
5486 apr_size_t apr_file_buffer_size_get(apr_file_t *thefile);
\r
5487 # 683 "../include/apr_file_io.h"
\r
5488 apr_status_t apr_file_seek(apr_file_t *thefile,
\r
5489 apr_seek_where_t where,
\r
5490 apr_off_t *offset);
\r
5491 # 700 "../include/apr_file_io.h"
\r
5492 apr_status_t apr_file_pipe_create(apr_file_t **in,
\r
5494 apr_pool_t *pool);
\r
5495 # 723 "../include/apr_file_io.h"
\r
5496 apr_status_t apr_file_pipe_create_ex(apr_file_t **in,
\r
5498 apr_int32_t blocking,
\r
5499 apr_pool_t *pool);
\r
5507 apr_status_t apr_file_namedpipe_create(const char *filename,
\r
5508 apr_fileperms_t perm,
\r
5509 apr_pool_t *pool);
\r
5516 apr_status_t apr_file_pipe_timeout_get(apr_file_t *thepipe,
\r
5517 apr_interval_time_t *timeout);
\r
5525 apr_status_t apr_file_pipe_timeout_set(apr_file_t *thepipe,
\r
5526 apr_interval_time_t timeout);
\r
5527 # 766 "../include/apr_file_io.h"
\r
5528 apr_status_t apr_file_lock(apr_file_t *thefile, int type);
\r
5534 apr_status_t apr_file_unlock(apr_file_t *thefile);
\r
5535 # 781 "../include/apr_file_io.h"
\r
5536 apr_status_t apr_file_name_get(const char **new_path,
\r
5537 apr_file_t *thefile);
\r
5545 apr_status_t apr_file_data_get(void **data, const char *key,
\r
5546 apr_file_t *file);
\r
5547 # 800 "../include/apr_file_io.h"
\r
5548 apr_status_t apr_file_data_set(apr_file_t *file, void *data,
\r
5550 apr_status_t (*cleanup)(void *));
\r
5551 # 811 "../include/apr_file_io.h"
\r
5552 int apr_file_printf(apr_file_t *fptr,
\r
5553 const char *format, ...)
\r
5554 __attribute__((format(printf,2,3)));
\r
5555 # 827 "../include/apr_file_io.h"
\r
5556 apr_status_t apr_file_perms_set(const char *fname,
\r
5557 apr_fileperms_t perms);
\r
5558 # 846 "../include/apr_file_io.h"
\r
5559 apr_status_t apr_file_attrs_set(const char *fname,
\r
5560 apr_fileattrs_t attributes,
\r
5561 apr_fileattrs_t attr_mask,
\r
5562 apr_pool_t *pool);
\r
5563 # 859 "../include/apr_file_io.h"
\r
5564 apr_status_t apr_file_mtime_set(const char *fname,
\r
5566 apr_pool_t *pool);
\r
5574 apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,
\r
5575 apr_pool_t *pool);
\r
5576 # 879 "../include/apr_file_io.h"
\r
5577 apr_status_t apr_dir_make_recursive(const char *path,
\r
5578 apr_fileperms_t perm,
\r
5579 apr_pool_t *pool);
\r
5580 # 890 "../include/apr_file_io.h"
\r
5581 apr_status_t apr_dir_remove(const char *path, apr_pool_t *pool);
\r
5589 apr_status_t apr_file_info_get(apr_finfo_t *finfo,
\r
5590 apr_int32_t wanted,
\r
5591 apr_file_t *thefile);
\r
5592 # 909 "../include/apr_file_io.h"
\r
5593 apr_status_t apr_file_trunc(apr_file_t *fp, apr_off_t offset);
\r
5600 apr_int32_t apr_file_flags_get(apr_file_t *f);
\r
5605 apr_pool_t * apr_file_pool_get (const apr_file_t *thefile);
\r
5611 apr_status_t apr_file_inherit_set( apr_file_t *thefile);
\r
5616 apr_status_t apr_file_inherit_unset( apr_file_t *thefile);
\r
5617 # 951 "../include/apr_file_io.h"
\r
5618 apr_status_t apr_file_mktemp(apr_file_t **fp, char *templ,
\r
5619 apr_int32_t flags, apr_pool_t *p);
\r
5620 # 964 "../include/apr_file_io.h"
\r
5621 apr_status_t apr_temp_dir_get(const char **temp_dir,
\r
5623 # 27 "../include/apr_thread_proc.h" 2
\r
5628 # 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4
\r
5629 # 25 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
\r
5630 # 1 "/usr/include/time.h" 1 3 4
\r
5631 # 26 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4
\r
5633 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4
\r
5634 # 28 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4
\r
5635 # 55 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
\r
5638 int tz_minuteswest;
\r
5642 typedef struct timezone *__restrict __timezone_ptr_t;
\r
5643 # 71 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
\r
5644 extern int gettimeofday (struct timeval *__restrict __tv,
\r
5645 __timezone_ptr_t __tz) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
5650 extern int settimeofday (const struct timeval *__tv,
\r
5651 const struct timezone *__tz)
\r
5652 __attribute__ ((__nothrow__ ));
\r
5658 extern int adjtime (const struct timeval *__delta,
\r
5659 struct timeval *__olddelta) __attribute__ ((__nothrow__ ));
\r
5664 enum __itimer_which
\r
5670 ITIMER_VIRTUAL = 1,
\r
5683 struct timeval it_interval;
\r
5685 struct timeval it_value;
\r
5693 typedef int __itimer_which_t;
\r
5698 extern int getitimer (__itimer_which_t __which,
\r
5699 struct itimerval *__value) __attribute__ ((__nothrow__ ));
\r
5704 extern int setitimer (__itimer_which_t __which,
\r
5705 const struct itimerval *__restrict __new,
\r
5706 struct itimerval *__restrict __old) __attribute__ ((__nothrow__ ));
\r
5711 extern int utimes (const char *__file, const struct timeval __tvp[2])
\r
5712 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
5716 extern int lutimes (const char *__file, const struct timeval __tvp[2])
\r
5717 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
5720 extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ ));
\r
5721 # 32 "../include/apr_thread_proc.h" 2
\r
5722 # 1 "/usr/include/x86_64-linux-gnu/sys/resource.h" 1 3 4
\r
5723 # 24 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4
\r
5724 # 1 "/usr/include/x86_64-linux-gnu/bits/resource.h" 1 3 4
\r
5725 # 31 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4
\r
5726 enum __rlimit_resource
\r
5756 RLIMIT_NOFILE = 7,
\r
5757 __RLIMIT_OFILE = RLIMIT_NOFILE,
\r
5766 __RLIMIT_NPROC = 6,
\r
5770 __RLIMIT_MEMLOCK = 8,
\r
5774 __RLIMIT_LOCKS = 10,
\r
5778 __RLIMIT_SIGPENDING = 11,
\r
5782 __RLIMIT_MSGQUEUE = 12,
\r
5788 __RLIMIT_NICE = 13,
\r
5793 __RLIMIT_RTPRIO = 14,
\r
5799 __RLIMIT_RTTIME = 15,
\r
5802 __RLIMIT_NLIMITS = 16,
\r
5803 __RLIM_NLIMITS = __RLIMIT_NLIMITS
\r
5807 # 131 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4
\r
5808 typedef __rlim_t rlim_t;
\r
5823 # 158 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4
\r
5831 RUSAGE_CHILDREN = -1
\r
5832 # 176 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4
\r
5837 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4
\r
5838 # 180 "/usr/include/x86_64-linux-gnu/bits/resource.h" 2 3 4
\r
5849 struct timeval ru_utime;
\r
5851 struct timeval ru_stime;
\r
5853 __extension__ union
\r
5855 long int ru_maxrss;
\r
5856 __syscall_slong_t __ru_maxrss_word;
\r
5861 __extension__ union
\r
5863 long int ru_ixrss;
\r
5864 __syscall_slong_t __ru_ixrss_word;
\r
5867 __extension__ union
\r
5869 long int ru_idrss;
\r
5870 __syscall_slong_t __ru_idrss_word;
\r
5873 __extension__ union
\r
5875 long int ru_isrss;
\r
5876 __syscall_slong_t __ru_isrss_word;
\r
5880 __extension__ union
\r
5882 long int ru_minflt;
\r
5883 __syscall_slong_t __ru_minflt_word;
\r
5886 __extension__ union
\r
5888 long int ru_majflt;
\r
5889 __syscall_slong_t __ru_majflt_word;
\r
5892 __extension__ union
\r
5894 long int ru_nswap;
\r
5895 __syscall_slong_t __ru_nswap_word;
\r
5899 __extension__ union
\r
5901 long int ru_inblock;
\r
5902 __syscall_slong_t __ru_inblock_word;
\r
5905 __extension__ union
\r
5907 long int ru_oublock;
\r
5908 __syscall_slong_t __ru_oublock_word;
\r
5911 __extension__ union
\r
5913 long int ru_msgsnd;
\r
5914 __syscall_slong_t __ru_msgsnd_word;
\r
5917 __extension__ union
\r
5919 long int ru_msgrcv;
\r
5920 __syscall_slong_t __ru_msgrcv_word;
\r
5923 __extension__ union
\r
5925 long int ru_nsignals;
\r
5926 __syscall_slong_t __ru_nsignals_word;
\r
5931 __extension__ union
\r
5933 long int ru_nvcsw;
\r
5934 __syscall_slong_t __ru_nvcsw_word;
\r
5938 __extension__ union
\r
5940 long int ru_nivcsw;
\r
5941 __syscall_slong_t __ru_nivcsw_word;
\r
5951 enum __priority_which
\r
5960 # 25 "/usr/include/x86_64-linux-gnu/sys/resource.h" 2 3 4
\r
5961 # 42 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4
\r
5962 typedef int __rlimit_resource_t;
\r
5963 typedef int __rusage_who_t;
\r
5964 typedef int __priority_which_t;
\r
5970 extern int getrlimit (__rlimit_resource_t __resource,
\r
5971 struct rlimit *__rlimits) __attribute__ ((__nothrow__ ));
\r
5972 # 69 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4
\r
5973 extern int setrlimit (__rlimit_resource_t __resource,
\r
5974 const struct rlimit *__rlimits) __attribute__ ((__nothrow__ ));
\r
5975 # 87 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4
\r
5976 extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__ ));
\r
5982 extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__ ));
\r
5986 extern int setpriority (__priority_which_t __which, id_t __who, int __prio)
\r
5987 __attribute__ ((__nothrow__ ));
\r
5988 # 33 "../include/apr_thread_proc.h" 2
\r
5989 # 45 "../include/apr_thread_proc.h"
\r
6011 APR_PROC_EXIT = 1,
\r
6012 APR_PROC_SIGNAL = 2,
\r
6013 APR_PROC_SIGNAL_CORE = 4
\r
6015 # 133 "../include/apr_thread_proc.h"
\r
6016 typedef struct apr_proc_t {
\r
6025 # 161 "../include/apr_thread_proc.h"
\r
6027 # 173 "../include/apr_thread_proc.h"
\r
6028 typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,
\r
6029 const char *description);
\r
6032 typedef struct apr_thread_t apr_thread_t;
\r
6035 typedef struct apr_threadattr_t apr_threadattr_t;
\r
6038 typedef struct apr_procattr_t apr_procattr_t;
\r
6041 typedef struct apr_thread_once_t apr_thread_once_t;
\r
6044 typedef struct apr_threadkey_t apr_threadkey_t;
\r
6047 typedef struct apr_other_child_rec_t apr_other_child_rec_t;
\r
6052 typedef void *( *apr_thread_start_t)(apr_thread_t*, void*);
\r
6059 APR_KILL_AFTER_TIMEOUT,
\r
6061 APR_KILL_ONLY_ONCE
\r
6062 } apr_kill_conditions_e;
\r
6063 # 218 "../include/apr_thread_proc.h"
\r
6064 apr_status_t apr_threadattr_create(apr_threadattr_t **new_attr,
\r
6065 apr_pool_t *cont);
\r
6072 apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,
\r
6081 apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr);
\r
6088 apr_status_t apr_threadattr_stacksize_set(apr_threadattr_t *attr,
\r
6089 apr_size_t stacksize);
\r
6090 # 255 "../include/apr_thread_proc.h"
\r
6091 apr_status_t apr_threadattr_guardsize_set(apr_threadattr_t *attr,
\r
6092 apr_size_t guardsize);
\r
6093 # 266 "../include/apr_thread_proc.h"
\r
6094 apr_status_t apr_thread_create(apr_thread_t **new_thread,
\r
6095 apr_threadattr_t *attr,
\r
6096 apr_thread_start_t func,
\r
6097 void *data, apr_pool_t *cont);
\r
6104 apr_status_t apr_thread_exit(apr_thread_t *thd,
\r
6105 apr_status_t retval);
\r
6112 apr_status_t apr_thread_join(apr_status_t *retval,
\r
6113 apr_thread_t *thd);
\r
6118 void apr_thread_yield(void);
\r
6126 apr_status_t apr_thread_once_init(apr_thread_once_t **control,
\r
6128 # 310 "../include/apr_thread_proc.h"
\r
6129 apr_status_t apr_thread_once(apr_thread_once_t *control,
\r
6130 void (*func)(void));
\r
6136 apr_status_t apr_thread_detach(apr_thread_t *thd);
\r
6144 apr_status_t apr_thread_data_get(void **data, const char *key,
\r
6145 apr_thread_t *thread);
\r
6146 # 335 "../include/apr_thread_proc.h"
\r
6147 apr_status_t apr_thread_data_set(void *data, const char *key,
\r
6148 apr_status_t (*cleanup) (void *),
\r
6149 apr_thread_t *thread);
\r
6157 apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
\r
6158 void (*dest)(void *),
\r
6159 apr_pool_t *cont);
\r
6166 apr_status_t apr_threadkey_private_get(void **new_mem,
\r
6167 apr_threadkey_t *key);
\r
6174 apr_status_t apr_threadkey_private_set(void *priv,
\r
6175 apr_threadkey_t *key);
\r
6181 apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key);
\r
6189 apr_status_t apr_threadkey_data_get(void **data, const char *key,
\r
6190 apr_threadkey_t *threadkey);
\r
6191 # 387 "../include/apr_thread_proc.h"
\r
6192 apr_status_t apr_threadkey_data_set(void *data, const char *key,
\r
6193 apr_status_t (*cleanup) (void *),
\r
6194 apr_threadkey_t *threadkey);
\r
6195 # 398 "../include/apr_thread_proc.h"
\r
6196 apr_status_t apr_procattr_create(apr_procattr_t **new_attr,
\r
6197 apr_pool_t *cont);
\r
6198 # 415 "../include/apr_thread_proc.h"
\r
6199 apr_status_t apr_procattr_io_set(apr_procattr_t *attr,
\r
6200 apr_int32_t in, apr_int32_t out,
\r
6202 # 434 "../include/apr_thread_proc.h"
\r
6203 apr_status_t apr_procattr_child_in_set(struct apr_procattr_t *attr,
\r
6204 apr_file_t *child_in,
\r
6205 apr_file_t *parent_in);
\r
6206 # 451 "../include/apr_thread_proc.h"
\r
6207 apr_status_t apr_procattr_child_out_set(struct apr_procattr_t *attr,
\r
6208 apr_file_t *child_out,
\r
6209 apr_file_t *parent_out);
\r
6210 # 468 "../include/apr_thread_proc.h"
\r
6211 apr_status_t apr_procattr_child_err_set(struct apr_procattr_t *attr,
\r
6212 apr_file_t *child_err,
\r
6213 apr_file_t *parent_err);
\r
6214 # 479 "../include/apr_thread_proc.h"
\r
6215 apr_status_t apr_procattr_dir_set(apr_procattr_t *attr,
\r
6217 # 493 "../include/apr_thread_proc.h"
\r
6218 apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr,
\r
6219 apr_cmdtype_e cmd);
\r
6226 apr_status_t apr_procattr_detach_set(apr_procattr_t *attr,
\r
6227 apr_int32_t detach);
\r
6228 # 517 "../include/apr_thread_proc.h"
\r
6229 apr_status_t apr_procattr_limit_set(apr_procattr_t *attr,
\r
6231 struct rlimit *limit);
\r
6232 # 533 "../include/apr_thread_proc.h"
\r
6233 apr_status_t apr_procattr_child_errfn_set(apr_procattr_t *attr,
\r
6234 apr_child_errfn_t *errfn);
\r
6235 # 548 "../include/apr_thread_proc.h"
\r
6236 apr_status_t apr_procattr_error_check_set(apr_procattr_t *attr,
\r
6238 # 558 "../include/apr_thread_proc.h"
\r
6239 apr_status_t apr_procattr_addrspace_set(apr_procattr_t *attr,
\r
6240 apr_int32_t addrspace);
\r
6241 # 569 "../include/apr_thread_proc.h"
\r
6242 apr_status_t apr_procattr_user_set(apr_procattr_t *attr,
\r
6243 const char *username,
\r
6244 const char *password);
\r
6251 apr_status_t apr_procattr_group_set(apr_procattr_t *attr,
\r
6252 const char *groupname);
\r
6253 # 591 "../include/apr_thread_proc.h"
\r
6254 apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont);
\r
6255 # 610 "../include/apr_thread_proc.h"
\r
6256 apr_status_t apr_proc_create(apr_proc_t *new_proc,
\r
6257 const char *progname,
\r
6258 const char * const *args,
\r
6259 const char * const *env,
\r
6260 apr_procattr_t *attr,
\r
6261 apr_pool_t *pool);
\r
6262 # 643 "../include/apr_thread_proc.h"
\r
6263 apr_status_t apr_proc_wait(apr_proc_t *proc,
\r
6264 int *exitcode, apr_exit_why_e *exitwhy,
\r
6265 apr_wait_how_e waithow);
\r
6266 # 673 "../include/apr_thread_proc.h"
\r
6267 apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc,
\r
6269 apr_exit_why_e *exitwhy,
\r
6270 apr_wait_how_e waithow,
\r
6272 # 688 "../include/apr_thread_proc.h"
\r
6273 apr_status_t apr_proc_detach(int daemonize);
\r
6274 # 707 "../include/apr_thread_proc.h"
\r
6275 void apr_proc_other_child_register(apr_proc_t *proc,
\r
6276 void (*maintenance) (int reason,
\r
6279 void *data, apr_file_t *write_fd,
\r
6281 # 723 "../include/apr_thread_proc.h"
\r
6282 void apr_proc_other_child_unregister(void *data);
\r
6283 # 745 "../include/apr_thread_proc.h"
\r
6284 apr_status_t apr_proc_other_child_alert(apr_proc_t *proc,
\r
6287 # 756 "../include/apr_thread_proc.h"
\r
6288 void apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,
\r
6297 void apr_proc_other_child_refresh_all(int reason);
\r
6304 apr_status_t apr_proc_kill(apr_proc_t *proc, int sig);
\r
6305 # 787 "../include/apr_thread_proc.h"
\r
6306 void apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *proc,
\r
6307 apr_kill_conditions_e how);
\r
6308 # 798 "../include/apr_thread_proc.h"
\r
6309 apr_status_t apr_setup_signal_thread(void);
\r
6310 # 807 "../include/apr_thread_proc.h"
\r
6311 apr_status_t apr_signal_thread(int(*signal_handler)(int signum));
\r
6319 apr_pool_t * apr_thread_pool_get (const apr_thread_t *thethread);
\r
6320 # 20 "./../test/testatomic.c" 2
\r
6323 # 1 "../include/apr_atomic.h" 1
\r
6324 # 47 "../include/apr_atomic.h"
\r
6325 apr_status_t apr_atomic_init(apr_pool_t *p);
\r
6326 # 59 "../include/apr_atomic.h"
\r
6327 apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem);
\r
6334 void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val);
\r
6342 apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val);
\r
6349 void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val);
\r
6356 apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem);
\r
6363 int apr_atomic_dec32(volatile apr_uint32_t *mem);
\r
6364 # 105 "../include/apr_atomic.h"
\r
6365 apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,
\r
6366 apr_uint32_t cmp);
\r
6374 apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val);
\r
6375 # 124 "../include/apr_atomic.h"
\r
6376 void* apr_atomic_casptr(volatile void **mem, void *with, const void *cmp);
\r
6384 void* apr_atomic_xchgptr(volatile void **mem, void *with);
\r
6385 # 23 "./../test/testatomic.c" 2
\r
6386 # 37 "./../test/testatomic.c"
\r
6387 static void test_init(abts_case *tc, void *data)
\r
6389 apr_assert_success(tc, "Could not initliaze atomics", apr_atomic_init(p), 39);
\r
6392 static void test_set32(abts_case *tc, void *data)
\r
6395 apr_atomic_set32(&y32, 2);
\r
6396 abts_int_equal(tc, 2, y32, 46);
\r
6399 static void test_read32(abts_case *tc, void *data)
\r
6402 apr_atomic_set32(&y32, 2);
\r
6403 abts_int_equal(tc, 2, apr_atomic_read32(&y32), 53);
\r
6406 static void test_dec32(abts_case *tc, void *data)
\r
6411 apr_atomic_set32(&y32, 2);
\r
6413 rv = apr_atomic_dec32(&y32);
\r
6414 abts_int_equal(tc, 1, y32, 64);
\r
6415 abts_assert(tc, "atomic_dec returned zero when it shouldn't", rv != 0, 65);;
\r
6417 rv = apr_atomic_dec32(&y32);
\r
6418 abts_int_equal(tc, 0, y32, 68);
\r
6419 abts_assert(tc, "atomic_dec didn't returned zero when it should", rv == 0, 69);;
\r
6422 static void test_xchg32(abts_case *tc, void *data)
\r
6424 apr_uint32_t oldval;
\r
6427 apr_atomic_set32(&y32, 100);
\r
6428 oldval = apr_atomic_xchg32(&y32, 50);
\r
6430 abts_int_equal(tc, 100, oldval, 80);
\r
6431 abts_int_equal(tc, 50, y32, 81);
\r
6434 static void test_xchgptr(abts_case *tc, void *data)
\r
6437 void *ref = "little piggy";
\r
6438 volatile void *target_ptr = ref;
\r
6441 old_ptr = apr_atomic_xchgptr(&target_ptr, &a);
\r
6442 abts_ptr_equal(tc, ref, old_ptr, 92);
\r
6443 abts_ptr_equal(tc, &a, (void *) target_ptr, 93);
\r
6446 static void test_cas_equal(abts_case *tc, void *data)
\r
6448 apr_uint32_t casval = 0;
\r
6449 apr_uint32_t oldval;
\r
6451 oldval = apr_atomic_cas32(&casval, 12, 0);
\r
6452 abts_int_equal(tc, 0, oldval, 102);
\r
6453 abts_int_equal(tc, 12, casval, 103);
\r
6456 static void test_cas_equal_nonnull(abts_case *tc, void *data)
\r
6458 apr_uint32_t casval = 12;
\r
6459 apr_uint32_t oldval;
\r
6461 oldval = apr_atomic_cas32(&casval, 23, 12);
\r
6462 abts_int_equal(tc, 12, oldval, 112);
\r
6463 abts_int_equal(tc, 23, casval, 113);
\r
6466 static void test_cas_notequal(abts_case *tc, void *data)
\r
6468 apr_uint32_t casval = 12;
\r
6469 apr_uint32_t oldval;
\r
6471 oldval = apr_atomic_cas32(&casval, 23, 2);
\r
6472 abts_int_equal(tc, 12, oldval, 122);
\r
6473 abts_int_equal(tc, 12, casval, 123);
\r
6476 static void test_casptr_equal(abts_case *tc, void *data)
\r
6479 volatile void *target_ptr = ((void*)0);
\r
6482 old_ptr = apr_atomic_casptr(&target_ptr, &a, ((void*)0));
\r
6483 abts_ptr_equal(tc, ((void*)0), old_ptr, 133);
\r
6484 abts_ptr_equal(tc, &a, (void *) target_ptr, 134);
\r
6487 static void test_casptr_equal_nonnull(abts_case *tc, void *data)
\r
6490 volatile void *target_ptr = &a;
\r
6493 old_ptr = apr_atomic_casptr(&target_ptr, &b, &a);
\r
6494 abts_ptr_equal(tc, &a, old_ptr, 144);
\r
6495 abts_ptr_equal(tc, &b, (void *) target_ptr, 145);
\r
6498 static void test_casptr_notequal(abts_case *tc, void *data)
\r
6501 volatile void *target_ptr = &a;
\r
6504 old_ptr = apr_atomic_casptr(&target_ptr, &a, &b);
\r
6505 abts_ptr_equal(tc, &a, old_ptr, 155);
\r
6506 abts_ptr_equal(tc, &a, (void *) target_ptr, 156);
\r
6509 static void test_add32(abts_case *tc, void *data)
\r
6511 apr_uint32_t oldval;
\r
6514 apr_atomic_set32(&y32, 23);
\r
6515 oldval = apr_atomic_add32(&y32, 4);
\r
6516 abts_int_equal(tc, 23, oldval, 166);
\r
6517 abts_int_equal(tc, 27, y32, 167);
\r
6520 static void test_add32_neg(abts_case *tc, void *data)
\r
6522 apr_uint32_t oldval;
\r
6525 apr_atomic_set32(&y32, 23);
\r
6526 oldval = apr_atomic_add32(&y32, -10);
\r
6527 abts_int_equal(tc, 23, oldval, 177);
\r
6528 abts_int_equal(tc, 13, y32, 178);
\r
6531 static void test_inc32(abts_case *tc, void *data)
\r
6533 apr_uint32_t oldval;
\r
6536 apr_atomic_set32(&y32, 23);
\r
6537 oldval = apr_atomic_inc32(&y32);
\r
6538 abts_int_equal(tc, 23, oldval, 188);
\r
6539 abts_int_equal(tc, 24, y32, 189);
\r
6542 static void test_set_add_inc_sub(abts_case *tc, void *data)
\r
6546 apr_atomic_set32(&y32, 0);
\r
6547 apr_atomic_add32(&y32, 20);
\r
6548 apr_atomic_inc32(&y32);
\r
6549 apr_atomic_sub32(&y32, 10);
\r
6551 abts_int_equal(tc, 11, y32, 201);
\r
6554 static void test_wrap_zero(abts_case *tc, void *data)
\r
6558 apr_uint32_t minus1 = -1;
\r
6561 apr_atomic_set32(&y32, 0);
\r
6562 rv = apr_atomic_dec32(&y32);
\r
6564 abts_assert(tc, "apr_atomic_dec32 on zero returned zero.", rv != 0, 214);;
\r
6565 str = apr_psprintf(p, "zero wrap failed: 0 - 1 = %d", y32);
\r
6566 abts_assert(tc, str, y32 == minus1, 216);;
\r
6569 static void test_inc_neg1(abts_case *tc, void *data)
\r
6571 apr_uint32_t y32 = -1;
\r
6572 apr_uint32_t minus1 = -1;
\r
6576 rv = apr_atomic_inc32(&y32);
\r
6578 abts_assert(tc, "apr_atomic_inc32 didn't return the old value.", rv == minus1, 228);;
\r
6579 str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);
\r
6580 abts_assert(tc, str, y32 == 0, 230);;
\r
6586 void * thread_func_mutex(apr_thread_t *thd, void *data);
\r
6587 void * thread_func_atomic(apr_thread_t *thd, void *data);
\r
6589 apr_thread_mutex_t *thread_lock;
\r
6590 volatile apr_uint32_t mutex_locks = 0;
\r
6591 volatile apr_uint32_t atomic_ops = 0;
\r
6592 apr_status_t exit_ret_val = 123;
\r
6594 void * thread_func_mutex(apr_thread_t *thd, void *data)
\r
6598 for (i = 0; i < 1; i++) {
\r
6599 apr_thread_mutex_lock(thread_lock);
\r
6601 apr_thread_mutex_unlock(thread_lock);
\r
6603 apr_thread_exit(thd, exit_ret_val);
\r
6604 return ((void*)0);
\r
6607 void * thread_func_atomic(apr_thread_t *thd, void *data)
\r
6611 for (i = 0; i < 1 ; i++) {
\r
6612 apr_atomic_inc32(&atomic_ops);
\r
6613 apr_atomic_add32(&atomic_ops, 2);
\r
6614 apr_atomic_dec32(&atomic_ops);
\r
6615 apr_atomic_dec32(&atomic_ops);
\r
6617 apr_thread_exit(thd, exit_ret_val);
\r
6618 return ((void*)0);
\r
6621 static void test_atomics_threaded(abts_case *tc, void *data)
\r
6623 apr_thread_t *t1[3];
\r
6624 apr_thread_t *t2[3];
\r
6632 rv = apr_thread_mutex_create(&thread_lock, 0x0, p);
\r
6633 apr_assert_success(tc, "Could not create lock", rv, 283);
\r
6635 for (i = 0; i < 3; i++) {
\r
6636 apr_status_t r1, r2;
\r
6637 r1 = apr_thread_create(&t1[i], ((void*)0), thread_func_mutex, ((void*)0), p);
\r
6638 r2 = apr_thread_create(&t2[i], ((void*)0), thread_func_atomic, ((void*)0), p);
\r
6639 abts_assert(tc, "Failed creating threads", !r1 && !r2, 289);;
\r
6642 for (i = 0; i < 3; i++) {
\r
6643 apr_status_t s1, s2;
\r
6644 apr_thread_join(&s1, t1[i]);
\r
6645 apr_thread_join(&s2, t2[i]);
\r
6647 abts_assert(tc, "Invalid return value from thread_join", s1 == exit_ret_val && s2 == exit_ret_val, 298);;
\r
6651 abts_int_equal(tc, 3 * 1, mutex_locks, 301);
\r
6652 abts_int_equal(tc, 3 * 1, apr_atomic_read32(&atomic_ops), 303);
\r
6655 rv = apr_thread_mutex_destroy(thread_lock);
\r
6656 abts_assert(tc, "Failed creating threads", rv == 0, 306);;
\r
6659 typedef struct tbox_t tbox_t;
\r
6663 apr_uint32_t *mem;
\r
6664 apr_uint32_t preval;
\r
6665 apr_uint32_t postval;
\r
6666 apr_uint32_t loop;
\r
6667 void (*func)(tbox_t *box);
\r
6670 static __inline__ void busyloop_read32(tbox_t *tbox)
\r
6675 val = apr_atomic_read32(tbox->mem);
\r
6677 if (val != tbox->preval) {
\r
6678 apr_thread_yield();
\r
6685 static void busyloop_set32(tbox_t *tbox)
\r
6688 busyloop_read32(tbox);
\r
6689 apr_atomic_set32(tbox->mem, tbox->postval);
\r
6690 } while (--tbox->loop);
\r
6693 static void busyloop_add32(tbox_t *tbox)
\r
6698 busyloop_read32(tbox);
\r
6699 val = apr_atomic_add32(tbox->mem, tbox->postval);
\r
6700 apr_thread_mutex_lock(thread_lock);
\r
6701 abts_int_equal(tbox->tc, val, tbox->preval, 350);
\r
6702 apr_thread_mutex_unlock(thread_lock);
\r
6703 } while (--tbox->loop);
\r
6706 static void busyloop_sub32(tbox_t *tbox)
\r
6709 busyloop_read32(tbox);
\r
6710 apr_atomic_sub32(tbox->mem, tbox->postval);
\r
6711 } while (--tbox->loop);
\r
6714 static void busyloop_inc32(tbox_t *tbox)
\r
6719 busyloop_read32(tbox);
\r
6720 val = apr_atomic_inc32(tbox->mem);
\r
6721 apr_thread_mutex_lock(thread_lock);
\r
6722 abts_int_equal(tbox->tc, val, tbox->preval, 371);
\r
6723 apr_thread_mutex_unlock(thread_lock);
\r
6724 } while (--tbox->loop);
\r
6727 static void busyloop_dec32(tbox_t *tbox)
\r
6732 busyloop_read32(tbox);
\r
6733 val = apr_atomic_dec32(tbox->mem);
\r
6734 apr_thread_mutex_lock(thread_lock);
\r
6735 abts_int_nequal(tbox->tc, 0, val, 384);
\r
6736 apr_thread_mutex_unlock(thread_lock);
\r
6737 } while (--tbox->loop);
\r
6740 static void busyloop_cas32(tbox_t *tbox)
\r
6746 val = apr_atomic_cas32(tbox->mem, tbox->postval, tbox->preval);
\r
6748 if (val != tbox->preval) {
\r
6749 apr_thread_yield();
\r
6754 } while (--tbox->loop);
\r
6757 static void busyloop_xchg32(tbox_t *tbox)
\r
6762 busyloop_read32(tbox);
\r
6763 val = apr_atomic_xchg32(tbox->mem, tbox->postval);
\r
6764 apr_thread_mutex_lock(thread_lock);
\r
6765 abts_int_equal(tbox->tc, val, tbox->preval, 413);
\r
6766 apr_thread_mutex_unlock(thread_lock);
\r
6767 } while (--tbox->loop);
\r
6770 static void * thread_func_busyloop(apr_thread_t *thd, void *data)
\r
6772 tbox_t *tbox = data;
\r
6776 apr_thread_exit(thd, 0);
\r
6778 return ((void*)0);
\r
6781 static void test_atomics_busyloop_threaded(abts_case *tc, void *data)
\r
6785 apr_uint32_t count = 0;
\r
6787 apr_thread_t *thread[3];
\r
6789 rv = apr_thread_mutex_create(&thread_lock, 0x0, p);
\r
6790 apr_assert_success(tc, "Could not create lock", rv, 438);
\r
6793 for (i = 0; i < 3; i++) {
\r
6795 tbox[i].mem = &count;
\r
6796 tbox[i].loop = 50;
\r
6799 tbox[0].preval = 98;
\r
6800 tbox[0].postval = 3891;
\r
6801 tbox[0].func = busyloop_add32;
\r
6803 tbox[1].preval = 3989;
\r
6804 tbox[1].postval = 1010;
\r
6805 tbox[1].func = busyloop_sub32;
\r
6807 tbox[2].preval = 2979;
\r
6808 tbox[2].postval = 0;
\r
6809 tbox[2].func = busyloop_inc32;
\r
6811 tbox[3].preval = 2980;
\r
6812 tbox[3].postval = 16384;
\r
6813 tbox[3].func = busyloop_set32;
\r
6815 tbox[4].preval = 16384;
\r
6816 tbox[4].postval = 0;
\r
6817 tbox[4].func = busyloop_dec32;
\r
6819 tbox[5].preval = 16383;
\r
6820 tbox[5].postval = 1048576;
\r
6821 tbox[5].func = busyloop_cas32;
\r
6823 tbox[6].preval = 1048576;
\r
6824 tbox[6].postval = 98;
\r
6825 tbox[6].func = busyloop_xchg32;
\r
6828 for (i = 0; i < 3; i++) {
\r
6829 rv = apr_thread_create(&thread[i], ((void*)0), thread_func_busyloop,
\r
6831 abts_assert(tc, "Failed creating thread", rv == 0, 479);;
\r
6835 apr_atomic_set32(tbox->mem, 98);
\r
6837 for (i = 0; i < 3; i++) {
\r
6838 apr_status_t retval;
\r
6839 rv = apr_thread_join(&retval, thread[i]);
\r
6840 abts_assert(tc, "Thread join failed", rv == 0, 488);;
\r
6841 abts_assert(tc, "Invalid return value from thread_join", retval == 0, 489);;
\r
6844 abts_int_equal(tbox->tc, 98, count, 492);
\r
6846 rv = apr_thread_mutex_destroy(thread_lock);
\r
6847 abts_assert(tc, "Failed creating threads", rv == 0, 495);;
\r
6852 abts_suite *testatomic(abts_suite *suite)
\r
6854 suite = abts_add_suite(suite, "./../test/testatomic.c");
\r
6856 abts_run_test(suite, test_init, ((void*)0));
\r
6857 abts_run_test(suite, test_set32, ((void*)0));
\r
6858 abts_run_test(suite, test_read32, ((void*)0));
\r
6859 abts_run_test(suite, test_dec32, ((void*)0));
\r
6860 abts_run_test(suite, test_xchg32, ((void*)0));
\r
6861 abts_run_test(suite, test_xchgptr, ((void*)0));
\r
6862 abts_run_test(suite, test_cas_equal, ((void*)0));
\r
6863 abts_run_test(suite, test_cas_equal_nonnull, ((void*)0));
\r
6864 abts_run_test(suite, test_cas_notequal, ((void*)0));
\r
6865 abts_run_test(suite, test_casptr_equal, ((void*)0));
\r
6866 abts_run_test(suite, test_casptr_equal_nonnull, ((void*)0));
\r
6867 abts_run_test(suite, test_casptr_notequal, ((void*)0));
\r
6868 abts_run_test(suite, test_add32, ((void*)0));
\r
6869 abts_run_test(suite, test_add32_neg, ((void*)0));
\r
6870 abts_run_test(suite, test_inc32, ((void*)0));
\r
6871 abts_run_test(suite, test_set_add_inc_sub, ((void*)0));
\r
6872 abts_run_test(suite, test_wrap_zero, ((void*)0));
\r
6873 abts_run_test(suite, test_inc_neg1, ((void*)0));
\r
6876 abts_run_test(suite, test_atomics_threaded, ((void*)0));
\r
6877 abts_run_test(suite, test_atomics_busyloop_threaded, ((void*)0));
\r
6883 # 1 "./../test/testutil.c" 1
\r
6884 # 20 "./../test/testutil.c"
\r
6885 # 1 "./../test/abts.h" 1
\r
6886 # 21 "./../test/testutil.c" 2
\r
6887 # 1 "./../test/testutil.h" 1
\r
6888 # 19 "./../test/testutil.h"
\r
6889 # 1 "./../test/abts.h" 1
\r
6890 # 20 "./../test/testutil.h" 2
\r
6891 # 22 "./../test/testutil.c" 2
\r
6896 void apr_assert_success(abts_case* tc, const char* context, apr_status_t rv,
\r
6899 if (rv == ((20000 + 50000) + 23)) {
\r
6900 abts_not_impl(tc, context, lineno);
\r
6901 } else if (rv != 0) {
\r
6902 char buf[8096], ebuf[128];
\r
6903 sprintf(buf, "%s (%d): %s\n", context, rv,
\r
6904 apr_strerror(rv, ebuf, sizeof ebuf));
\r
6905 abts_fail(tc, buf, lineno);
\r
6909 void initialize(void) {
\r
6911 atexit(apr_terminate);
\r
6913 apr_pool_create_ex(&p, ((void*)0), ((void*)0), ((void*)0));
\r
6916 # 1 "./../locks/unix/thread_mutex.c" 1
\r
6917 # 17 "./../locks/unix/thread_mutex.c"
\r
6918 # 1 "../include/arch/unix/apr_arch_thread_mutex.h" 1
\r
6919 # 21 "../include/arch/unix/apr_arch_thread_mutex.h"
\r
6920 # 1 "../include/arch/unix/apr_private.h" 1
\r
6921 # 999 "../include/arch/unix/apr_private.h"
\r
6922 # 1 "../include/arch/unix/../apr_private_common.h" 1
\r
6923 # 27 "../include/arch/unix/../apr_private_common.h"
\r
6924 apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,
\r
6925 const char *liststr,
\r
6929 apr_status_t apr_filepath_list_merge_impl(char **liststr,
\r
6930 apr_array_header_t *pathelts,
\r
6933 # 1000 "../include/arch/unix/apr_private.h" 2
\r
6934 # 22 "../include/arch/unix/apr_arch_thread_mutex.h" 2
\r
6937 # 1 "../include/apr_portable.h" 1
\r
6938 # 32 "../include/apr_portable.h"
\r
6939 # 1 "../include/apr_network_io.h" 1
\r
6940 # 31 "../include/apr_network_io.h"
\r
6941 # 1 "/usr/include/netinet/in.h" 1 3 4
\r
6942 # 22 "/usr/include/netinet/in.h" 3 4
\r
6943 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 1 3 4
\r
6944 # 23 "/usr/include/netinet/in.h" 2 3 4
\r
6952 typedef uint32_t in_addr_t;
\r
6960 # 1 "/usr/include/x86_64-linux-gnu/bits/in.h" 1 3 4
\r
6961 # 112 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4
\r
6964 struct in_addr ip_dst;
\r
6971 struct in_addr imr_multiaddr;
\r
6972 struct in_addr imr_address;
\r
6980 struct in_addr ipi_spec_dst;
\r
6981 struct in_addr ipi_addr;
\r
6983 # 38 "/usr/include/netinet/in.h" 2 3 4
\r
7008 IPPROTO_DCCP = 33,
\r
7010 IPPROTO_IPV6 = 41,
\r
7012 IPPROTO_RSVP = 46,
\r
7022 IPPROTO_BEETPH = 94,
\r
7024 IPPROTO_ENCAP = 98,
\r
7026 IPPROTO_PIM = 103,
\r
7028 IPPROTO_COMP = 108,
\r
7030 IPPROTO_SCTP = 132,
\r
7032 IPPROTO_UDPLITE = 136,
\r
7034 IPPROTO_RAW = 255,
\r
7045 IPPROTO_HOPOPTS = 0,
\r
7047 IPPROTO_ROUTING = 43,
\r
7049 IPPROTO_FRAGMENT = 44,
\r
7051 IPPROTO_ICMPV6 = 58,
\r
7053 IPPROTO_NONE = 59,
\r
7055 IPPROTO_DSTOPTS = 60,
\r
7063 typedef uint16_t in_port_t;
\r
7069 IPPORT_DISCARD = 9,
\r
7070 IPPORT_SYSTAT = 11,
\r
7071 IPPORT_DAYTIME = 13,
\r
7072 IPPORT_NETSTAT = 15,
\r
7074 IPPORT_TELNET = 23,
\r
7076 IPPORT_TIMESERVER = 37,
\r
7077 IPPORT_NAMESERVER = 42,
\r
7078 IPPORT_WHOIS = 43,
\r
7083 IPPORT_FINGER = 79,
\r
7084 IPPORT_TTYLINK = 87,
\r
7085 IPPORT_SUPDUP = 95,
\r
7088 IPPORT_EXECSERVER = 512,
\r
7089 IPPORT_LOGINSERVER = 513,
\r
7090 IPPORT_CMDSERVER = 514,
\r
7091 IPPORT_EFSSERVER = 520,
\r
7094 IPPORT_BIFFUDP = 512,
\r
7095 IPPORT_WHOSERVER = 513,
\r
7096 IPPORT_ROUTESERVER = 520,
\r
7099 IPPORT_RESERVED = 1024,
\r
7102 IPPORT_USERRESERVED = 5000
\r
7104 # 209 "/usr/include/netinet/in.h" 3 4
\r
7109 uint8_t __u6_addr8[16];
\r
7111 uint16_t __u6_addr16[8];
\r
7112 uint32_t __u6_addr32[4];
\r
7123 extern const struct in6_addr in6addr_any;
\r
7124 extern const struct in6_addr in6addr_loopback;
\r
7125 # 237 "/usr/include/netinet/in.h" 3 4
\r
7126 struct sockaddr_in
\r
7128 sa_family_t sin_family;
\r
7129 in_port_t sin_port;
\r
7130 struct in_addr sin_addr;
\r
7133 unsigned char sin_zero[sizeof (struct sockaddr) -
\r
7134 (sizeof (unsigned short int)) -
\r
7135 sizeof (in_port_t) -
\r
7136 sizeof (struct in_addr)];
\r
7141 struct sockaddr_in6
\r
7143 sa_family_t sin6_family;
\r
7144 in_port_t sin6_port;
\r
7145 uint32_t sin6_flowinfo;
\r
7146 struct in6_addr sin6_addr;
\r
7147 uint32_t sin6_scope_id;
\r
7156 struct in_addr imr_multiaddr;
\r
7159 struct in_addr imr_interface;
\r
7162 struct ip_mreq_source
\r
7165 struct in_addr imr_multiaddr;
\r
7168 struct in_addr imr_interface;
\r
7171 struct in_addr imr_sourceaddr;
\r
7180 struct in6_addr ipv6mr_multiaddr;
\r
7183 unsigned int ipv6mr_interface;
\r
7192 uint32_t gr_interface;
\r
7195 struct sockaddr_storage gr_group;
\r
7198 struct group_source_req
\r
7201 uint32_t gsr_interface;
\r
7204 struct sockaddr_storage gsr_group;
\r
7207 struct sockaddr_storage gsr_source;
\r
7212 struct ip_msfilter
\r
7215 struct in_addr imsf_multiaddr;
\r
7218 struct in_addr imsf_interface;
\r
7221 uint32_t imsf_fmode;
\r
7224 uint32_t imsf_numsrc;
\r
7226 struct in_addr imsf_slist[1];
\r
7233 struct group_filter
\r
7236 uint32_t gf_interface;
\r
7239 struct sockaddr_storage gf_group;
\r
7242 uint32_t gf_fmode;
\r
7245 uint32_t gf_numsrc;
\r
7247 struct sockaddr_storage gf_slist[1];
\r
7249 # 374 "/usr/include/netinet/in.h" 3 4
\r
7250 extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
7251 extern uint16_t ntohs (uint16_t __netshort)
\r
7252 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
7253 extern uint32_t htonl (uint32_t __hostlong)
\r
7254 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
7255 extern uint16_t htons (uint16_t __hostshort)
\r
7256 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
7262 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4
\r
7263 # 386 "/usr/include/netinet/in.h" 2 3 4
\r
7264 # 501 "/usr/include/netinet/in.h" 3 4
\r
7265 extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ ));
\r
7268 extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
\r
7269 __attribute__ ((__nothrow__ ));
\r
7270 # 32 "../include/apr_network_io.h" 2
\r
7271 # 108 "../include/apr_network_io.h"
\r
7273 APR_SHUTDOWN_READ,
\r
7274 APR_SHUTDOWN_WRITE,
\r
7275 APR_SHUTDOWN_READWRITE
\r
7276 } apr_shutdown_how_e;
\r
7277 # 172 "../include/apr_network_io.h"
\r
7281 } apr_interface_e;
\r
7282 # 193 "../include/apr_network_io.h"
\r
7283 typedef struct apr_socket_t apr_socket_t;
\r
7287 typedef struct apr_hdtr_t apr_hdtr_t;
\r
7289 typedef struct in_addr apr_in_addr_t;
\r
7291 typedef struct apr_ipsubnet_t apr_ipsubnet_t;
\r
7294 typedef apr_uint16_t apr_port_t;
\r
7299 typedef struct apr_sockaddr_t apr_sockaddr_t;
\r
7303 struct apr_sockaddr_t {
\r
7313 apr_int32_t family;
\r
7315 apr_socklen_t salen;
\r
7326 apr_sockaddr_t *next;
\r
7330 struct sockaddr_in sin;
\r
7333 struct sockaddr_in6 sin6;
\r
7338 struct sockaddr_storage sas;
\r
7342 # 263 "../include/apr_network_io.h"
\r
7343 struct apr_hdtr_t {
\r
7345 struct iovec* headers;
\r
7349 struct iovec* trailers;
\r
7353 # 287 "../include/apr_network_io.h"
\r
7354 apr_status_t apr_socket_create(apr_socket_t **new_sock,
\r
7355 int family, int type,
\r
7357 apr_pool_t *cont);
\r
7358 # 305 "../include/apr_network_io.h"
\r
7359 apr_status_t apr_socket_shutdown(apr_socket_t *thesocket,
\r
7360 apr_shutdown_how_e how);
\r
7366 apr_status_t apr_socket_close(apr_socket_t *thesocket);
\r
7367 # 321 "../include/apr_network_io.h"
\r
7368 apr_status_t apr_socket_bind(apr_socket_t *sock,
\r
7369 apr_sockaddr_t *sa);
\r
7370 # 331 "../include/apr_network_io.h"
\r
7371 apr_status_t apr_socket_listen(apr_socket_t *sock,
\r
7372 apr_int32_t backlog);
\r
7373 # 345 "../include/apr_network_io.h"
\r
7374 apr_status_t apr_socket_accept(apr_socket_t **new_sock,
\r
7375 apr_socket_t *sock,
\r
7376 apr_pool_t *connection_pool);
\r
7384 apr_status_t apr_socket_connect(apr_socket_t *sock,
\r
7385 apr_sockaddr_t *sa);
\r
7386 # 370 "../include/apr_network_io.h"
\r
7387 apr_status_t apr_socket_atreadeof(apr_socket_t *sock,
\r
7389 # 396 "../include/apr_network_io.h"
\r
7390 apr_status_t apr_sockaddr_info_get(apr_sockaddr_t **sa,
\r
7391 const char *hostname,
\r
7392 apr_int32_t family,
\r
7394 apr_int32_t flags,
\r
7396 # 411 "../include/apr_network_io.h"
\r
7397 apr_status_t apr_getnameinfo(char **hostname,
\r
7398 apr_sockaddr_t *sa,
\r
7399 apr_int32_t flags);
\r
7400 # 445 "../include/apr_network_io.h"
\r
7401 apr_status_t apr_parse_addr_port(char **addr,
\r
7406 # 459 "../include/apr_network_io.h"
\r
7407 apr_status_t apr_gethostname(char *buf, int len, apr_pool_t *cont);
\r
7415 apr_status_t apr_socket_data_get(void **data, const char *key,
\r
7416 apr_socket_t *sock);
\r
7417 # 477 "../include/apr_network_io.h"
\r
7418 apr_status_t apr_socket_data_set(apr_socket_t *sock, void *data,
\r
7420 apr_status_t (*cleanup)(void*));
\r
7421 # 498 "../include/apr_network_io.h"
\r
7422 apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf,
\r
7424 # 519 "../include/apr_network_io.h"
\r
7425 apr_status_t apr_socket_sendv(apr_socket_t *sock,
\r
7426 const struct iovec *vec,
\r
7427 apr_int32_t nvec, apr_size_t *len);
\r
7428 # 530 "../include/apr_network_io.h"
\r
7429 apr_status_t apr_socket_sendto(apr_socket_t *sock,
\r
7430 apr_sockaddr_t *where,
\r
7431 apr_int32_t flags, const char *buf,
\r
7433 # 548 "../include/apr_network_io.h"
\r
7434 apr_status_t apr_socket_recvfrom(apr_sockaddr_t *from,
\r
7435 apr_socket_t *sock,
\r
7436 apr_int32_t flags, char *buf,
\r
7438 # 573 "../include/apr_network_io.h"
\r
7439 apr_status_t apr_socket_sendfile(apr_socket_t *sock,
\r
7442 apr_off_t *offset,
\r
7444 apr_int32_t flags);
\r
7445 # 601 "../include/apr_network_io.h"
\r
7446 apr_status_t apr_socket_recv(apr_socket_t *sock,
\r
7447 char *buf, apr_size_t *len);
\r
7448 # 626 "../include/apr_network_io.h"
\r
7449 apr_status_t apr_socket_opt_set(apr_socket_t *sock,
\r
7450 apr_int32_t opt, apr_int32_t on);
\r
7451 # 640 "../include/apr_network_io.h"
\r
7452 apr_status_t apr_socket_timeout_set(apr_socket_t *sock,
\r
7453 apr_interval_time_t t);
\r
7454 # 662 "../include/apr_network_io.h"
\r
7455 apr_status_t apr_socket_opt_get(apr_socket_t *sock,
\r
7456 apr_int32_t opt, apr_int32_t *on);
\r
7463 apr_status_t apr_socket_timeout_get(apr_socket_t *sock,
\r
7464 apr_interval_time_t *t);
\r
7472 apr_status_t apr_socket_atmark(apr_socket_t *sock,
\r
7474 # 690 "../include/apr_network_io.h"
\r
7475 apr_status_t apr_socket_addr_get(apr_sockaddr_t **sa,
\r
7476 apr_interface_e which,
\r
7477 apr_socket_t *sock);
\r
7478 # 701 "../include/apr_network_io.h"
\r
7479 apr_status_t apr_sockaddr_ip_get(char **addr,
\r
7480 apr_sockaddr_t *sockaddr);
\r
7487 apr_status_t apr_sockaddr_ip_getbuf(char *buf, apr_size_t buflen,
\r
7488 apr_sockaddr_t *sockaddr);
\r
7489 # 722 "../include/apr_network_io.h"
\r
7490 int apr_sockaddr_equal(const apr_sockaddr_t *addr1,
\r
7491 const apr_sockaddr_t *addr2);
\r
7492 # 733 "../include/apr_network_io.h"
\r
7493 int apr_sockaddr_is_wildcard(const apr_sockaddr_t *addr);
\r
7500 apr_status_t apr_socket_type_get(apr_socket_t *sock,
\r
7508 apr_status_t apr_getservbyname(apr_sockaddr_t *sockaddr,
\r
7509 const char *servname);
\r
7510 # 758 "../include/apr_network_io.h"
\r
7511 apr_status_t apr_ipsubnet_create(apr_ipsubnet_t **ipsub,
\r
7512 const char *ipstr,
\r
7513 const char *mask_or_numbits,
\r
7515 # 770 "../include/apr_network_io.h"
\r
7516 int apr_ipsubnet_test(apr_ipsubnet_t *ipsub, apr_sockaddr_t *sa);
\r
7517 # 791 "../include/apr_network_io.h"
\r
7518 apr_status_t apr_socket_protocol_get(apr_socket_t *sock,
\r
7524 apr_pool_t * apr_socket_pool_get (const apr_socket_t *thesocket);
\r
7529 apr_status_t apr_socket_inherit_set( apr_socket_t *thesocket);
\r
7534 apr_status_t apr_socket_inherit_unset( apr_socket_t *thesocket);
\r
7535 # 823 "../include/apr_network_io.h"
\r
7536 apr_status_t apr_mcast_join(apr_socket_t *sock,
\r
7537 apr_sockaddr_t *join,
\r
7538 apr_sockaddr_t *iface,
\r
7539 apr_sockaddr_t *source);
\r
7540 # 838 "../include/apr_network_io.h"
\r
7541 apr_status_t apr_mcast_leave(apr_socket_t *sock,
\r
7542 apr_sockaddr_t *addr,
\r
7543 apr_sockaddr_t *iface,
\r
7544 apr_sockaddr_t *source);
\r
7545 # 850 "../include/apr_network_io.h"
\r
7546 apr_status_t apr_mcast_hops(apr_socket_t *sock,
\r
7554 apr_status_t apr_mcast_loopback(apr_socket_t *sock,
\r
7563 apr_status_t apr_mcast_interface(apr_socket_t *sock,
\r
7564 apr_sockaddr_t *iface);
\r
7565 # 33 "../include/apr_portable.h" 2
\r
7567 # 1 "../include/apr_global_mutex.h" 1
\r
7568 # 26 "../include/apr_global_mutex.h"
\r
7569 # 1 "../include/apr_proc_mutex.h" 1
\r
7570 # 44 "../include/apr_proc_mutex.h"
\r
7575 APR_LOCK_PROC_PTHREAD,
\r
7576 APR_LOCK_POSIXSEM,
\r
7581 typedef struct apr_proc_mutex_t apr_proc_mutex_t;
\r
7582 # 79 "../include/apr_proc_mutex.h"
\r
7583 apr_status_t apr_proc_mutex_create(apr_proc_mutex_t **mutex,
\r
7584 const char *fname,
\r
7585 apr_lockmech_e mech,
\r
7586 apr_pool_t *pool);
\r
7587 # 95 "../include/apr_proc_mutex.h"
\r
7588 apr_status_t apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,
\r
7589 const char *fname,
\r
7590 apr_pool_t *pool);
\r
7597 apr_status_t apr_proc_mutex_lock(apr_proc_mutex_t *mutex);
\r
7598 # 113 "../include/apr_proc_mutex.h"
\r
7599 apr_status_t apr_proc_mutex_trylock(apr_proc_mutex_t *mutex);
\r
7605 apr_status_t apr_proc_mutex_unlock(apr_proc_mutex_t *mutex);
\r
7611 apr_status_t apr_proc_mutex_destroy(apr_proc_mutex_t *mutex);
\r
7619 apr_status_t apr_proc_mutex_cleanup(void *mutex);
\r
7626 const char * apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex);
\r
7633 const char * apr_proc_mutex_name(apr_proc_mutex_t *mutex);
\r
7638 const char * apr_proc_mutex_defname(void);
\r
7644 apr_pool_t * apr_proc_mutex_pool_get (const apr_proc_mutex_t *theproc_mutex);
\r
7645 # 27 "../include/apr_global_mutex.h" 2
\r
7646 # 46 "../include/apr_global_mutex.h"
\r
7647 typedef struct apr_global_mutex_t apr_global_mutex_t;
\r
7648 # 74 "../include/apr_global_mutex.h"
\r
7649 apr_status_t apr_global_mutex_create(apr_global_mutex_t **mutex,
\r
7650 const char *fname,
\r
7651 apr_lockmech_e mech,
\r
7652 apr_pool_t *pool);
\r
7653 # 90 "../include/apr_global_mutex.h"
\r
7654 apr_status_t apr_global_mutex_child_init(
\r
7655 apr_global_mutex_t **mutex,
\r
7656 const char *fname,
\r
7657 apr_pool_t *pool);
\r
7664 apr_status_t apr_global_mutex_lock(apr_global_mutex_t *mutex);
\r
7665 # 109 "../include/apr_global_mutex.h"
\r
7666 apr_status_t apr_global_mutex_trylock(apr_global_mutex_t *mutex);
\r
7672 apr_status_t apr_global_mutex_unlock(apr_global_mutex_t *mutex);
\r
7678 apr_status_t apr_global_mutex_destroy(apr_global_mutex_t *mutex);
\r
7684 const char * apr_global_mutex_lockfile(apr_global_mutex_t *mutex);
\r
7692 const char * apr_global_mutex_name(apr_global_mutex_t *mutex);
\r
7698 apr_pool_t * apr_global_mutex_pool_get (const apr_global_mutex_t *theglobal_mutex);
\r
7699 # 35 "../include/apr_portable.h" 2
\r
7702 # 1 "../include/apr_dso.h" 1
\r
7703 # 44 "../include/apr_dso.h"
\r
7704 typedef struct apr_dso_handle_t apr_dso_handle_t;
\r
7709 typedef void * apr_dso_handle_sym_t;
\r
7710 # 59 "../include/apr_dso.h"
\r
7711 apr_status_t apr_dso_load(apr_dso_handle_t **res_handle,
\r
7712 const char *path, apr_pool_t *ctx);
\r
7718 apr_status_t apr_dso_unload(apr_dso_handle_t *handle);
\r
7726 apr_status_t apr_dso_sym(apr_dso_handle_sym_t *ressym,
\r
7727 apr_dso_handle_t *handle,
\r
7728 const char *symname);
\r
7736 const char * apr_dso_error(apr_dso_handle_t *dso, char *buf, apr_size_t bufsize);
\r
7737 # 38 "../include/apr_portable.h" 2
\r
7738 # 1 "../include/apr_shm.h" 1
\r
7739 # 43 "../include/apr_shm.h"
\r
7740 typedef struct apr_shm_t apr_shm_t;
\r
7741 # 69 "../include/apr_shm.h"
\r
7742 apr_status_t apr_shm_create(apr_shm_t **m,
\r
7743 apr_size_t reqsize,
\r
7744 const char *filename,
\r
7745 apr_pool_t *pool);
\r
7746 # 114 "../include/apr_shm.h"
\r
7747 apr_status_t apr_shm_create_ex(apr_shm_t **m,
\r
7748 apr_size_t reqsize,
\r
7749 const char *filename,
\r
7751 apr_int32_t flags);
\r
7752 # 135 "../include/apr_shm.h"
\r
7753 apr_status_t apr_shm_remove(const char *filename,
\r
7754 apr_pool_t *pool);
\r
7760 apr_status_t apr_shm_destroy(apr_shm_t *m);
\r
7761 # 153 "../include/apr_shm.h"
\r
7762 apr_status_t apr_shm_attach(apr_shm_t **m,
\r
7763 const char *filename,
\r
7764 apr_pool_t *pool);
\r
7765 # 167 "../include/apr_shm.h"
\r
7766 apr_status_t apr_shm_attach_ex(apr_shm_t **m,
\r
7767 const char *filename,
\r
7769 apr_int32_t flags);
\r
7776 apr_status_t apr_shm_detach(apr_shm_t *m);
\r
7777 # 188 "../include/apr_shm.h"
\r
7778 void * apr_shm_baseaddr_get(const apr_shm_t *m);
\r
7785 apr_size_t apr_shm_size_get(const apr_shm_t *m);
\r
7790 apr_pool_t * apr_shm_pool_get (const apr_shm_t *theshm);
\r
7791 # 39 "../include/apr_portable.h" 2
\r
7794 # 1 "/usr/include/dirent.h" 1 3 4
\r
7795 # 61 "/usr/include/dirent.h" 3 4
\r
7796 # 1 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 1 3 4
\r
7797 # 22 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 3 4
\r
7807 unsigned short int d_reclen;
\r
7808 unsigned char d_type;
\r
7811 # 62 "/usr/include/dirent.h" 2 3 4
\r
7812 # 97 "/usr/include/dirent.h" 3 4
\r
7834 # 127 "/usr/include/dirent.h" 3 4
\r
7835 typedef struct __dirstream DIR;
\r
7842 extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1)));
\r
7849 extern DIR *fdopendir (int __fd);
\r
7857 extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
\r
7858 # 162 "/usr/include/dirent.h" 3 4
\r
7859 extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
\r
7860 # 183 "/usr/include/dirent.h" 3 4
\r
7861 extern int readdir_r (DIR *__restrict __dirp,
\r
7862 struct dirent *__restrict __entry,
\r
7863 struct dirent **__restrict __result)
\r
7864 __attribute__ ((__nonnull__ (1, 2, 3)));
\r
7865 # 208 "/usr/include/dirent.h" 3 4
\r
7866 extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
7872 extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
7875 extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
7881 extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
7882 # 244 "/usr/include/dirent.h" 3 4
\r
7883 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
7884 # 245 "/usr/include/dirent.h" 2 3 4
\r
7885 # 254 "/usr/include/dirent.h" 3 4
\r
7886 extern int scandir (const char *__restrict __dir,
\r
7887 struct dirent ***__restrict __namelist,
\r
7888 int (*__selector) (const struct dirent *),
\r
7889 int (*__cmp) (const struct dirent **,
\r
7890 const struct dirent **))
\r
7891 __attribute__ ((__nonnull__ (1, 2)));
\r
7892 # 324 "/usr/include/dirent.h" 3 4
\r
7893 extern int alphasort (const struct dirent **__e1,
\r
7894 const struct dirent **__e2)
\r
7895 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
\r
7896 # 352 "/usr/include/dirent.h" 3 4
\r
7897 extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
\r
7899 __off_t *__restrict __basep)
\r
7900 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));
\r
7901 # 42 "../include/apr_portable.h" 2
\r
7904 # 1 "/usr/include/fcntl.h" 1 3 4
\r
7905 # 35 "/usr/include/fcntl.h" 3 4
\r
7906 # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 1 3 4
\r
7907 # 35 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4
\r
7911 short int l_whence;
\r
7921 # 61 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4
\r
7922 # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 1 3 4
\r
7923 # 62 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 2 3 4
\r
7924 # 36 "/usr/include/fcntl.h" 2 3 4
\r
7925 # 67 "/usr/include/fcntl.h" 3 4
\r
7926 # 1 "/usr/include/time.h" 1 3 4
\r
7927 # 68 "/usr/include/fcntl.h" 2 3 4
\r
7928 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4
\r
7929 # 46 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4
\r
7945 __nlink_t st_nlink;
\r
7962 __blksize_t st_blksize;
\r
7964 __blkcnt_t st_blocks;
\r
7965 # 91 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4
\r
7966 struct timespec st_atim;
\r
7967 struct timespec st_mtim;
\r
7968 struct timespec st_ctim;
\r
7969 # 106 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4
\r
7970 __syscall_slong_t __glibc_reserved[3];
\r
7971 # 115 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4
\r
7973 # 69 "/usr/include/fcntl.h" 2 3 4
\r
7974 # 137 "/usr/include/fcntl.h" 3 4
\r
7975 extern int fcntl (int __fd, int __cmd, ...);
\r
7976 # 146 "/usr/include/fcntl.h" 3 4
\r
7977 extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
\r
7978 # 170 "/usr/include/fcntl.h" 3 4
\r
7979 extern int openat (int __fd, const char *__file, int __oflag, ...)
\r
7980 __attribute__ ((__nonnull__ (2)));
\r
7981 # 192 "/usr/include/fcntl.h" 3 4
\r
7982 extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1)));
\r
7983 # 238 "/usr/include/fcntl.h" 3 4
\r
7984 extern int posix_fadvise (int __fd, off_t __offset, off_t __len,
\r
7985 int __advise) __attribute__ ((__nothrow__ ));
\r
7986 # 260 "/usr/include/fcntl.h" 3 4
\r
7987 extern int posix_fallocate (int __fd, off_t __offset, off_t __len);
\r
7988 # 45 "../include/apr_portable.h" 2
\r
7991 # 1 "/usr/include/pthread.h" 1 3 4
\r
7992 # 23 "/usr/include/pthread.h" 3 4
\r
7993 # 1 "/usr/include/sched.h" 1 3 4
\r
7994 # 28 "/usr/include/sched.h" 3 4
\r
7995 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
7996 # 29 "/usr/include/sched.h" 2 3 4
\r
8000 # 1 "/usr/include/time.h" 1 3 4
\r
8001 # 33 "/usr/include/sched.h" 2 3 4
\r
8010 # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4
\r
8011 # 72 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4
\r
8012 struct sched_param
\r
8014 int __sched_priority;
\r
8016 # 103 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4
\r
8017 struct __sched_param
\r
8019 int __sched_priority;
\r
8021 # 118 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4
\r
8022 typedef unsigned long int __cpu_mask;
\r
8031 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
\r
8033 # 203 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4
\r
8034 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
\r
8035 __attribute__ ((__nothrow__ ));
\r
8036 extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ )) ;
\r
8037 extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ ));
\r
8038 # 42 "/usr/include/sched.h" 2 3 4
\r
8046 extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
\r
8047 __attribute__ ((__nothrow__ ));
\r
8050 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ ));
\r
8053 extern int sched_setscheduler (__pid_t __pid, int __policy,
\r
8054 const struct sched_param *__param) __attribute__ ((__nothrow__ ));
\r
8057 extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ ));
\r
8060 extern int sched_yield (void) __attribute__ ((__nothrow__ ));
\r
8063 extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ ));
\r
8066 extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ ));
\r
8069 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ ));
\r
8070 # 24 "/usr/include/pthread.h" 2 3 4
\r
8071 # 1 "/usr/include/time.h" 1 3 4
\r
8072 # 37 "/usr/include/time.h" 3 4
\r
8073 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
8074 # 38 "/usr/include/time.h" 2 3 4
\r
8078 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4
\r
8079 # 42 "/usr/include/time.h" 2 3 4
\r
8080 # 133 "/usr/include/time.h" 3 4
\r
8094 long int tm_gmtoff;
\r
8095 const char *tm_zone;
\r
8101 # 161 "/usr/include/time.h" 3 4
\r
8104 struct timespec it_interval;
\r
8105 struct timespec it_value;
\r
8110 # 189 "/usr/include/time.h" 3 4
\r
8111 extern clock_t clock (void) __attribute__ ((__nothrow__ ));
\r
8114 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ ));
\r
8117 extern double difftime (time_t __time1, time_t __time0)
\r
8118 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
8121 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ ));
\r
8127 extern size_t strftime (char *__restrict __s, size_t __maxsize,
\r
8128 const char *__restrict __format,
\r
8129 const struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));
\r
8130 # 223 "/usr/include/time.h" 3 4
\r
8131 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
\r
8132 const char *__restrict __format,
\r
8133 const struct tm *__restrict __tp,
\r
8134 __locale_t __loc) __attribute__ ((__nothrow__ ));
\r
8135 # 239 "/usr/include/time.h" 3 4
\r
8136 extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ ));
\r
8140 extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ ));
\r
8146 extern struct tm *gmtime_r (const time_t *__restrict __timer,
\r
8147 struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));
\r
8151 extern struct tm *localtime_r (const time_t *__restrict __timer,
\r
8152 struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));
\r
8158 extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ ));
\r
8161 extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ ));
\r
8169 extern char *asctime_r (const struct tm *__restrict __tp,
\r
8170 char *__restrict __buf) __attribute__ ((__nothrow__ ));
\r
8173 extern char *ctime_r (const time_t *__restrict __timer,
\r
8174 char *__restrict __buf) __attribute__ ((__nothrow__ ));
\r
8179 extern char *__tzname[2];
\r
8180 extern int __daylight;
\r
8181 extern long int __timezone;
\r
8186 extern char *tzname[2];
\r
8190 extern void tzset (void) __attribute__ ((__nothrow__ ));
\r
8194 extern int daylight;
\r
8195 extern long int timezone;
\r
8201 extern int stime (const time_t *__when) __attribute__ ((__nothrow__ ));
\r
8202 # 319 "/usr/include/time.h" 3 4
\r
8203 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ ));
\r
8206 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ ));
\r
8209 extern int dysize (int __year) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
8210 # 334 "/usr/include/time.h" 3 4
\r
8211 extern int nanosleep (const struct timespec *__requested_time,
\r
8212 struct timespec *__remaining);
\r
8216 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ ));
\r
8219 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ ));
\r
8222 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
\r
8223 __attribute__ ((__nothrow__ ));
\r
8230 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
\r
8231 const struct timespec *__req,
\r
8232 struct timespec *__rem);
\r
8235 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ ));
\r
8240 extern int timer_create (clockid_t __clock_id,
\r
8241 struct sigevent *__restrict __evp,
\r
8242 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ ));
\r
8245 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ ));
\r
8248 extern int timer_settime (timer_t __timerid, int __flags,
\r
8249 const struct itimerspec *__restrict __value,
\r
8250 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ ));
\r
8253 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
\r
8254 __attribute__ ((__nothrow__ ));
\r
8257 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ ));
\r
8258 # 25 "/usr/include/pthread.h" 2 3 4
\r
8261 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4
\r
8262 # 26 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4
\r
8263 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
8264 # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4
\r
8269 typedef long int __jmp_buf[8];
\r
8270 # 28 "/usr/include/pthread.h" 2 3 4
\r
8271 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
8272 # 29 "/usr/include/pthread.h" 2 3 4
\r
8278 PTHREAD_CREATE_JOINABLE,
\r
8280 PTHREAD_CREATE_DETACHED
\r
8288 PTHREAD_MUTEX_TIMED_NP,
\r
8289 PTHREAD_MUTEX_RECURSIVE_NP,
\r
8290 PTHREAD_MUTEX_ERRORCHECK_NP,
\r
8291 PTHREAD_MUTEX_ADAPTIVE_NP
\r
8294 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
\r
8295 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
\r
8296 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
\r
8297 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
\r
8310 PTHREAD_MUTEX_STALLED,
\r
8311 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
\r
8312 PTHREAD_MUTEX_ROBUST,
\r
8313 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
\r
8322 PTHREAD_PRIO_NONE,
\r
8323 PTHREAD_PRIO_INHERIT,
\r
8324 PTHREAD_PRIO_PROTECT
\r
8326 # 125 "/usr/include/pthread.h" 3 4
\r
8329 PTHREAD_RWLOCK_PREFER_READER_NP,
\r
8330 PTHREAD_RWLOCK_PREFER_WRITER_NP,
\r
8331 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
\r
8332 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
\r
8334 # 166 "/usr/include/pthread.h" 3 4
\r
8337 PTHREAD_INHERIT_SCHED,
\r
8339 PTHREAD_EXPLICIT_SCHED
\r
8347 PTHREAD_SCOPE_SYSTEM,
\r
8349 PTHREAD_SCOPE_PROCESS
\r
8357 PTHREAD_PROCESS_PRIVATE,
\r
8359 PTHREAD_PROCESS_SHARED
\r
8362 # 201 "/usr/include/pthread.h" 3 4
\r
8363 struct _pthread_cleanup_buffer
\r
8365 void (*__routine) (void *);
\r
8368 struct _pthread_cleanup_buffer *__prev;
\r
8374 PTHREAD_CANCEL_ENABLE,
\r
8376 PTHREAD_CANCEL_DISABLE
\r
8381 PTHREAD_CANCEL_DEFERRED,
\r
8383 PTHREAD_CANCEL_ASYNCHRONOUS
\r
8386 # 244 "/usr/include/pthread.h" 3 4
\r
8387 extern int pthread_create (pthread_t *__restrict __newthread,
\r
8388 const pthread_attr_t *__restrict __attr,
\r
8389 void *(*__start_routine) (void *),
\r
8390 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
\r
8396 extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
\r
8404 extern int pthread_join (pthread_t __th, void **__thread_return);
\r
8405 # 282 "/usr/include/pthread.h" 3 4
\r
8406 extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ ));
\r
8410 extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
8413 extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
\r
8414 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
8422 extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8425 extern int pthread_attr_destroy (pthread_attr_t *__attr)
\r
8426 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8429 extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
\r
8430 int *__detachstate)
\r
8431 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8434 extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
\r
8435 int __detachstate)
\r
8436 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8440 extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
\r
8441 size_t *__guardsize)
\r
8442 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8445 extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
\r
8446 size_t __guardsize)
\r
8447 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8451 extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
\r
8452 struct sched_param *__restrict __param)
\r
8453 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8456 extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
\r
8457 const struct sched_param *__restrict
\r
8458 __param) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8461 extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
\r
8462 __attr, int *__restrict __policy)
\r
8463 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8466 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
\r
8467 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8470 extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
\r
8471 __attr, int *__restrict __inherit)
\r
8472 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8475 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
\r
8477 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8481 extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
\r
8482 int *__restrict __scope)
\r
8483 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8486 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
\r
8487 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8490 extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
\r
8491 __attr, void **__restrict __stackaddr)
\r
8492 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
\r
8498 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
\r
8499 void *__stackaddr)
\r
8500 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
\r
8503 extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
\r
8504 __attr, size_t *__restrict __stacksize)
\r
8505 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8510 extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
\r
8511 size_t __stacksize)
\r
8512 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8516 extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
\r
8517 void **__restrict __stackaddr,
\r
8518 size_t *__restrict __stacksize)
\r
8519 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3)));
\r
8524 extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
\r
8525 size_t __stacksize) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8526 # 440 "/usr/include/pthread.h" 3 4
\r
8527 extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
\r
8528 const struct sched_param *__param)
\r
8529 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
\r
8532 extern int pthread_getschedparam (pthread_t __target_thread,
\r
8533 int *__restrict __policy,
\r
8534 struct sched_param *__restrict __param)
\r
8535 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
\r
8538 extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
\r
8539 __attribute__ ((__nothrow__ ));
\r
8540 # 505 "/usr/include/pthread.h" 3 4
\r
8541 extern int pthread_once (pthread_once_t *__once_control,
\r
8542 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
\r
8543 # 517 "/usr/include/pthread.h" 3 4
\r
8544 extern int pthread_setcancelstate (int __state, int *__oldstate);
\r
8548 extern int pthread_setcanceltype (int __type, int *__oldtype);
\r
8551 extern int pthread_cancel (pthread_t __th);
\r
8556 extern void pthread_testcancel (void);
\r
8565 __jmp_buf __cancel_jmp_buf;
\r
8566 int __mask_was_saved;
\r
8567 } __cancel_jmp_buf[1];
\r
8569 } __pthread_unwind_buf_t __attribute__ ((__aligned__));
\r
8570 # 551 "/usr/include/pthread.h" 3 4
\r
8571 struct __pthread_cleanup_frame
\r
8573 void (*__cancel_routine) (void *);
\r
8574 void *__cancel_arg;
\r
8576 int __cancel_type;
\r
8578 # 691 "/usr/include/pthread.h" 3 4
\r
8579 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
\r
8581 # 703 "/usr/include/pthread.h" 3 4
\r
8582 extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
\r
8584 # 744 "/usr/include/pthread.h" 3 4
\r
8585 extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
\r
8586 __attribute__ ((__noreturn__))
\r
8588 __attribute__ ((__weak__))
\r
8594 struct __jmp_buf_tag;
\r
8595 extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
\r
8601 extern int pthread_mutex_init (pthread_mutex_t *__mutex,
\r
8602 const pthread_mutexattr_t *__mutexattr)
\r
8603 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8606 extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
\r
8607 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8610 extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
\r
8611 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8614 extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
\r
8615 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8619 extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
\r
8620 const struct timespec *__restrict
\r
8621 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
\r
8625 extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
\r
8626 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8630 extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
\r
8631 __restrict __mutex,
\r
8632 int *__restrict __prioceiling)
\r
8633 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8637 extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
\r
8638 int __prioceiling,
\r
8639 int *__restrict __old_ceiling)
\r
8640 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
\r
8645 extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
\r
8646 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8647 # 817 "/usr/include/pthread.h" 3 4
\r
8648 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
\r
8649 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8652 extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
\r
8653 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8656 extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
\r
8657 __restrict __attr,
\r
8658 int *__restrict __pshared)
\r
8659 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8662 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
\r
8664 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8668 extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
\r
8669 __attr, int *__restrict __kind)
\r
8670 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8675 extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
\r
8676 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8680 extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
\r
8681 __restrict __attr,
\r
8682 int *__restrict __protocol)
\r
8683 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8687 extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
\r
8689 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8692 extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
\r
8693 __restrict __attr,
\r
8694 int *__restrict __prioceiling)
\r
8695 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8698 extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
\r
8699 int __prioceiling)
\r
8700 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8704 extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
\r
8705 int *__robustness)
\r
8706 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8714 extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
\r
8716 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8717 # 899 "/usr/include/pthread.h" 3 4
\r
8718 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
\r
8719 const pthread_rwlockattr_t *__restrict
\r
8720 __attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8723 extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
\r
8724 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8727 extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
\r
8728 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8731 extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
\r
8732 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8736 extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
\r
8737 const struct timespec *__restrict
\r
8738 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
\r
8742 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
\r
8743 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8746 extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
\r
8747 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8751 extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
\r
8752 const struct timespec *__restrict
\r
8753 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
\r
8757 extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
\r
8758 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8764 extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
\r
8765 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8768 extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
\r
8769 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8772 extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
\r
8773 __restrict __attr,
\r
8774 int *__restrict __pshared)
\r
8775 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8778 extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
\r
8780 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8783 extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
\r
8784 __restrict __attr,
\r
8785 int *__restrict __pref)
\r
8786 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8789 extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
\r
8790 int __pref) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8798 extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
\r
8799 const pthread_condattr_t *__restrict __cond_attr)
\r
8800 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8803 extern int pthread_cond_destroy (pthread_cond_t *__cond)
\r
8804 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8807 extern int pthread_cond_signal (pthread_cond_t *__cond)
\r
8808 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8811 extern int pthread_cond_broadcast (pthread_cond_t *__cond)
\r
8812 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8819 extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
\r
8820 pthread_mutex_t *__restrict __mutex)
\r
8821 __attribute__ ((__nonnull__ (1, 2)));
\r
8822 # 1011 "/usr/include/pthread.h" 3 4
\r
8823 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
\r
8824 pthread_mutex_t *__restrict __mutex,
\r
8825 const struct timespec *__restrict __abstime)
\r
8826 __attribute__ ((__nonnull__ (1, 2, 3)));
\r
8831 extern int pthread_condattr_init (pthread_condattr_t *__attr)
\r
8832 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8835 extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
\r
8836 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8839 extern int pthread_condattr_getpshared (const pthread_condattr_t *
\r
8840 __restrict __attr,
\r
8841 int *__restrict __pshared)
\r
8842 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8845 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
\r
8846 int __pshared) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8850 extern int pthread_condattr_getclock (const pthread_condattr_t *
\r
8851 __restrict __attr,
\r
8852 __clockid_t *__restrict __clock_id)
\r
8853 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8856 extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
\r
8857 __clockid_t __clock_id)
\r
8858 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8859 # 1055 "/usr/include/pthread.h" 3 4
\r
8860 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
\r
8861 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8864 extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
\r
8865 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8868 extern int pthread_spin_lock (pthread_spinlock_t *__lock)
\r
8869 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8872 extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
\r
8873 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8876 extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
\r
8877 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8884 extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
\r
8885 const pthread_barrierattr_t *__restrict
\r
8886 __attr, unsigned int __count)
\r
8887 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8890 extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
\r
8891 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8894 extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
\r
8895 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
\r
8899 extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
\r
8900 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8903 extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
\r
8904 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8907 extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
\r
8908 __restrict __attr,
\r
8909 int *__restrict __pshared)
\r
8910 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
8913 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
\r
8915 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8916 # 1122 "/usr/include/pthread.h" 3 4
\r
8917 extern int pthread_key_create (pthread_key_t *__key,
\r
8918 void (*__destr_function) (void *))
\r
8919 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
8922 extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ ));
\r
8925 extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ ));
\r
8928 extern int pthread_setspecific (pthread_key_t __key,
\r
8929 const void *__pointer) __attribute__ ((__nothrow__ )) ;
\r
8934 extern int pthread_getcpuclockid (pthread_t __thread_id,
\r
8935 __clockid_t *__clock_id)
\r
8936 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
8937 # 1156 "/usr/include/pthread.h" 3 4
\r
8938 extern int pthread_atfork (void (*__prepare) (void),
\r
8939 void (*__parent) (void),
\r
8940 void (*__child) (void)) __attribute__ ((__nothrow__ ));
\r
8941 # 48 "../include/apr_portable.h" 2
\r
8942 # 127 "../include/apr_portable.h"
\r
8943 struct apr_os_proc_mutex_t {
\r
8950 pthread_mutex_t *pthread_interproc;
\r
8956 pthread_mutex_t *intraproc;
\r
8961 typedef int apr_os_file_t;
\r
8962 typedef DIR apr_os_dir_t;
\r
8963 typedef int apr_os_sock_t;
\r
8964 typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;
\r
8968 typedef pthread_t apr_os_thread_t;
\r
8969 typedef pthread_key_t apr_os_threadkey_t;
\r
8972 typedef pid_t apr_os_proc_t;
\r
8973 typedef struct timeval apr_os_imp_time_t;
\r
8974 typedef struct tm apr_os_exp_time_t;
\r
8975 # 169 "../include/apr_portable.h"
\r
8976 typedef void * apr_os_dso_handle_t;
\r
8978 typedef void* apr_os_shm_t;
\r
8979 # 183 "../include/apr_portable.h"
\r
8980 struct apr_os_sock_info_t {
\r
8981 apr_os_sock_t *os_sock;
\r
8982 struct sockaddr *local;
\r
8983 struct sockaddr *remote;
\r
8989 typedef struct apr_os_sock_info_t apr_os_sock_info_t;
\r
8990 # 203 "../include/apr_portable.h"
\r
8991 struct apr_os_global_mutex_t {
\r
8993 apr_proc_mutex_t *proc_mutex;
\r
8995 apr_thread_mutex_t *thread_mutex;
\r
8998 typedef struct apr_os_global_mutex_t apr_os_global_mutex_t;
\r
9000 apr_status_t apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex,
\r
9001 apr_global_mutex_t *pmutex);
\r
9002 # 224 "../include/apr_portable.h"
\r
9003 apr_status_t apr_os_file_get(apr_os_file_t *thefile,
\r
9004 apr_file_t *file);
\r
9011 apr_status_t apr_os_dir_get(apr_os_dir_t **thedir,
\r
9019 apr_status_t apr_os_sock_get(apr_os_sock_t *thesock,
\r
9020 apr_socket_t *sock);
\r
9027 apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
\r
9028 apr_proc_mutex_t *pmutex);
\r
9035 apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,
\r
9036 apr_time_exp_t *aprtime);
\r
9043 apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime,
\r
9044 apr_time_t *aprtime);
\r
9051 apr_status_t apr_os_shm_get(apr_os_shm_t *osshm,
\r
9053 # 285 "../include/apr_portable.h"
\r
9054 apr_status_t apr_os_thread_get(apr_os_thread_t **thethd,
\r
9055 apr_thread_t *thd);
\r
9062 apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey,
\r
9063 apr_threadkey_t *key);
\r
9071 apr_status_t apr_os_thread_put(apr_thread_t **thd,
\r
9072 apr_os_thread_t *thethd,
\r
9073 apr_pool_t *cont);
\r
9081 apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,
\r
9082 apr_os_threadkey_t *thekey,
\r
9083 apr_pool_t *cont);
\r
9087 apr_os_thread_t apr_os_thread_current(void);
\r
9095 int apr_os_thread_equal(apr_os_thread_t tid1,
\r
9096 apr_os_thread_t tid2);
\r
9097 # 341 "../include/apr_portable.h"
\r
9098 apr_status_t apr_os_file_put(apr_file_t **file,
\r
9099 apr_os_file_t *thefile,
\r
9100 apr_int32_t flags, apr_pool_t *cont);
\r
9101 # 353 "../include/apr_portable.h"
\r
9102 apr_status_t apr_os_pipe_put(apr_file_t **file,
\r
9103 apr_os_file_t *thefile,
\r
9104 apr_pool_t *cont);
\r
9105 # 367 "../include/apr_portable.h"
\r
9106 apr_status_t apr_os_pipe_put_ex(apr_file_t **file,
\r
9107 apr_os_file_t *thefile,
\r
9108 int register_cleanup,
\r
9109 apr_pool_t *cont);
\r
9117 apr_status_t apr_os_dir_put(apr_dir_t **dir,
\r
9118 apr_os_dir_t *thedir,
\r
9119 apr_pool_t *cont);
\r
9120 # 390 "../include/apr_portable.h"
\r
9121 apr_status_t apr_os_sock_put(apr_socket_t **sock,
\r
9122 apr_os_sock_t *thesock,
\r
9123 apr_pool_t *cont);
\r
9124 # 404 "../include/apr_portable.h"
\r
9125 apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
\r
9126 apr_os_sock_info_t *os_sock_info,
\r
9127 apr_pool_t *cont);
\r
9135 apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
\r
9136 apr_os_proc_mutex_t *ospmutex,
\r
9137 apr_pool_t *cont);
\r
9145 apr_status_t apr_os_imp_time_put(apr_time_t *aprtime,
\r
9146 apr_os_imp_time_t **ostime,
\r
9147 apr_pool_t *cont);
\r
9155 apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime,
\r
9156 apr_os_exp_time_t **ostime,
\r
9157 apr_pool_t *cont);
\r
9158 # 447 "../include/apr_portable.h"
\r
9159 apr_status_t apr_os_shm_put(apr_shm_t **shm,
\r
9160 apr_os_shm_t *osshm,
\r
9161 apr_pool_t *cont);
\r
9162 # 463 "../include/apr_portable.h"
\r
9163 apr_status_t apr_os_dso_handle_put(apr_dso_handle_t **dso,
\r
9164 apr_os_dso_handle_t thedso,
\r
9165 apr_pool_t *pool);
\r
9172 apr_status_t apr_os_dso_handle_get(apr_os_dso_handle_t *dso,
\r
9173 apr_dso_handle_t *aprdso);
\r
9174 # 491 "../include/apr_portable.h"
\r
9175 const char* apr_os_default_encoding(apr_pool_t *pool);
\r
9176 # 500 "../include/apr_portable.h"
\r
9177 const char* apr_os_locale_encoding(apr_pool_t *pool);
\r
9178 # 25 "../include/arch/unix/apr_arch_thread_mutex.h" 2
\r
9186 struct apr_thread_mutex_t {
\r
9188 pthread_mutex_t mutex;
\r
9190 # 18 "./../locks/unix/thread_mutex.c" 2
\r
9192 # 1 "../include/apr_want.h" 1
\r
9193 # 20 "./../locks/unix/thread_mutex.c" 2
\r
9197 static apr_status_t thread_mutex_cleanup(void *data)
\r
9199 apr_thread_mutex_t *mutex = data;
\r
9202 rv = pthread_mutex_destroy(&mutex->mutex);
\r
9211 apr_status_t apr_thread_mutex_create(apr_thread_mutex_t **mutex,
\r
9212 unsigned int flags,
\r
9215 apr_thread_mutex_t *new_mutex;
\r
9224 new_mutex = memset(apr_palloc(pool, sizeof(apr_thread_mutex_t)), 0, sizeof(apr_thread_mutex_t));
\r
9225 new_mutex->pool = pool;
\r
9228 if (flags & 0x1) {
\r
9229 pthread_mutexattr_t mattr;
\r
9231 rv = pthread_mutexattr_init(&mattr);
\r
9232 if (rv) return rv;
\r
9234 rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
\r
9236 pthread_mutexattr_destroy(&mattr);
\r
9240 rv = pthread_mutex_init(&new_mutex->mutex, &mattr);
\r
9242 pthread_mutexattr_destroy(&mattr);
\r
9245 rv = pthread_mutex_init(&new_mutex->mutex, ((void*)0));
\r
9254 apr_pool_cleanup_register(new_mutex->pool,
\r
9255 new_mutex, thread_mutex_cleanup,
\r
9256 apr_pool_cleanup_null);
\r
9258 *mutex = new_mutex;
\r
9262 apr_status_t apr_thread_mutex_lock(apr_thread_mutex_t *mutex)
\r
9266 rv = pthread_mutex_lock(&mutex->mutex);
\r
9276 apr_status_t apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)
\r
9280 rv = pthread_mutex_trylock(&mutex->mutex);
\r
9285 return (rv == 16) ? ((20000 + 50000) + 25) : rv;
\r
9291 apr_status_t apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
\r
9293 apr_status_t status;
\r
9295 status = pthread_mutex_unlock(&mutex->mutex);
\r
9305 apr_status_t apr_thread_mutex_destroy(apr_thread_mutex_t *mutex)
\r
9307 return apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup);
\r
9310 apr_pool_t * apr_thread_mutex_pool_get (const apr_thread_mutex_t *thethread_mutex) { return thethread_mutex->pool; }
\r
9312 # 1 "./../locks/unix/proc_mutex.c" 1
\r
9313 # 19 "./../locks/unix/proc_mutex.c"
\r
9314 # 1 "../include/arch/unix/apr_arch_proc_mutex.h" 1
\r
9315 # 23 "../include/arch/unix/apr_arch_proc_mutex.h"
\r
9316 # 1 "../include/apr_lib.h" 1
\r
9317 # 32 "../include/apr_lib.h"
\r
9318 # 1 "/usr/include/ctype.h" 1 3 4
\r
9319 # 46 "/usr/include/ctype.h" 3 4
\r
9322 _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
\r
9323 _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
\r
9324 _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
\r
9325 _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
\r
9326 _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
\r
9327 _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
\r
9328 _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
\r
9329 _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
\r
9330 _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
\r
9331 _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
\r
9332 _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
\r
9333 _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
\r
9335 # 79 "/usr/include/ctype.h" 3 4
\r
9336 extern const unsigned short int **__ctype_b_loc (void)
\r
9337 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
9338 extern const __int32_t **__ctype_tolower_loc (void)
\r
9339 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
9340 extern const __int32_t **__ctype_toupper_loc (void)
\r
9341 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
\r
9342 # 110 "/usr/include/ctype.h" 3 4
\r
9343 extern int isalnum (int) __attribute__ ((__nothrow__ ));
\r
9344 extern int isalpha (int) __attribute__ ((__nothrow__ ));
\r
9345 extern int iscntrl (int) __attribute__ ((__nothrow__ ));
\r
9346 extern int isdigit (int) __attribute__ ((__nothrow__ ));
\r
9347 extern int islower (int) __attribute__ ((__nothrow__ ));
\r
9348 extern int isgraph (int) __attribute__ ((__nothrow__ ));
\r
9349 extern int isprint (int) __attribute__ ((__nothrow__ ));
\r
9350 extern int ispunct (int) __attribute__ ((__nothrow__ ));
\r
9351 extern int isspace (int) __attribute__ ((__nothrow__ ));
\r
9352 extern int isupper (int) __attribute__ ((__nothrow__ ));
\r
9353 extern int isxdigit (int) __attribute__ ((__nothrow__ ));
\r
9357 extern int tolower (int __c) __attribute__ ((__nothrow__ ));
\r
9360 extern int toupper (int __c) __attribute__ ((__nothrow__ ));
\r
9361 # 136 "/usr/include/ctype.h" 3 4
\r
9362 extern int isblank (int) __attribute__ ((__nothrow__ ));
\r
9363 # 150 "/usr/include/ctype.h" 3 4
\r
9364 extern int isascii (int __c) __attribute__ ((__nothrow__ ));
\r
9368 extern int toascii (int __c) __attribute__ ((__nothrow__ ));
\r
9372 extern int _toupper (int) __attribute__ ((__nothrow__ ));
\r
9373 extern int _tolower (int) __attribute__ ((__nothrow__ ));
\r
9374 # 271 "/usr/include/ctype.h" 3 4
\r
9375 extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9376 extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9377 extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9378 extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9379 extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9380 extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9381 extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9382 extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9383 extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9384 extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9385 extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9387 extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ ));
\r
9391 extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));
\r
9392 extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));
\r
9395 extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));
\r
9396 extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));
\r
9397 # 33 "../include/apr_lib.h" 2
\r
9398 # 59 "../include/apr_lib.h"
\r
9399 typedef struct apr_vformatter_buff_t apr_vformatter_buff_t;
\r
9404 struct apr_vformatter_buff_t {
\r
9410 # 84 "../include/apr_lib.h"
\r
9411 const char * apr_filepath_name_get(const char *pathname);
\r
9412 # 174 "../include/apr_lib.h"
\r
9413 int apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *b),
\r
9414 apr_vformatter_buff_t *c, const char *fmt,
\r
9416 # 189 "../include/apr_lib.h"
\r
9417 apr_status_t apr_password_get(const char *prompt, char *pwbuf,
\r
9418 apr_size_t *bufsize);
\r
9419 # 24 "../include/arch/unix/apr_arch_proc_mutex.h" 2
\r
9424 # 1 "../include/arch/unix/apr_arch_file_io.h" 1
\r
9425 # 41 "../include/arch/unix/apr_arch_file_io.h"
\r
9426 # 1 "/usr/include/errno.h" 1 3 4
\r
9427 # 42 "../include/arch/unix/apr_arch_file_io.h" 2
\r
9433 # 1 "/usr/include/strings.h" 1 3 4
\r
9434 # 48 "../include/arch/unix/apr_arch_file_io.h" 2
\r
9440 # 1 "/usr/include/x86_64-linux-gnu/sys/stat.h" 1 3 4
\r
9441 # 105 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4
\r
9442 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4
\r
9443 # 106 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4
\r
9444 # 209 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4
\r
9445 extern int stat (const char *__restrict __file,
\r
9446 struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
9450 extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
9451 # 238 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4
\r
9452 extern int fstatat (int __fd, const char *__restrict __file,
\r
9453 struct stat *__restrict __buf, int __flag)
\r
9454 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
\r
9455 # 263 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4
\r
9456 extern int lstat (const char *__restrict __file,
\r
9457 struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
\r
9458 # 284 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4
\r
9459 extern int chmod (const char *__file, __mode_t __mode)
\r
9460 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
9466 extern int lchmod (const char *__file, __mode_t __mode)
\r
9467 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
9472 extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ ));
\r
9478 extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
\r
9480 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;
\r
9487 extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ ));
\r
9488 # 321 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4
\r
9489 extern int mkdir (const char *__path, __mode_t __mode)
\r
9490 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
9496 extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
\r
9497 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
9504 extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
\r
9505 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
9511 extern int mknodat (int __fd, const char *__path, __mode_t __mode,
\r
9512 __dev_t __dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
9518 extern int mkfifo (const char *__path, __mode_t __mode)
\r
9519 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
\r
9525 extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
\r
9526 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
9532 extern int utimensat (int __fd, const char *__path,
\r
9533 const struct timespec __times[2],
\r
9535 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
\r
9540 extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ ));
\r
9541 # 399 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4
\r
9542 extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
\r
9543 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
\r
9544 extern int __xstat (int __ver, const char *__filename,
\r
9545 struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
\r
9546 extern int __lxstat (int __ver, const char *__filename,
\r
9547 struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
\r
9548 extern int __fxstatat (int __ver, int __fildes, const char *__filename,
\r
9549 struct stat *__stat_buf, int __flag)
\r
9550 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4)));
\r
9551 # 442 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4
\r
9552 extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
\r
9553 __dev_t *__dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));
\r
9555 extern int __xmknodat (int __ver, int __fd, const char *__path,
\r
9556 __mode_t __mode, __dev_t *__dev)
\r
9557 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 5)));
\r
9558 # 54 "../include/arch/unix/apr_arch_file_io.h" 2
\r
9559 # 75 "../include/arch/unix/apr_arch_file_io.h"
\r
9560 # 1 "/usr/include/x86_64-linux-gnu/sys/param.h" 1 3 4
\r
9561 # 23 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4
\r
9562 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
9563 # 24 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
\r
9571 # 1 "/usr/include/x86_64-linux-gnu/bits/param.h" 1 3 4
\r
9572 # 28 "/usr/include/x86_64-linux-gnu/bits/param.h" 3 4
\r
9573 # 1 "/usr/include/linux/param.h" 1 3 4
\r
9577 # 1 "/usr/include/x86_64-linux-gnu/asm/param.h" 1 3 4
\r
9578 # 1 "/usr/include/asm-generic/param.h" 1 3 4
\r
9579 # 2 "/usr/include/x86_64-linux-gnu/asm/param.h" 2 3 4
\r
9580 # 5 "/usr/include/linux/param.h" 2 3 4
\r
9581 # 29 "/usr/include/x86_64-linux-gnu/bits/param.h" 2 3 4
\r
9582 # 32 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
\r
9583 # 76 "../include/arch/unix/apr_arch_file_io.h" 2
\r
9584 # 93 "../include/arch/unix/apr_arch_file_io.h"
\r
9585 struct apr_file_t {
\r
9589 apr_int32_t flags;
\r
9592 apr_interval_time_t timeout;
\r
9594 enum {BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;
\r
9602 apr_size_t bufpos;
\r
9603 apr_size_t bufsize;
\r
9604 unsigned long dataRead;
\r
9606 apr_off_t filePtr;
\r
9608 struct apr_thread_mutex_t *thlock;
\r
9611 # 142 "../include/arch/unix/apr_arch_file_io.h"
\r
9612 typedef struct stat struct_stat;
\r
9613 # 151 "../include/arch/unix/apr_arch_file_io.h"
\r
9614 struct apr_dir_t {
\r
9621 struct dirent *entry;
\r
9625 apr_status_t apr_unix_file_cleanup(void *);
\r
9626 apr_status_t apr_unix_child_file_cleanup(void *);
\r
9628 mode_t apr_unix_perms2mode(apr_fileperms_t perms);
\r
9629 apr_fileperms_t apr_unix_mode2perms(mode_t mode);
\r
9631 apr_status_t apr_file_flush_locked(apr_file_t *thefile);
\r
9632 apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
\r
9633 apr_file_t *thefile);
\r
9634 # 29 "../include/arch/unix/apr_arch_proc_mutex.h" 2
\r
9635 # 42 "../include/arch/unix/apr_arch_proc_mutex.h"
\r
9636 # 1 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 1 3 4
\r
9637 # 28 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 3 4
\r
9638 # 1 "/usr/include/x86_64-linux-gnu/bits/ipctypes.h" 1 3 4
\r
9639 # 28 "/usr/include/x86_64-linux-gnu/bits/ipctypes.h" 3 4
\r
9640 typedef int __ipc_pid_t;
\r
9641 # 29 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 2 3 4
\r
9642 # 1 "/usr/include/x86_64-linux-gnu/bits/ipc.h" 1 3 4
\r
9643 # 42 "/usr/include/x86_64-linux-gnu/bits/ipc.h" 3 4
\r
9651 unsigned short int mode;
\r
9652 unsigned short int __pad1;
\r
9653 unsigned short int __seq;
\r
9654 unsigned short int __pad2;
\r
9655 __syscall_ulong_t __glibc_reserved1;
\r
9656 __syscall_ulong_t __glibc_reserved2;
\r
9658 # 30 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 2 3 4
\r
9659 # 54 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 3 4
\r
9660 extern key_t ftok (const char *__pathname, int __proj_id) __attribute__ ((__nothrow__ ));
\r
9661 # 43 "../include/arch/unix/apr_arch_proc_mutex.h" 2
\r
9664 # 1 "/usr/include/x86_64-linux-gnu/sys/sem.h" 1 3 4
\r
9665 # 24 "/usr/include/x86_64-linux-gnu/sys/sem.h" 3 4
\r
9666 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
9667 # 25 "/usr/include/x86_64-linux-gnu/sys/sem.h" 2 3 4
\r
9673 # 1 "/usr/include/x86_64-linux-gnu/bits/sem.h" 1 3 4
\r
9674 # 38 "/usr/include/x86_64-linux-gnu/bits/sem.h" 3 4
\r
9677 struct ipc_perm sem_perm;
\r
9678 __time_t sem_otime;
\r
9679 __syscall_ulong_t __glibc_reserved1;
\r
9680 __time_t sem_ctime;
\r
9681 __syscall_ulong_t __glibc_reserved2;
\r
9682 __syscall_ulong_t sem_nsems;
\r
9683 __syscall_ulong_t __glibc_reserved3;
\r
9684 __syscall_ulong_t __glibc_reserved4;
\r
9686 # 72 "/usr/include/x86_64-linux-gnu/bits/sem.h" 3 4
\r
9700 # 31 "/usr/include/x86_64-linux-gnu/sys/sem.h" 2 3 4
\r
9701 # 41 "/usr/include/x86_64-linux-gnu/sys/sem.h" 3 4
\r
9704 unsigned short int sem_num;
\r
9706 short int sem_flg;
\r
9713 extern int semctl (int __semid, int __semnum, int __cmd, ...) __attribute__ ((__nothrow__ ));
\r
9716 extern int semget (key_t __key, int __nsems, int __semflg) __attribute__ ((__nothrow__ ));
\r
9719 extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __attribute__ ((__nothrow__ ));
\r
9720 # 46 "../include/arch/unix/apr_arch_proc_mutex.h" 2
\r
9723 # 1 "/usr/include/x86_64-linux-gnu/sys/file.h" 1 3 4
\r
9724 # 50 "/usr/include/x86_64-linux-gnu/sys/file.h" 3 4
\r
9725 extern int flock (int __fd, int __operation) __attribute__ ((__nothrow__ ));
\r
9726 # 49 "../include/arch/unix/apr_arch_proc_mutex.h" 2
\r
9727 # 60 "../include/arch/unix/apr_arch_proc_mutex.h"
\r
9728 # 1 "/usr/include/x86_64-linux-gnu/sys/mman.h" 1 3 4
\r
9729 # 25 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4
\r
9730 # 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4
\r
9731 # 26 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4
\r
9732 # 41 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4
\r
9733 # 1 "/usr/include/x86_64-linux-gnu/bits/mman.h" 1 3 4
\r
9734 # 45 "/usr/include/x86_64-linux-gnu/bits/mman.h" 3 4
\r
9735 # 1 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 1 3 4
\r
9736 # 46 "/usr/include/x86_64-linux-gnu/bits/mman.h" 2 3 4
\r
9737 # 42 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4
\r
9738 # 57 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4
\r
9739 extern void *mmap (void *__addr, size_t __len, int __prot,
\r
9740 int __flags, int __fd, __off_t __offset) __attribute__ ((__nothrow__ ));
\r
9741 # 76 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4
\r
9742 extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__ ));
\r
9747 extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__ ));
\r
9755 extern int msync (void *__addr, size_t __len, int __flags);
\r
9760 extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ ));
\r
9764 extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ ));
\r
9769 extern int mlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ ));
\r
9772 extern int munlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ ));
\r
9777 extern int mlockall (int __flags) __attribute__ ((__nothrow__ ));
\r
9781 extern int munlockall (void) __attribute__ ((__nothrow__ ));
\r
9789 extern int mincore (void *__start, size_t __len, unsigned char *__vec)
\r
9790 __attribute__ ((__nothrow__ ));
\r
9791 # 144 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4
\r
9792 extern int shm_open (const char *__name, int __oflag, mode_t __mode);
\r
9795 extern int shm_unlink (const char *__name);
\r
9796 # 61 "../include/arch/unix/apr_arch_proc_mutex.h" 2
\r
9802 # 1 "/usr/include/semaphore.h" 1 3 4
\r
9803 # 29 "/usr/include/semaphore.h" 3 4
\r
9804 # 1 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 1 3 4
\r
9805 # 23 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4
\r
9806 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
\r
9807 # 24 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 2 3 4
\r
9808 # 36 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4
\r
9814 # 30 "/usr/include/semaphore.h" 2 3 4
\r
9821 extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)
\r
9822 __attribute__ ((__nothrow__ ));
\r
9824 extern int sem_destroy (sem_t *__sem) __attribute__ ((__nothrow__ ));
\r
9827 extern sem_t *sem_open (const char *__name, int __oflag, ...) __attribute__ ((__nothrow__ ));
\r
9830 extern int sem_close (sem_t *__sem) __attribute__ ((__nothrow__ ));
\r
9833 extern int sem_unlink (const char *__name) __attribute__ ((__nothrow__ ));
\r
9839 extern int sem_wait (sem_t *__sem);
\r
9846 extern int sem_timedwait (sem_t *__restrict __sem,
\r
9847 const struct timespec *__restrict __abstime);
\r
9851 extern int sem_trywait (sem_t *__sem) __attribute__ ((__nothrow__));
\r
9854 extern int sem_post (sem_t *__sem) __attribute__ ((__nothrow__));
\r
9857 extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
\r
9858 __attribute__ ((__nothrow__ ));
\r
9859 # 67 "../include/arch/unix/apr_arch_proc_mutex.h" 2
\r
9863 struct apr_proc_mutex_unix_lock_methods_t {
\r
9864 unsigned int flags;
\r
9865 apr_status_t (*create)(apr_proc_mutex_t *, const char *);
\r
9866 apr_status_t (*acquire)(apr_proc_mutex_t *);
\r
9867 apr_status_t (*tryacquire)(apr_proc_mutex_t *);
\r
9868 apr_status_t (*release)(apr_proc_mutex_t *);
\r
9869 apr_status_t (*cleanup)(void *);
\r
9870 apr_status_t (*child_init)(apr_proc_mutex_t **, apr_pool_t *, const char *);
\r
9873 typedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lock_methods_t;
\r
9881 struct semid_ds *buf;
\r
9882 unsigned short *array;
\r
9886 struct apr_proc_mutex_t {
\r
9888 const apr_proc_mutex_unix_lock_methods_t *meth;
\r
9889 const apr_proc_mutex_unix_lock_methods_t *inter_meth;
\r
9893 apr_file_t *interproc;
\r
9896 sem_t *psem_interproc;
\r
9899 pthread_mutex_t *pthread_interproc;
\r
9903 void apr_proc_mutex_unix_setup_lock(void);
\r
9904 # 20 "./../locks/unix/proc_mutex.c" 2
\r
9906 # 1 "../include/apr_hash.h" 1
\r
9907 # 52 "../include/apr_hash.h"
\r
9908 typedef struct apr_hash_t apr_hash_t;
\r
9913 typedef struct apr_hash_index_t apr_hash_index_t;
\r
9921 typedef unsigned int (*apr_hashfunc_t)(const char *key, apr_ssize_t *klen);
\r
9926 unsigned int apr_hashfunc_default(const char *key,
\r
9927 apr_ssize_t *klen);
\r
9934 apr_hash_t * apr_hash_make(apr_pool_t *pool);
\r
9942 apr_hash_t * apr_hash_make_custom(apr_pool_t *pool,
\r
9943 apr_hashfunc_t hash_func);
\r
9944 # 96 "../include/apr_hash.h"
\r
9945 apr_hash_t * apr_hash_copy(apr_pool_t *pool,
\r
9946 const apr_hash_t *h);
\r
9947 # 107 "../include/apr_hash.h"
\r
9948 void apr_hash_set(apr_hash_t *ht, const void *key,
\r
9949 apr_ssize_t klen, const void *val);
\r
9950 # 117 "../include/apr_hash.h"
\r
9951 void * apr_hash_get(apr_hash_t *ht, const void *key,
\r
9952 apr_ssize_t klen);
\r
9953 # 147 "../include/apr_hash.h"
\r
9954 apr_hash_index_t * apr_hash_first(apr_pool_t *p, apr_hash_t *ht);
\r
9962 apr_hash_index_t * apr_hash_next(apr_hash_index_t *hi);
\r
9963 # 166 "../include/apr_hash.h"
\r
9964 void apr_hash_this(apr_hash_index_t *hi, const void **key,
\r
9965 apr_ssize_t *klen, void **val);
\r
9972 const void* apr_hash_this_key(apr_hash_index_t *hi);
\r
9979 apr_ssize_t apr_hash_this_key_len(apr_hash_index_t *hi);
\r
9986 void* apr_hash_this_val(apr_hash_index_t *hi);
\r
9993 unsigned int apr_hash_count(apr_hash_t *ht);
\r
9999 void apr_hash_clear(apr_hash_t *ht);
\r
10000 # 212 "../include/apr_hash.h"
\r
10001 apr_hash_t * apr_hash_overlay(apr_pool_t *p,
\r
10002 const apr_hash_t *overlay,
\r
10003 const apr_hash_t *base);
\r
10004 # 230 "../include/apr_hash.h"
\r
10005 apr_hash_t * apr_hash_merge(apr_pool_t *p,
\r
10006 const apr_hash_t *h1,
\r
10007 const apr_hash_t *h2,
\r
10008 void * (*merger)(apr_pool_t *p,
\r
10010 apr_ssize_t klen,
\r
10011 const void *h1_val,
\r
10012 const void *h2_val,
\r
10013 const void *data),
\r
10014 const void *data);
\r
10015 # 252 "../include/apr_hash.h"
\r
10016 typedef int (apr_hash_do_callback_fn_t)(void *rec, const void *key,
\r
10017 apr_ssize_t klen,
\r
10018 const void *value);
\r
10019 # 268 "../include/apr_hash.h"
\r
10020 int apr_hash_do(apr_hash_do_callback_fn_t *comp,
\r
10021 void *rec, const apr_hash_t *ht);
\r
10026 apr_pool_t * apr_hash_pool_get (const apr_hash_t *thehash);
\r
10027 # 22 "./../locks/unix/proc_mutex.c" 2
\r
10029 apr_status_t apr_proc_mutex_destroy(apr_proc_mutex_t *mutex)
\r
10031 return apr_pool_cleanup_run(mutex->pool, mutex, apr_proc_mutex_cleanup);
\r
10036 static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex,
\r
10037 apr_pool_t *cont,
\r
10038 const char *fname)
\r
10042 # 44 "./../locks/unix/proc_mutex.c"
\r
10043 static apr_status_t proc_mutex_posix_cleanup(void *mutex_)
\r
10045 apr_proc_mutex_t *mutex = mutex_;
\r
10047 if (sem_close(mutex->psem_interproc) < 0) {
\r
10048 return (*__errno_location ());
\r
10054 static unsigned int rshash (char *p) {
\r
10056 unsigned int b = 378551;
\r
10057 unsigned int a = 63689;
\r
10058 unsigned int retval = 0;
\r
10062 retval = retval * a + (*p);
\r
10069 static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,
\r
10070 const char *fname)
\r
10074 char semname[32];
\r
10076 new_mutex->interproc = apr_palloc(new_mutex->pool,
\r
10077 sizeof(*new_mutex->interproc));
\r
10078 # 101 "./../locks/unix/proc_mutex.c"
\r
10080 apr_ssize_t flen = strlen(fname);
\r
10081 char *p = apr_pstrndup(new_mutex->pool, fname, strlen(fname));
\r
10082 unsigned int h1, h2;
\r
10083 h1 = (apr_hashfunc_default((const char *)p, &flen) & 0xffffffff);
\r
10084 h2 = (rshash(p) & 0xffffffff);
\r
10085 apr_snprintf(semname, sizeof(semname), "/ApR.%xH%x", h1, h2);
\r
10088 unsigned long sec;
\r
10089 unsigned long usec;
\r
10090 now = apr_time_now();
\r
10091 sec = ((now) / 1000000L);
\r
10092 usec = ((now) % 1000000L);
\r
10093 apr_snprintf(semname, sizeof(semname), "/ApR.%lxZ%lx", sec, usec);
\r
10095 psem = sem_open(semname, 0100 | 0200, 0644, 1);
\r
10096 if (psem == (sem_t *)((sem_t *) 0)) {
\r
10097 if ((*__errno_location ()) == 36) {
\r
10099 semname[13] = '\0';
\r
10101 return (*__errno_location ());
\r
10103 psem = sem_open(semname, 0100 | 0200, 0644, 1);
\r
10106 if (psem == (sem_t *)((sem_t *) 0)) {
\r
10107 return (*__errno_location ());
\r
10110 sem_unlink(semname);
\r
10111 new_mutex->psem_interproc = psem;
\r
10112 new_mutex->fname = apr_pstrdup(new_mutex->pool, semname);
\r
10113 apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,
\r
10114 apr_proc_mutex_cleanup,
\r
10115 apr_pool_cleanup_null);
\r
10119 static apr_status_t proc_mutex_posix_acquire(apr_proc_mutex_t *mutex)
\r
10121 if (sem_wait(mutex->psem_interproc) < 0) {
\r
10122 return (*__errno_location ());
\r
10124 mutex->curr_locked = 1;
\r
10128 static apr_status_t proc_mutex_posix_tryacquire(apr_proc_mutex_t *mutex)
\r
10130 if (sem_trywait(mutex->psem_interproc) < 0) {
\r
10131 if ((*__errno_location ()) == 11) {
\r
10132 return ((20000 + 50000) + 25);
\r
10134 return (*__errno_location ());
\r
10136 mutex->curr_locked = 1;
\r
10140 static apr_status_t proc_mutex_posix_release(apr_proc_mutex_t *mutex)
\r
10142 mutex->curr_locked = 0;
\r
10143 if (sem_post(mutex->psem_interproc) < 0) {
\r
10146 return (*__errno_location ());
\r
10151 static const apr_proc_mutex_unix_lock_methods_t mutex_posixsem_methods =
\r
10158 proc_mutex_posix_create,
\r
10159 proc_mutex_posix_acquire,
\r
10160 proc_mutex_posix_tryacquire,
\r
10161 proc_mutex_posix_release,
\r
10162 proc_mutex_posix_cleanup,
\r
10163 proc_mutex_no_child_init,
\r
10171 static struct sembuf proc_mutex_op_on;
\r
10172 static struct sembuf proc_mutex_op_try;
\r
10173 static struct sembuf proc_mutex_op_off;
\r
10175 static void proc_mutex_sysv_setup(void)
\r
10177 proc_mutex_op_on.sem_num = 0;
\r
10178 proc_mutex_op_on.sem_op = -1;
\r
10179 proc_mutex_op_on.sem_flg = 0x1000;
\r
10180 proc_mutex_op_try.sem_num = 0;
\r
10181 proc_mutex_op_try.sem_op = -1;
\r
10182 proc_mutex_op_try.sem_flg = 0x1000 | 04000;
\r
10183 proc_mutex_op_off.sem_num = 0;
\r
10184 proc_mutex_op_off.sem_op = 1;
\r
10185 proc_mutex_op_off.sem_flg = 0x1000;
\r
10188 static apr_status_t proc_mutex_sysv_cleanup(void *mutex_)
\r
10190 apr_proc_mutex_t *mutex=mutex_;
\r
10193 if (mutex->interproc->filedes != -1) {
\r
10195 semctl(mutex->interproc->filedes, 0, 0, ick);
\r
10200 static apr_status_t proc_mutex_sysv_create(apr_proc_mutex_t *new_mutex,
\r
10201 const char *fname)
\r
10206 new_mutex->interproc = apr_palloc(new_mutex->pool, sizeof(*new_mutex->interproc));
\r
10207 new_mutex->interproc->filedes = semget(((__key_t) 0), 1, 01000 | 0600);
\r
10209 if (new_mutex->interproc->filedes < 0) {
\r
10210 rv = (*__errno_location ());
\r
10211 proc_mutex_sysv_cleanup(new_mutex);
\r
10215 if (semctl(new_mutex->interproc->filedes, 0, 16, ick) < 0) {
\r
10216 rv = (*__errno_location ());
\r
10217 proc_mutex_sysv_cleanup(new_mutex);
\r
10220 new_mutex->curr_locked = 0;
\r
10221 apr_pool_cleanup_register(new_mutex->pool,
\r
10222 (void *)new_mutex, apr_proc_mutex_cleanup,
\r
10223 apr_pool_cleanup_null);
\r
10227 static apr_status_t proc_mutex_sysv_acquire(apr_proc_mutex_t *mutex)
\r
10232 rc = semop(mutex->interproc->filedes, &proc_mutex_op_on, 1);
\r
10233 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10235 return (*__errno_location ());
\r
10237 mutex->curr_locked = 1;
\r
10241 static apr_status_t proc_mutex_sysv_tryacquire(apr_proc_mutex_t *mutex)
\r
10246 rc = semop(mutex->interproc->filedes, &proc_mutex_op_try, 1);
\r
10247 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10249 if ((*__errno_location ()) == 11) {
\r
10250 return ((20000 + 50000) + 25);
\r
10252 return (*__errno_location ());
\r
10254 mutex->curr_locked = 1;
\r
10258 static apr_status_t proc_mutex_sysv_release(apr_proc_mutex_t *mutex)
\r
10262 mutex->curr_locked = 0;
\r
10264 rc = semop(mutex->interproc->filedes, &proc_mutex_op_off, 1);
\r
10265 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10267 return (*__errno_location ());
\r
10272 static const apr_proc_mutex_unix_lock_methods_t mutex_sysv_methods =
\r
10279 proc_mutex_sysv_create,
\r
10280 proc_mutex_sysv_acquire,
\r
10281 proc_mutex_sysv_tryacquire,
\r
10282 proc_mutex_sysv_release,
\r
10283 proc_mutex_sysv_cleanup,
\r
10284 proc_mutex_no_child_init,
\r
10292 static apr_status_t proc_mutex_proc_pthread_cleanup(void *mutex_)
\r
10294 apr_proc_mutex_t *mutex=mutex_;
\r
10297 if (mutex->curr_locked == 1) {
\r
10298 if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {
\r
10306 if (mutex->curr_locked != -1) {
\r
10307 if ((rv = pthread_mutex_destroy(mutex->pthread_interproc))) {
\r
10314 if (munmap((caddr_t)mutex->pthread_interproc, sizeof(pthread_mutex_t))) {
\r
10315 return (*__errno_location ());
\r
10320 static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,
\r
10321 const char *fname)
\r
10325 pthread_mutexattr_t mattr;
\r
10327 fd = open("/dev/zero", 02);
\r
10329 return (*__errno_location ());
\r
10332 new_mutex->pthread_interproc = (pthread_mutex_t *)mmap(
\r
10334 sizeof(pthread_mutex_t),
\r
10337 if (new_mutex->pthread_interproc == (pthread_mutex_t *) (caddr_t) -1) {
\r
10339 return (*__errno_location ());
\r
10343 new_mutex->curr_locked = -1;
\r
10345 if ((rv = pthread_mutexattr_init(&mattr))) {
\r
10349 proc_mutex_proc_pthread_cleanup(new_mutex);
\r
10352 if ((rv = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))) {
\r
10356 proc_mutex_proc_pthread_cleanup(new_mutex);
\r
10357 pthread_mutexattr_destroy(&mattr);
\r
10362 if ((rv = pthread_mutexattr_setrobust_np(&mattr,
\r
10363 PTHREAD_MUTEX_ROBUST_NP))) {
\r
10367 proc_mutex_proc_pthread_cleanup(new_mutex);
\r
10368 pthread_mutexattr_destroy(&mattr);
\r
10371 if ((rv = pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT))) {
\r
10375 proc_mutex_proc_pthread_cleanup(new_mutex);
\r
10376 pthread_mutexattr_destroy(&mattr);
\r
10381 if ((rv = pthread_mutex_init(new_mutex->pthread_interproc, &mattr))) {
\r
10385 proc_mutex_proc_pthread_cleanup(new_mutex);
\r
10386 pthread_mutexattr_destroy(&mattr);
\r
10390 new_mutex->curr_locked = 0;
\r
10392 if ((rv = pthread_mutexattr_destroy(&mattr))) {
\r
10396 proc_mutex_proc_pthread_cleanup(new_mutex);
\r
10400 apr_pool_cleanup_register(new_mutex->pool,
\r
10401 (void *)new_mutex,
\r
10402 apr_proc_mutex_cleanup,
\r
10403 apr_pool_cleanup_null);
\r
10407 static apr_status_t proc_mutex_proc_pthread_acquire(apr_proc_mutex_t *mutex)
\r
10411 if ((rv = pthread_mutex_lock(mutex->pthread_interproc))) {
\r
10418 pthread_mutex_consistent_np(mutex->pthread_interproc);
\r
10426 mutex->curr_locked = 1;
\r
10430 static apr_status_t proc_mutex_proc_pthread_tryacquire(apr_proc_mutex_t *mutex)
\r
10434 if ((rv = pthread_mutex_trylock(mutex->pthread_interproc))) {
\r
10439 return ((20000 + 50000) + 25);
\r
10444 pthread_mutex_consistent_np(mutex->pthread_interproc);
\r
10453 mutex->curr_locked = 1;
\r
10457 static apr_status_t proc_mutex_proc_pthread_release(apr_proc_mutex_t *mutex)
\r
10461 mutex->curr_locked = 0;
\r
10462 if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {
\r
10471 static const apr_proc_mutex_unix_lock_methods_t mutex_proc_pthread_methods =
\r
10474 proc_mutex_proc_pthread_create,
\r
10475 proc_mutex_proc_pthread_acquire,
\r
10476 proc_mutex_proc_pthread_tryacquire,
\r
10477 proc_mutex_proc_pthread_release,
\r
10478 proc_mutex_proc_pthread_cleanup,
\r
10479 proc_mutex_no_child_init,
\r
10487 static struct flock proc_mutex_lock_it;
\r
10488 static struct flock proc_mutex_unlock_it;
\r
10490 static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *);
\r
10492 static void proc_mutex_fcntl_setup(void)
\r
10494 proc_mutex_lock_it.l_whence = 0;
\r
10495 proc_mutex_lock_it.l_start = 0;
\r
10496 proc_mutex_lock_it.l_len = 0;
\r
10497 proc_mutex_lock_it.l_type = 1;
\r
10498 proc_mutex_lock_it.l_pid = 0;
\r
10499 proc_mutex_unlock_it.l_whence = 0;
\r
10500 proc_mutex_unlock_it.l_start = 0;
\r
10501 proc_mutex_unlock_it.l_len = 0;
\r
10502 proc_mutex_unlock_it.l_type = 2;
\r
10503 proc_mutex_unlock_it.l_pid = 0;
\r
10506 static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)
\r
10508 apr_status_t status;
\r
10509 apr_proc_mutex_t *mutex=mutex_;
\r
10511 if (mutex->curr_locked == 1) {
\r
10512 status = proc_mutex_fcntl_release(mutex);
\r
10517 return apr_file_close(mutex->interproc);
\r
10520 static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
\r
10521 const char *fname)
\r
10526 new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);
\r
10527 rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
\r
10528 0x00004 | 0x00002 | 0x00040,
\r
10529 0x0400 | 0x0200 | 0x0040 | 0x0004,
\r
10530 new_mutex->pool);
\r
10533 new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");
\r
10534 rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,
\r
10535 0x00004 | 0x00002 | 0x00040,
\r
10536 new_mutex->pool);
\r
10543 new_mutex->curr_locked = 0;
\r
10544 unlink(new_mutex->fname);
\r
10545 apr_pool_cleanup_register(new_mutex->pool,
\r
10546 (void*)new_mutex,
\r
10547 apr_proc_mutex_cleanup,
\r
10548 apr_pool_cleanup_null);
\r
10552 static apr_status_t proc_mutex_fcntl_acquire(apr_proc_mutex_t *mutex)
\r
10557 rc = fcntl(mutex->interproc->filedes, 7, &proc_mutex_lock_it);
\r
10558 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10560 return (*__errno_location ());
\r
10562 mutex->curr_locked=1;
\r
10566 static apr_status_t proc_mutex_fcntl_tryacquire(apr_proc_mutex_t *mutex)
\r
10571 rc = fcntl(mutex->interproc->filedes, 6, &proc_mutex_lock_it);
\r
10572 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10577 if ((*__errno_location ()) == 11) {
\r
10579 return ((20000 + 50000) + 25);
\r
10581 return (*__errno_location ());
\r
10583 mutex->curr_locked = 1;
\r
10587 static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *mutex)
\r
10591 mutex->curr_locked=0;
\r
10593 rc = fcntl(mutex->interproc->filedes, 7, &proc_mutex_unlock_it);
\r
10594 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10596 return (*__errno_location ());
\r
10601 static const apr_proc_mutex_unix_lock_methods_t mutex_fcntl_methods =
\r
10608 proc_mutex_fcntl_create,
\r
10609 proc_mutex_fcntl_acquire,
\r
10610 proc_mutex_fcntl_tryacquire,
\r
10611 proc_mutex_fcntl_release,
\r
10612 proc_mutex_fcntl_cleanup,
\r
10613 proc_mutex_no_child_init,
\r
10621 static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *);
\r
10623 static apr_status_t proc_mutex_flock_cleanup(void *mutex_)
\r
10625 apr_status_t status;
\r
10626 apr_proc_mutex_t *mutex=mutex_;
\r
10628 if (mutex->curr_locked == 1) {
\r
10629 status = proc_mutex_flock_release(mutex);
\r
10633 if (mutex->interproc) {
\r
10634 apr_file_close(mutex->interproc);
\r
10636 unlink(mutex->fname);
\r
10640 static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,
\r
10641 const char *fname)
\r
10646 new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);
\r
10647 rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
\r
10648 0x00004 | 0x00002 | 0x00040,
\r
10650 new_mutex->pool);
\r
10653 new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");
\r
10654 rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,
\r
10655 0x00004 | 0x00002 | 0x00040,
\r
10656 new_mutex->pool);
\r
10660 proc_mutex_flock_cleanup(new_mutex);
\r
10661 return (*__errno_location ());
\r
10663 new_mutex->curr_locked = 0;
\r
10664 apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,
\r
10665 apr_proc_mutex_cleanup,
\r
10666 apr_pool_cleanup_null);
\r
10670 static apr_status_t proc_mutex_flock_acquire(apr_proc_mutex_t *mutex)
\r
10675 rc = flock(mutex->interproc->filedes, 2);
\r
10676 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10678 return (*__errno_location ());
\r
10680 mutex->curr_locked = 1;
\r
10684 static apr_status_t proc_mutex_flock_tryacquire(apr_proc_mutex_t *mutex)
\r
10689 rc = flock(mutex->interproc->filedes, 2 | 4);
\r
10690 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10692 if ((*__errno_location ()) == 11 || (*__errno_location ()) == 11) {
\r
10693 return ((20000 + 50000) + 25);
\r
10695 return (*__errno_location ());
\r
10697 mutex->curr_locked = 1;
\r
10701 static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *mutex)
\r
10705 mutex->curr_locked = 0;
\r
10707 rc = flock(mutex->interproc->filedes, 8);
\r
10708 } while (rc < 0 && (*__errno_location ()) == 4);
\r
10710 return (*__errno_location ());
\r
10715 static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex,
\r
10716 apr_pool_t *pool,
\r
10717 const char *fname)
\r
10719 apr_proc_mutex_t *new_mutex;
\r
10722 new_mutex = (apr_proc_mutex_t *)apr_palloc(pool, sizeof(apr_proc_mutex_t));
\r
10724 memcpy(new_mutex, *mutex, sizeof *new_mutex);
\r
10725 new_mutex->pool = pool;
\r
10727 fname = (*mutex)->fname;
\r
10729 new_mutex->fname = apr_pstrdup(pool, fname);
\r
10730 rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
\r
10731 0x00002, 0, new_mutex->pool);
\r
10735 *mutex = new_mutex;
\r
10739 static const apr_proc_mutex_unix_lock_methods_t mutex_flock_methods =
\r
10746 proc_mutex_flock_create,
\r
10747 proc_mutex_flock_acquire,
\r
10748 proc_mutex_flock_tryacquire,
\r
10749 proc_mutex_flock_release,
\r
10750 proc_mutex_flock_cleanup,
\r
10751 proc_mutex_flock_child_init,
\r
10757 void apr_proc_mutex_unix_setup_lock(void)
\r
10761 proc_mutex_sysv_setup();
\r
10764 proc_mutex_fcntl_setup();
\r
10768 static apr_status_t proc_mutex_choose_method(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech)
\r
10771 case APR_LOCK_FCNTL:
\r
10773 new_mutex->inter_meth = &mutex_fcntl_methods;
\r
10778 case APR_LOCK_FLOCK:
\r
10780 new_mutex->inter_meth = &mutex_flock_methods;
\r
10785 case APR_LOCK_SYSVSEM:
\r
10787 new_mutex->inter_meth = &mutex_sysv_methods;
\r
10792 case APR_LOCK_POSIXSEM:
\r
10794 new_mutex->inter_meth = &mutex_posixsem_methods;
\r
10799 case APR_LOCK_PROC_PTHREAD:
\r
10801 new_mutex->inter_meth = &mutex_proc_pthread_methods;
\r
10806 case APR_LOCK_DEFAULT:
\r
10810 new_mutex->inter_meth = &mutex_sysv_methods;
\r
10811 # 842 "./../locks/unix/proc_mutex.c"
\r
10814 return ((20000 + 50000) + 23);
\r
10819 const char * apr_proc_mutex_defname(void)
\r
10822 apr_proc_mutex_t mutex;
\r
10824 if ((rv = proc_mutex_choose_method(&mutex, APR_LOCK_DEFAULT)) != 0) {
\r
10825 return "unknown";
\r
10827 mutex.meth = mutex.inter_meth;
\r
10829 return apr_proc_mutex_name(&mutex);
\r
10832 static apr_status_t proc_mutex_create(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech, const char *fname)
\r
10836 if ((rv = proc_mutex_choose_method(new_mutex, mech)) != 0) {
\r
10840 new_mutex->meth = new_mutex->inter_meth;
\r
10842 if ((rv = new_mutex->meth->create(new_mutex, fname)) != 0) {
\r
10849 apr_status_t apr_proc_mutex_create(apr_proc_mutex_t **mutex,
\r
10850 const char *fname,
\r
10851 apr_lockmech_e mech,
\r
10852 apr_pool_t *pool)
\r
10854 apr_proc_mutex_t *new_mutex;
\r
10857 new_mutex = memset(apr_palloc(pool, sizeof(apr_proc_mutex_t)), 0, sizeof(apr_proc_mutex_t));
\r
10858 new_mutex->pool = pool;
\r
10860 if ((rv = proc_mutex_create(new_mutex, mech, fname)) != 0)
\r
10863 *mutex = new_mutex;
\r
10867 apr_status_t apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,
\r
10868 const char *fname,
\r
10869 apr_pool_t *pool)
\r
10871 return (*mutex)->meth->child_init(mutex, pool, fname);
\r
10874 apr_status_t apr_proc_mutex_lock(apr_proc_mutex_t *mutex)
\r
10876 return mutex->meth->acquire(mutex);
\r
10879 apr_status_t apr_proc_mutex_trylock(apr_proc_mutex_t *mutex)
\r
10881 return mutex->meth->tryacquire(mutex);
\r
10884 apr_status_t apr_proc_mutex_unlock(apr_proc_mutex_t *mutex)
\r
10886 return mutex->meth->release(mutex);
\r
10889 apr_status_t apr_proc_mutex_cleanup(void *mutex)
\r
10891 return ((apr_proc_mutex_t *)mutex)->meth->cleanup(mutex);
\r
10894 const char * apr_proc_mutex_name(apr_proc_mutex_t *mutex)
\r
10896 return mutex->meth->name;
\r
10899 const char * apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)
\r
10904 if (mutex->meth == &mutex_flock_methods) {
\r
10905 return mutex->fname;
\r
10909 if (mutex->meth == &mutex_fcntl_methods) {
\r
10910 return mutex->fname;
\r
10913 return ((void*)0);
\r
10916 apr_pool_t * apr_proc_mutex_pool_get (const apr_proc_mutex_t *theproc_mutex) { return theproc_mutex->pool; }
\r
10920 apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
\r
10921 apr_proc_mutex_t *pmutex)
\r
10924 if (pmutex->interproc) {
\r
10925 ospmutex->crossproc = pmutex->interproc->filedes;
\r
10928 ospmutex->crossproc = -1;
\r
10932 ospmutex->pthread_interproc = pmutex->pthread_interproc;
\r
10937 apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
\r
10938 apr_os_proc_mutex_t *ospmutex,
\r
10939 apr_pool_t *pool)
\r
10941 if (pool == ((void*)0)) {
\r
10942 return (20000 + 2);
\r
10944 if ((*pmutex) == ((void*)0)) {
\r
10945 (*pmutex) = (apr_proc_mutex_t *)memset(apr_palloc(pool, sizeof(apr_proc_mutex_t)), 0, sizeof(apr_proc_mutex_t));
\r
10947 (*pmutex)->pool = pool;
\r
10950 apr_os_file_put(&(*pmutex)->interproc, &ospmutex->crossproc, 0, pool);
\r
10953 (*pmutex)->pthread_interproc = ospmutex->pthread_interproc;
\r
10958 # 1 "./../memory/unix/apr_pools.c" 1
\r
10959 # 31 "./../memory/unix/apr_pools.c"
\r
10960 # 1 "../include/apr_want.h" 1
\r
10961 # 32 "./../memory/unix/apr_pools.c" 2
\r
10962 # 1 "../include/apr_env.h" 1
\r
10963 # 42 "../include/apr_env.h"
\r
10964 apr_status_t apr_env_get(char **value, const char *envvar,
\r
10965 apr_pool_t *pool);
\r
10973 apr_status_t apr_env_set(const char *envvar, const char *value,
\r
10974 apr_pool_t *pool);
\r
10981 apr_status_t apr_env_delete(const char *envvar, apr_pool_t *pool);
\r
10982 # 33 "./../memory/unix/apr_pools.c" 2
\r
10983 # 85 "./../memory/unix/apr_pools.c"
\r
10984 struct apr_allocator_t {
\r
10986 apr_uint32_t max_index;
\r
10992 apr_uint32_t max_free_index;
\r
10997 apr_uint32_t current_free_index;
\r
10999 apr_thread_mutex_t *mutex;
\r
11001 apr_pool_t *owner;
\r
11002 # 113 "./../memory/unix/apr_pools.c"
\r
11003 apr_memnode_t *free[20];
\r
11005 # 123 "./../memory/unix/apr_pools.c"
\r
11006 apr_status_t apr_allocator_create(apr_allocator_t **allocator)
\r
11008 apr_allocator_t *new_allocator;
\r
11010 *allocator = ((void*)0);
\r
11012 if ((new_allocator = malloc((((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0))
\r
11015 memset(new_allocator, 0, (((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)));
\r
11016 new_allocator->max_free_index = 0;
\r
11018 *allocator = new_allocator;
\r
11023 void apr_allocator_destroy(apr_allocator_t *allocator)
\r
11025 apr_uint32_t index;
\r
11026 apr_memnode_t *node, **ref;
\r
11028 for (index = 0; index < 20; index++) {
\r
11029 ref = &allocator->free[index];
\r
11030 while ((node = *ref) != ((void*)0)) {
\r
11031 *ref = node->next;
\r
11044 void apr_allocator_mutex_set(apr_allocator_t *allocator,
\r
11045 apr_thread_mutex_t *mutex)
\r
11047 allocator->mutex = mutex;
\r
11050 apr_thread_mutex_t * apr_allocator_mutex_get(
\r
11051 apr_allocator_t *allocator)
\r
11053 return allocator->mutex;
\r
11057 void apr_allocator_owner_set(apr_allocator_t *allocator,
\r
11058 apr_pool_t *pool)
\r
11060 allocator->owner = pool;
\r
11063 apr_pool_t * apr_allocator_owner_get(apr_allocator_t *allocator)
\r
11065 return allocator->owner;
\r
11068 void apr_allocator_max_free_set(apr_allocator_t *allocator,
\r
11069 apr_size_t in_size)
\r
11071 apr_uint32_t max_free_index;
\r
11072 apr_uint32_t size = (apr_uint32_t)in_size;
\r
11075 apr_thread_mutex_t *mutex;
\r
11077 mutex = apr_allocator_mutex_get(allocator);
\r
11078 if (mutex != ((void*)0))
\r
11079 apr_thread_mutex_lock(mutex);
\r
11082 max_free_index = (((size) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) >> 12;
\r
11083 allocator->current_free_index += max_free_index;
\r
11084 allocator->current_free_index -= allocator->max_free_index;
\r
11085 allocator->max_free_index = max_free_index;
\r
11086 if (allocator->current_free_index > max_free_index)
\r
11087 allocator->current_free_index = max_free_index;
\r
11090 if (mutex != ((void*)0))
\r
11091 apr_thread_mutex_unlock(mutex);
\r
11095 static __inline__
\r
11096 apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
\r
11098 apr_memnode_t *node, **ref;
\r
11099 apr_uint32_t max_index;
\r
11100 apr_size_t size, i, index;
\r
11105 size = (((in_size + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1))) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1));
\r
11106 if (size < in_size) {
\r
11107 return ((void*)0);
\r
11109 if (size < (2 * (1 << 12)))
\r
11110 size = (2 * (1 << 12));
\r
11115 index = (size >> 12) - 1;
\r
11117 if (index > (4294967295U)) {
\r
11118 return ((void*)0);
\r
11124 if (index <= allocator->max_index) {
\r
11126 if (allocator->mutex)
\r
11127 apr_thread_mutex_lock(allocator->mutex);
\r
11128 # 257 "./../memory/unix/apr_pools.c"
\r
11129 max_index = allocator->max_index;
\r
11130 ref = &allocator->free[index];
\r
11132 while (*ref == ((void*)0) && i < max_index) {
\r
11137 if ((node = *ref) != ((void*)0)) {
\r
11143 if ((*ref = node->next) == ((void*)0) && i >= max_index) {
\r
11148 while (*ref == ((void*)0) && max_index > 0);
\r
11150 allocator->max_index = max_index;
\r
11153 allocator->current_free_index += node->index + 1;
\r
11154 if (allocator->current_free_index > allocator->max_free_index)
\r
11155 allocator->current_free_index = allocator->max_free_index;
\r
11158 if (allocator->mutex)
\r
11159 apr_thread_mutex_unlock(allocator->mutex);
\r
11162 node->next = ((void*)0);
\r
11163 node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));
\r
11169 if (allocator->mutex)
\r
11170 apr_thread_mutex_unlock(allocator->mutex);
\r
11177 else if (allocator->free[0]) {
\r
11179 if (allocator->mutex)
\r
11180 apr_thread_mutex_lock(allocator->mutex);
\r
11186 ref = &allocator->free[0];
\r
11187 while ((node = *ref) != ((void*)0) && index > node->index)
\r
11188 ref = &node->next;
\r
11191 *ref = node->next;
\r
11193 allocator->current_free_index += node->index + 1;
\r
11194 if (allocator->current_free_index > allocator->max_free_index)
\r
11195 allocator->current_free_index = allocator->max_free_index;
\r
11198 if (allocator->mutex)
\r
11199 apr_thread_mutex_unlock(allocator->mutex);
\r
11202 node->next = ((void*)0);
\r
11203 node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));
\r
11209 if (allocator->mutex)
\r
11210 apr_thread_mutex_unlock(allocator->mutex);
\r
11213 # 349 "./../memory/unix/apr_pools.c"
\r
11214 if ((node = malloc(size)) == ((void*)0))
\r
11216 return ((void*)0);
\r
11218 node->next = ((void*)0);
\r
11219 node->index = (apr_uint32_t)index;
\r
11220 node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));
\r
11221 node->endp = (char *)node + size;
\r
11226 static __inline__
\r
11227 void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)
\r
11229 apr_memnode_t *next; apr_memnode_t *freelist = ((void*)0);
\r
11230 apr_uint32_t index, max_index;
\r
11231 apr_uint32_t max_free_index, current_free_index;
\r
11234 if (allocator->mutex)
\r
11235 apr_thread_mutex_lock(allocator->mutex);
\r
11238 max_index = allocator->max_index;
\r
11239 max_free_index = allocator->max_free_index;
\r
11240 current_free_index = allocator->current_free_index;
\r
11246 next = node->next;
\r
11247 index = node->index;
\r
11249 if (max_free_index != 0
\r
11250 && index + 1 > current_free_index) {
\r
11251 node->next = freelist;
\r
11254 else if (index < 20) {
\r
11258 if ((node->next = allocator->free[index]) == ((void*)0)
\r
11259 && index > max_index) {
\r
11260 max_index = index;
\r
11262 allocator->free[index] = node;
\r
11263 if (current_free_index >= index + 1)
\r
11264 current_free_index -= index + 1;
\r
11266 current_free_index = 0;
\r
11272 node->next = allocator->free[0];
\r
11273 allocator->free[0] = node;
\r
11274 if (current_free_index >= index + 1)
\r
11275 current_free_index -= index + 1;
\r
11277 current_free_index = 0;
\r
11279 } while ((node = next) != ((void*)0));
\r
11281 allocator->max_index = max_index;
\r
11282 allocator->current_free_index = current_free_index;
\r
11285 if (allocator->mutex)
\r
11286 apr_thread_mutex_unlock(allocator->mutex);
\r
11289 while (freelist != ((void*)0)) {
\r
11291 freelist = node->next;
\r
11300 apr_memnode_t * apr_allocator_alloc(apr_allocator_t *allocator,
\r
11303 return allocator_alloc(allocator, size);
\r
11306 void apr_allocator_free(apr_allocator_t *allocator,
\r
11307 apr_memnode_t *node)
\r
11309 allocator_free(allocator, node);
\r
11311 # 467 "./../memory/unix/apr_pools.c"
\r
11312 typedef struct cleanup_t cleanup_t;
\r
11315 struct process_chain {
\r
11317 apr_proc_t *proc;
\r
11318 apr_kill_conditions_e kill_how;
\r
11320 struct process_chain *next;
\r
11322 # 500 "./../memory/unix/apr_pools.c"
\r
11323 struct apr_pool_t {
\r
11324 apr_pool_t *parent;
\r
11325 apr_pool_t *child;
\r
11326 apr_pool_t *sibling;
\r
11327 apr_pool_t **ref;
\r
11328 cleanup_t *cleanups;
\r
11329 cleanup_t *free_cleanups;
\r
11330 apr_allocator_t *allocator;
\r
11331 struct process_chain *subprocesses;
\r
11332 apr_abortfunc_t abort_fn;
\r
11333 apr_hash_t *user_data;
\r
11337 apr_memnode_t *active;
\r
11338 apr_memnode_t *self;
\r
11339 char *self_first_avail;
\r
11340 # 535 "./../memory/unix/apr_pools.c"
\r
11341 cleanup_t *pre_cleanups;
\r
11343 # 545 "./../memory/unix/apr_pools.c"
\r
11344 static apr_byte_t apr_pools_initialized = 0;
\r
11345 static apr_pool_t *global_pool = ((void*)0);
\r
11348 static apr_allocator_t *global_allocator = ((void*)0);
\r
11349 # 560 "./../memory/unix/apr_pools.c"
\r
11350 static void run_cleanups(cleanup_t **c);
\r
11351 static void free_proc_chain(struct process_chain *procs);
\r
11352 # 572 "./../memory/unix/apr_pools.c"
\r
11353 apr_status_t apr_pool_initialize(void)
\r
11357 if (apr_pools_initialized++)
\r
11359 # 587 "./../memory/unix/apr_pools.c"
\r
11360 if ((rv = apr_allocator_create(&global_allocator)) != 0) {
\r
11361 apr_pools_initialized = 0;
\r
11365 if ((rv = apr_pool_create_ex(&global_pool, ((void*)0), ((void*)0),
\r
11366 global_allocator)) != 0) {
\r
11367 apr_allocator_destroy(global_allocator);
\r
11368 global_allocator = ((void*)0);
\r
11369 apr_pools_initialized = 0;
\r
11373 apr_pool_tag(global_pool, "apr_global_pool");
\r
11381 if ((rv = apr_atomic_init(global_pool)) != 0) {
\r
11387 apr_thread_mutex_t *mutex;
\r
11389 if ((rv = apr_thread_mutex_create(&mutex,
\r
11391 global_pool)) != 0) {
\r
11395 apr_allocator_mutex_set(global_allocator, mutex);
\r
11399 apr_allocator_owner_set(global_allocator, global_pool);
\r
11404 void apr_pool_terminate(void)
\r
11406 if (!apr_pools_initialized)
\r
11409 if (--apr_pools_initialized)
\r
11412 apr_pool_destroy(global_pool);
\r
11413 global_pool = ((void*)0);
\r
11415 global_allocator = ((void*)0);
\r
11417 # 668 "./../memory/unix/apr_pools.c"
\r
11418 void * apr_palloc(apr_pool_t *pool, apr_size_t in_size)
\r
11420 apr_memnode_t *active, *node;
\r
11422 apr_size_t size, free_index;
\r
11424 size = (((in_size) + ((8) - 1)) & ~((8) - 1));
\r
11425 if (size < in_size) {
\r
11426 if (pool->abort_fn)
\r
11427 pool->abort_fn(12);
\r
11429 return ((void*)0);
\r
11431 active = pool->active;
\r
11434 if (size <= ((apr_size_t)(active->endp - active->first_avail))) {
\r
11435 mem = active->first_avail;
\r
11436 active->first_avail += size;
\r
11441 node = active->next;
\r
11442 if (size <= ((apr_size_t)(node->endp - node->first_avail))) {
\r
11443 do { *node->ref = node->next; node->next->ref = node->ref; } while (0);
\r
11446 if ((node = allocator_alloc(pool->allocator, size)) == ((void*)0)) {
\r
11447 if (pool->abort_fn)
\r
11448 pool->abort_fn(12);
\r
11450 return ((void*)0);
\r
11454 node->free_index = 0;
\r
11456 mem = node->first_avail;
\r
11457 node->first_avail += size;
\r
11459 do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);
\r
11461 pool->active = node;
\r
11463 free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;
\r
11466 active->free_index = (apr_uint32_t)free_index;
\r
11467 node = active->next;
\r
11468 if (free_index >= node->free_index)
\r
11472 node = node->next;
\r
11474 while (free_index < node->free_index);
\r
11476 do { *active->ref = active->next; active->next->ref = active->ref; } while (0);
\r
11477 do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);
\r
11481 # 740 "./../memory/unix/apr_pools.c"
\r
11482 void * apr_pcalloc(apr_pool_t *pool, apr_size_t size);
\r
11483 void * apr_pcalloc(apr_pool_t *pool, apr_size_t size)
\r
11487 if ((mem = apr_palloc(pool, size)) != ((void*)0)) {
\r
11488 memset(mem, 0, size);
\r
11499 void apr_pool_clear(apr_pool_t *pool)
\r
11501 apr_memnode_t *active;
\r
11504 run_cleanups(&pool->pre_cleanups);
\r
11505 pool->pre_cleanups = ((void*)0);
\r
11510 while (pool->child)
\r
11511 apr_pool_destroy(pool->child);
\r
11514 run_cleanups(&pool->cleanups);
\r
11515 pool->cleanups = ((void*)0);
\r
11516 pool->free_cleanups = ((void*)0);
\r
11519 free_proc_chain(pool->subprocesses);
\r
11520 pool->subprocesses = ((void*)0);
\r
11523 pool->user_data = ((void*)0);
\r
11528 active = pool->active = pool->self;
\r
11529 active->first_avail = pool->self_first_avail;
\r
11531 if (active->next == active)
\r
11534 *active->ref = ((void*)0);
\r
11535 allocator_free(pool->allocator, active->next);
\r
11536 active->next = active;
\r
11537 active->ref = &active->next;
\r
11540 void apr_pool_destroy(apr_pool_t *pool)
\r
11542 apr_memnode_t *active;
\r
11543 apr_allocator_t *allocator;
\r
11546 run_cleanups(&pool->pre_cleanups);
\r
11547 pool->pre_cleanups = ((void*)0);
\r
11552 while (pool->child)
\r
11553 apr_pool_destroy(pool->child);
\r
11556 run_cleanups(&pool->cleanups);
\r
11559 free_proc_chain(pool->subprocesses);
\r
11562 if (pool->parent) {
\r
11564 apr_thread_mutex_t *mutex;
\r
11566 if ((mutex = apr_allocator_mutex_get(pool->parent->allocator)) != ((void*)0))
\r
11567 apr_thread_mutex_lock(mutex);
\r
11570 if ((*pool->ref = pool->sibling) != ((void*)0))
\r
11571 pool->sibling->ref = pool->ref;
\r
11575 apr_thread_mutex_unlock(mutex);
\r
11582 allocator = pool->allocator;
\r
11583 active = pool->self;
\r
11584 *active->ref = ((void*)0);
\r
11587 if (apr_allocator_owner_get(allocator) == pool) {
\r
11591 apr_allocator_mutex_set(allocator, ((void*)0));
\r
11598 allocator_free(allocator, active);
\r
11605 if (apr_allocator_owner_get(allocator) == pool) {
\r
11606 apr_allocator_destroy(allocator);
\r
11610 apr_status_t apr_pool_create_ex(apr_pool_t **newpool,
\r
11611 apr_pool_t *parent,
\r
11612 apr_abortfunc_t abort_fn,
\r
11613 apr_allocator_t *allocator)
\r
11615 apr_pool_t *pool;
\r
11616 apr_memnode_t *node;
\r
11618 *newpool = ((void*)0);
\r
11621 parent = global_pool;
\r
11627 if (!abort_fn && parent)
\r
11628 abort_fn = parent->abort_fn;
\r
11630 if (allocator == ((void*)0))
\r
11631 allocator = parent->allocator;
\r
11633 if ((node = allocator_alloc(allocator,
\r
11634 (2 * (1 << 12)) - (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {
\r
11641 node->next = node;
\r
11642 node->ref = &node->next;
\r
11644 pool = (apr_pool_t *)node->first_avail;
\r
11645 node->first_avail = pool->self_first_avail = (char *)pool + (((sizeof(apr_pool_t)) + ((8) - 1)) & ~((8) - 1));
\r
11647 pool->allocator = allocator;
\r
11648 pool->active = pool->self = node;
\r
11649 pool->abort_fn = abort_fn;
\r
11650 pool->child = ((void*)0);
\r
11651 pool->cleanups = ((void*)0);
\r
11652 pool->free_cleanups = ((void*)0);
\r
11653 pool->pre_cleanups = ((void*)0);
\r
11654 pool->subprocesses = ((void*)0);
\r
11655 pool->user_data = ((void*)0);
\r
11656 pool->tag = ((void*)0);
\r
11662 if ((pool->parent = parent) != ((void*)0)) {
\r
11664 apr_thread_mutex_t *mutex;
\r
11666 if ((mutex = apr_allocator_mutex_get(parent->allocator)) != ((void*)0))
\r
11667 apr_thread_mutex_lock(mutex);
\r
11670 if ((pool->sibling = parent->child) != ((void*)0))
\r
11671 pool->sibling->ref = &pool->sibling;
\r
11673 parent->child = pool;
\r
11674 pool->ref = &parent->child;
\r
11678 apr_thread_mutex_unlock(mutex);
\r
11682 pool->sibling = ((void*)0);
\r
11683 pool->ref = ((void*)0);
\r
11693 apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool,
\r
11694 apr_abortfunc_t abort_fn,
\r
11695 apr_allocator_t *allocator)
\r
11697 return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);
\r
11700 apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool,
\r
11701 apr_abortfunc_t abort_fn,
\r
11702 apr_allocator_t *allocator)
\r
11704 apr_pool_t *pool;
\r
11705 apr_memnode_t *node;
\r
11706 apr_allocator_t *pool_allocator;
\r
11708 *newpool = ((void*)0);
\r
11710 if (!apr_pools_initialized)
\r
11711 return (20000 + 2);
\r
11712 if ((pool_allocator = allocator) == ((void*)0)) {
\r
11713 if ((pool_allocator = malloc((((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {
\r
11719 memset(pool_allocator, 0, (((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)));
\r
11720 pool_allocator->max_free_index = 0;
\r
11722 if ((node = allocator_alloc(pool_allocator,
\r
11723 (2 * (1 << 12)) - (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {
\r
11730 node->next = node;
\r
11731 node->ref = &node->next;
\r
11733 pool = (apr_pool_t *)node->first_avail;
\r
11734 node->first_avail = pool->self_first_avail = (char *)pool + (((sizeof(apr_pool_t)) + ((8) - 1)) & ~((8) - 1));
\r
11736 pool->allocator = pool_allocator;
\r
11737 pool->active = pool->self = node;
\r
11738 pool->abort_fn = abort_fn;
\r
11739 pool->child = ((void*)0);
\r
11740 pool->cleanups = ((void*)0);
\r
11741 pool->free_cleanups = ((void*)0);
\r
11742 pool->pre_cleanups = ((void*)0);
\r
11743 pool->subprocesses = ((void*)0);
\r
11744 pool->user_data = ((void*)0);
\r
11745 pool->tag = ((void*)0);
\r
11746 pool->parent = ((void*)0);
\r
11747 pool->sibling = ((void*)0);
\r
11748 pool->ref = ((void*)0);
\r
11754 pool_allocator->owner = pool;
\r
11759 # 1036 "./../memory/unix/apr_pools.c"
\r
11760 struct psprintf_data {
\r
11761 apr_vformatter_buff_t vbuff;
\r
11762 apr_memnode_t *node;
\r
11763 apr_pool_t *pool;
\r
11764 apr_byte_t got_a_new_node;
\r
11765 apr_memnode_t *free;
\r
11770 static int psprintf_flush(apr_vformatter_buff_t *vbuff)
\r
11772 struct psprintf_data *ps = (struct psprintf_data *)vbuff;
\r
11773 apr_memnode_t *node, *active;
\r
11774 apr_size_t cur_len, size;
\r
11776 apr_pool_t *pool;
\r
11777 apr_size_t free_index;
\r
11780 active = ps->node;
\r
11781 strp = ps->vbuff.curpos;
\r
11782 cur_len = strp - active->first_avail;
\r
11783 size = cur_len << 1;
\r
11793 node = active->next;
\r
11794 if (!ps->got_a_new_node && size <= ((apr_size_t)(node->endp - node->first_avail))) {
\r
11796 do { *node->ref = node->next; node->next->ref = node->ref; } while (0);
\r
11797 do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);
\r
11799 node->free_index = 0;
\r
11801 pool->active = node;
\r
11803 free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;
\r
11806 active->free_index = (apr_uint32_t)free_index;
\r
11807 node = active->next;
\r
11808 if (free_index < node->free_index) {
\r
11810 node = node->next;
\r
11812 while (free_index < node->free_index);
\r
11814 do { *active->ref = active->next; active->next->ref = active->ref; } while (0);
\r
11815 do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);
\r
11818 node = pool->active;
\r
11821 if ((node = allocator_alloc(pool->allocator, size)) == ((void*)0))
\r
11824 if (ps->got_a_new_node) {
\r
11825 active->next = ps->free;
\r
11826 ps->free = active;
\r
11829 ps->got_a_new_node = 1;
\r
11832 memcpy(node->first_avail, active->first_avail, cur_len);
\r
11835 ps->vbuff.curpos = node->first_avail + cur_len;
\r
11836 ps->vbuff.endpos = node->endp - 1;
\r
11841 char * apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
\r
11843 struct psprintf_data ps;
\r
11846 apr_memnode_t *active, *node;
\r
11847 apr_size_t free_index;
\r
11849 ps.node = active = pool->active;
\r
11851 ps.vbuff.curpos = ps.node->first_avail;
\r
11854 ps.vbuff.endpos = ps.node->endp - 1;
\r
11855 ps.got_a_new_node = 0;
\r
11856 ps.free = ((void*)0);
\r
11861 if (ps.node->first_avail == ps.node->endp) {
\r
11862 if (psprintf_flush(&ps.vbuff) == -1) {
\r
11863 if (pool->abort_fn) {
\r
11864 pool->abort_fn(12);
\r
11867 return ((void*)0);
\r
11871 if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) {
\r
11872 if (pool->abort_fn)
\r
11873 pool->abort_fn(12);
\r
11875 return ((void*)0);
\r
11878 strp = ps.vbuff.curpos;
\r
11881 size = strp - ps.node->first_avail;
\r
11882 size = (((size) + ((8) - 1)) & ~((8) - 1));
\r
11883 strp = ps.node->first_avail;
\r
11884 ps.node->first_avail += size;
\r
11887 allocator_free(pool->allocator, ps.free);
\r
11892 if (!ps.got_a_new_node)
\r
11895 active = pool->active;
\r
11898 node->free_index = 0;
\r
11900 do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);
\r
11902 pool->active = node;
\r
11904 free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;
\r
11907 active->free_index = (apr_uint32_t)free_index;
\r
11908 node = active->next;
\r
11910 if (free_index >= node->free_index)
\r
11914 node = node->next;
\r
11916 while (free_index < node->free_index);
\r
11918 do { *active->ref = active->next; active->next->ref = active->ref; } while (0);
\r
11919 do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);
\r
11923 # 2049 "./../memory/unix/apr_pools.c"
\r
11924 char * apr_psprintf(apr_pool_t *p, const char *fmt, ...)
\r
11929 __builtin_va_start(ap, fmt);
\r
11930 res = apr_pvsprintf(p, fmt, ap);
\r
11931 __builtin_va_end(ap);
\r
11939 void apr_pool_abort_set(apr_abortfunc_t abort_fn,
\r
11940 apr_pool_t *pool)
\r
11942 pool->abort_fn = abort_fn;
\r
11945 apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)
\r
11947 return pool->abort_fn;
\r
11950 apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)
\r
11959 return pool->parent;
\r
11962 apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)
\r
11964 return pool->allocator;
\r
11970 int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
\r
11972 if (a == ((void*)0))
\r
11974 # 2108 "./../memory/unix/apr_pools.c"
\r
11985 void apr_pool_tag(apr_pool_t *pool, const char *tag)
\r
11995 apr_status_t apr_pool_userdata_set(const void *data, const char *key,
\r
11996 apr_status_t (*cleanup) (void *),
\r
11997 apr_pool_t *pool)
\r
12003 if (pool->user_data == ((void*)0))
\r
12004 pool->user_data = apr_hash_make(pool);
\r
12006 if (apr_hash_get(pool->user_data, key, (-1)) == ((void*)0)) {
\r
12007 char *new_key = apr_pstrdup(pool, key);
\r
12008 apr_hash_set(pool->user_data, new_key, (-1), data);
\r
12011 apr_hash_set(pool->user_data, key, (-1), data);
\r
12015 apr_pool_cleanup_register(pool, data, cleanup, cleanup);
\r
12020 apr_status_t apr_pool_userdata_setn(const void *data,
\r
12022 apr_status_t (*cleanup)(void *),
\r
12023 apr_pool_t *pool)
\r
12029 if (pool->user_data == ((void*)0))
\r
12030 pool->user_data = apr_hash_make(pool);
\r
12032 apr_hash_set(pool->user_data, key, (-1), data);
\r
12035 apr_pool_cleanup_register(pool, data, cleanup, cleanup);
\r
12040 apr_status_t apr_pool_userdata_get(void **data, const char *key,
\r
12041 apr_pool_t *pool)
\r
12047 if (pool->user_data == ((void*)0)) {
\r
12048 *data = ((void*)0);
\r
12051 *data = apr_hash_get(pool->user_data, key, (-1));
\r
12062 struct cleanup_t {
\r
12063 struct cleanup_t *next;
\r
12064 const void *data;
\r
12065 apr_status_t (*plain_cleanup_fn)(void *data);
\r
12066 apr_status_t (*child_cleanup_fn)(void *data);
\r
12069 void apr_pool_cleanup_register(apr_pool_t *p, const void *data,
\r
12070 apr_status_t (*plain_cleanup_fn)(void *data),
\r
12071 apr_status_t (*child_cleanup_fn)(void *data))
\r
12079 if (p != ((void*)0)) {
\r
12080 if (p->free_cleanups) {
\r
12082 c = p->free_cleanups;
\r
12083 p->free_cleanups = c->next;
\r
12085 c = apr_palloc(p, sizeof(cleanup_t));
\r
12088 c->plain_cleanup_fn = plain_cleanup_fn;
\r
12089 c->child_cleanup_fn = child_cleanup_fn;
\r
12090 c->next = p->cleanups;
\r
12095 void apr_pool_pre_cleanup_register(apr_pool_t *p, const void *data,
\r
12096 apr_status_t (*plain_cleanup_fn)(void *data))
\r
12104 if (p != ((void*)0)) {
\r
12105 if (p->free_cleanups) {
\r
12107 c = p->free_cleanups;
\r
12108 p->free_cleanups = c->next;
\r
12110 c = apr_palloc(p, sizeof(cleanup_t));
\r
12113 c->plain_cleanup_fn = plain_cleanup_fn;
\r
12114 c->next = p->pre_cleanups;
\r
12115 p->pre_cleanups = c;
\r
12119 void apr_pool_cleanup_kill(apr_pool_t *p, const void *data,
\r
12120 apr_status_t (*cleanup_fn)(void *))
\r
12122 cleanup_t *c, **lastp;
\r
12128 if (p == ((void*)0))
\r
12132 lastp = &p->cleanups;
\r
12134 # 2276 "./../memory/unix/apr_pools.c"
\r
12135 if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {
\r
12136 *lastp = c->next;
\r
12138 c->next = p->free_cleanups;
\r
12139 p->free_cleanups = c;
\r
12143 lastp = &c->next;
\r
12148 c = p->pre_cleanups;
\r
12149 lastp = &p->pre_cleanups;
\r
12151 # 2301 "./../memory/unix/apr_pools.c"
\r
12152 if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {
\r
12153 *lastp = c->next;
\r
12155 c->next = p->free_cleanups;
\r
12156 p->free_cleanups = c;
\r
12160 lastp = &c->next;
\r
12166 void apr_pool_child_cleanup_set(apr_pool_t *p, const void *data,
\r
12167 apr_status_t (*plain_cleanup_fn)(void *),
\r
12168 apr_status_t (*child_cleanup_fn)(void *))
\r
12176 if (p == ((void*)0))
\r
12181 if (c->data == data && c->plain_cleanup_fn == plain_cleanup_fn) {
\r
12182 c->child_cleanup_fn = child_cleanup_fn;
\r
12190 apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data,
\r
12191 apr_status_t (*cleanup_fn)(void *))
\r
12193 apr_pool_cleanup_kill(p, data, cleanup_fn);
\r
12194 return (*cleanup_fn)(data);
\r
12197 static void run_cleanups(cleanup_t **cref)
\r
12199 cleanup_t *c = *cref;
\r
12203 (*c->plain_cleanup_fn)((void *)c->data);
\r
12210 static void run_child_cleanups(cleanup_t **cref)
\r
12212 cleanup_t *c = *cref;
\r
12216 (*c->child_cleanup_fn)((void *)c->data);
\r
12221 static void cleanup_pool_for_exec(apr_pool_t *p)
\r
12223 run_child_cleanups(&p->cleanups);
\r
12225 for (p = p->child; p; p = p->sibling)
\r
12226 cleanup_pool_for_exec(p);
\r
12229 void apr_pool_cleanup_for_exec(void)
\r
12231 cleanup_pool_for_exec(global_pool);
\r
12233 # 2402 "./../memory/unix/apr_pools.c"
\r
12234 apr_status_t apr_pool_cleanup_null(void *data)
\r
12239 # 2415 "./../memory/unix/apr_pools.c"
\r
12240 void apr_pool_note_subprocess(apr_pool_t *pool, apr_proc_t *proc,
\r
12241 apr_kill_conditions_e how)
\r
12243 struct process_chain *pc = apr_palloc(pool, sizeof(struct process_chain));
\r
12246 pc->kill_how = how;
\r
12247 pc->next = pool->subprocesses;
\r
12248 pool->subprocesses = pc;
\r
12251 static void free_proc_chain(struct process_chain *procs)
\r
12257 struct process_chain *pc;
\r
12258 int need_timeout = 0;
\r
12259 apr_time_t timeout_interval;
\r
12263 # 2448 "./../memory/unix/apr_pools.c"
\r
12264 for (pc = procs; pc; pc = pc->next) {
\r
12265 if (apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_NOWAIT) != ((20000 + 50000) + 6))
\r
12266 pc->kill_how = APR_KILL_NEVER;
\r
12270 for (pc = procs; pc; pc = pc->next) {
\r
12272 if ((pc->kill_how == APR_KILL_AFTER_TIMEOUT)
\r
12273 || (pc->kill_how == APR_KILL_ONLY_ONCE)) {
\r
12280 if (apr_proc_kill(pc->proc, 15) == 0)
\r
12281 need_timeout = 1;
\r
12283 else if (pc->kill_how == APR_KILL_ALWAYS) {
\r
12289 apr_proc_kill(pc->proc, 9);
\r
12297 if (need_timeout) {
\r
12298 timeout_interval = 46875;
\r
12299 apr_sleep(timeout_interval);
\r
12303 need_timeout = 0;
\r
12304 for (pc = procs; pc; pc = pc->next) {
\r
12305 if (pc->kill_how == APR_KILL_AFTER_TIMEOUT) {
\r
12306 if (apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_NOWAIT)
\r
12307 == ((20000 + 50000) + 6))
\r
12308 need_timeout = 1;
\r
12310 pc->kill_how = APR_KILL_NEVER;
\r
12313 if (need_timeout) {
\r
12314 if (timeout_interval >= 3000000) {
\r
12317 apr_sleep(timeout_interval);
\r
12318 timeout_interval *= 2;
\r
12320 } while (need_timeout);
\r
12327 for (pc = procs; pc; pc = pc->next) {
\r
12328 if (pc->kill_how == APR_KILL_AFTER_TIMEOUT)
\r
12329 apr_proc_kill(pc->proc, 9);
\r
12333 for (pc = procs; pc; pc = pc->next) {
\r
12334 if (pc->kill_how != APR_KILL_NEVER)
\r
12335 (void)apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_WAIT);
\r
12338 # 2530 "./../memory/unix/apr_pools.c"
\r
12339 void * apr_palloc_debug(apr_pool_t *pool, apr_size_t size,
\r
12340 const char *file_line)
\r
12342 return apr_palloc(pool, size);
\r
12345 void * apr_pcalloc_debug(apr_pool_t *pool, apr_size_t size,
\r
12346 const char *file_line)
\r
12348 return apr_pcalloc(pool, size);
\r
12351 void apr_pool_clear_debug(apr_pool_t *pool,
\r
12352 const char *file_line)
\r
12354 apr_pool_clear(pool);
\r
12357 void apr_pool_destroy_debug(apr_pool_t *pool,
\r
12358 const char *file_line)
\r
12360 apr_pool_destroy(pool);
\r
12363 apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool,
\r
12364 apr_pool_t *parent,
\r
12365 apr_abortfunc_t abort_fn,
\r
12366 apr_allocator_t *allocator,
\r
12367 const char *file_line)
\r
12369 return apr_pool_create_ex(newpool, parent, abort_fn, allocator);
\r
12372 apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool,
\r
12373 apr_abortfunc_t abort_fn,
\r
12374 apr_allocator_t *allocator,
\r
12375 const char *file_line)
\r
12377 return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);
\r
12380 apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,
\r
12381 apr_abortfunc_t abort_fn,
\r
12382 apr_allocator_t *allocator,
\r
12383 const char *file_line)
\r
12385 return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);
\r
12388 # 1 "./../misc/unix/start.c" 1
\r
12389 # 20 "./../misc/unix/start.c"
\r
12390 # 1 "../include/apr_signal.h" 1
\r
12391 # 57 "../include/apr_signal.h"
\r
12392 typedef void apr_sigfunc_t(int);
\r
12399 apr_sigfunc_t * apr_signal(int signo, apr_sigfunc_t * func);
\r
12400 # 80 "../include/apr_signal.h"
\r
12401 const char * apr_signal_description_get(int signum);
\r
12408 void apr_signal_init(apr_pool_t *pglobal);
\r
12415 apr_status_t apr_signal_block(int signum);
\r
12422 apr_status_t apr_signal_unblock(int signum);
\r
12423 # 21 "./../misc/unix/start.c" 2
\r
12427 # 1 "../include/arch/unix/apr_arch_internal_time.h" 1
\r
12428 # 22 "../include/arch/unix/apr_arch_internal_time.h"
\r
12429 void apr_unix_setup_time(void);
\r
12430 # 25 "./../misc/unix/start.c" 2
\r
12433 apr_status_t apr_app_initialize(int *argc,
\r
12434 const char * const * *argv,
\r
12435 const char * const * *env)
\r
12442 return apr_initialize();
\r
12445 static int initialized = 0;
\r
12447 apr_status_t apr_initialize(void)
\r
12449 apr_pool_t *pool;
\r
12450 apr_status_t status;
\r
12452 if (initialized++) {
\r
12457 apr_proc_mutex_unix_setup_lock();
\r
12458 apr_unix_setup_time();
\r
12461 if ((status = apr_pool_initialize()) != 0)
\r
12464 if (apr_pool_create_ex(&pool, ((void*)0), ((void*)0), ((void*)0)) != 0) {
\r
12465 return (20000 + 2);
\r
12468 apr_pool_tag(pool, "apr_initialize");
\r
12469 # 71 "./../misc/unix/start.c"
\r
12470 apr_signal_init(pool);
\r
12475 void apr_terminate(void)
\r
12478 if (initialized) {
\r
12481 apr_pool_terminate();
\r
12485 void apr_terminate2(void)
\r
12490 # 1 "./../time/unix/time.c" 1
\r
12491 # 43 "./../time/unix/time.c"
\r
12492 static apr_int32_t get_offset(struct tm *tm)
\r
12495 return tm->tm_gmtoff;
\r
12496 # 64 "./../time/unix/time.c"
\r
12499 apr_status_t apr_time_ansi_put(apr_time_t *result,
\r
12502 *result = (apr_time_t)input * 1000000L;
\r
12507 apr_time_t apr_time_now(void)
\r
12509 struct timeval tv;
\r
12510 gettimeofday(&tv, ((void*)0));
\r
12511 return tv.tv_sec * 1000000L + tv.tv_usec;
\r
12514 static void explode_time(apr_time_exp_t *xt, apr_time_t t,
\r
12515 apr_int32_t offset, int use_localtime)
\r
12518 time_t tt = (t / 1000000L) + offset;
\r
12519 xt->tm_usec = t % 1000000L;
\r
12522 if (use_localtime)
\r
12523 localtime_r(&tt, &tm);
\r
12525 gmtime_r(&tt, &tm);
\r
12533 xt->tm_sec = tm.tm_sec;
\r
12534 xt->tm_min = tm.tm_min;
\r
12535 xt->tm_hour = tm.tm_hour;
\r
12536 xt->tm_mday = tm.tm_mday;
\r
12537 xt->tm_mon = tm.tm_mon;
\r
12538 xt->tm_year = tm.tm_year;
\r
12539 xt->tm_wday = tm.tm_wday;
\r
12540 xt->tm_yday = tm.tm_yday;
\r
12541 xt->tm_isdst = tm.tm_isdst;
\r
12542 xt->tm_gmtoff = get_offset(&tm);
\r
12545 apr_status_t apr_time_exp_tz(apr_time_exp_t *result,
\r
12546 apr_time_t input, apr_int32_t offs)
\r
12548 explode_time(result, input, offs, 0);
\r
12549 result->tm_gmtoff = offs;
\r
12553 apr_status_t apr_time_exp_gmt(apr_time_exp_t *result,
\r
12554 apr_time_t input)
\r
12556 return apr_time_exp_tz(result, input, 0);
\r
12559 apr_status_t apr_time_exp_lt(apr_time_exp_t *result,
\r
12560 apr_time_t input)
\r
12566 explode_time(result, input, 0, 1);
\r
12571 apr_status_t apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt)
\r
12573 apr_time_t year = xt->tm_year;
\r
12575 static const int dayoffset[12] =
\r
12576 {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
\r
12580 if (xt->tm_mon < 2)
\r
12585 days = year * 365 + year / 4 - year / 100 + (year / 100 + 3) / 4;
\r
12586 days += dayoffset[xt->tm_mon] + xt->tm_mday - 1;
\r
12588 days = ((days * 24 + xt->tm_hour) * 60 + xt->tm_min) * 60 + xt->tm_sec;
\r
12591 return (20000 + 4);
\r
12593 *t = days * 1000000L + xt->tm_usec;
\r
12597 apr_status_t apr_time_exp_gmt_get(apr_time_t *t,
\r
12598 apr_time_exp_t *xt)
\r
12600 apr_status_t status = apr_time_exp_get(t, xt);
\r
12602 *t -= (apr_time_t) xt->tm_gmtoff * 1000000L;
\r
12606 apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime,
\r
12607 apr_time_t *aprtime)
\r
12609 (*ostime)->tv_usec = *aprtime % 1000000L;
\r
12610 (*ostime)->tv_sec = *aprtime / 1000000L;
\r
12614 apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,
\r
12615 apr_time_exp_t *aprtime)
\r
12617 (*ostime)->tm_sec = aprtime->tm_sec;
\r
12618 (*ostime)->tm_min = aprtime->tm_min;
\r
12619 (*ostime)->tm_hour = aprtime->tm_hour;
\r
12620 (*ostime)->tm_mday = aprtime->tm_mday;
\r
12621 (*ostime)->tm_mon = aprtime->tm_mon;
\r
12622 (*ostime)->tm_year = aprtime->tm_year;
\r
12623 (*ostime)->tm_wday = aprtime->tm_wday;
\r
12624 (*ostime)->tm_yday = aprtime->tm_yday;
\r
12625 (*ostime)->tm_isdst = aprtime->tm_isdst;
\r
12628 (*ostime)->tm_gmtoff = aprtime->tm_gmtoff;
\r
12636 apr_status_t apr_os_imp_time_put(apr_time_t *aprtime,
\r
12637 apr_os_imp_time_t **ostime,
\r
12638 apr_pool_t *cont)
\r
12640 *aprtime = (*ostime)->tv_sec * 1000000L + (*ostime)->tv_usec;
\r
12644 apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime,
\r
12645 apr_os_exp_time_t **ostime,
\r
12646 apr_pool_t *cont)
\r
12648 aprtime->tm_sec = (*ostime)->tm_sec;
\r
12649 aprtime->tm_min = (*ostime)->tm_min;
\r
12650 aprtime->tm_hour = (*ostime)->tm_hour;
\r
12651 aprtime->tm_mday = (*ostime)->tm_mday;
\r
12652 aprtime->tm_mon = (*ostime)->tm_mon;
\r
12653 aprtime->tm_year = (*ostime)->tm_year;
\r
12654 aprtime->tm_wday = (*ostime)->tm_wday;
\r
12655 aprtime->tm_yday = (*ostime)->tm_yday;
\r
12656 aprtime->tm_isdst = (*ostime)->tm_isdst;
\r
12659 aprtime->tm_gmtoff = (*ostime)->tm_gmtoff;
\r
12667 void apr_sleep(apr_interval_time_t t)
\r
12676 struct timeval tv;
\r
12677 tv.tv_usec = t % 1000000L;
\r
12678 tv.tv_sec = t / 1000000L;
\r
12679 select(0, ((void*)0), ((void*)0), ((void*)0), &tv);
\r
12682 # 296 "./../time/unix/time.c"
\r
12683 void apr_unix_setup_time(void)
\r
12685 # 339 "./../time/unix/time.c"
\r
12691 void apr_time_clock_hires(apr_pool_t *p)
\r
12696 # 1 "./../atomic/unix/builtins.c" 1
\r
12697 # 17 "./../atomic/unix/builtins.c"
\r
12698 # 1 "../include/arch/unix/apr_arch_atomic.h" 1
\r
12699 # 18 "./../atomic/unix/builtins.c" 2
\r
12703 apr_status_t apr_atomic_init(apr_pool_t *p)
\r
12708 apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem)
\r
12713 void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
\r
12718 apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
\r
12720 return __sync_fetch_and_add(mem, val);
\r
12723 void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
\r
12725 __sync_fetch_and_sub(mem, val);
\r
12728 apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)
\r
12730 return __sync_fetch_and_add(mem, 1);
\r
12733 int apr_atomic_dec32(volatile apr_uint32_t *mem)
\r
12735 return __sync_sub_and_fetch(mem, 1);
\r
12738 apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,
\r
12739 apr_uint32_t cmp)
\r
12741 return __sync_val_compare_and_swap(mem, cmp, with);
\r
12744 apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
\r
12746 __sync_synchronize();
\r
12748 return __sync_lock_test_and_set(mem, val);
\r
12751 void* apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
\r
12753 return (void*) __sync_val_compare_and_swap(mem, cmp, with);
\r
12756 void* apr_atomic_xchgptr(volatile void **mem, void *with)
\r
12758 __sync_synchronize();
\r
12760 return (void*) __sync_lock_test_and_set(mem, with);
\r
12763 # 1 "./../threadproc/unix/signals.c" 1
\r
12764 # 18 "./../threadproc/unix/signals.c"
\r
12765 # 1 "../include/arch/unix/apr_arch_threadproc.h" 1
\r
12766 # 55 "../include/arch/unix/apr_arch_threadproc.h"
\r
12767 struct apr_thread_t {
\r
12768 apr_pool_t *pool;
\r
12771 apr_thread_start_t func;
\r
12772 apr_status_t exitval;
\r
12775 struct apr_threadattr_t {
\r
12776 apr_pool_t *pool;
\r
12777 pthread_attr_t attr;
\r
12780 struct apr_threadkey_t {
\r
12781 apr_pool_t *pool;
\r
12782 pthread_key_t key;
\r
12785 struct apr_thread_once_t {
\r
12786 pthread_once_t once;
\r
12791 struct apr_procattr_t {
\r
12792 apr_pool_t *pool;
\r
12793 apr_file_t *parent_in;
\r
12794 apr_file_t *child_in;
\r
12795 apr_file_t *parent_out;
\r
12796 apr_file_t *child_out;
\r
12797 apr_file_t *parent_err;
\r
12798 apr_file_t *child_err;
\r
12800 apr_int32_t cmdtype;
\r
12801 apr_int32_t detached;
\r
12803 struct rlimit *limit_cpu;
\r
12806 struct rlimit *limit_mem;
\r
12809 struct rlimit *limit_nproc;
\r
12812 struct rlimit *limit_nofile;
\r
12814 apr_child_errfn_t *errfn;
\r
12815 apr_int32_t errchk;
\r
12819 # 19 "./../threadproc/unix/signals.c" 2
\r
12825 # 1 "/usr/include/assert.h" 1 3 4
\r
12826 # 25 "./../threadproc/unix/signals.c" 2
\r
12827 # 35 "./../threadproc/unix/signals.c"
\r
12828 apr_status_t apr_proc_kill(apr_proc_t *proc, int signum)
\r
12830 # 48 "./../threadproc/unix/signals.c"
\r
12831 if (kill(proc->pid, signum) == -1) {
\r
12832 return (*__errno_location ());
\r
12837 # 74 "./../threadproc/unix/signals.c"
\r
12838 apr_sigfunc_t * apr_signal(int signo, apr_sigfunc_t * func)
\r
12840 struct sigaction act, oact;
\r
12842 act.__sigaction_handler.sa_handler = func;
\r
12843 sigemptyset(&act.sa_mask);
\r
12844 act.sa_flags = 0;
\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
12859 void apr_signal_init(apr_pool_t *pglobal)
\r
12862 const char *apr_signal_description_get(int signum)
\r
12864 return (signum >= 0) ? sys_siglist[signum] : "unknown signal (number)";
\r
12866 # 274 "./../threadproc/unix/signals.c"
\r
12867 static void remove_sync_sigs(sigset_t *sig_mask)
\r
12870 sigdelset(sig_mask, 6);
\r
12873 sigdelset(sig_mask, 7);
\r
12879 sigdelset(sig_mask, 8);
\r
12882 sigdelset(sig_mask, 4);
\r
12885 sigdelset(sig_mask, 6);
\r
12888 sigdelset(sig_mask, 13);
\r
12891 sigdelset(sig_mask, 11);
\r
12894 sigdelset(sig_mask, 31);
\r
12897 sigdelset(sig_mask, 5);
\r
12898 # 315 "./../threadproc/unix/signals.c"
\r
12899 sigdelset(sig_mask, 12);
\r
12903 apr_status_t apr_signal_thread(int(*signal_handler)(int signum))
\r
12905 sigset_t sig_mask;
\r
12907 int (*sig_func)(int signum) = (int (*)(int))signal_handler;
\r
12911 sigfillset(&sig_mask);
\r
12918 sigdelset(&sig_mask, 9);
\r
12921 sigdelset(&sig_mask, 19);
\r
12924 sigdelset(&sig_mask, 18);
\r
12931 remove_sync_sigs(&sig_mask);
\r
12932 # 379 "./../threadproc/unix/signals.c"
\r
12935 int signal_received;
\r
12937 if (sigwait((&sig_mask),(&signal_received)) != 0)
\r
12942 if (sig_func(signal_received) == 1) {
\r
12953 apr_status_t apr_setup_signal_thread(void)
\r
12955 sigset_t sig_mask;
\r
12957 # 416 "./../threadproc/unix/signals.c"
\r
12958 sigfillset(&sig_mask);
\r
12959 remove_sync_sigs(&sig_mask);
\r
12966 if ((rv = pthread_sigmask(2, &sig_mask, ((void*)0))) != 0) {
\r
12977 apr_status_t apr_signal_block(int signum)
\r
12980 sigset_t sig_mask;
\r
12983 sigemptyset(&sig_mask);
\r
12985 sigaddset(&sig_mask, signum);
\r
12992 if ((rv = pthread_sigmask(0, &sig_mask, ((void*)0))) != 0) {
\r
13004 apr_status_t apr_signal_unblock(int signum)
\r
13007 sigset_t sig_mask;
\r
13010 sigemptyset(&sig_mask);
\r
13012 sigaddset(&sig_mask, signum);
\r
13019 if ((rv = pthread_sigmask(1, &sig_mask, ((void*)0))) != 0) {
\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
13041 static apr_status_t threadattr_cleanup(void *data)
\r
13043 apr_threadattr_t *attr = data;
\r
13046 rv = pthread_attr_destroy(&attr->attr);
\r
13055 apr_status_t apr_threadattr_create(apr_threadattr_t **new,
\r
13056 apr_pool_t *pool)
\r
13058 apr_status_t stat;
\r
13060 (*new) = apr_palloc(pool, sizeof(apr_threadattr_t));
\r
13061 (*new)->pool = pool;
\r
13062 stat = pthread_attr_init(&(*new)->attr);
\r
13065 apr_pool_cleanup_register(pool, *new, threadattr_cleanup,
\r
13066 apr_pool_cleanup_null);
\r
13082 apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,
\r
13085 apr_status_t stat;
\r
13091 if ((stat = pthread_attr_setdetachstate(&attr->attr,
\r
13092 ((on) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE))) == 0) {
\r
13105 apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)
\r
13112 pthread_attr_getdetachstate(&attr->attr, &state);
\r
13114 if (state == ((1) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE))
\r
13115 return ((20000 + 50000) + 3);
\r
13116 return ((20000 + 50000) + 4);
\r
13119 apr_status_t apr_threadattr_stacksize_set(apr_threadattr_t *attr,
\r
13120 apr_size_t stacksize)
\r
13124 stat = pthread_attr_setstacksize(&attr->attr, stacksize);
\r
13135 apr_status_t apr_threadattr_guardsize_set(apr_threadattr_t *attr,
\r
13141 rv = pthread_attr_setguardsize(&attr->attr, size);
\r
13154 static void *dummy_worker(void *opaque)
\r
13156 apr_thread_t *thread = (apr_thread_t*)opaque;
\r
13157 return thread->func(thread, thread->data);
\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
13164 apr_pool_t *pool)
\r
13166 apr_status_t stat;
\r
13167 pthread_attr_t *temp;
\r
13169 (*new) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
\r
13171 if ((*new) == ((void*)0)) {
\r
13175 (*new)->td = (pthread_t *)apr_pcalloc(pool, sizeof(pthread_t));
\r
13177 if ((*new)->td == ((void*)0)) {
\r
13181 (*new)->data = data;
\r
13182 (*new)->func = func;
\r
13185 temp = &attr->attr;
\r
13187 temp = ((void*)0);
\r
13189 stat = apr_pool_create_ex(&(*new)->pool, pool, ((void*)0), ((void*)0));
\r
13194 if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {
\r
13206 apr_os_thread_t apr_os_thread_current(void)
\r
13208 return pthread_self();
\r
13211 int apr_os_thread_equal(apr_os_thread_t tid1,
\r
13212 apr_os_thread_t tid2)
\r
13214 return pthread_equal(tid1, tid2);
\r
13217 apr_status_t apr_thread_exit(apr_thread_t *thd,
\r
13218 apr_status_t retval)
\r
13220 thd->exitval = retval;
\r
13221 apr_pool_destroy(thd->pool);
\r
13222 pthread_exit(((void*)0));
\r
13226 apr_status_t apr_thread_join(apr_status_t *retval,
\r
13227 apr_thread_t *thd)
\r
13229 apr_status_t stat;
\r
13230 apr_status_t *thread_stat;
\r
13232 if ((stat = pthread_join(*thd->td,(void *)&thread_stat)) == 0) {
\r
13233 *retval = thd->exitval;
\r
13245 apr_status_t apr_thread_detach(apr_thread_t *thd)
\r
13247 apr_status_t stat;
\r
13252 if ((stat = pthread_detach(*thd->td)) == 0) {
\r
13266 void apr_thread_yield(void)
\r
13281 apr_status_t apr_thread_data_get(void **data, const char *key,
\r
13282 apr_thread_t *thread)
\r
13284 return apr_pool_userdata_get(data, key, thread->pool);
\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
13291 return apr_pool_userdata_set(data, key, cleanup, thread->pool);
\r
13294 apr_status_t apr_os_thread_get(apr_os_thread_t **thethd,
\r
13295 apr_thread_t *thd)
\r
13297 *thethd = thd->td;
\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
13305 if (pool == ((void*)0)) {
\r
13306 return (20000 + 2);
\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
13314 (*thd)->td = thethd;
\r
13318 apr_status_t apr_thread_once_init(apr_thread_once_t **control,
\r
13321 static const pthread_once_t once_init = 0;
\r
13323 *control = apr_palloc(p, sizeof(**control));
\r
13324 (*control)->once = once_init;
\r
13328 apr_status_t apr_thread_once(apr_thread_once_t *control,
\r
13329 void (*func)(void))
\r
13331 return pthread_once(&control->once, func);
\r
13334 apr_pool_t * apr_thread_pool_get (const apr_thread_t *thethread) { return thethread->pool; }
\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
13350 const struct testlist {
\r
13351 abts_suite *(*func)(abts_suite *suite);
\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
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
13414 const char **testlist = ((void*)0);
\r
13416 static int find_test_name(const char *testname) {
\r
13418 for (i = 0; testlist[i] != ((void*)0); i++) {
\r
13419 if (!strcmp(testlist[i], testname)) {
\r
13427 static int should_test_run(const char *testname) {
\r
13429 if (list_tests == 1) {
\r
13432 if (testlist == ((void*)0)) {
\r
13435 found = find_test_name(testname);
\r
13436 if ((found && !exclude) || (!found && exclude)) {
\r
13442 static void reset_status(void)
\r
13447 static void update_status(void)
\r
13450 curr_char = (curr_char + 1) % 6;
\r
13451 fprintf(stdout, "\b%c", status[curr_char]);
\r
13456 static void end_suite(abts_suite *suite)
\r
13458 if (suite != ((void*)0)) {
\r
13459 sub_suite *last = suite->tail;
\r
13461 fprintf(stdout, "\b");
\r
13464 if (last->failed == 0) {
\r
13465 fprintf(stdout, "SUCCESS\n");
\r
13469 fprintf(stdout, "FAILED %d of %d\n", last->failed, last->num_test);
\r
13475 abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full)
\r
13477 sub_suite *subsuite;
\r
13479 const char *suite_name;
\r
13483 if (suite && suite->tail &&!suite->tail->not_run) {
\r
13484 end_suite(suite);
\r
13487 subsuite = malloc(sizeof(*subsuite));
\r
13488 subsuite->num_test = 0;
\r
13489 subsuite->failed = 0;
\r
13490 subsuite->next = ((void*)0);
\r
13493 suite_name = strrchr(suite_name_full, '/');
\r
13494 if (!suite_name) {
\r
13495 suite_name = strrchr(suite_name_full, '\\');
\r
13497 if (suite_name) {
\r
13500 suite_name = suite_name_full;
\r
13502 p = strrchr(suite_name, '.');
\r
13504 subsuite->name = memcpy(calloc(p - suite_name + 1, 1),
\r
13505 suite_name, p - suite_name);
\r
13508 subsuite->name = suite_name;
\r
13511 if (list_tests) {
\r
13512 fprintf(stdout, "%s\n", subsuite->name);
\r
13515 subsuite->not_run = 0;
\r
13517 if (suite == ((void*)0)) {
\r
13518 suite = malloc(sizeof(*suite));
\r
13519 suite->head = subsuite;
\r
13520 suite->tail = subsuite;
\r
13523 suite->tail->next = subsuite;
\r
13524 suite->tail = subsuite;
\r
13527 if (!should_test_run(subsuite->name)) {
\r
13528 subsuite->not_run = 1;
\r
13533 fprintf(stdout, "%-20s: ", subsuite->name);
\r
13540 void abts_run_test(abts_suite *ts, test_func f, void *value)
\r
13545 if (!should_test_run(ts->tail->name)) {
\r
13563 static int report(abts_suite *suite)
\r
13568 if (suite && suite->tail &&!suite->tail->not_run) {
\r
13569 end_suite(suite);
\r
13572 for (dptr = suite->head; dptr; dptr = dptr->next) {
\r
13573 count += dptr->failed;
\r
13576 if (list_tests) {
\r
13580 if (count == 0) {
\r
13581 printf("All tests passed.\n");
\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
13594 dptr = dptr->next;
\r
13599 void abts_log_message(const char *fmt, ...)
\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
13613 void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno)
\r
13616 if (tc->failed) return;
\r
13618 if (expected == actual) return;
\r
13622 fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual);
\r
13627 void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno)
\r
13630 if (tc->failed) return;
\r
13632 if (expected != actual) return;
\r
13636 fprintf(stderr, "Line %d: expected something other than <%d>, but saw <%d>\n",
\r
13637 lineno, expected, actual);
\r
13642 void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno)
\r
13645 if (tc->failed) return;
\r
13647 if (expected == actual) return;
\r
13652 fprintf(stderr, "Line %d: expected %lu, but saw %lu\n", lineno,
\r
13653 (unsigned long)expected, (unsigned long)actual);
\r
13658 void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno)
\r
13661 if (tc->failed) return;
\r
13663 if (!expected && !actual) return;
\r
13664 if (expected && actual)
\r
13665 if (!strcmp(expected, actual)) { return; }
\r
13669 fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual);
\r
13674 void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,
\r
13675 size_t n, int lineno)
\r
13678 if (tc->failed) { return; }
\r
13680 if (!strncmp(expected, actual, n)) { return; }
\r
13684 fprintf(stderr, "Line %d: expected something other than <%s>, but saw <%s>\n",
\r
13685 lineno, expected, actual);
\r
13690 void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno)
\r
13693 if (tc->failed) { return; }
\r
13695 if (ptr != ((void*)0)) { return; }
\r
13699 fprintf(stderr, "Line %d: expected non-NULL, but saw NULL\n", lineno);
\r
13704 void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno)
\r
13707 if (tc->failed) { return; }
\r
13709 if (expected == actual) { return; }
\r
13713 fprintf(stderr, "Line %d: expected <%p>, but saw <%p>\n", lineno, expected, actual);
\r
13718 void abts_fail(abts_case *tc, const char *message, int lineno)
\r
13721 if (tc->failed) { return; }
\r
13725 fprintf(stderr, "Line %d: %s\n", lineno, message);
\r
13730 void abts_assert(abts_case *tc, const char *message, int condition, int lineno)
\r
13733 if (tc->failed) { return; }
\r
13735 if (condition) { return; }
\r
13739 fprintf(stderr, "Line %d: %s\n", lineno, message);
\r
13744 void abts_true(abts_case *tc, int condition, int lineno)
\r
13747 if (tc->failed) { return; }
\r
13749 if (condition) { return; }
\r
13753 fprintf(stderr, "Line %d: Condition is false, but expected true\n", lineno);
\r
13758 void abts_not_impl(abts_case *tc, const char *message, int lineno)
\r
13762 tc->suite->not_impl++;
\r
13764 fprintf(stderr, "Line %d: %s\n", lineno, message);
\r
13775 int fflush(FILE *stream){
\r
13779 int fprintf(FILE *stream, const char *format, ...){
\r
13783 void test_atomics_threaded_1(abts_case *tc, void *data)
\r
13785 apr_thread_t *t1[3];
\r
13793 rv = apr_thread_mutex_create(&thread_lock, 0x0, p);
\r
13794 (((rv == 0) && "Could not create lock") ? (void) (0) : __assert_fail ("(rv == 0) && \"Could not create lock\"", "main1.c", 46, __PRETTY_FUNCTION__));
\r
13796 for (i = 0; i < 3; i++) {
\r
13798 r1 = apr_thread_create(&t1[i], ((void*)0), thread_func_mutex, ((void*)0), p);
\r
13799 ((!r1 && "Failed creating threads") ? (void) (0) : __assert_fail ("!r1 && \"Failed creating threads\"", "main1.c", 51, __PRETTY_FUNCTION__));
\r
13802 for (i = 0; i < 3; i++) {
\r
13804 apr_thread_join(&s1, t1[i]);
\r
13806 ((s1 == exit_ret_val && "Invalid return value from thread_join") ? (void) (0) : __assert_fail ("s1 == exit_ret_val && \"Invalid return value from thread_join\"", "main1.c", 59, __PRETTY_FUNCTION__));
\r
13810 abts_int_equal(tc, 3 * 1, mutex_locks, 62);
\r
13812 rv = apr_thread_mutex_destroy(thread_lock);
\r
13813 ((rv == 0 && "Failed creating threads") ? (void) (0) : __assert_fail ("rv == 0 && \"Failed creating threads\"", "main1.c", 65, __PRETTY_FUNCTION__));
\r
13816 int main(int argc, char *argv[]){
\r
13822 tc.suite = ((void*)0);
\r
13823 test_atomics_threaded_1(&tc,((void*)0));
\r