+/* Adapted from the sources of the Apache Portable Runtime library version 1.5.1:\r
+ * https://apr.apache.org/\r
+ */\r
+\r
+/* BOUND 5 */\r
+# 1 "main1.c"\r
+# 1 "<built-in>" 1\r
+# 1 "<built-in>" 3\r
+# 312 "<built-in>" 3\r
+# 1 "<command line>" 1\r
+# 1 "<built-in>" 2\r
+# 1 "main1.c" 2\r
+\r
+# 1 "/usr/include/assert.h" 1 3 4\r
+# 35 "/usr/include/assert.h" 3 4\r
+# 1 "/usr/include/features.h" 1 3 4\r
+# 352 "/usr/include/features.h" 3 4\r
+# 1 "/usr/include/stdc-predef.h" 1 3 4\r
+# 353 "/usr/include/features.h" 2 3 4\r
+# 374 "/usr/include/features.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4\r
+# 385 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 386 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4\r
+# 375 "/usr/include/features.h" 2 3 4\r
+# 398 "/usr/include/features.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4\r
+# 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4\r
+# 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4\r
+# 399 "/usr/include/features.h" 2 3 4\r
+# 36 "/usr/include/assert.h" 2 3 4\r
+# 69 "/usr/include/assert.h" 3 4\r
+extern void __assert_fail (const char *__assertion, const char *__file,\r
+ unsigned int __line, const char *__function)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
+\r
+\r
+extern void __assert_perror_fail (int __errnum, const char *__file,\r
+ unsigned int __line, const char *__function)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
+\r
+\r
+\r
+\r
+extern void __assert (const char *__assertion, const char *__file, int __line)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
+# 3 "main1.c" 2\r
+\r
+\r
+\r
+\r
+# 1 "./../test/abts.h" 1\r
+# 21 "./../test/abts.h"\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 1 3\r
+# 30 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 3\r
+typedef __builtin_va_list va_list;\r
+# 50 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdarg.h" 3\r
+typedef __builtin_va_list __gnuc_va_list;\r
+# 22 "./../test/abts.h" 2\r
+# 1 "/usr/include/stdio.h" 1 3 4\r
+# 33 "/usr/include/stdio.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 58 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 3 4\r
+typedef long unsigned int size_t;\r
+# 34 "/usr/include/stdio.h" 2 3 4\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4\r
+# 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4\r
+\r
+\r
+typedef unsigned char __u_char;\r
+typedef unsigned short int __u_short;\r
+typedef unsigned int __u_int;\r
+typedef unsigned long int __u_long;\r
+\r
+\r
+typedef signed char __int8_t;\r
+typedef unsigned char __uint8_t;\r
+typedef signed short int __int16_t;\r
+typedef unsigned short int __uint16_t;\r
+typedef signed int __int32_t;\r
+typedef unsigned int __uint32_t;\r
+\r
+typedef signed long int __int64_t;\r
+typedef unsigned long int __uint64_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef long int __quad_t;\r
+typedef unsigned long int __u_quad_t;\r
+# 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4\r
+# 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4\r
+\r
+\r
+typedef unsigned long int __dev_t;\r
+typedef unsigned int __uid_t;\r
+typedef unsigned int __gid_t;\r
+typedef unsigned long int __ino_t;\r
+typedef unsigned long int __ino64_t;\r
+typedef unsigned int __mode_t;\r
+typedef unsigned long int __nlink_t;\r
+typedef long int __off_t;\r
+typedef long int __off64_t;\r
+typedef int __pid_t;\r
+typedef struct { int __val[2]; } __fsid_t;\r
+typedef long int __clock_t;\r
+typedef unsigned long int __rlim_t;\r
+typedef unsigned long int __rlim64_t;\r
+typedef unsigned int __id_t;\r
+typedef long int __time_t;\r
+typedef unsigned int __useconds_t;\r
+typedef long int __suseconds_t;\r
+\r
+typedef int __daddr_t;\r
+typedef int __key_t;\r
+\r
+\r
+typedef int __clockid_t;\r
+\r
+\r
+typedef void * __timer_t;\r
+\r
+\r
+typedef long int __blksize_t;\r
+\r
+\r
+\r
+\r
+typedef long int __blkcnt_t;\r
+typedef long int __blkcnt64_t;\r
+\r
+\r
+typedef unsigned long int __fsblkcnt_t;\r
+typedef unsigned long int __fsblkcnt64_t;\r
+\r
+\r
+typedef unsigned long int __fsfilcnt_t;\r
+typedef unsigned long int __fsfilcnt64_t;\r
+\r
+\r
+typedef long int __fsword_t;\r
+\r
+typedef long int __ssize_t;\r
+\r
+\r
+typedef long int __syscall_slong_t;\r
+\r
+typedef unsigned long int __syscall_ulong_t;\r
+\r
+\r
+\r
+typedef __off64_t __loff_t;\r
+typedef __quad_t *__qaddr_t;\r
+typedef char *__caddr_t;\r
+\r
+\r
+typedef long int __intptr_t;\r
+\r
+\r
+typedef unsigned int __socklen_t;\r
+# 36 "/usr/include/stdio.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+struct _IO_FILE;\r
+\r
+\r
+\r
+typedef struct _IO_FILE FILE;\r
+# 64 "/usr/include/stdio.h" 3 4\r
+typedef struct _IO_FILE __FILE;\r
+# 74 "/usr/include/stdio.h" 3 4\r
+# 1 "/usr/include/libio.h" 1 3 4\r
+# 31 "/usr/include/libio.h" 3 4\r
+# 1 "/usr/include/_G_config.h" 1 3 4\r
+# 15 "/usr/include/_G_config.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 16 "/usr/include/_G_config.h" 2 3 4\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/wchar.h" 1 3 4\r
+# 82 "/usr/include/wchar.h" 3 4\r
+typedef struct\r
+{\r
+ int __count;\r
+ union\r
+ {\r
+\r
+ unsigned int __wch;\r
+\r
+\r
+\r
+ char __wchb[4];\r
+ } __value;\r
+} __mbstate_t;\r
+# 21 "/usr/include/_G_config.h" 2 3 4\r
+typedef struct\r
+{\r
+ __off_t __pos;\r
+ __mbstate_t __state;\r
+} _G_fpos_t;\r
+typedef struct\r
+{\r
+ __off64_t __pos;\r
+ __mbstate_t __state;\r
+} _G_fpos64_t;\r
+# 32 "/usr/include/libio.h" 2 3 4\r
+# 144 "/usr/include/libio.h" 3 4\r
+struct _IO_jump_t; struct _IO_FILE;\r
+# 154 "/usr/include/libio.h" 3 4\r
+typedef void _IO_lock_t;\r
+\r
+\r
+\r
+\r
+\r
+struct _IO_marker {\r
+ struct _IO_marker *_next;\r
+ struct _IO_FILE *_sbuf;\r
+\r
+\r
+\r
+ int _pos;\r
+# 177 "/usr/include/libio.h" 3 4\r
+};\r
+\r
+\r
+enum __codecvt_result\r
+{\r
+ __codecvt_ok,\r
+ __codecvt_partial,\r
+ __codecvt_error,\r
+ __codecvt_noconv\r
+};\r
+# 245 "/usr/include/libio.h" 3 4\r
+struct _IO_FILE {\r
+ int _flags;\r
+\r
+\r
+\r
+\r
+ char* _IO_read_ptr;\r
+ char* _IO_read_end;\r
+ char* _IO_read_base;\r
+ char* _IO_write_base;\r
+ char* _IO_write_ptr;\r
+ char* _IO_write_end;\r
+ char* _IO_buf_base;\r
+ char* _IO_buf_end;\r
+\r
+ char *_IO_save_base;\r
+ char *_IO_backup_base;\r
+ char *_IO_save_end;\r
+\r
+ struct _IO_marker *_markers;\r
+\r
+ struct _IO_FILE *_chain;\r
+\r
+ int _fileno;\r
+\r
+\r
+\r
+ int _flags2;\r
+\r
+ __off_t _old_offset;\r
+\r
+\r
+\r
+ unsigned short _cur_column;\r
+ signed char _vtable_offset;\r
+ char _shortbuf[1];\r
+\r
+\r
+\r
+ _IO_lock_t *_lock;\r
+# 293 "/usr/include/libio.h" 3 4\r
+ __off64_t _offset;\r
+# 302 "/usr/include/libio.h" 3 4\r
+ void *__pad1;\r
+ void *__pad2;\r
+ void *__pad3;\r
+ void *__pad4;\r
+ size_t __pad5;\r
+\r
+ int _mode;\r
+\r
+ char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];\r
+\r
+};\r
+\r
+\r
+typedef struct _IO_FILE _IO_FILE;\r
+\r
+\r
+struct _IO_FILE_plus;\r
+\r
+extern struct _IO_FILE_plus _IO_2_1_stdin_;\r
+extern struct _IO_FILE_plus _IO_2_1_stdout_;\r
+extern struct _IO_FILE_plus _IO_2_1_stderr_;\r
+# 338 "/usr/include/libio.h" 3 4\r
+typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,\r
+ size_t __n);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);\r
+\r
+\r
+typedef int __io_close_fn (void *__cookie);\r
+# 390 "/usr/include/libio.h" 3 4\r
+extern int __underflow (_IO_FILE *);\r
+extern int __uflow (_IO_FILE *);\r
+extern int __overflow (_IO_FILE *, int);\r
+# 434 "/usr/include/libio.h" 3 4\r
+extern int _IO_getc (_IO_FILE *__fp);\r
+extern int _IO_putc (int __c, _IO_FILE *__fp);\r
+extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ ));\r
+extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ ));\r
+\r
+extern int _IO_peekc_locked (_IO_FILE *__fp);\r
+\r
+\r
+\r
+\r
+\r
+extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
+extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
+extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
+# 464 "/usr/include/libio.h" 3 4\r
+extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,\r
+ __gnuc_va_list, int *__restrict);\r
+extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,\r
+ __gnuc_va_list);\r
+extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);\r
+extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);\r
+\r
+extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);\r
+extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);\r
+\r
+extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ ));\r
+# 75 "/usr/include/stdio.h" 2 3 4\r
+\r
+\r
+\r
+\r
+typedef __gnuc_va_list va_list;\r
+# 90 "/usr/include/stdio.h" 3 4\r
+typedef __off_t off_t;\r
+# 102 "/usr/include/stdio.h" 3 4\r
+typedef __ssize_t ssize_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef _G_fpos_t fpos_t;\r
+# 164 "/usr/include/stdio.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4\r
+# 165 "/usr/include/stdio.h" 2 3 4\r
+\r
+\r
+\r
+extern struct _IO_FILE *stdin;\r
+extern struct _IO_FILE *stdout;\r
+extern struct _IO_FILE *stderr;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int remove (const char *__filename) __attribute__ ((__nothrow__ ));\r
+\r
+extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int renameat (int __oldfd, const char *__old, int __newfd,\r
+ const char *__new) __attribute__ ((__nothrow__ ));\r
+# 195 "/usr/include/stdio.h" 3 4\r
+extern FILE *tmpfile (void) ;\r
+# 209 "/usr/include/stdio.h" 3 4\r
+extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+\r
+extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ )) ;\r
+# 227 "/usr/include/stdio.h" 3 4\r
+extern char *tempnam (const char *__dir, const char *__pfx)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
+# 237 "/usr/include/stdio.h" 3 4\r
+extern int fclose (FILE *__stream);\r
+\r
+\r
+\r
+\r
+extern int fflush (FILE *__stream);\r
+# 252 "/usr/include/stdio.h" 3 4\r
+extern int fflush_unlocked (FILE *__stream);\r
+# 272 "/usr/include/stdio.h" 3 4\r
+extern FILE *fopen (const char *__restrict __filename,\r
+ const char *__restrict __modes) ;\r
+\r
+\r
+\r
+\r
+extern FILE *freopen (const char *__restrict __filename,\r
+ const char *__restrict __modes,\r
+ FILE *__restrict __stream) ;\r
+# 306 "/usr/include/stdio.h" 3 4\r
+extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ )) ;\r
+# 319 "/usr/include/stdio.h" 3 4\r
+extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)\r
+ __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,\r
+ int __modes, size_t __n) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,\r
+ size_t __size) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ ));\r
+# 356 "/usr/include/stdio.h" 3 4\r
+extern int fprintf (FILE *__restrict __stream,\r
+ const char *__restrict __format, ...);\r
+\r
+\r
+\r
+\r
+extern int printf (const char *__restrict __format, ...);\r
+\r
+extern int sprintf (char *__restrict __s,\r
+ const char *__restrict __format, ...) __attribute__ ((__nothrow__));\r
+\r
+\r
+\r
+\r
+\r
+extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,\r
+ __gnuc_va_list __arg);\r
+\r
+\r
+\r
+\r
+extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);\r
+\r
+extern int vsprintf (char *__restrict __s, const char *__restrict __format,\r
+ __gnuc_va_list __arg) __attribute__ ((__nothrow__));\r
+\r
+\r
+\r
+\r
+\r
+extern int snprintf (char *__restrict __s, size_t __maxlen,\r
+ const char *__restrict __format, ...)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));\r
+\r
+extern int vsnprintf (char *__restrict __s, size_t __maxlen,\r
+ const char *__restrict __format, __gnuc_va_list __arg)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));\r
+# 412 "/usr/include/stdio.h" 3 4\r
+extern int vdprintf (int __fd, const char *__restrict __fmt,\r
+ __gnuc_va_list __arg)\r
+ __attribute__ ((__format__ (__printf__, 2, 0)));\r
+extern int dprintf (int __fd, const char *__restrict __fmt, ...)\r
+ __attribute__ ((__format__ (__printf__, 2, 3)));\r
+# 425 "/usr/include/stdio.h" 3 4\r
+extern int fscanf (FILE *__restrict __stream,\r
+ const char *__restrict __format, ...) ;\r
+\r
+\r
+\r
+\r
+extern int scanf (const char *__restrict __format, ...) ;\r
+\r
+extern int sscanf (const char *__restrict __s,\r
+ const char *__restrict __format, ...) __attribute__ ((__nothrow__ ));\r
+# 443 "/usr/include/stdio.h" 3 4\r
+extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") ;\r
+\r
+\r
+extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") ;\r
+\r
+extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ ));\r
+# 471 "/usr/include/stdio.h" 3 4\r
+extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,\r
+ __gnuc_va_list __arg)\r
+ __attribute__ ((__format__ (__scanf__, 2, 0))) ;\r
+\r
+\r
+\r
+\r
+\r
+extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)\r
+ __attribute__ ((__format__ (__scanf__, 1, 0))) ;\r
+\r
+\r
+extern int vsscanf (const char *__restrict __s,\r
+ const char *__restrict __format, __gnuc_va_list __arg)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__scanf__, 2, 0)));\r
+# 494 "/usr/include/stdio.h" 3 4\r
+extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")\r
+\r
+\r
+\r
+ __attribute__ ((__format__ (__scanf__, 2, 0))) ;\r
+extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")\r
+\r
+ __attribute__ ((__format__ (__scanf__, 1, 0))) ;\r
+extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ ))\r
+\r
+\r
+\r
+ __attribute__ ((__format__ (__scanf__, 2, 0)));\r
+# 531 "/usr/include/stdio.h" 3 4\r
+extern int fgetc (FILE *__stream);\r
+extern int getc (FILE *__stream);\r
+\r
+\r
+\r
+\r
+\r
+extern int getchar (void);\r
+# 550 "/usr/include/stdio.h" 3 4\r
+extern int getc_unlocked (FILE *__stream);\r
+extern int getchar_unlocked (void);\r
+# 561 "/usr/include/stdio.h" 3 4\r
+extern int fgetc_unlocked (FILE *__stream);\r
+# 573 "/usr/include/stdio.h" 3 4\r
+extern int fputc (int __c, FILE *__stream);\r
+extern int putc (int __c, FILE *__stream);\r
+\r
+\r
+\r
+\r
+\r
+extern int putchar (int __c);\r
+# 594 "/usr/include/stdio.h" 3 4\r
+extern int fputc_unlocked (int __c, FILE *__stream);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int putc_unlocked (int __c, FILE *__stream);\r
+extern int putchar_unlocked (int __c);\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int getw (FILE *__stream);\r
+\r
+\r
+extern int putw (int __w, FILE *__stream);\r
+# 622 "/usr/include/stdio.h" 3 4\r
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)\r
+ ;\r
+# 638 "/usr/include/stdio.h" 3 4\r
+extern char *gets (char *__s) __attribute__ ((__deprecated__));\r
+# 665 "/usr/include/stdio.h" 3 4\r
+extern __ssize_t __getdelim (char **__restrict __lineptr,\r
+ size_t *__restrict __n, int __delimiter,\r
+ FILE *__restrict __stream) ;\r
+extern __ssize_t getdelim (char **__restrict __lineptr,\r
+ size_t *__restrict __n, int __delimiter,\r
+ FILE *__restrict __stream) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern __ssize_t getline (char **__restrict __lineptr,\r
+ size_t *__restrict __n,\r
+ FILE *__restrict __stream) ;\r
+# 689 "/usr/include/stdio.h" 3 4\r
+extern int fputs (const char *__restrict __s, FILE *__restrict __stream);\r
+\r
+\r
+\r
+\r
+\r
+extern int puts (const char *__s);\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int ungetc (int __c, FILE *__stream);\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern size_t fread (void *__restrict __ptr, size_t __size,\r
+ size_t __n, FILE *__restrict __stream) ;\r
+\r
+\r
+\r
+\r
+extern size_t fwrite (const void *__restrict __ptr, size_t __size,\r
+ size_t __n, FILE *__restrict __s);\r
+# 737 "/usr/include/stdio.h" 3 4\r
+extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,\r
+ size_t __n, FILE *__restrict __stream) ;\r
+extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,\r
+ size_t __n, FILE *__restrict __stream);\r
+# 749 "/usr/include/stdio.h" 3 4\r
+extern int fseek (FILE *__stream, long int __off, int __whence);\r
+\r
+\r
+\r
+\r
+extern long int ftell (FILE *__stream) ;\r
+\r
+\r
+\r
+\r
+extern void rewind (FILE *__stream);\r
+# 773 "/usr/include/stdio.h" 3 4\r
+extern int fseeko (FILE *__stream, __off_t __off, int __whence);\r
+\r
+\r
+\r
+\r
+extern __off_t ftello (FILE *__stream) ;\r
+# 798 "/usr/include/stdio.h" 3 4\r
+extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);\r
+\r
+\r
+\r
+\r
+extern int fsetpos (FILE *__stream, const fpos_t *__pos);\r
+# 826 "/usr/include/stdio.h" 3 4\r
+extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ ));\r
+\r
+extern int feof (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
+\r
+extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ ));\r
+extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
+extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
+# 846 "/usr/include/stdio.h" 3 4\r
+extern void perror (const char *__s);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4\r
+# 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4\r
+extern int sys_nerr;\r
+extern const char *const sys_errlist[];\r
+# 854 "/usr/include/stdio.h" 2 3 4\r
+\r
+\r
+\r
+\r
+extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
+# 873 "/usr/include/stdio.h" 3 4\r
+extern FILE *popen (const char *__command, const char *__modes) ;\r
+\r
+\r
+\r
+\r
+\r
+extern int pclose (FILE *__stream);\r
+\r
+\r
+\r
+\r
+\r
+extern char *ctermid (char *__s) __attribute__ ((__nothrow__ ));\r
+# 913 "/usr/include/stdio.h" 3 4\r
+extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ ));\r
+# 23 "./../test/abts.h" 2\r
+# 1 "/usr/include/stdlib.h" 1 3 4\r
+# 32 "/usr/include/stdlib.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 86 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 3 4\r
+typedef int wchar_t;\r
+# 33 "/usr/include/stdlib.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4\r
+# 50 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4\r
+typedef enum\r
+{\r
+ P_ALL,\r
+ P_PID,\r
+ P_PGID\r
+} idtype_t;\r
+# 42 "/usr/include/stdlib.h" 2 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4\r
+# 64 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4\r
+# 1 "/usr/include/endian.h" 1 3 4\r
+# 36 "/usr/include/endian.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4\r
+# 37 "/usr/include/endian.h" 2 3 4\r
+# 60 "/usr/include/endian.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4\r
+# 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4\r
+# 61 "/usr/include/endian.h" 2 3 4\r
+# 65 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 2 3 4\r
+\r
+union wait\r
+ {\r
+ int w_status;\r
+ struct\r
+ {\r
+\r
+ unsigned int __w_termsig:7;\r
+ unsigned int __w_coredump:1;\r
+ unsigned int __w_retcode:8;\r
+ unsigned int:16;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ } __wait_terminated;\r
+ struct\r
+ {\r
+\r
+ unsigned int __w_stopval:8;\r
+ unsigned int __w_stopsig:8;\r
+ unsigned int:16;\r
+\r
+\r
+\r
+\r
+\r
+\r
+ } __wait_stopped;\r
+ };\r
+# 43 "/usr/include/stdlib.h" 2 3 4\r
+# 67 "/usr/include/stdlib.h" 3 4\r
+typedef union\r
+ {\r
+ union wait *__uptr;\r
+ int *__iptr;\r
+ } __WAIT_STATUS __attribute__ ((__transparent_union__));\r
+# 97 "/usr/include/stdlib.h" 3 4\r
+typedef struct\r
+ {\r
+ int quot;\r
+ int rem;\r
+ } div_t;\r
+\r
+\r
+\r
+typedef struct\r
+ {\r
+ long int quot;\r
+ long int rem;\r
+ } ldiv_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+__extension__ typedef struct\r
+ {\r
+ long long int quot;\r
+ long long int rem;\r
+ } lldiv_t;\r
+# 139 "/usr/include/stdlib.h" 3 4\r
+extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern double atof (const char *__nptr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+extern int atoi (const char *__nptr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+extern long int atol (const char *__nptr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+\r
+\r
+__extension__ extern long long int atoll (const char *__nptr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+\r
+\r
+extern double strtod (const char *__restrict __nptr,\r
+ char **__restrict __endptr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern float strtof (const char *__restrict __nptr,\r
+ char **__restrict __endptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+extern long double strtold (const char *__restrict __nptr,\r
+ char **__restrict __endptr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern long int strtol (const char *__restrict __nptr,\r
+ char **__restrict __endptr, int __base)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+extern unsigned long int strtoul (const char *__restrict __nptr,\r
+ char **__restrict __endptr, int __base)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+__extension__\r
+extern long long int strtoq (const char *__restrict __nptr,\r
+ char **__restrict __endptr, int __base)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+__extension__\r
+extern unsigned long long int strtouq (const char *__restrict __nptr,\r
+ char **__restrict __endptr, int __base)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+__extension__\r
+extern long long int strtoll (const char *__restrict __nptr,\r
+ char **__restrict __endptr, int __base)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+__extension__\r
+extern unsigned long long int strtoull (const char *__restrict __nptr,\r
+ char **__restrict __endptr, int __base)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 305 "/usr/include/stdlib.h" 3 4\r
+extern char *l64a (long int __n) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+extern long int a64l (const char *__s)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4\r
+# 33 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+typedef __u_char u_char;\r
+typedef __u_short u_short;\r
+typedef __u_int u_int;\r
+typedef __u_long u_long;\r
+typedef __quad_t quad_t;\r
+typedef __u_quad_t u_quad_t;\r
+typedef __fsid_t fsid_t;\r
+\r
+\r
+\r
+\r
+typedef __loff_t loff_t;\r
+\r
+\r
+\r
+typedef __ino_t ino_t;\r
+# 60 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+typedef __dev_t dev_t;\r
+\r
+\r
+\r
+\r
+typedef __gid_t gid_t;\r
+\r
+\r
+\r
+\r
+typedef __mode_t mode_t;\r
+\r
+\r
+\r
+\r
+typedef __nlink_t nlink_t;\r
+\r
+\r
+\r
+\r
+typedef __uid_t uid_t;\r
+# 98 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+typedef __pid_t pid_t;\r
+\r
+\r
+\r
+\r
+\r
+typedef __id_t id_t;\r
+# 115 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+typedef __daddr_t daddr_t;\r
+typedef __caddr_t caddr_t;\r
+\r
+\r
+\r
+\r
+\r
+typedef __key_t key_t;\r
+# 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+# 1 "/usr/include/time.h" 1 3 4\r
+# 59 "/usr/include/time.h" 3 4\r
+typedef __clock_t clock_t;\r
+# 75 "/usr/include/time.h" 3 4\r
+typedef __time_t time_t;\r
+# 91 "/usr/include/time.h" 3 4\r
+typedef __clockid_t clockid_t;\r
+# 103 "/usr/include/time.h" 3 4\r
+typedef __timer_t timer_t;\r
+# 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
+# 146 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 147 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
+\r
+\r
+\r
+typedef unsigned long int ulong;\r
+typedef unsigned short int ushort;\r
+typedef unsigned int uint;\r
+# 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+typedef int int8_t __attribute__ ((__mode__ (__QI__)));\r
+typedef int int16_t __attribute__ ((__mode__ (__HI__)));\r
+typedef int int32_t __attribute__ ((__mode__ (__SI__)));\r
+typedef int int64_t __attribute__ ((__mode__ (__DI__)));\r
+\r
+\r
+typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));\r
+typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));\r
+typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));\r
+typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));\r
+\r
+typedef int register_t __attribute__ ((__mode__ (__word__)));\r
+# 219 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4\r
+# 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4\r
+# 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4\r
+# 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4\r
+# 22 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4\r
+typedef int __sig_atomic_t;\r
+\r
+\r
+\r
+\r
+typedef struct\r
+ {\r
+ unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];\r
+ } __sigset_t;\r
+# 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
+\r
+\r
+\r
+typedef __sigset_t sigset_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/time.h" 1 3 4\r
+# 120 "/usr/include/time.h" 3 4\r
+struct timespec\r
+ {\r
+ __time_t tv_sec;\r
+ __syscall_slong_t tv_nsec;\r
+ };\r
+# 44 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
+# 30 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4\r
+struct timeval\r
+ {\r
+ __time_t tv_sec;\r
+ __suseconds_t tv_usec;\r
+ };\r
+# 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4\r
+\r
+\r
+typedef __suseconds_t suseconds_t;\r
+\r
+\r
+\r
+\r
+\r
+typedef long int __fd_mask;\r
+# 64 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
+typedef struct\r
+ {\r
+\r
+\r
+\r
+\r
+\r
+\r
+ __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];\r
+\r
+\r
+ } fd_set;\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef __fd_mask fd_mask;\r
+# 106 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
+extern int select (int __nfds, fd_set *__restrict __readfds,\r
+ fd_set *__restrict __writefds,\r
+ fd_set *__restrict __exceptfds,\r
+ struct timeval *__restrict __timeout);\r
+# 118 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4\r
+extern int pselect (int __nfds, fd_set *__restrict __readfds,\r
+ fd_set *__restrict __writefds,\r
+ fd_set *__restrict __exceptfds,\r
+ const struct timespec *__restrict __timeout,\r
+ const __sigset_t *__restrict __sigmask);\r
+# 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4\r
+# 26 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4\r
+__extension__\r
+extern unsigned int gnu_dev_major (unsigned long long int __dev)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+__extension__\r
+extern unsigned int gnu_dev_minor (unsigned long long int __dev)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+__extension__\r
+extern unsigned long long int gnu_dev_makedev (unsigned int __major,\r
+ unsigned int __minor)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+# 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+typedef __blksize_t blksize_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef __blkcnt_t blkcnt_t;\r
+\r
+\r
+\r
+typedef __fsblkcnt_t fsblkcnt_t;\r
+\r
+\r
+\r
+typedef __fsfilcnt_t fsfilcnt_t;\r
+# 270 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4\r
+# 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4\r
+# 60 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
+typedef unsigned long int pthread_t;\r
+\r
+\r
+union pthread_attr_t\r
+{\r
+ char __size[56];\r
+ long int __align;\r
+};\r
+\r
+typedef union pthread_attr_t pthread_attr_t;\r
+\r
+\r
+\r
+\r
+\r
+typedef struct __pthread_internal_list\r
+{\r
+ struct __pthread_internal_list *__prev;\r
+ struct __pthread_internal_list *__next;\r
+} __pthread_list_t;\r
+# 90 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
+typedef union\r
+{\r
+ struct __pthread_mutex_s\r
+ {\r
+ int __lock;\r
+ unsigned int __count;\r
+ int __owner;\r
+\r
+ unsigned int __nusers;\r
+\r
+\r
+\r
+ int __kind;\r
+\r
+ short __spins;\r
+ short __elision;\r
+ __pthread_list_t __list;\r
+# 124 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
+ } __data;\r
+ char __size[40];\r
+ long int __align;\r
+} pthread_mutex_t;\r
+\r
+typedef union\r
+{\r
+ char __size[4];\r
+ int __align;\r
+} pthread_mutexattr_t;\r
+\r
+\r
+\r
+\r
+typedef union\r
+{\r
+ struct\r
+ {\r
+ int __lock;\r
+ unsigned int __futex;\r
+ __extension__ unsigned long long int __total_seq;\r
+ __extension__ unsigned long long int __wakeup_seq;\r
+ __extension__ unsigned long long int __woken_seq;\r
+ void *__mutex;\r
+ unsigned int __nwaiters;\r
+ unsigned int __broadcast_seq;\r
+ } __data;\r
+ char __size[48];\r
+ __extension__ long long int __align;\r
+} pthread_cond_t;\r
+\r
+typedef union\r
+{\r
+ char __size[4];\r
+ int __align;\r
+} pthread_condattr_t;\r
+\r
+\r
+\r
+typedef unsigned int pthread_key_t;\r
+\r
+\r
+\r
+typedef int pthread_once_t;\r
+\r
+\r
+\r
+\r
+\r
+typedef union\r
+{\r
+\r
+ struct\r
+ {\r
+ int __lock;\r
+ unsigned int __nr_readers;\r
+ unsigned int __readers_wakeup;\r
+ unsigned int __writer_wakeup;\r
+ unsigned int __nr_readers_queued;\r
+ unsigned int __nr_writers_queued;\r
+ int __writer;\r
+ int __shared;\r
+ unsigned long int __pad1;\r
+ unsigned long int __pad2;\r
+\r
+\r
+ unsigned int __flags;\r
+\r
+ } __data;\r
+# 211 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4\r
+ char __size[56];\r
+ long int __align;\r
+} pthread_rwlock_t;\r
+\r
+typedef union\r
+{\r
+ char __size[8];\r
+ long int __align;\r
+} pthread_rwlockattr_t;\r
+\r
+\r
+\r
+\r
+\r
+typedef volatile int pthread_spinlock_t;\r
+\r
+\r
+\r
+\r
+typedef union\r
+{\r
+ char __size[32];\r
+ long int __align;\r
+} pthread_barrier_t;\r
+\r
+typedef union\r
+{\r
+ char __size[4];\r
+ int __align;\r
+} pthread_barrierattr_t;\r
+# 271 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4\r
+# 315 "/usr/include/stdlib.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern long int random (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern char *initstate (unsigned int __seed, char *__statebuf,\r
+ size_t __statelen) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+struct random_data\r
+ {\r
+ int32_t *fptr;\r
+ int32_t *rptr;\r
+ int32_t *state;\r
+ int rand_type;\r
+ int rand_deg;\r
+ int rand_sep;\r
+ int32_t *end_ptr;\r
+ };\r
+\r
+extern int random_r (struct random_data *__restrict __buf,\r
+ int32_t *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+extern int srandom_r (unsigned int __seed, struct random_data *__buf)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,\r
+ size_t __statelen,\r
+ struct random_data *__restrict __buf)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
+\r
+extern int setstate_r (char *__restrict __statebuf,\r
+ struct random_data *__restrict __buf)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int rand (void) __attribute__ ((__nothrow__ ));\r
+\r
+extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern double drand48 (void) __attribute__ ((__nothrow__ ));\r
+extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern long int lrand48 (void) __attribute__ ((__nothrow__ ));\r
+extern long int nrand48 (unsigned short int __xsubi[3])\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern long int mrand48 (void) __attribute__ ((__nothrow__ ));\r
+extern long int jrand48 (unsigned short int __xsubi[3])\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ ));\r
+extern unsigned short int *seed48 (unsigned short int __seed16v[3])\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+struct drand48_data\r
+ {\r
+ unsigned short int __x[3];\r
+ unsigned short int __old_x[3];\r
+ unsigned short int __c;\r
+ unsigned short int __init;\r
+ __extension__ unsigned long long int __a;\r
+\r
+ };\r
+\r
+\r
+extern int drand48_r (struct drand48_data *__restrict __buffer,\r
+ double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+extern int erand48_r (unsigned short int __xsubi[3],\r
+ struct drand48_data *__restrict __buffer,\r
+ double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int lrand48_r (struct drand48_data *__restrict __buffer,\r
+ long int *__restrict __result)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+extern int nrand48_r (unsigned short int __xsubi[3],\r
+ struct drand48_data *__restrict __buffer,\r
+ long int *__restrict __result)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int mrand48_r (struct drand48_data *__restrict __buffer,\r
+ long int *__restrict __result)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+extern int jrand48_r (unsigned short int __xsubi[3],\r
+ struct drand48_data *__restrict __buffer,\r
+ long int *__restrict __result)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int srand48_r (long int __seedval, struct drand48_data *__buffer)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+extern int seed48_r (unsigned short int __seed16v[3],\r
+ struct drand48_data *__buffer) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+extern int lcong48_r (unsigned short int __param[7],\r
+ struct drand48_data *__buffer)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+# 466 "/usr/include/stdlib.h" 3 4\r
+extern void *malloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
+\r
+extern void *calloc (size_t __nmemb, size_t __size)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
+# 480 "/usr/include/stdlib.h" 3 4\r
+extern void *realloc (void *__ptr, size_t __size)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));\r
+\r
+extern void free (void *__ptr) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern void cfree (void *__ptr) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/alloca.h" 1 3 4\r
+# 24 "/usr/include/alloca.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 25 "/usr/include/alloca.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern void *alloca (size_t __size) __attribute__ ((__nothrow__ ));\r
+# 493 "/usr/include/stdlib.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+extern void *valloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) ;\r
+\r
+\r
+\r
+\r
+extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+# 515 "/usr/include/stdlib.h" 3 4\r
+extern void abort (void) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
+\r
+\r
+\r
+extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 535 "/usr/include/stdlib.h" 3 4\r
+extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern void exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
+# 557 "/usr/include/stdlib.h" 3 4\r
+extern void _Exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern char *getenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+# 578 "/usr/include/stdlib.h" 3 4\r
+extern int putenv (char *__string) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern int setenv (const char *__name, const char *__value, int __replace)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int clearenv (void) __attribute__ ((__nothrow__ ));\r
+# 606 "/usr/include/stdlib.h" 3 4\r
+extern char *mktemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 620 "/usr/include/stdlib.h" 3 4\r
+extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;\r
+# 642 "/usr/include/stdlib.h" 3 4\r
+extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;\r
+# 663 "/usr/include/stdlib.h" 3 4\r
+extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+# 717 "/usr/include/stdlib.h" 3 4\r
+extern int system (const char *__command) ;\r
+# 734 "/usr/include/stdlib.h" 3 4\r
+extern char *realpath (const char *__restrict __name,\r
+ char *__restrict __resolved) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef int (*__compar_fn_t) (const void *, const void *);\r
+# 755 "/usr/include/stdlib.h" 3 4\r
+extern void *bsearch (const void *__key, const void *__base,\r
+ size_t __nmemb, size_t __size, __compar_fn_t __compar)\r
+ __attribute__ ((__nonnull__ (1, 2, 5))) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern void qsort (void *__base, size_t __nmemb, size_t __size,\r
+ __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));\r
+# 775 "/usr/include/stdlib.h" 3 4\r
+extern int abs (int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
+extern long int labs (long int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
+\r
+\r
+\r
+__extension__ extern long long int llabs (long long int __x)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern div_t div (int __numer, int __denom)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
+extern ldiv_t ldiv (long int __numer, long int __denom)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
+\r
+\r
+\r
+\r
+__extension__ extern lldiv_t lldiv (long long int __numer,\r
+ long long int __denom)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) ;\r
+# 812 "/usr/include/stdlib.h" 3 4\r
+extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,\r
+ int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
+\r
+\r
+\r
+\r
+extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,\r
+ int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
+\r
+\r
+\r
+\r
+extern char *gcvt (double __value, int __ndigit, char *__buf)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) ;\r
+\r
+\r
+\r
+\r
+extern char *qecvt (long double __value, int __ndigit,\r
+ int *__restrict __decpt, int *__restrict __sign)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
+extern char *qfcvt (long double __value, int __ndigit,\r
+ int *__restrict __decpt, int *__restrict __sign)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) ;\r
+extern char *qgcvt (long double __value, int __ndigit, char *__buf)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) ;\r
+\r
+\r
+\r
+\r
+extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,\r
+ int *__restrict __sign, char *__restrict __buf,\r
+ size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
+extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,\r
+ int *__restrict __sign, char *__restrict __buf,\r
+ size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
+\r
+extern int qecvt_r (long double __value, int __ndigit,\r
+ int *__restrict __decpt, int *__restrict __sign,\r
+ char *__restrict __buf, size_t __len)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
+extern int qfcvt_r (long double __value, int __ndigit,\r
+ int *__restrict __decpt, int *__restrict __sign,\r
+ char *__restrict __buf, size_t __len)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int mbtowc (wchar_t *__restrict __pwc,\r
+ const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern size_t mbstowcs (wchar_t *__restrict __pwcs,\r
+ const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));\r
+\r
+extern size_t wcstombs (char *__restrict __s,\r
+ const wchar_t *__restrict __pwcs, size_t __n)\r
+ __attribute__ ((__nothrow__ ));\r
+# 888 "/usr/include/stdlib.h" 3 4\r
+extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+# 899 "/usr/include/stdlib.h" 3 4\r
+extern int getsubopt (char **__restrict __optionp,\r
+ char *const *__restrict __tokens,\r
+ char **__restrict __valuep)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3))) ;\r
+# 951 "/usr/include/stdlib.h" 3 4\r
+extern int getloadavg (double __loadavg[], int __nelem)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4\r
+# 956 "/usr/include/stdlib.h" 2 3 4\r
+# 24 "./../test/abts.h" 2\r
+# 1 "/usr/include/string.h" 1 3 4\r
+# 32 "/usr/include/string.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 33 "/usr/include/string.h" 2 3 4\r
+# 46 "/usr/include/string.h" 3 4\r
+extern void *memcpy (void *__restrict __dest, const void *__restrict __src,\r
+ size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern void *memmove (void *__dest, const void *__src, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern void *memccpy (void *__restrict __dest, const void *__restrict __src,\r
+ int __c, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+\r
+extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int memcmp (const void *__s1, const void *__s2, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+# 96 "/usr/include/string.h" 3 4\r
+extern void *memchr (const void *__s, int __c, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
+# 129 "/usr/include/string.h" 3 4\r
+extern char *strcpy (char *__restrict __dest, const char *__restrict __src)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+extern char *strncpy (char *__restrict __dest,\r
+ const char *__restrict __src, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern char *strcat (char *__restrict __dest, const char *__restrict __src)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+extern char *strncat (char *__restrict __dest, const char *__restrict __src,\r
+ size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int strcmp (const char *__s1, const char *__s2)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+extern int strncmp (const char *__s1, const char *__s2, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int strcoll (const char *__s1, const char *__s2)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+extern size_t strxfrm (char *__restrict __dest,\r
+ const char *__restrict __src, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/xlocale.h" 1 3 4\r
+# 27 "/usr/include/xlocale.h" 3 4\r
+typedef struct __locale_struct\r
+{\r
+\r
+ struct __locale_data *__locales[13];\r
+\r
+\r
+ const unsigned short int *__ctype_b;\r
+ const int *__ctype_tolower;\r
+ const int *__ctype_toupper;\r
+\r
+\r
+ const char *__names[13];\r
+} *__locale_t;\r
+\r
+\r
+typedef __locale_t locale_t;\r
+# 164 "/usr/include/string.h" 2 3 4\r
+\r
+\r
+extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));\r
+\r
+extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,\r
+ __locale_t __l) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
+\r
+\r
+\r
+\r
+\r
+extern char *strdup (const char *__s)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern char *strndup (const char *__string, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));\r
+# 236 "/usr/include/string.h" 3 4\r
+extern char *strchr (const char *__s, int __c)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
+# 263 "/usr/include/string.h" 3 4\r
+extern char *strrchr (const char *__s, int __c)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
+# 285 "/usr/include/string.h" 3 4\r
+extern size_t strcspn (const char *__s, const char *__reject)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern size_t strspn (const char *__s, const char *__accept)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+# 315 "/usr/include/string.h" 3 4\r
+extern char *strpbrk (const char *__s, const char *__accept)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+# 342 "/usr/include/string.h" 3 4\r
+extern char *strstr (const char *__haystack, const char *__needle)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+extern char *strtok (char *__restrict __s, const char *__restrict __delim)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+\r
+extern char *__strtok_r (char *__restrict __s,\r
+ const char *__restrict __delim,\r
+ char **__restrict __save_ptr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
+\r
+extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,\r
+ char **__restrict __save_ptr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
+# 399 "/usr/include/string.h" 3 4\r
+extern size_t strlen (const char *__s)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern size_t strnlen (const char *__string, size_t __maxlen)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern char *strerror (int __errnum) __attribute__ ((__nothrow__ ));\r
+# 427 "/usr/include/string.h" 3 4\r
+extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+# 445 "/usr/include/string.h" 3 4\r
+extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern void bcopy (const void *__src, void *__dest, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int bcmp (const void *__s1, const void *__s2, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+# 489 "/usr/include/string.h" 3 4\r
+extern char *index (const char *__s, int __c)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
+# 517 "/usr/include/string.h" 3 4\r
+extern char *rindex (const char *__s, int __c)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+extern int ffs (int __i) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+# 534 "/usr/include/string.h" 3 4\r
+extern int strcasecmp (const char *__s1, const char *__s2)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+# 557 "/usr/include/string.h" 3 4\r
+extern char *strsep (char **__restrict __stringp,\r
+ const char *__restrict __delim)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+extern char *strsignal (int __sig) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern char *__stpncpy (char *__restrict __dest,\r
+ const char *__restrict __src, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+extern char *stpncpy (char *__restrict __dest,\r
+ const char *__restrict __src, size_t __n)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+# 25 "./../test/abts.h" 2\r
+\r
+\r
+\r
+# 1 "/usr/include/unistd.h" 1 3 4\r
+# 202 "/usr/include/unistd.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4\r
+# 203 "/usr/include/unistd.h" 2 3 4\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4\r
+# 22 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4\r
+# 207 "/usr/include/unistd.h" 2 3 4\r
+# 226 "/usr/include/unistd.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 227 "/usr/include/unistd.h" 2 3 4\r
+# 255 "/usr/include/unistd.h" 3 4\r
+typedef __useconds_t useconds_t;\r
+# 267 "/usr/include/unistd.h" 3 4\r
+typedef __intptr_t intptr_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef __socklen_t socklen_t;\r
+# 287 "/usr/include/unistd.h" 3 4\r
+extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 304 "/usr/include/unistd.h" 3 4\r
+extern int faccessat (int __fd, const char *__file, int __type, int __flag)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
+# 334 "/usr/include/unistd.h" 3 4\r
+extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ ));\r
+# 353 "/usr/include/unistd.h" 3 4\r
+extern int close (int __fd);\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;\r
+\r
+\r
+\r
+\r
+\r
+extern ssize_t write (int __fd, const void *__buf, size_t __n) ;\r
+# 376 "/usr/include/unistd.h" 3 4\r
+extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,\r
+ __off_t __offset) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,\r
+ __off_t __offset) ;\r
+# 417 "/usr/include/unistd.h" 3 4\r
+extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ )) ;\r
+# 432 "/usr/include/unistd.h" 3 4\r
+extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ ));\r
+# 444 "/usr/include/unistd.h" 3 4\r
+extern unsigned int sleep (unsigned int __seconds);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)\r
+ __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int usleep (__useconds_t __useconds);\r
+# 469 "/usr/include/unistd.h" 3 4\r
+extern int pause (void);\r
+\r
+\r
+\r
+extern int chown (const char *__file, __uid_t __owner, __gid_t __group)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int fchownat (int __fd, const char *__file, __uid_t __owner,\r
+ __gid_t __group, int __flag)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
+\r
+\r
+\r
+extern int chdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+extern int fchdir (int __fd) __attribute__ ((__nothrow__ )) ;\r
+# 511 "/usr/include/unistd.h" 3 4\r
+extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ )) ;\r
+# 525 "/usr/include/unistd.h" 3 4\r
+extern char *getwd (char *__buf)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;\r
+\r
+\r
+\r
+\r
+extern int dup (int __fd) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ ));\r
+# 543 "/usr/include/unistd.h" 3 4\r
+extern char **__environ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int execve (const char *__path, char *const __argv[],\r
+ char *const __envp[]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+extern int fexecve (int __fd, char *const __argv[], char *const __envp[])\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+\r
+extern int execv (const char *__path, char *const __argv[])\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int execle (const char *__path, const char *__arg, ...)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int execl (const char *__path, const char *__arg, ...)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int execvp (const char *__file, char *const __argv[])\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+extern int execlp (const char *__file, const char *__arg, ...)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+# 598 "/usr/include/unistd.h" 3 4\r
+extern int nice (int __inc) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern void _exit (int __status) __attribute__ ((__noreturn__));\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4\r
+enum\r
+ {\r
+ _PC_LINK_MAX,\r
+\r
+ _PC_MAX_CANON,\r
+\r
+ _PC_MAX_INPUT,\r
+\r
+ _PC_NAME_MAX,\r
+\r
+ _PC_PATH_MAX,\r
+\r
+ _PC_PIPE_BUF,\r
+\r
+ _PC_CHOWN_RESTRICTED,\r
+\r
+ _PC_NO_TRUNC,\r
+\r
+ _PC_VDISABLE,\r
+\r
+ _PC_SYNC_IO,\r
+\r
+ _PC_ASYNC_IO,\r
+\r
+ _PC_PRIO_IO,\r
+\r
+ _PC_SOCK_MAXBUF,\r
+\r
+ _PC_FILESIZEBITS,\r
+\r
+ _PC_REC_INCR_XFER_SIZE,\r
+\r
+ _PC_REC_MAX_XFER_SIZE,\r
+\r
+ _PC_REC_MIN_XFER_SIZE,\r
+\r
+ _PC_REC_XFER_ALIGN,\r
+\r
+ _PC_ALLOC_SIZE_MIN,\r
+\r
+ _PC_SYMLINK_MAX,\r
+\r
+ _PC_2_SYMLINKS\r
+\r
+ };\r
+\r
+\r
+enum\r
+ {\r
+ _SC_ARG_MAX,\r
+\r
+ _SC_CHILD_MAX,\r
+\r
+ _SC_CLK_TCK,\r
+\r
+ _SC_NGROUPS_MAX,\r
+\r
+ _SC_OPEN_MAX,\r
+\r
+ _SC_STREAM_MAX,\r
+\r
+ _SC_TZNAME_MAX,\r
+\r
+ _SC_JOB_CONTROL,\r
+\r
+ _SC_SAVED_IDS,\r
+\r
+ _SC_REALTIME_SIGNALS,\r
+\r
+ _SC_PRIORITY_SCHEDULING,\r
+\r
+ _SC_TIMERS,\r
+\r
+ _SC_ASYNCHRONOUS_IO,\r
+\r
+ _SC_PRIORITIZED_IO,\r
+\r
+ _SC_SYNCHRONIZED_IO,\r
+\r
+ _SC_FSYNC,\r
+\r
+ _SC_MAPPED_FILES,\r
+\r
+ _SC_MEMLOCK,\r
+\r
+ _SC_MEMLOCK_RANGE,\r
+\r
+ _SC_MEMORY_PROTECTION,\r
+\r
+ _SC_MESSAGE_PASSING,\r
+\r
+ _SC_SEMAPHORES,\r
+\r
+ _SC_SHARED_MEMORY_OBJECTS,\r
+\r
+ _SC_AIO_LISTIO_MAX,\r
+\r
+ _SC_AIO_MAX,\r
+\r
+ _SC_AIO_PRIO_DELTA_MAX,\r
+\r
+ _SC_DELAYTIMER_MAX,\r
+\r
+ _SC_MQ_OPEN_MAX,\r
+\r
+ _SC_MQ_PRIO_MAX,\r
+\r
+ _SC_VERSION,\r
+\r
+ _SC_PAGESIZE,\r
+\r
+\r
+ _SC_RTSIG_MAX,\r
+\r
+ _SC_SEM_NSEMS_MAX,\r
+\r
+ _SC_SEM_VALUE_MAX,\r
+\r
+ _SC_SIGQUEUE_MAX,\r
+\r
+ _SC_TIMER_MAX,\r
+\r
+\r
+\r
+\r
+ _SC_BC_BASE_MAX,\r
+\r
+ _SC_BC_DIM_MAX,\r
+\r
+ _SC_BC_SCALE_MAX,\r
+\r
+ _SC_BC_STRING_MAX,\r
+\r
+ _SC_COLL_WEIGHTS_MAX,\r
+\r
+ _SC_EQUIV_CLASS_MAX,\r
+\r
+ _SC_EXPR_NEST_MAX,\r
+\r
+ _SC_LINE_MAX,\r
+\r
+ _SC_RE_DUP_MAX,\r
+\r
+ _SC_CHARCLASS_NAME_MAX,\r
+\r
+\r
+ _SC_2_VERSION,\r
+\r
+ _SC_2_C_BIND,\r
+\r
+ _SC_2_C_DEV,\r
+\r
+ _SC_2_FORT_DEV,\r
+\r
+ _SC_2_FORT_RUN,\r
+\r
+ _SC_2_SW_DEV,\r
+\r
+ _SC_2_LOCALEDEF,\r
+\r
+\r
+ _SC_PII,\r
+\r
+ _SC_PII_XTI,\r
+\r
+ _SC_PII_SOCKET,\r
+\r
+ _SC_PII_INTERNET,\r
+\r
+ _SC_PII_OSI,\r
+\r
+ _SC_POLL,\r
+\r
+ _SC_SELECT,\r
+\r
+ _SC_UIO_MAXIOV,\r
+\r
+ _SC_IOV_MAX = _SC_UIO_MAXIOV,\r
+\r
+ _SC_PII_INTERNET_STREAM,\r
+\r
+ _SC_PII_INTERNET_DGRAM,\r
+\r
+ _SC_PII_OSI_COTS,\r
+\r
+ _SC_PII_OSI_CLTS,\r
+\r
+ _SC_PII_OSI_M,\r
+\r
+ _SC_T_IOV_MAX,\r
+\r
+\r
+\r
+ _SC_THREADS,\r
+\r
+ _SC_THREAD_SAFE_FUNCTIONS,\r
+\r
+ _SC_GETGR_R_SIZE_MAX,\r
+\r
+ _SC_GETPW_R_SIZE_MAX,\r
+\r
+ _SC_LOGIN_NAME_MAX,\r
+\r
+ _SC_TTY_NAME_MAX,\r
+\r
+ _SC_THREAD_DESTRUCTOR_ITERATIONS,\r
+\r
+ _SC_THREAD_KEYS_MAX,\r
+\r
+ _SC_THREAD_STACK_MIN,\r
+\r
+ _SC_THREAD_THREADS_MAX,\r
+\r
+ _SC_THREAD_ATTR_STACKADDR,\r
+\r
+ _SC_THREAD_ATTR_STACKSIZE,\r
+\r
+ _SC_THREAD_PRIORITY_SCHEDULING,\r
+\r
+ _SC_THREAD_PRIO_INHERIT,\r
+\r
+ _SC_THREAD_PRIO_PROTECT,\r
+\r
+ _SC_THREAD_PROCESS_SHARED,\r
+\r
+\r
+ _SC_NPROCESSORS_CONF,\r
+\r
+ _SC_NPROCESSORS_ONLN,\r
+\r
+ _SC_PHYS_PAGES,\r
+\r
+ _SC_AVPHYS_PAGES,\r
+\r
+ _SC_ATEXIT_MAX,\r
+\r
+ _SC_PASS_MAX,\r
+\r
+\r
+ _SC_XOPEN_VERSION,\r
+\r
+ _SC_XOPEN_XCU_VERSION,\r
+\r
+ _SC_XOPEN_UNIX,\r
+\r
+ _SC_XOPEN_CRYPT,\r
+\r
+ _SC_XOPEN_ENH_I18N,\r
+\r
+ _SC_XOPEN_SHM,\r
+\r
+\r
+ _SC_2_CHAR_TERM,\r
+\r
+ _SC_2_C_VERSION,\r
+\r
+ _SC_2_UPE,\r
+\r
+\r
+ _SC_XOPEN_XPG2,\r
+\r
+ _SC_XOPEN_XPG3,\r
+\r
+ _SC_XOPEN_XPG4,\r
+\r
+\r
+ _SC_CHAR_BIT,\r
+\r
+ _SC_CHAR_MAX,\r
+\r
+ _SC_CHAR_MIN,\r
+\r
+ _SC_INT_MAX,\r
+\r
+ _SC_INT_MIN,\r
+\r
+ _SC_LONG_BIT,\r
+\r
+ _SC_WORD_BIT,\r
+\r
+ _SC_MB_LEN_MAX,\r
+\r
+ _SC_NZERO,\r
+\r
+ _SC_SSIZE_MAX,\r
+\r
+ _SC_SCHAR_MAX,\r
+\r
+ _SC_SCHAR_MIN,\r
+\r
+ _SC_SHRT_MAX,\r
+\r
+ _SC_SHRT_MIN,\r
+\r
+ _SC_UCHAR_MAX,\r
+\r
+ _SC_UINT_MAX,\r
+\r
+ _SC_ULONG_MAX,\r
+\r
+ _SC_USHRT_MAX,\r
+\r
+\r
+ _SC_NL_ARGMAX,\r
+\r
+ _SC_NL_LANGMAX,\r
+\r
+ _SC_NL_MSGMAX,\r
+\r
+ _SC_NL_NMAX,\r
+\r
+ _SC_NL_SETMAX,\r
+\r
+ _SC_NL_TEXTMAX,\r
+\r
+\r
+ _SC_XBS5_ILP32_OFF32,\r
+\r
+ _SC_XBS5_ILP32_OFFBIG,\r
+\r
+ _SC_XBS5_LP64_OFF64,\r
+\r
+ _SC_XBS5_LPBIG_OFFBIG,\r
+\r
+\r
+ _SC_XOPEN_LEGACY,\r
+\r
+ _SC_XOPEN_REALTIME,\r
+\r
+ _SC_XOPEN_REALTIME_THREADS,\r
+\r
+\r
+ _SC_ADVISORY_INFO,\r
+\r
+ _SC_BARRIERS,\r
+\r
+ _SC_BASE,\r
+\r
+ _SC_C_LANG_SUPPORT,\r
+\r
+ _SC_C_LANG_SUPPORT_R,\r
+\r
+ _SC_CLOCK_SELECTION,\r
+\r
+ _SC_CPUTIME,\r
+\r
+ _SC_THREAD_CPUTIME,\r
+\r
+ _SC_DEVICE_IO,\r
+\r
+ _SC_DEVICE_SPECIFIC,\r
+\r
+ _SC_DEVICE_SPECIFIC_R,\r
+\r
+ _SC_FD_MGMT,\r
+\r
+ _SC_FIFO,\r
+\r
+ _SC_PIPE,\r
+\r
+ _SC_FILE_ATTRIBUTES,\r
+\r
+ _SC_FILE_LOCKING,\r
+\r
+ _SC_FILE_SYSTEM,\r
+\r
+ _SC_MONOTONIC_CLOCK,\r
+\r
+ _SC_MULTI_PROCESS,\r
+\r
+ _SC_SINGLE_PROCESS,\r
+\r
+ _SC_NETWORKING,\r
+\r
+ _SC_READER_WRITER_LOCKS,\r
+\r
+ _SC_SPIN_LOCKS,\r
+\r
+ _SC_REGEXP,\r
+\r
+ _SC_REGEX_VERSION,\r
+\r
+ _SC_SHELL,\r
+\r
+ _SC_SIGNALS,\r
+\r
+ _SC_SPAWN,\r
+\r
+ _SC_SPORADIC_SERVER,\r
+\r
+ _SC_THREAD_SPORADIC_SERVER,\r
+\r
+ _SC_SYSTEM_DATABASE,\r
+\r
+ _SC_SYSTEM_DATABASE_R,\r
+\r
+ _SC_TIMEOUTS,\r
+\r
+ _SC_TYPED_MEMORY_OBJECTS,\r
+\r
+ _SC_USER_GROUPS,\r
+\r
+ _SC_USER_GROUPS_R,\r
+\r
+ _SC_2_PBS,\r
+\r
+ _SC_2_PBS_ACCOUNTING,\r
+\r
+ _SC_2_PBS_LOCATE,\r
+\r
+ _SC_2_PBS_MESSAGE,\r
+\r
+ _SC_2_PBS_TRACK,\r
+\r
+ _SC_SYMLOOP_MAX,\r
+\r
+ _SC_STREAMS,\r
+\r
+ _SC_2_PBS_CHECKPOINT,\r
+\r
+\r
+ _SC_V6_ILP32_OFF32,\r
+\r
+ _SC_V6_ILP32_OFFBIG,\r
+\r
+ _SC_V6_LP64_OFF64,\r
+\r
+ _SC_V6_LPBIG_OFFBIG,\r
+\r
+\r
+ _SC_HOST_NAME_MAX,\r
+\r
+ _SC_TRACE,\r
+\r
+ _SC_TRACE_EVENT_FILTER,\r
+\r
+ _SC_TRACE_INHERIT,\r
+\r
+ _SC_TRACE_LOG,\r
+\r
+\r
+ _SC_LEVEL1_ICACHE_SIZE,\r
+\r
+ _SC_LEVEL1_ICACHE_ASSOC,\r
+\r
+ _SC_LEVEL1_ICACHE_LINESIZE,\r
+\r
+ _SC_LEVEL1_DCACHE_SIZE,\r
+\r
+ _SC_LEVEL1_DCACHE_ASSOC,\r
+\r
+ _SC_LEVEL1_DCACHE_LINESIZE,\r
+\r
+ _SC_LEVEL2_CACHE_SIZE,\r
+\r
+ _SC_LEVEL2_CACHE_ASSOC,\r
+\r
+ _SC_LEVEL2_CACHE_LINESIZE,\r
+\r
+ _SC_LEVEL3_CACHE_SIZE,\r
+\r
+ _SC_LEVEL3_CACHE_ASSOC,\r
+\r
+ _SC_LEVEL3_CACHE_LINESIZE,\r
+\r
+ _SC_LEVEL4_CACHE_SIZE,\r
+\r
+ _SC_LEVEL4_CACHE_ASSOC,\r
+\r
+ _SC_LEVEL4_CACHE_LINESIZE,\r
+\r
+\r
+\r
+ _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,\r
+\r
+ _SC_RAW_SOCKETS,\r
+\r
+\r
+ _SC_V7_ILP32_OFF32,\r
+\r
+ _SC_V7_ILP32_OFFBIG,\r
+\r
+ _SC_V7_LP64_OFF64,\r
+\r
+ _SC_V7_LPBIG_OFFBIG,\r
+\r
+\r
+ _SC_SS_REPL_MAX,\r
+\r
+\r
+ _SC_TRACE_EVENT_NAME_MAX,\r
+\r
+ _SC_TRACE_NAME_MAX,\r
+\r
+ _SC_TRACE_SYS_MAX,\r
+\r
+ _SC_TRACE_USER_EVENT_MAX,\r
+\r
+\r
+ _SC_XOPEN_STREAMS,\r
+\r
+\r
+ _SC_THREAD_ROBUST_PRIO_INHERIT,\r
+\r
+ _SC_THREAD_ROBUST_PRIO_PROTECT\r
+\r
+ };\r
+\r
+\r
+enum\r
+ {\r
+ _CS_PATH,\r
+\r
+\r
+ _CS_V6_WIDTH_RESTRICTED_ENVS,\r
+\r
+\r
+\r
+ _CS_GNU_LIBC_VERSION,\r
+\r
+ _CS_GNU_LIBPTHREAD_VERSION,\r
+\r
+\r
+ _CS_V5_WIDTH_RESTRICTED_ENVS,\r
+\r
+\r
+\r
+ _CS_V7_WIDTH_RESTRICTED_ENVS,\r
+\r
+\r
+\r
+ _CS_LFS_CFLAGS = 1000,\r
+\r
+ _CS_LFS_LDFLAGS,\r
+\r
+ _CS_LFS_LIBS,\r
+\r
+ _CS_LFS_LINTFLAGS,\r
+\r
+ _CS_LFS64_CFLAGS,\r
+\r
+ _CS_LFS64_LDFLAGS,\r
+\r
+ _CS_LFS64_LIBS,\r
+\r
+ _CS_LFS64_LINTFLAGS,\r
+\r
+\r
+ _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,\r
+\r
+ _CS_XBS5_ILP32_OFF32_LDFLAGS,\r
+\r
+ _CS_XBS5_ILP32_OFF32_LIBS,\r
+\r
+ _CS_XBS5_ILP32_OFF32_LINTFLAGS,\r
+\r
+ _CS_XBS5_ILP32_OFFBIG_CFLAGS,\r
+\r
+ _CS_XBS5_ILP32_OFFBIG_LDFLAGS,\r
+\r
+ _CS_XBS5_ILP32_OFFBIG_LIBS,\r
+\r
+ _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,\r
+\r
+ _CS_XBS5_LP64_OFF64_CFLAGS,\r
+\r
+ _CS_XBS5_LP64_OFF64_LDFLAGS,\r
+\r
+ _CS_XBS5_LP64_OFF64_LIBS,\r
+\r
+ _CS_XBS5_LP64_OFF64_LINTFLAGS,\r
+\r
+ _CS_XBS5_LPBIG_OFFBIG_CFLAGS,\r
+\r
+ _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,\r
+\r
+ _CS_XBS5_LPBIG_OFFBIG_LIBS,\r
+\r
+ _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,\r
+\r
+\r
+ _CS_POSIX_V6_ILP32_OFF32_CFLAGS,\r
+\r
+ _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,\r
+\r
+ _CS_POSIX_V6_ILP32_OFF32_LIBS,\r
+\r
+ _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,\r
+\r
+ _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,\r
+\r
+ _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,\r
+\r
+ _CS_POSIX_V6_ILP32_OFFBIG_LIBS,\r
+\r
+ _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,\r
+\r
+ _CS_POSIX_V6_LP64_OFF64_CFLAGS,\r
+\r
+ _CS_POSIX_V6_LP64_OFF64_LDFLAGS,\r
+\r
+ _CS_POSIX_V6_LP64_OFF64_LIBS,\r
+\r
+ _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,\r
+\r
+ _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,\r
+\r
+ _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,\r
+\r
+ _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,\r
+\r
+ _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,\r
+\r
+\r
+ _CS_POSIX_V7_ILP32_OFF32_CFLAGS,\r
+\r
+ _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,\r
+\r
+ _CS_POSIX_V7_ILP32_OFF32_LIBS,\r
+\r
+ _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,\r
+\r
+ _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,\r
+\r
+ _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,\r
+\r
+ _CS_POSIX_V7_ILP32_OFFBIG_LIBS,\r
+\r
+ _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,\r
+\r
+ _CS_POSIX_V7_LP64_OFF64_CFLAGS,\r
+\r
+ _CS_POSIX_V7_LP64_OFF64_LDFLAGS,\r
+\r
+ _CS_POSIX_V7_LP64_OFF64_LIBS,\r
+\r
+ _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,\r
+\r
+ _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,\r
+\r
+ _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,\r
+\r
+ _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,\r
+\r
+ _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,\r
+\r
+\r
+ _CS_V6_ENV,\r
+\r
+ _CS_V7_ENV\r
+\r
+ };\r
+# 610 "/usr/include/unistd.h" 2 3 4\r
+\r
+\r
+extern long int pathconf (const char *__path, int __name)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern long int sysconf (int __name) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern __pid_t getpid (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern __pid_t getppid (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
+\r
+extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ ));\r
+# 660 "/usr/include/unistd.h" 3 4\r
+extern int setpgrp (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern __pid_t setsid (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern __uid_t getuid (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern __uid_t geteuid (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern __gid_t getgid (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern __gid_t getegid (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ )) ;\r
+# 700 "/usr/include/unistd.h" 3 4\r
+extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ )) ;\r
+# 756 "/usr/include/unistd.h" 3 4\r
+extern __pid_t fork (void) __attribute__ ((__nothrow__));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern __pid_t vfork (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern char *ttyname (int __fd) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int ttyname_r (int __fd, char *__buf, size_t __buflen)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
+\r
+\r
+\r
+extern int isatty (int __fd) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int ttyslot (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int link (const char *__from, const char *__to)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;\r
+\r
+\r
+\r
+\r
+extern int linkat (int __fromfd, const char *__from, int __tofd,\r
+ const char *__to, int __flags)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4))) ;\r
+\r
+\r
+\r
+\r
+extern int symlink (const char *__from, const char *__to)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;\r
+\r
+\r
+\r
+\r
+extern ssize_t readlink (const char *__restrict __path,\r
+ char *__restrict __buf, size_t __len)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) ;\r
+\r
+\r
+\r
+\r
+extern int symlinkat (const char *__from, int __tofd,\r
+ const char *__to) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3))) ;\r
+\r
+\r
+extern ssize_t readlinkat (int __fd, const char *__restrict __path,\r
+ char *__restrict __buf, size_t __len)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3))) ;\r
+\r
+\r
+\r
+extern int unlink (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int unlinkat (int __fd, const char *__name, int __flag)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+extern int rmdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern char *getlogin (void);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+extern int setlogin (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 871 "/usr/include/unistd.h" 3 4\r
+# 1 "/usr/include/getopt.h" 1 3 4\r
+# 57 "/usr/include/getopt.h" 3 4\r
+extern char *optarg;\r
+# 71 "/usr/include/getopt.h" 3 4\r
+extern int optind;\r
+\r
+\r
+\r
+\r
+extern int opterr;\r
+\r
+\r
+\r
+extern int optopt;\r
+# 150 "/usr/include/getopt.h" 3 4\r
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)\r
+ __attribute__ ((__nothrow__ ));\r
+# 872 "/usr/include/unistd.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int sethostname (const char *__name, size_t __len)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+extern int sethostid (long int __id) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+\r
+extern int getdomainname (char *__name, size_t __len)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+extern int setdomainname (const char *__name, size_t __len)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+\r
+\r
+extern int vhangup (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int revoke (const char *__file) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int profil (unsigned short int *__sample_buffer, size_t __size,\r
+ size_t __offset, unsigned int __scale)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern int acct (const char *__name) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern char *getusershell (void) __attribute__ ((__nothrow__ ));\r
+extern void endusershell (void) __attribute__ ((__nothrow__ ));\r
+extern void setusershell (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int chroot (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+\r
+\r
+\r
+extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int fsync (int __fd);\r
+# 969 "/usr/include/unistd.h" 3 4\r
+extern long int gethostid (void);\r
+\r
+\r
+extern void sync (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int getpagesize (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+\r
+\r
+\r
+\r
+extern int getdtablesize (void) __attribute__ ((__nothrow__ ));\r
+# 993 "/usr/include/unistd.h" 3 4\r
+extern int truncate (const char *__file, __off_t __length)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) ;\r
+# 1016 "/usr/include/unistd.h" 3 4\r
+extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ )) ;\r
+# 1037 "/usr/include/unistd.h" 3 4\r
+extern int brk (void *__addr) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+\r
+extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ ));\r
+# 1058 "/usr/include/unistd.h" 3 4\r
+extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ ));\r
+# 1081 "/usr/include/unistd.h" 3 4\r
+extern int lockf (int __fd, int __cmd, __off_t __len) ;\r
+# 1112 "/usr/include/unistd.h" 3 4\r
+extern int fdatasync (int __fildes);\r
+# 29 "./../test/abts.h" 2\r
+# 41 "./../test/abts.h"\r
+struct sub_suite {\r
+ const char *name;\r
+ int num_test;\r
+ int failed;\r
+ int not_run;\r
+ int not_impl;\r
+ struct sub_suite *next;\r
+};\r
+typedef struct sub_suite sub_suite;\r
+\r
+struct abts_suite {\r
+ sub_suite *head;\r
+ sub_suite *tail;\r
+};\r
+typedef struct abts_suite abts_suite;\r
+\r
+struct abts_case {\r
+ int failed;\r
+ sub_suite *suite;\r
+};\r
+typedef struct abts_case abts_case;\r
+\r
+typedef void (*test_func)(abts_case *tc, void *data);\r
+\r
+\r
+\r
+abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name);\r
+void abts_run_test(abts_suite *ts, test_func f, void *value);\r
+void abts_log_message(const char *fmt, ...);\r
+\r
+void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno);\r
+void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno);\r
+void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno);\r
+void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,\r
+ size_t n, int lineno);\r
+void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno);\r
+void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno);\r
+void abts_true(abts_case *tc, int condition, int lineno);\r
+void abts_fail(abts_case *tc, const char *message, int lineno);\r
+void abts_not_impl(abts_case *tc, const char *message, int lineno);\r
+void abts_assert(abts_case *tc, const char *message, int condition, int lineno);\r
+void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno);\r
+# 99 "./../test/abts.h"\r
+abts_suite *run_tests(abts_suite *suite);\r
+abts_suite *run_tests1(abts_suite *suite);\r
+# 8 "main1.c" 2\r
+# 1 "./../test/testutil.h" 1\r
+# 17 "./../test/testutil.h"\r
+# 1 "../include/apr_pools.h" 1\r
+# 43 "../include/apr_pools.h"\r
+# 1 "../include/apr.h" 1\r
+# 168 "../include/apr.h"\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4\r
+# 26 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/uio.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/uio.h" 1 3 4\r
+# 43 "/usr/include/x86_64-linux-gnu/bits/uio.h" 3 4\r
+struct iovec\r
+ {\r
+ void *iov_base;\r
+ size_t iov_len;\r
+ };\r
+# 29 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4\r
+# 39 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
+extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)\r
+ ;\r
+# 50 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
+extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)\r
+ ;\r
+# 65 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
+extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,\r
+ __off_t __offset) ;\r
+# 77 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4\r
+extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,\r
+ __off_t __offset) ;\r
+# 27 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
+\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 29 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
+# 38 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/socket.h" 1 3 4\r
+# 27 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
+# 38 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 3 4\r
+enum __socket_type\r
+{\r
+ SOCK_STREAM = 1,\r
+\r
+\r
+ SOCK_DGRAM = 2,\r
+\r
+\r
+ SOCK_RAW = 3,\r
+\r
+ SOCK_RDM = 4,\r
+\r
+ SOCK_SEQPACKET = 5,\r
+\r
+\r
+ SOCK_DCCP = 6,\r
+\r
+ SOCK_PACKET = 10,\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ SOCK_CLOEXEC = 02000000,\r
+\r
+\r
+ SOCK_NONBLOCK = 00004000\r
+\r
+\r
+};\r
+# 39 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
+# 146 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 3 4\r
+typedef unsigned short int sa_family_t;\r
+# 147 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
+\r
+\r
+struct sockaddr\r
+ {\r
+ sa_family_t sa_family;\r
+ char sa_data[14];\r
+ };\r
+# 162 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
+struct sockaddr_storage\r
+ {\r
+ sa_family_t ss_family;\r
+ unsigned long int __ss_align;\r
+ char __ss_padding[(128 - (2 * sizeof (unsigned long int)))];\r
+ };\r
+\r
+\r
+\r
+enum\r
+ {\r
+ MSG_OOB = 0x01,\r
+\r
+ MSG_PEEK = 0x02,\r
+\r
+ MSG_DONTROUTE = 0x04,\r
+\r
+\r
+\r
+\r
+\r
+\r
+ MSG_CTRUNC = 0x08,\r
+\r
+ MSG_PROXY = 0x10,\r
+\r
+ MSG_TRUNC = 0x20,\r
+\r
+ MSG_DONTWAIT = 0x40,\r
+\r
+ MSG_EOR = 0x80,\r
+\r
+ MSG_WAITALL = 0x100,\r
+\r
+ MSG_FIN = 0x200,\r
+\r
+ MSG_SYN = 0x400,\r
+\r
+ MSG_CONFIRM = 0x800,\r
+\r
+ MSG_RST = 0x1000,\r
+\r
+ MSG_ERRQUEUE = 0x2000,\r
+\r
+ MSG_NOSIGNAL = 0x4000,\r
+\r
+ MSG_MORE = 0x8000,\r
+\r
+ MSG_WAITFORONE = 0x10000,\r
+\r
+ MSG_FASTOPEN = 0x20000000,\r
+\r
+\r
+ MSG_CMSG_CLOEXEC = 0x40000000\r
+\r
+\r
+\r
+ };\r
+\r
+\r
+\r
+\r
+struct msghdr\r
+ {\r
+ void *msg_name;\r
+ socklen_t msg_namelen;\r
+\r
+ struct iovec *msg_iov;\r
+ size_t msg_iovlen;\r
+\r
+ void *msg_control;\r
+ size_t msg_controllen;\r
+\r
+\r
+\r
+\r
+ int msg_flags;\r
+ };\r
+\r
+\r
+struct cmsghdr\r
+ {\r
+ size_t cmsg_len;\r
+\r
+\r
+\r
+\r
+ int cmsg_level;\r
+ int cmsg_type;\r
+\r
+ __extension__ unsigned char __cmsg_data [];\r
+\r
+ };\r
+# 272 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
+extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,\r
+ struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ ));\r
+# 299 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
+enum\r
+ {\r
+ SCM_RIGHTS = 0x01\r
+\r
+\r
+\r
+\r
+\r
+ };\r
+# 345 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 1 3 4\r
+# 1 "/usr/include/asm-generic/socket.h" 1 3 4\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4\r
+# 1 "/usr/include/asm-generic/sockios.h" 1 3 4\r
+# 2 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 2 3 4\r
+# 5 "/usr/include/asm-generic/socket.h" 2 3 4\r
+# 2 "/usr/include/x86_64-linux-gnu/asm/socket.h" 2 3 4\r
+# 346 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4\r
+# 379 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4\r
+struct linger\r
+ {\r
+ int l_onoff;\r
+ int l_linger;\r
+ };\r
+# 39 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4\r
+\r
+\r
+\r
+\r
+struct osockaddr\r
+ {\r
+ unsigned short int sa_family;\r
+ unsigned char sa_data[14];\r
+ };\r
+\r
+\r
+\r
+\r
+enum\r
+{\r
+ SHUT_RD = 0,\r
+\r
+ SHUT_WR,\r
+\r
+ SHUT_RDWR\r
+\r
+};\r
+# 113 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int socketpair (int __domain, int __type, int __protocol,\r
+ int __fds[2]) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int bind (int __fd, const struct sockaddr * __addr, socklen_t __len)\r
+ __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int getsockname (int __fd, struct sockaddr *__restrict __addr,\r
+ socklen_t *__restrict __len) __attribute__ ((__nothrow__ ));\r
+# 137 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+extern int connect (int __fd, const struct sockaddr * __addr, socklen_t __len);\r
+\r
+\r
+\r
+extern int getpeername (int __fd, struct sockaddr *__restrict __addr,\r
+ socklen_t *__restrict __len) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern ssize_t sendto (int __fd, const void *__buf, size_t __n,\r
+ int __flags, const struct sockaddr * __addr,\r
+ socklen_t __addr_len);\r
+# 174 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,\r
+ int __flags, struct sockaddr *__restrict __addr,\r
+ socklen_t *__restrict __addr_len);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern ssize_t sendmsg (int __fd, const struct msghdr *__message,\r
+ int __flags);\r
+# 202 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);\r
+# 219 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+extern int getsockopt (int __fd, int __level, int __optname,\r
+ void *__restrict __optval,\r
+ socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int setsockopt (int __fd, int __level, int __optname,\r
+ const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ ));\r
+# 243 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+extern int accept (int __fd, struct sockaddr *__restrict __addr,\r
+ socklen_t *__restrict __addr_len);\r
+# 261 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4\r
+extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int sockatmark (int __fd) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ ));\r
+# 169 "../include/apr.h" 2\r
+# 178 "../include/apr.h"\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 1 3\r
+# 61 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 3\r
+# 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 1 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/stdint.h" 1 3 4\r
+# 26 "/usr/include/stdint.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4\r
+# 27 "/usr/include/stdint.h" 2 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 28 "/usr/include/stdint.h" 2 3 4\r
+# 48 "/usr/include/stdint.h" 3 4\r
+typedef unsigned char uint8_t;\r
+typedef unsigned short int uint16_t;\r
+\r
+typedef unsigned int uint32_t;\r
+\r
+\r
+\r
+typedef unsigned long int uint64_t;\r
+# 65 "/usr/include/stdint.h" 3 4\r
+typedef signed char int_least8_t;\r
+typedef short int int_least16_t;\r
+typedef int int_least32_t;\r
+\r
+typedef long int int_least64_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef unsigned char uint_least8_t;\r
+typedef unsigned short int uint_least16_t;\r
+typedef unsigned int uint_least32_t;\r
+\r
+typedef unsigned long int uint_least64_t;\r
+# 90 "/usr/include/stdint.h" 3 4\r
+typedef signed char int_fast8_t;\r
+\r
+typedef long int int_fast16_t;\r
+typedef long int int_fast32_t;\r
+typedef long int int_fast64_t;\r
+# 103 "/usr/include/stdint.h" 3 4\r
+typedef unsigned char uint_fast8_t;\r
+\r
+typedef unsigned long int uint_fast16_t;\r
+typedef unsigned long int uint_fast32_t;\r
+typedef unsigned long int uint_fast64_t;\r
+# 122 "/usr/include/stdint.h" 3 4\r
+typedef unsigned long int uintptr_t;\r
+# 134 "/usr/include/stdint.h" 3 4\r
+typedef long int intmax_t;\r
+typedef unsigned long int uintmax_t;\r
+# 10 "/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 2 3 4\r
+# 62 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 2 3\r
+# 179 "../include/apr.h" 2\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/wait.h" 1 3 4\r
+# 29 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
+# 1 "/usr/include/signal.h" 1 3 4\r
+# 32 "/usr/include/signal.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4\r
+# 102 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4\r
+extern int __sigismember (const __sigset_t *, int);\r
+extern int __sigaddset (__sigset_t *, int);\r
+extern int __sigdelset (__sigset_t *, int);\r
+# 33 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef __sig_atomic_t sig_atomic_t;\r
+# 57 "/usr/include/signal.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/signum.h" 1 3 4\r
+# 58 "/usr/include/signal.h" 2 3 4\r
+# 75 "/usr/include/signal.h" 3 4\r
+# 1 "/usr/include/time.h" 1 3 4\r
+# 76 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 25 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef union sigval\r
+ {\r
+ int sival_int;\r
+ void *sival_ptr;\r
+ } sigval_t;\r
+# 58 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
+typedef __clock_t __sigchld_clock_t;\r
+\r
+\r
+\r
+typedef struct\r
+ {\r
+ int si_signo;\r
+ int si_errno;\r
+\r
+ int si_code;\r
+\r
+ union\r
+ {\r
+ int _pad[((128 / sizeof (int)) - 4)];\r
+\r
+\r
+ struct\r
+ {\r
+ __pid_t si_pid;\r
+ __uid_t si_uid;\r
+ } _kill;\r
+\r
+\r
+ struct\r
+ {\r
+ int si_tid;\r
+ int si_overrun;\r
+ sigval_t si_sigval;\r
+ } _timer;\r
+\r
+\r
+ struct\r
+ {\r
+ __pid_t si_pid;\r
+ __uid_t si_uid;\r
+ sigval_t si_sigval;\r
+ } _rt;\r
+\r
+\r
+ struct\r
+ {\r
+ __pid_t si_pid;\r
+ __uid_t si_uid;\r
+ int si_status;\r
+ __sigchld_clock_t si_utime;\r
+ __sigchld_clock_t si_stime;\r
+ } _sigchld;\r
+\r
+\r
+ struct\r
+ {\r
+ void *si_addr;\r
+ short int si_addr_lsb;\r
+ } _sigfault;\r
+\r
+\r
+ struct\r
+ {\r
+ long int si_band;\r
+ int si_fd;\r
+ } _sigpoll;\r
+\r
+\r
+ struct\r
+ {\r
+ void *_call_addr;\r
+ int _syscall;\r
+ unsigned int _arch;\r
+ } _sigsys;\r
+ } _sifields;\r
+ } siginfo_t ;\r
+# 153 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
+enum\r
+{\r
+ SI_ASYNCNL = -60,\r
+\r
+ SI_TKILL = -6,\r
+\r
+ SI_SIGIO,\r
+\r
+ SI_ASYNCIO,\r
+\r
+ SI_MESGQ,\r
+\r
+ SI_TIMER,\r
+\r
+ SI_QUEUE,\r
+\r
+ SI_USER,\r
+\r
+ SI_KERNEL = 0x80\r
+\r
+};\r
+\r
+\r
+\r
+enum\r
+{\r
+ ILL_ILLOPC = 1,\r
+\r
+ ILL_ILLOPN,\r
+\r
+ ILL_ILLADR,\r
+\r
+ ILL_ILLTRP,\r
+\r
+ ILL_PRVOPC,\r
+\r
+ ILL_PRVREG,\r
+\r
+ ILL_COPROC,\r
+\r
+ ILL_BADSTK\r
+\r
+};\r
+\r
+\r
+enum\r
+{\r
+ FPE_INTDIV = 1,\r
+\r
+ FPE_INTOVF,\r
+\r
+ FPE_FLTDIV,\r
+\r
+ FPE_FLTOVF,\r
+\r
+ FPE_FLTUND,\r
+\r
+ FPE_FLTRES,\r
+\r
+ FPE_FLTINV,\r
+\r
+ FPE_FLTSUB\r
+\r
+};\r
+\r
+\r
+enum\r
+{\r
+ SEGV_MAPERR = 1,\r
+\r
+ SEGV_ACCERR\r
+\r
+};\r
+\r
+\r
+enum\r
+{\r
+ BUS_ADRALN = 1,\r
+\r
+ BUS_ADRERR,\r
+\r
+ BUS_OBJERR,\r
+\r
+ BUS_MCEERR_AR,\r
+\r
+ BUS_MCEERR_AO\r
+\r
+};\r
+\r
+\r
+enum\r
+{\r
+ TRAP_BRKPT = 1,\r
+\r
+ TRAP_TRACE\r
+\r
+};\r
+\r
+\r
+enum\r
+{\r
+ CLD_EXITED = 1,\r
+\r
+ CLD_KILLED,\r
+\r
+ CLD_DUMPED,\r
+\r
+ CLD_TRAPPED,\r
+\r
+ CLD_STOPPED,\r
+\r
+ CLD_CONTINUED\r
+\r
+};\r
+\r
+\r
+enum\r
+{\r
+ POLL_IN = 1,\r
+\r
+ POLL_OUT,\r
+\r
+ POLL_MSG,\r
+\r
+ POLL_ERR,\r
+\r
+ POLL_PRI,\r
+\r
+ POLL_HUP\r
+\r
+};\r
+# 307 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
+typedef struct sigevent\r
+ {\r
+ sigval_t sigev_value;\r
+ int sigev_signo;\r
+ int sigev_notify;\r
+\r
+ union\r
+ {\r
+ int _pad[((64 / sizeof (int)) - 4)];\r
+\r
+\r
+\r
+ __pid_t _tid;\r
+\r
+ struct\r
+ {\r
+ void (*_function) (sigval_t);\r
+ pthread_attr_t *_attribute;\r
+ } _sigev_thread;\r
+ } _sigev_un;\r
+ } sigevent_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+enum\r
+{\r
+ SIGEV_SIGNAL = 0,\r
+\r
+ SIGEV_NONE,\r
+\r
+ SIGEV_THREAD,\r
+\r
+\r
+ SIGEV_THREAD_ID = 4\r
+\r
+};\r
+# 81 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+\r
+\r
+typedef void (*__sighandler_t) (int);\r
+\r
+\r
+\r
+\r
+extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)\r
+ __attribute__ ((__nothrow__ ));\r
+# 102 "/usr/include/signal.h" 3 4\r
+extern __sighandler_t signal (int __sig, __sighandler_t __handler)\r
+ __attribute__ ((__nothrow__ ));\r
+# 127 "/usr/include/signal.h" 3 4\r
+extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int raise (int __sig) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)\r
+ __attribute__ ((__nothrow__ ));\r
+extern int gsignal (int __sig) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern void psignal (int __sig, const char *__s);\r
+\r
+\r
+\r
+\r
+extern void psiginfo (const siginfo_t *__pinfo, const char *__s);\r
+# 167 "/usr/include/signal.h" 3 4\r
+extern int __sigpause (int __sig_or_mask, int __is_sig);\r
+# 189 "/usr/include/signal.h" 3 4\r
+extern int sigblock (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
+\r
+\r
+extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
+\r
+\r
+extern int siggetmask (void) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
+# 209 "/usr/include/signal.h" 3 4\r
+typedef __sighandler_t sig_t;\r
+\r
+\r
+\r
+\r
+\r
+extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int sigismember (const sigset_t *__set, int __signo)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 245 "/usr/include/signal.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 3 4\r
+struct sigaction\r
+ {\r
+\r
+\r
+ union\r
+ {\r
+\r
+ __sighandler_t sa_handler;\r
+\r
+ void (*sa_sigaction) (int, siginfo_t *, void *);\r
+ }\r
+ __sigaction_handler;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ __sigset_t sa_mask;\r
+\r
+\r
+ int sa_flags;\r
+\r
+\r
+ void (*sa_restorer) (void);\r
+ };\r
+# 246 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+extern int sigprocmask (int __how, const sigset_t *__restrict __set,\r
+ sigset_t *__restrict __oset) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int sigaction (int __sig, const struct sigaction *__restrict __act,\r
+ struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)\r
+ __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int sigwaitinfo (const sigset_t *__restrict __set,\r
+ siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int sigtimedwait (const sigset_t *__restrict __set,\r
+ siginfo_t *__restrict __info,\r
+ const struct timespec *__restrict __timeout)\r
+ __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)\r
+ __attribute__ ((__nothrow__ ));\r
+# 303 "/usr/include/signal.h" 3 4\r
+extern const char *const _sys_siglist[65];\r
+extern const char *const sys_siglist[65];\r
+\r
+\r
+struct sigvec\r
+ {\r
+ __sighandler_t sv_handler;\r
+ int sv_mask;\r
+\r
+ int sv_flags;\r
+\r
+ };\r
+# 327 "/usr/include/signal.h" 3 4\r
+extern int sigvec (int __sig, const struct sigvec *__vec,\r
+ struct sigvec *__ovec) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 1 3 4\r
+# 29 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4\r
+struct _fpx_sw_bytes\r
+{\r
+ __uint32_t magic1;\r
+ __uint32_t extended_size;\r
+ __uint64_t xstate_bv;\r
+ __uint32_t xstate_size;\r
+ __uint32_t padding[7];\r
+};\r
+\r
+struct _fpreg\r
+{\r
+ unsigned short significand[4];\r
+ unsigned short exponent;\r
+};\r
+\r
+struct _fpxreg\r
+{\r
+ unsigned short significand[4];\r
+ unsigned short exponent;\r
+ unsigned short padding[3];\r
+};\r
+\r
+struct _xmmreg\r
+{\r
+ __uint32_t element[4];\r
+};\r
+# 121 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4\r
+struct _fpstate\r
+{\r
+\r
+ __uint16_t cwd;\r
+ __uint16_t swd;\r
+ __uint16_t ftw;\r
+ __uint16_t fop;\r
+ __uint64_t rip;\r
+ __uint64_t rdp;\r
+ __uint32_t mxcsr;\r
+ __uint32_t mxcr_mask;\r
+ struct _fpxreg _st[8];\r
+ struct _xmmreg _xmm[16];\r
+ __uint32_t padding[24];\r
+};\r
+\r
+struct sigcontext\r
+{\r
+ __uint64_t r8;\r
+ __uint64_t r9;\r
+ __uint64_t r10;\r
+ __uint64_t r11;\r
+ __uint64_t r12;\r
+ __uint64_t r13;\r
+ __uint64_t r14;\r
+ __uint64_t r15;\r
+ __uint64_t rdi;\r
+ __uint64_t rsi;\r
+ __uint64_t rbp;\r
+ __uint64_t rbx;\r
+ __uint64_t rdx;\r
+ __uint64_t rax;\r
+ __uint64_t rcx;\r
+ __uint64_t rsp;\r
+ __uint64_t rip;\r
+ __uint64_t eflags;\r
+ unsigned short cs;\r
+ unsigned short gs;\r
+ unsigned short fs;\r
+ unsigned short __pad0;\r
+ __uint64_t err;\r
+ __uint64_t trapno;\r
+ __uint64_t oldmask;\r
+ __uint64_t cr2;\r
+ __extension__ union\r
+ {\r
+ struct _fpstate * fpstate;\r
+ __uint64_t __fpstate_word;\r
+ };\r
+ __uint64_t __reserved1 [8];\r
+};\r
+\r
+\r
+\r
+struct _xsave_hdr\r
+{\r
+ __uint64_t xstate_bv;\r
+ __uint64_t reserved1[2];\r
+ __uint64_t reserved2[5];\r
+};\r
+\r
+struct _ymmh_state\r
+{\r
+ __uint32_t ymmh_space[64];\r
+};\r
+\r
+struct _xstate\r
+{\r
+ struct _fpstate fpstate;\r
+ struct _xsave_hdr xstate_hdr;\r
+ struct _ymmh_state ymmh;\r
+};\r
+# 333 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 343 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+\r
+\r
+extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 1 3 4\r
+# 25 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4\r
+struct sigstack\r
+ {\r
+ void *ss_sp;\r
+ int ss_onstack;\r
+ };\r
+\r
+\r
+\r
+enum\r
+{\r
+ SS_ONSTACK = 1,\r
+\r
+ SS_DISABLE\r
+\r
+};\r
+# 49 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4\r
+typedef struct sigaltstack\r
+ {\r
+ void *ss_sp;\r
+ int ss_flags;\r
+ size_t ss_size;\r
+ } stack_t;\r
+# 350 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 1 3 4\r
+# 22 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4\r
+# 1 "/usr/include/signal.h" 1 3 4\r
+# 23 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+__extension__ typedef long long int greg_t;\r
+\r
+\r
+\r
+\r
+\r
+typedef greg_t gregset_t[23];\r
+# 92 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4\r
+struct _libc_fpxreg\r
+{\r
+ unsigned short int significand[4];\r
+ unsigned short int exponent;\r
+ unsigned short int padding[3];\r
+};\r
+\r
+struct _libc_xmmreg\r
+{\r
+ __uint32_t element[4];\r
+};\r
+\r
+struct _libc_fpstate\r
+{\r
+\r
+ __uint16_t cwd;\r
+ __uint16_t swd;\r
+ __uint16_t ftw;\r
+ __uint16_t fop;\r
+ __uint64_t rip;\r
+ __uint64_t rdp;\r
+ __uint32_t mxcsr;\r
+ __uint32_t mxcr_mask;\r
+ struct _libc_fpxreg _st[8];\r
+ struct _libc_xmmreg _xmm[16];\r
+ __uint32_t padding[24];\r
+};\r
+\r
+\r
+typedef struct _libc_fpstate *fpregset_t;\r
+\r
+\r
+typedef struct\r
+ {\r
+ gregset_t gregs;\r
+\r
+ fpregset_t fpregs;\r
+ __extension__ unsigned long long __reserved1 [8];\r
+} mcontext_t;\r
+\r
+\r
+typedef struct ucontext\r
+ {\r
+ unsigned long int uc_flags;\r
+ struct ucontext *uc_link;\r
+ stack_t uc_stack;\r
+ mcontext_t uc_mcontext;\r
+ __sigset_t uc_sigmask;\r
+ struct _libc_fpstate __fpregs_mem;\r
+ } ucontext_t;\r
+# 353 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));\r
+\r
+\r
+\r
+extern int sigaltstack (const struct sigaltstack *__restrict __ss,\r
+ struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__ ));\r
+# 388 "/usr/include/signal.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 1 3 4\r
+# 30 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 3 4\r
+extern int pthread_sigmask (int __how,\r
+ const __sigset_t *__restrict __newmask,\r
+ __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ ));\r
+# 389 "/usr/include/signal.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ ));\r
+\r
+extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ ));\r
+# 30 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4\r
+# 102 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
+extern __pid_t wait (__WAIT_STATUS __stat_loc);\r
+# 125 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
+extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);\r
+# 135 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 25 "/usr/include/x86_64-linux-gnu/bits/siginfo.h" 2 3 4\r
+# 136 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4\r
+# 148 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4\r
+extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,\r
+ int __options);\r
+\r
+\r
+\r
+\r
+\r
+struct rusage;\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,\r
+ struct rusage * __usage) __attribute__ ((__nothrow__));\r
+\r
+\r
+\r
+\r
+extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,\r
+ struct rusage *__usage) __attribute__ ((__nothrow__));\r
+# 183 "../include/apr.h" 2\r
+# 193 "../include/apr.h"\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 1 3\r
+# 37 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 3\r
+# 1 "/usr/include/limits.h" 1 3 4\r
+# 143 "/usr/include/limits.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4\r
+# 160 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4\r
+# 38 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4\r
+# 1 "/usr/include/linux/limits.h" 1 3 4\r
+# 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4\r
+# 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4\r
+# 144 "/usr/include/limits.h" 2 3 4\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4\r
+# 148 "/usr/include/limits.h" 2 3 4\r
+# 38 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/limits.h" 2 3\r
+# 194 "../include/apr.h" 2\r
+# 309 "../include/apr.h"\r
+typedef unsigned char apr_byte_t;\r
+\r
+typedef short apr_int16_t;\r
+typedef unsigned short apr_uint16_t;\r
+\r
+typedef int apr_int32_t;\r
+typedef unsigned int apr_uint32_t;\r
+# 352 "../include/apr.h"\r
+ typedef long apr_int64_t;\r
+ typedef unsigned long apr_uint64_t;\r
+\r
+\r
+typedef size_t apr_size_t;\r
+typedef ssize_t apr_ssize_t;\r
+typedef off_t apr_off_t;\r
+typedef socklen_t apr_socklen_t;\r
+typedef ino_t apr_ino_t;\r
+\r
+\r
+typedef apr_uint64_t apr_uintptr_t;\r
+# 44 "../include/apr_pools.h" 2\r
+# 1 "../include/apr_errno.h" 1\r
+# 28 "../include/apr_errno.h"\r
+# 1 "/usr/include/errno.h" 1 3 4\r
+# 35 "/usr/include/errno.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4\r
+# 1 "/usr/include/linux/errno.h" 1 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4\r
+# 1 "/usr/include/asm-generic/errno.h" 1 3 4\r
+\r
+\r
+\r
+# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4\r
+# 5 "/usr/include/asm-generic/errno.h" 2 3 4\r
+# 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4\r
+# 2 "/usr/include/linux/errno.h" 2 3 4\r
+# 25 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4\r
+# 50 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4\r
+extern int *__errno_location (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+# 36 "/usr/include/errno.h" 2 3 4\r
+# 29 "../include/apr_errno.h" 2\r
+# 44 "../include/apr_errno.h"\r
+typedef int apr_status_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+char * apr_strerror(apr_status_t statcode, char *buf,\r
+ apr_size_t bufsize);\r
+# 45 "../include/apr_pools.h" 2\r
+# 1 "../include/apr_general.h" 1\r
+# 29 "../include/apr_general.h"\r
+# 1 "../include/apr_pools.h" 1\r
+# 30 "../include/apr_general.h" 2\r
+# 68 "../include/apr_general.h"\r
+typedef int apr_signum_t;\r
+# 177 "../include/apr_general.h"\r
+apr_status_t apr_initialize(void);\r
+# 191 "../include/apr_general.h"\r
+apr_status_t apr_app_initialize(int *argc,\r
+ char const * const * *argv,\r
+ char const * const * *env);\r
+# 205 "../include/apr_general.h"\r
+void apr_terminate(void);\r
+# 216 "../include/apr_general.h"\r
+void apr_terminate2(void);\r
+# 233 "../include/apr_general.h"\r
+apr_status_t apr_generate_random_bytes(unsigned char * buf,\r
+ apr_size_t length);\r
+# 46 "../include/apr_pools.h" 2\r
+\r
+# 1 "../include/apr_want.h" 1\r
+# 48 "../include/apr_pools.h" 2\r
+# 60 "../include/apr_pools.h"\r
+typedef struct apr_pool_t apr_pool_t;\r
+# 148 "../include/apr_pools.h"\r
+typedef int (*apr_abortfunc_t)(int retcode);\r
+# 164 "../include/apr_pools.h"\r
+apr_status_t apr_pool_initialize(void);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_pool_terminate(void);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "../include/apr_allocator.h" 1\r
+# 28 "../include/apr_allocator.h"\r
+# 1 "../include/apr_want.h" 1\r
+# 29 "../include/apr_allocator.h" 2\r
+# 41 "../include/apr_allocator.h"\r
+typedef struct apr_allocator_t apr_allocator_t;\r
+\r
+typedef struct apr_memnode_t apr_memnode_t;\r
+# 54 "../include/apr_allocator.h"\r
+struct apr_memnode_t {\r
+ apr_memnode_t *next;\r
+ apr_memnode_t **ref;\r
+ apr_uint32_t index;\r
+ apr_uint32_t free_index;\r
+ char *first_avail;\r
+ char *endp;\r
+};\r
+# 74 "../include/apr_allocator.h"\r
+apr_status_t apr_allocator_create(apr_allocator_t **allocator)\r
+ __attribute__((nonnull(1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_allocator_destroy(apr_allocator_t *allocator)\r
+ __attribute__((nonnull(1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_memnode_t * apr_allocator_alloc(apr_allocator_t *allocator,\r
+ apr_size_t size)\r
+ __attribute__((nonnull(1)));\r
+# 103 "../include/apr_allocator.h"\r
+void apr_allocator_free(apr_allocator_t *allocator,\r
+ apr_memnode_t *memnode)\r
+ __attribute__((nonnull(1,2)));\r
+\r
+\r
+# 1 "../include/apr_pools.h" 1\r
+# 108 "../include/apr_allocator.h" 2\r
+# 120 "../include/apr_allocator.h"\r
+void apr_allocator_owner_set(apr_allocator_t *allocator,\r
+ apr_pool_t *pool)\r
+ __attribute__((nonnull(1)));\r
+\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_allocator_owner_get(apr_allocator_t *allocator)\r
+ __attribute__((nonnull(1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_allocator_max_free_set(apr_allocator_t *allocator,\r
+ apr_size_t size)\r
+ __attribute__((nonnull(1)));\r
+\r
+\r
+# 1 "../include/apr_thread_mutex.h" 1\r
+# 41 "../include/apr_thread_mutex.h"\r
+typedef struct apr_thread_mutex_t apr_thread_mutex_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "../include/apr_pools.h" 1\r
+# 49 "../include/apr_thread_mutex.h" 2\r
+# 65 "../include/apr_thread_mutex.h"\r
+apr_status_t apr_thread_mutex_create(apr_thread_mutex_t **mutex,\r
+ unsigned int flags,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_thread_mutex_lock(apr_thread_mutex_t *mutex);\r
+# 82 "../include/apr_thread_mutex.h"\r
+apr_status_t apr_thread_mutex_trylock(apr_thread_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_thread_mutex_unlock(apr_thread_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_thread_mutex_destroy(apr_thread_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_thread_mutex_pool_get (const apr_thread_mutex_t *thethread_mutex);\r
+# 142 "../include/apr_allocator.h" 2\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_allocator_mutex_set(apr_allocator_t *allocator,\r
+ apr_thread_mutex_t *mutex)\r
+ __attribute__((nonnull(1)));\r
+\r
+\r
+\r
+\r
+\r
+apr_thread_mutex_t * apr_allocator_mutex_get(\r
+ apr_allocator_t *allocator)\r
+ __attribute__((nonnull(1)));\r
+# 180 "../include/apr_pools.h" 2\r
+# 196 "../include/apr_pools.h"\r
+apr_status_t apr_pool_create_ex(apr_pool_t **newpool,\r
+ apr_pool_t *parent,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator)\r
+ __attribute__((nonnull(1)));\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator);\r
+# 226 "../include/apr_pools.h"\r
+apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator)\r
+ __attribute__((nonnull(1)));\r
+# 247 "../include/apr_pools.h"\r
+apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool,\r
+ apr_pool_t *parent,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator,\r
+ const char *file_line)\r
+ __attribute__((nonnull(1)));\r
+# 264 "../include/apr_pools.h"\r
+apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator,\r
+ const char *file_line);\r
+# 284 "../include/apr_pools.h"\r
+apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator,\r
+ const char *file_line)\r
+ __attribute__((nonnull(1)));\r
+# 354 "../include/apr_pools.h"\r
+apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)\r
+ __attribute__((nonnull(1)));\r
+# 365 "../include/apr_pools.h"\r
+void apr_pool_clear(apr_pool_t *p) __attribute__((nonnull(1)));\r
+# 380 "../include/apr_pools.h"\r
+void apr_pool_clear_debug(apr_pool_t *p,\r
+ const char *file_line)\r
+ __attribute__((nonnull(1)));\r
+# 395 "../include/apr_pools.h"\r
+void apr_pool_destroy(apr_pool_t *p) __attribute__((nonnull(1)));\r
+# 410 "../include/apr_pools.h"\r
+void apr_pool_destroy_debug(apr_pool_t *p,\r
+ const char *file_line)\r
+ __attribute__((nonnull(1)));\r
+# 430 "../include/apr_pools.h"\r
+void * apr_palloc(apr_pool_t *p, apr_size_t size)\r
+\r
+\r
+\r
+ __attribute__((nonnull(1)));\r
+# 444 "../include/apr_pools.h"\r
+void * apr_palloc_debug(apr_pool_t *p, apr_size_t size,\r
+ const char *file_line)\r
+\r
+\r
+\r
+ __attribute__((nonnull(1)));\r
+# 476 "../include/apr_pools.h"\r
+void * apr_pcalloc_debug(apr_pool_t *p, apr_size_t size,\r
+ const char *file_line)\r
+ __attribute__((nonnull(1)));\r
+# 498 "../include/apr_pools.h"\r
+void apr_pool_abort_set(apr_abortfunc_t abortfunc,\r
+ apr_pool_t *pool)\r
+ __attribute__((nonnull(2)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)\r
+ __attribute__((nonnull(1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)\r
+ __attribute__((nonnull(1)));\r
+# 529 "../include/apr_pools.h"\r
+int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_pool_tag(apr_pool_t *pool, const char *tag)\r
+ __attribute__((nonnull(1)));\r
+# 563 "../include/apr_pools.h"\r
+apr_status_t apr_pool_userdata_set(const void *data,\r
+ const char *key,\r
+ apr_status_t (*cleanup)(void *),\r
+ apr_pool_t *pool)\r
+ __attribute__((nonnull(2,4)));\r
+# 588 "../include/apr_pools.h"\r
+apr_status_t apr_pool_userdata_setn(\r
+ const void *data, const char *key,\r
+ apr_status_t (*cleanup)(void *),\r
+ apr_pool_t *pool)\r
+ __attribute__((nonnull(2,4)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_pool_userdata_get(void **data, const char *key,\r
+ apr_pool_t *pool)\r
+ __attribute__((nonnull(1,2,3)));\r
+# 628 "../include/apr_pools.h"\r
+void apr_pool_cleanup_register(\r
+ apr_pool_t *p, const void *data,\r
+ apr_status_t (*plain_cleanup)(void *),\r
+ apr_status_t (*child_cleanup)(void *))\r
+ __attribute__((nonnull(3,4)));\r
+# 646 "../include/apr_pools.h"\r
+void apr_pool_pre_cleanup_register(\r
+ apr_pool_t *p, const void *data,\r
+ apr_status_t (*plain_cleanup)(void *))\r
+ __attribute__((nonnull(3)));\r
+# 663 "../include/apr_pools.h"\r
+void apr_pool_cleanup_kill(apr_pool_t *p, const void *data,\r
+ apr_status_t (*cleanup)(void *))\r
+ __attribute__((nonnull(3)));\r
+# 679 "../include/apr_pools.h"\r
+void apr_pool_child_cleanup_set(\r
+ apr_pool_t *p, const void *data,\r
+ apr_status_t (*plain_cleanup)(void *),\r
+ apr_status_t (*child_cleanup)(void *))\r
+ __attribute__((nonnull(3,4)));\r
+# 696 "../include/apr_pools.h"\r
+apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data,\r
+ apr_status_t (*cleanup)(void *))\r
+ __attribute__((nonnull(3)));\r
+# 707 "../include/apr_pools.h"\r
+apr_status_t apr_pool_cleanup_null(void *data);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_pool_cleanup_for_exec(void);\r
+# 18 "./../test/testutil.h" 2\r
+\r
+# 1 "./../test/abts.h" 1\r
+# 20 "./../test/testutil.h" 2\r
+# 52 "./../test/testutil.h"\r
+extern apr_pool_t *p;\r
+\r
+\r
+\r
+void apr_assert_success(abts_case* tc, const char *context,\r
+ apr_status_t rv, int lineno);\r
+\r
+\r
+\r
+void initialize(void);\r
+\r
+abts_suite *testatomic(abts_suite *suite);\r
+abts_suite *testdir(abts_suite *suite);\r
+abts_suite *testdso(abts_suite *suite);\r
+abts_suite *testdup(abts_suite *suite);\r
+abts_suite *testescape(abts_suite *suite);\r
+abts_suite *testenv(abts_suite *suite);\r
+abts_suite *testfile(abts_suite *suite);\r
+abts_suite *testfilecopy(abts_suite *suite);\r
+abts_suite *testfileinfo(abts_suite *suite);\r
+abts_suite *testflock(abts_suite *suite);\r
+abts_suite *testfmt(abts_suite *suite);\r
+abts_suite *testfnmatch(abts_suite *suite);\r
+abts_suite *testgetopt(abts_suite *suite);\r
+abts_suite *testglobalmutex(abts_suite *suite);\r
+abts_suite *testhash(abts_suite *suite);\r
+abts_suite *testipsub(abts_suite *suite);\r
+abts_suite *testlock(abts_suite *suite);\r
+abts_suite *testcond(abts_suite *suite);\r
+abts_suite *testlfs(abts_suite *suite);\r
+abts_suite *testmmap(abts_suite *suite);\r
+abts_suite *testnames(abts_suite *suite);\r
+abts_suite *testoc(abts_suite *suite);\r
+abts_suite *testpath(abts_suite *suite);\r
+abts_suite *testpipe(abts_suite *suite);\r
+abts_suite *testpoll(abts_suite *suite);\r
+abts_suite *testpool(abts_suite *suite);\r
+abts_suite *testproc(abts_suite *suite);\r
+abts_suite *testprocmutex(abts_suite *suite);\r
+abts_suite *testrand(abts_suite *suite);\r
+abts_suite *testsleep(abts_suite *suite);\r
+abts_suite *testshm(abts_suite *suite);\r
+abts_suite *testsock(abts_suite *suite);\r
+abts_suite *testsockets(abts_suite *suite);\r
+abts_suite *testsockopt(abts_suite *suite);\r
+abts_suite *teststr(abts_suite *suite);\r
+abts_suite *teststrnatcmp(abts_suite *suite);\r
+abts_suite *testtable(abts_suite *suite);\r
+abts_suite *testtemp(abts_suite *suite);\r
+abts_suite *testthread(abts_suite *suite);\r
+abts_suite *testtime(abts_suite *suite);\r
+abts_suite *testud(abts_suite *suite);\r
+abts_suite *testuser(abts_suite *suite);\r
+abts_suite *testvsn(abts_suite *suite);\r
+# 9 "main1.c" 2\r
+\r
+# 1 "./../test/testatomic.c" 1\r
+# 17 "./../test/testatomic.c"\r
+# 1 "./../test/testutil.h" 1\r
+# 19 "./../test/testutil.h"\r
+# 1 "./../test/abts.h" 1\r
+# 20 "./../test/testutil.h" 2\r
+# 18 "./../test/testatomic.c" 2\r
+# 1 "../include/apr_strings.h" 1\r
+# 52 "../include/apr_strings.h"\r
+# 1 "../include/apr_want.h" 1\r
+# 53 "../include/apr_strings.h" 2\r
+# 76 "../include/apr_strings.h"\r
+int apr_strnatcmp(char const *a, char const *b);\r
+# 87 "../include/apr_strings.h"\r
+int apr_strnatcasecmp(char const *a, char const *b);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+char * apr_pstrdup(apr_pool_t *p, const char *s);\r
+# 109 "../include/apr_strings.h"\r
+char * apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n)\r
+\r
+\r
+\r
+ ;\r
+# 125 "../include/apr_strings.h"\r
+char * apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n);\r
+# 135 "../include/apr_strings.h"\r
+void * apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n)\r
+\r
+\r
+\r
+ ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+char * apr_pstrcat(apr_pool_t *p, ...)\r
+\r
+ __attribute__((sentinel))\r
+\r
+ ;\r
+# 161 "../include/apr_strings.h"\r
+char * apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,\r
+ apr_size_t nvec, apr_size_t *nbytes);\r
+# 172 "../include/apr_strings.h"\r
+char * apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap);\r
+# 182 "../include/apr_strings.h"\r
+char * apr_psprintf(apr_pool_t *p, const char *fmt, ...)\r
+ __attribute__((format(printf,2,3)));\r
+# 207 "../include/apr_strings.h"\r
+char * apr_cpystrn(char *dst, const char *src,\r
+ apr_size_t dst_size);\r
+# 217 "../include/apr_strings.h"\r
+char * apr_collapse_spaces(char *dest, const char *src);\r
+# 226 "../include/apr_strings.h"\r
+apr_status_t apr_tokenize_to_argv(const char *arg_str,\r
+ char ***argv_out,\r
+ apr_pool_t *token_context);\r
+# 247 "../include/apr_strings.h"\r
+char * apr_strtok(char *str, const char *sep, char **last);\r
+# 279 "../include/apr_strings.h"\r
+int apr_snprintf(char *buf, apr_size_t len,\r
+ const char *format, ...)\r
+ __attribute__((format(printf,3,4)));\r
+# 291 "../include/apr_strings.h"\r
+int apr_vsnprintf(char *buf, apr_size_t len, const char *format,\r
+ va_list ap);\r
+# 301 "../include/apr_strings.h"\r
+char * apr_itoa(apr_pool_t *p, int n);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+char * apr_ltoa(apr_pool_t *p, long n);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+char * apr_off_t_toa(apr_pool_t *p, apr_off_t n);\r
+# 335 "../include/apr_strings.h"\r
+apr_status_t apr_strtoff(apr_off_t *offset, const char *buf,\r
+ char **end, int base);\r
+# 353 "../include/apr_strings.h"\r
+apr_int64_t apr_strtoi64(const char *buf, char **end, int base);\r
+# 362 "../include/apr_strings.h"\r
+apr_int64_t apr_atoi64(const char *buf);\r
+# 372 "../include/apr_strings.h"\r
+char * apr_strfsize(apr_off_t size, char *buf);\r
+# 19 "./../test/testatomic.c" 2\r
+# 1 "../include/apr_thread_proc.h" 1\r
+# 26 "../include/apr_thread_proc.h"\r
+# 1 "../include/apr_file_io.h" 1\r
+# 27 "../include/apr_file_io.h"\r
+# 1 "../include/apr_time.h" 1\r
+# 40 "../include/apr_time.h"\r
+ extern const char apr_month_snames[12][4];\r
+\r
+ extern const char apr_day_snames[7][4];\r
+\r
+\r
+\r
+typedef apr_int64_t apr_time_t;\r
+# 56 "../include/apr_time.h"\r
+typedef apr_int64_t apr_interval_time_t;\r
+\r
+typedef apr_int32_t apr_short_interval_time_t;\r
+# 88 "../include/apr_time.h"\r
+apr_time_t apr_time_now(void);\r
+\r
+\r
+typedef struct apr_time_exp_t apr_time_exp_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+struct apr_time_exp_t {\r
+\r
+ apr_int32_t tm_usec;\r
+\r
+ apr_int32_t tm_sec;\r
+\r
+ apr_int32_t tm_min;\r
+\r
+ apr_int32_t tm_hour;\r
+\r
+ apr_int32_t tm_mday;\r
+\r
+ apr_int32_t tm_mon;\r
+\r
+ apr_int32_t tm_year;\r
+\r
+ apr_int32_t tm_wday;\r
+\r
+ apr_int32_t tm_yday;\r
+\r
+ apr_int32_t tm_isdst;\r
+\r
+ apr_int32_t tm_gmtoff;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_time_ansi_put(apr_time_t *result,\r
+ time_t input);\r
+# 138 "../include/apr_time.h"\r
+apr_status_t apr_time_exp_tz(apr_time_exp_t *result,\r
+ apr_time_t input,\r
+ apr_int32_t offs);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_time_exp_gmt(apr_time_exp_t *result,\r
+ apr_time_t input);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_time_exp_lt(apr_time_exp_t *result,\r
+ apr_time_t input);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_time_exp_get(apr_time_t *result,\r
+ apr_time_exp_t *input);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_time_exp_gmt_get(apr_time_t *result,\r
+ apr_time_exp_t *input);\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_sleep(apr_interval_time_t t);\r
+# 193 "../include/apr_time.h"\r
+apr_status_t apr_rfc822_date(char *date_str, apr_time_t t);\r
+# 207 "../include/apr_time.h"\r
+apr_status_t apr_ctime(char *date_str, apr_time_t t);\r
+# 217 "../include/apr_time.h"\r
+apr_status_t apr_strftime(char *s, apr_size_t *retsize,\r
+ apr_size_t max, const char *format,\r
+ apr_time_exp_t *tm);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_time_clock_hires(apr_pool_t *p);\r
+# 28 "../include/apr_file_io.h" 2\r
+\r
+# 1 "../include/apr_file_info.h" 1\r
+# 26 "../include/apr_file_info.h"\r
+# 1 "../include/apr_user.h" 1\r
+# 45 "../include/apr_user.h"\r
+typedef uid_t apr_uid_t;\r
+# 54 "../include/apr_user.h"\r
+typedef gid_t apr_gid_t;\r
+# 66 "../include/apr_user.h"\r
+apr_status_t apr_uid_current(apr_uid_t *userid,\r
+ apr_gid_t *groupid,\r
+ apr_pool_t *p);\r
+# 77 "../include/apr_user.h"\r
+apr_status_t apr_uid_name_get(char **username, apr_uid_t userid,\r
+ apr_pool_t *p);\r
+# 88 "../include/apr_user.h"\r
+apr_status_t apr_uid_get(apr_uid_t *userid, apr_gid_t *groupid,\r
+ const char *username, apr_pool_t *p);\r
+# 98 "../include/apr_user.h"\r
+apr_status_t apr_uid_homepath_get(char **dirname,\r
+ const char *username,\r
+ apr_pool_t *p);\r
+# 123 "../include/apr_user.h"\r
+apr_status_t apr_gid_name_get(char **groupname,\r
+ apr_gid_t groupid, apr_pool_t *p);\r
+# 133 "../include/apr_user.h"\r
+apr_status_t apr_gid_get(apr_gid_t *groupid,\r
+ const char *groupname, apr_pool_t *p);\r
+# 27 "../include/apr_file_info.h" 2\r
+\r
+# 1 "../include/apr_tables.h" 1\r
+# 56 "../include/apr_tables.h"\r
+typedef struct apr_table_t apr_table_t;\r
+\r
+\r
+typedef struct apr_array_header_t apr_array_header_t;\r
+\r
+\r
+struct apr_array_header_t {\r
+\r
+ apr_pool_t *pool;\r
+\r
+ int elt_size;\r
+\r
+ int nelts;\r
+\r
+ int nalloc;\r
+\r
+ char *elts;\r
+};\r
+\r
+\r
+\r
+\r
+typedef struct apr_table_entry_t apr_table_entry_t;\r
+\r
+\r
+struct apr_table_entry_t {\r
+\r
+ char *key;\r
+\r
+\r
+\r
+ char *val;\r
+\r
+\r
+ apr_uint32_t key_checksum;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+const apr_array_header_t * apr_table_elts(const apr_table_t *t);\r
+\r
+\r
+\r
+\r
+\r
+\r
+int apr_is_empty_table(const apr_table_t *t);\r
+\r
+\r
+\r
+\r
+\r
+\r
+int apr_is_empty_array(const apr_array_header_t *a);\r
+# 121 "../include/apr_tables.h"\r
+apr_array_header_t * apr_array_make(apr_pool_t *p,\r
+ int nelts, int elt_size);\r
+# 131 "../include/apr_tables.h"\r
+void * apr_array_push(apr_array_header_t *arr);\r
+# 158 "../include/apr_tables.h"\r
+void * apr_array_pop(apr_array_header_t *arr);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_array_clear(apr_array_header_t *arr);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_array_cat(apr_array_header_t *dst,\r
+ const apr_array_header_t *src);\r
+# 186 "../include/apr_tables.h"\r
+apr_array_header_t * apr_array_copy(apr_pool_t *p,\r
+ const apr_array_header_t *arr);\r
+# 196 "../include/apr_tables.h"\r
+apr_array_header_t * apr_array_copy_hdr(apr_pool_t *p,\r
+ const apr_array_header_t *arr);\r
+# 206 "../include/apr_tables.h"\r
+apr_array_header_t * apr_array_append(apr_pool_t *p,\r
+ const apr_array_header_t *first,\r
+ const apr_array_header_t *second);\r
+# 221 "../include/apr_tables.h"\r
+char * apr_array_pstrcat(apr_pool_t *p,\r
+ const apr_array_header_t *arr,\r
+ const char sep);\r
+# 232 "../include/apr_tables.h"\r
+apr_table_t * apr_table_make(apr_pool_t *p, int nelts);\r
+# 241 "../include/apr_tables.h"\r
+apr_table_t * apr_table_copy(apr_pool_t *p,\r
+ const apr_table_t *t);\r
+# 252 "../include/apr_tables.h"\r
+apr_table_t * apr_table_clone(apr_pool_t *p,\r
+ const apr_table_t *t);\r
+\r
+\r
+\r
+\r
+\r
+void apr_table_clear(apr_table_t *t);\r
+# 268 "../include/apr_tables.h"\r
+const char * apr_table_get(const apr_table_t *t, const char *key);\r
+# 279 "../include/apr_tables.h"\r
+const char * apr_table_getm(apr_pool_t *p, const apr_table_t *t,\r
+ const char *key);\r
+# 291 "../include/apr_tables.h"\r
+void apr_table_set(apr_table_t *t, const char *key,\r
+ const char *val);\r
+# 304 "../include/apr_tables.h"\r
+void apr_table_setn(apr_table_t *t, const char *key,\r
+ const char *val);\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_table_unset(apr_table_t *t, const char *key);\r
+# 323 "../include/apr_tables.h"\r
+void apr_table_merge(apr_table_t *t, const char *key,\r
+ const char *val);\r
+# 335 "../include/apr_tables.h"\r
+void apr_table_mergen(apr_table_t *t, const char *key,\r
+ const char *val);\r
+# 347 "../include/apr_tables.h"\r
+void apr_table_add(apr_table_t *t, const char *key,\r
+ const char *val);\r
+# 360 "../include/apr_tables.h"\r
+void apr_table_addn(apr_table_t *t, const char *key,\r
+ const char *val);\r
+# 370 "../include/apr_tables.h"\r
+apr_table_t * apr_table_overlay(apr_pool_t *p,\r
+ const apr_table_t *overlay,\r
+ const apr_table_t *base);\r
+# 384 "../include/apr_tables.h"\r
+typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,\r
+ const char *value);\r
+# 406 "../include/apr_tables.h"\r
+int apr_table_do(apr_table_do_callback_fn_t *comp,\r
+ void *rec, const apr_table_t *t, ...)\r
+\r
+ __attribute__((sentinel))\r
+\r
+ ;\r
+# 432 "../include/apr_tables.h"\r
+int apr_table_vdo(apr_table_do_callback_fn_t *comp,\r
+ void *rec, const apr_table_t *t, va_list vp);\r
+# 478 "../include/apr_tables.h"\r
+void apr_table_overlap(apr_table_t *a, const apr_table_t *b,\r
+ unsigned flags);\r
+# 491 "../include/apr_tables.h"\r
+void apr_table_compress(apr_table_t *t, unsigned flags);\r
+# 29 "../include/apr_file_info.h" 2\r
+# 62 "../include/apr_file_info.h"\r
+typedef enum {\r
+ APR_NOFILE = 0,\r
+ APR_REG,\r
+ APR_DIR,\r
+ APR_CHR,\r
+ APR_BLK,\r
+ APR_PIPE,\r
+ APR_LNK,\r
+ APR_SOCK,\r
+ APR_UNKFILE = 127\r
+} apr_filetype_e;\r
+# 121 "../include/apr_file_info.h"\r
+typedef struct apr_dir_t apr_dir_t;\r
+\r
+\r
+\r
+typedef apr_int32_t apr_fileperms_t;\r
+# 135 "../include/apr_file_info.h"\r
+typedef dev_t apr_dev_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef struct apr_finfo_t apr_finfo_t;\r
+# 174 "../include/apr_file_info.h"\r
+struct apr_finfo_t {\r
+\r
+ apr_pool_t *pool;\r
+\r
+\r
+ apr_int32_t valid;\r
+\r
+ apr_fileperms_t protection;\r
+\r
+\r
+\r
+\r
+ apr_filetype_e filetype;\r
+\r
+ apr_uid_t user;\r
+\r
+ apr_gid_t group;\r
+\r
+ apr_ino_t inode;\r
+\r
+ apr_dev_t device;\r
+\r
+ apr_int32_t nlink;\r
+\r
+ apr_off_t size;\r
+\r
+ apr_off_t csize;\r
+\r
+ apr_time_t atime;\r
+\r
+ apr_time_t mtime;\r
+\r
+ apr_time_t ctime;\r
+\r
+ const char *fname;\r
+\r
+ const char *name;\r
+\r
+ struct apr_file_t *filehand;\r
+};\r
+# 229 "../include/apr_file_info.h"\r
+apr_status_t apr_stat(apr_finfo_t *finfo, const char *fname,\r
+ apr_int32_t wanted, apr_pool_t *pool);\r
+# 244 "../include/apr_file_info.h"\r
+apr_status_t apr_dir_open(apr_dir_t **new_dir,\r
+ const char *dirname,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_dir_close(apr_dir_t *thedir);\r
+# 267 "../include/apr_file_info.h"\r
+apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,\r
+ apr_dir_t *thedir);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_dir_rewind(apr_dir_t *thedir);\r
+# 336 "../include/apr_file_info.h"\r
+apr_status_t apr_filepath_root(const char **rootpath,\r
+ const char **filepath,\r
+ apr_int32_t flags,\r
+ apr_pool_t *p);\r
+# 354 "../include/apr_file_info.h"\r
+apr_status_t apr_filepath_merge(char **newpath,\r
+ const char *rootpath,\r
+ const char *addpath,\r
+ apr_int32_t flags,\r
+ apr_pool_t *p);\r
+# 369 "../include/apr_file_info.h"\r
+apr_status_t apr_filepath_list_split(apr_array_header_t **pathelts,\r
+ const char *liststr,\r
+ apr_pool_t *p);\r
+# 382 "../include/apr_file_info.h"\r
+apr_status_t apr_filepath_list_merge(char **liststr,\r
+ apr_array_header_t *pathelts,\r
+ apr_pool_t *p);\r
+# 393 "../include/apr_file_info.h"\r
+apr_status_t apr_filepath_get(char **path, apr_int32_t flags,\r
+ apr_pool_t *p);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_filepath_set(const char *path, apr_pool_t *p);\r
+# 419 "../include/apr_file_info.h"\r
+apr_status_t apr_filepath_encoding(int *style, apr_pool_t *p);\r
+# 30 "../include/apr_file_io.h" 2\r
+# 1 "../include/apr_inherit.h" 1\r
+# 31 "../include/apr_file_io.h" 2\r
+\r
+\r
+\r
+# 1 "../include/apr_want.h" 1\r
+# 35 "../include/apr_file_io.h" 2\r
+# 180 "../include/apr_file_io.h"\r
+typedef apr_uint32_t apr_fileattrs_t;\r
+\r
+\r
+typedef int apr_seek_where_t;\r
+\r
+\r
+\r
+\r
+typedef struct apr_file_t apr_file_t;\r
+# 250 "../include/apr_file_io.h"\r
+apr_status_t apr_file_open(apr_file_t **newf, const char *fname,\r
+ apr_int32_t flag, apr_fileperms_t perm,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_close(apr_file_t *file);\r
+# 267 "../include/apr_file_io.h"\r
+apr_status_t apr_file_remove(const char *path, apr_pool_t *pool);\r
+# 278 "../include/apr_file_io.h"\r
+apr_status_t apr_file_rename(const char *from_path,\r
+ const char *to_path,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_link(const char *from_path,\r
+ const char *to_path);\r
+# 303 "../include/apr_file_io.h"\r
+apr_status_t apr_file_copy(const char *from_path,\r
+ const char *to_path,\r
+ apr_fileperms_t perms,\r
+ apr_pool_t *pool);\r
+# 319 "../include/apr_file_io.h"\r
+apr_status_t apr_file_append(const char *from_path,\r
+ const char *to_path,\r
+ apr_fileperms_t perms,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_eof(apr_file_t *fptr);\r
+# 346 "../include/apr_file_io.h"\r
+apr_status_t apr_file_open_stderr(apr_file_t **thefile,\r
+ apr_pool_t *pool);\r
+# 356 "../include/apr_file_io.h"\r
+apr_status_t apr_file_open_stdout(apr_file_t **thefile,\r
+ apr_pool_t *pool);\r
+# 366 "../include/apr_file_io.h"\r
+apr_status_t apr_file_open_stdin(apr_file_t **thefile,\r
+ apr_pool_t *pool);\r
+# 386 "../include/apr_file_io.h"\r
+apr_status_t apr_file_open_flags_stderr(apr_file_t **thefile,\r
+ apr_int32_t flags,\r
+ apr_pool_t *pool);\r
+# 407 "../include/apr_file_io.h"\r
+apr_status_t apr_file_open_flags_stdout(apr_file_t **thefile,\r
+ apr_int32_t flags,\r
+ apr_pool_t *pool);\r
+# 428 "../include/apr_file_io.h"\r
+apr_status_t apr_file_open_flags_stdin(apr_file_t **thefile,\r
+ apr_int32_t flags,\r
+ apr_pool_t *pool);\r
+# 449 "../include/apr_file_io.h"\r
+apr_status_t apr_file_read(apr_file_t *thefile, void *buf,\r
+ apr_size_t *nbytes);\r
+# 467 "../include/apr_file_io.h"\r
+apr_status_t apr_file_write(apr_file_t *thefile, const void *buf,\r
+ apr_size_t *nbytes);\r
+# 485 "../include/apr_file_io.h"\r
+apr_status_t apr_file_writev(apr_file_t *thefile,\r
+ const struct iovec *vec,\r
+ apr_size_t nvec, apr_size_t *nbytes);\r
+# 509 "../include/apr_file_io.h"\r
+apr_status_t apr_file_read_full(apr_file_t *thefile, void *buf,\r
+ apr_size_t nbytes,\r
+ apr_size_t *bytes_read);\r
+# 533 "../include/apr_file_io.h"\r
+apr_status_t apr_file_write_full(apr_file_t *thefile,\r
+ const void *buf,\r
+ apr_size_t nbytes,\r
+ apr_size_t *bytes_written);\r
+# 552 "../include/apr_file_io.h"\r
+apr_status_t apr_file_writev_full(apr_file_t *thefile,\r
+ const struct iovec *vec,\r
+ apr_size_t nvec,\r
+ apr_size_t *nbytes);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_putc(char ch, apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_getc(char *ch, apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_ungetc(char ch, apr_file_t *thefile);\r
+# 585 "../include/apr_file_io.h"\r
+apr_status_t apr_file_gets(char *str, int len,\r
+ apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_puts(const char *str, apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_flush(apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_sync(apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_datasync(apr_file_t *thefile);\r
+# 620 "../include/apr_file_io.h"\r
+apr_status_t apr_file_dup(apr_file_t **new_file,\r
+ apr_file_t *old_file,\r
+ apr_pool_t *p);\r
+# 632 "../include/apr_file_io.h"\r
+apr_status_t apr_file_dup2(apr_file_t *new_file,\r
+ apr_file_t *old_file,\r
+ apr_pool_t *p);\r
+# 647 "../include/apr_file_io.h"\r
+apr_status_t apr_file_setaside(apr_file_t **new_file,\r
+ apr_file_t *old_file,\r
+ apr_pool_t *p);\r
+# 662 "../include/apr_file_io.h"\r
+apr_status_t apr_file_buffer_set(apr_file_t *thefile,\r
+ char * buffer,\r
+ apr_size_t bufsize);\r
+\r
+\r
+\r
+\r
+\r
+apr_size_t apr_file_buffer_size_get(apr_file_t *thefile);\r
+# 683 "../include/apr_file_io.h"\r
+apr_status_t apr_file_seek(apr_file_t *thefile,\r
+ apr_seek_where_t where,\r
+ apr_off_t *offset);\r
+# 700 "../include/apr_file_io.h"\r
+apr_status_t apr_file_pipe_create(apr_file_t **in,\r
+ apr_file_t **out,\r
+ apr_pool_t *pool);\r
+# 723 "../include/apr_file_io.h"\r
+apr_status_t apr_file_pipe_create_ex(apr_file_t **in,\r
+ apr_file_t **out,\r
+ apr_int32_t blocking,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_namedpipe_create(const char *filename,\r
+ apr_fileperms_t perm,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_pipe_timeout_get(apr_file_t *thepipe,\r
+ apr_interval_time_t *timeout);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_pipe_timeout_set(apr_file_t *thepipe,\r
+ apr_interval_time_t timeout);\r
+# 766 "../include/apr_file_io.h"\r
+apr_status_t apr_file_lock(apr_file_t *thefile, int type);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_unlock(apr_file_t *thefile);\r
+# 781 "../include/apr_file_io.h"\r
+apr_status_t apr_file_name_get(const char **new_path,\r
+ apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_data_get(void **data, const char *key,\r
+ apr_file_t *file);\r
+# 800 "../include/apr_file_io.h"\r
+apr_status_t apr_file_data_set(apr_file_t *file, void *data,\r
+ const char *key,\r
+ apr_status_t (*cleanup)(void *));\r
+# 811 "../include/apr_file_io.h"\r
+int apr_file_printf(apr_file_t *fptr,\r
+ const char *format, ...)\r
+ __attribute__((format(printf,2,3)));\r
+# 827 "../include/apr_file_io.h"\r
+apr_status_t apr_file_perms_set(const char *fname,\r
+ apr_fileperms_t perms);\r
+# 846 "../include/apr_file_io.h"\r
+apr_status_t apr_file_attrs_set(const char *fname,\r
+ apr_fileattrs_t attributes,\r
+ apr_fileattrs_t attr_mask,\r
+ apr_pool_t *pool);\r
+# 859 "../include/apr_file_io.h"\r
+apr_status_t apr_file_mtime_set(const char *fname,\r
+ apr_time_t mtime,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,\r
+ apr_pool_t *pool);\r
+# 879 "../include/apr_file_io.h"\r
+apr_status_t apr_dir_make_recursive(const char *path,\r
+ apr_fileperms_t perm,\r
+ apr_pool_t *pool);\r
+# 890 "../include/apr_file_io.h"\r
+apr_status_t apr_dir_remove(const char *path, apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_info_get(apr_finfo_t *finfo,\r
+ apr_int32_t wanted,\r
+ apr_file_t *thefile);\r
+# 909 "../include/apr_file_io.h"\r
+apr_status_t apr_file_trunc(apr_file_t *fp, apr_off_t offset);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_int32_t apr_file_flags_get(apr_file_t *f);\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_file_pool_get (const apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_inherit_set( apr_file_t *thefile);\r
+\r
+\r
+\r
+\r
+apr_status_t apr_file_inherit_unset( apr_file_t *thefile);\r
+# 951 "../include/apr_file_io.h"\r
+apr_status_t apr_file_mktemp(apr_file_t **fp, char *templ,\r
+ apr_int32_t flags, apr_pool_t *p);\r
+# 964 "../include/apr_file_io.h"\r
+apr_status_t apr_temp_dir_get(const char **temp_dir,\r
+ apr_pool_t *p);\r
+# 27 "../include/apr_thread_proc.h" 2\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4\r
+# 25 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
+# 1 "/usr/include/time.h" 1 3 4\r
+# 26 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4\r
+# 55 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
+struct timezone\r
+ {\r
+ int tz_minuteswest;\r
+ int tz_dsttime;\r
+ };\r
+\r
+typedef struct timezone *__restrict __timezone_ptr_t;\r
+# 71 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4\r
+extern int gettimeofday (struct timeval *__restrict __tv,\r
+ __timezone_ptr_t __tz) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+extern int settimeofday (const struct timeval *__tv,\r
+ const struct timezone *__tz)\r
+ __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int adjtime (const struct timeval *__delta,\r
+ struct timeval *__olddelta) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+enum __itimer_which\r
+ {\r
+\r
+ ITIMER_REAL = 0,\r
+\r
+\r
+ ITIMER_VIRTUAL = 1,\r
+\r
+\r
+\r
+ ITIMER_PROF = 2\r
+\r
+ };\r
+\r
+\r
+\r
+struct itimerval\r
+ {\r
+\r
+ struct timeval it_interval;\r
+\r
+ struct timeval it_value;\r
+ };\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef int __itimer_which_t;\r
+\r
+\r
+\r
+\r
+extern int getitimer (__itimer_which_t __which,\r
+ struct itimerval *__value) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int setitimer (__itimer_which_t __which,\r
+ const struct itimerval *__restrict __new,\r
+ struct itimerval *__restrict __old) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int utimes (const char *__file, const struct timeval __tvp[2])\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int lutimes (const char *__file, const struct timeval __tvp[2])\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ ));\r
+# 32 "../include/apr_thread_proc.h" 2\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/resource.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/resource.h" 1 3 4\r
+# 31 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
+enum __rlimit_resource\r
+{\r
+\r
+ RLIMIT_CPU = 0,\r
+\r
+\r
+\r
+ RLIMIT_FSIZE = 1,\r
+\r
+\r
+\r
+ RLIMIT_DATA = 2,\r
+\r
+\r
+\r
+ RLIMIT_STACK = 3,\r
+\r
+\r
+\r
+ RLIMIT_CORE = 4,\r
+\r
+\r
+\r
+\r
+\r
+\r
+ __RLIMIT_RSS = 5,\r
+\r
+\r
+\r
+ RLIMIT_NOFILE = 7,\r
+ __RLIMIT_OFILE = RLIMIT_NOFILE,\r
+\r
+\r
+\r
+\r
+ RLIMIT_AS = 9,\r
+\r
+\r
+\r
+ __RLIMIT_NPROC = 6,\r
+\r
+\r
+\r
+ __RLIMIT_MEMLOCK = 8,\r
+\r
+\r
+\r
+ __RLIMIT_LOCKS = 10,\r
+\r
+\r
+\r
+ __RLIMIT_SIGPENDING = 11,\r
+\r
+\r
+\r
+ __RLIMIT_MSGQUEUE = 12,\r
+\r
+\r
+\r
+\r
+\r
+ __RLIMIT_NICE = 13,\r
+\r
+\r
+\r
+\r
+ __RLIMIT_RTPRIO = 14,\r
+\r
+\r
+\r
+\r
+\r
+ __RLIMIT_RTTIME = 15,\r
+\r
+\r
+ __RLIMIT_NLIMITS = 16,\r
+ __RLIM_NLIMITS = __RLIMIT_NLIMITS\r
+\r
+\r
+};\r
+# 131 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
+typedef __rlim_t rlim_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+struct rlimit\r
+ {\r
+\r
+ rlim_t rlim_cur;\r
+\r
+ rlim_t rlim_max;\r
+ };\r
+# 158 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
+enum __rusage_who\r
+{\r
+\r
+ RUSAGE_SELF = 0,\r
+\r
+\r
+\r
+ RUSAGE_CHILDREN = -1\r
+# 176 "/usr/include/x86_64-linux-gnu/bits/resource.h" 3 4\r
+};\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
+# 180 "/usr/include/x86_64-linux-gnu/bits/resource.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+struct rusage\r
+ {\r
+\r
+ struct timeval ru_utime;\r
+\r
+ struct timeval ru_stime;\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_maxrss;\r
+ __syscall_slong_t __ru_maxrss_word;\r
+ };\r
+\r
+\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_ixrss;\r
+ __syscall_slong_t __ru_ixrss_word;\r
+ };\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_idrss;\r
+ __syscall_slong_t __ru_idrss_word;\r
+ };\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_isrss;\r
+ __syscall_slong_t __ru_isrss_word;\r
+ };\r
+\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_minflt;\r
+ __syscall_slong_t __ru_minflt_word;\r
+ };\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_majflt;\r
+ __syscall_slong_t __ru_majflt_word;\r
+ };\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_nswap;\r
+ __syscall_slong_t __ru_nswap_word;\r
+ };\r
+\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_inblock;\r
+ __syscall_slong_t __ru_inblock_word;\r
+ };\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_oublock;\r
+ __syscall_slong_t __ru_oublock_word;\r
+ };\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_msgsnd;\r
+ __syscall_slong_t __ru_msgsnd_word;\r
+ };\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_msgrcv;\r
+ __syscall_slong_t __ru_msgrcv_word;\r
+ };\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_nsignals;\r
+ __syscall_slong_t __ru_nsignals_word;\r
+ };\r
+\r
+\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_nvcsw;\r
+ __syscall_slong_t __ru_nvcsw_word;\r
+ };\r
+\r
+\r
+ __extension__ union\r
+ {\r
+ long int ru_nivcsw;\r
+ __syscall_slong_t __ru_nivcsw_word;\r
+ };\r
+ };\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+enum __priority_which\r
+{\r
+ PRIO_PROCESS = 0,\r
+\r
+ PRIO_PGRP = 1,\r
+\r
+ PRIO_USER = 2\r
+\r
+};\r
+# 25 "/usr/include/x86_64-linux-gnu/sys/resource.h" 2 3 4\r
+# 42 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
+typedef int __rlimit_resource_t;\r
+typedef int __rusage_who_t;\r
+typedef int __priority_which_t;\r
+\r
+\r
+\r
+\r
+\r
+extern int getrlimit (__rlimit_resource_t __resource,\r
+ struct rlimit *__rlimits) __attribute__ ((__nothrow__ ));\r
+# 69 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
+extern int setrlimit (__rlimit_resource_t __resource,\r
+ const struct rlimit *__rlimits) __attribute__ ((__nothrow__ ));\r
+# 87 "/usr/include/x86_64-linux-gnu/sys/resource.h" 3 4\r
+extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int setpriority (__priority_which_t __which, id_t __who, int __prio)\r
+ __attribute__ ((__nothrow__ ));\r
+# 33 "../include/apr_thread_proc.h" 2\r
+# 45 "../include/apr_thread_proc.h"\r
+typedef enum {\r
+ APR_SHELLCMD,\r
+ APR_PROGRAM,\r
+ APR_PROGRAM_ENV,\r
+ APR_PROGRAM_PATH,\r
+ APR_SHELLCMD_ENV\r
+\r
+\r
+} apr_cmdtype_e;\r
+\r
+typedef enum {\r
+ APR_WAIT,\r
+ APR_NOWAIT\r
+} apr_wait_how_e;\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef enum {\r
+ APR_PROC_EXIT = 1,\r
+ APR_PROC_SIGNAL = 2,\r
+ APR_PROC_SIGNAL_CORE = 4\r
+} apr_exit_why_e;\r
+# 133 "../include/apr_thread_proc.h"\r
+typedef struct apr_proc_t {\r
+\r
+ pid_t pid;\r
+\r
+ apr_file_t *in;\r
+\r
+ apr_file_t *out;\r
+\r
+ apr_file_t *err;\r
+# 161 "../include/apr_thread_proc.h"\r
+} apr_proc_t;\r
+# 173 "../include/apr_thread_proc.h"\r
+typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,\r
+ const char *description);\r
+\r
+\r
+typedef struct apr_thread_t apr_thread_t;\r
+\r
+\r
+typedef struct apr_threadattr_t apr_threadattr_t;\r
+\r
+\r
+typedef struct apr_procattr_t apr_procattr_t;\r
+\r
+\r
+typedef struct apr_thread_once_t apr_thread_once_t;\r
+\r
+\r
+typedef struct apr_threadkey_t apr_threadkey_t;\r
+\r
+\r
+typedef struct apr_other_child_rec_t apr_other_child_rec_t;\r
+\r
+\r
+\r
+\r
+typedef void *( *apr_thread_start_t)(apr_thread_t*, void*);\r
+\r
+typedef enum {\r
+ APR_KILL_NEVER,\r
+\r
+\r
+ APR_KILL_ALWAYS,\r
+ APR_KILL_AFTER_TIMEOUT,\r
+ APR_JUST_WAIT,\r
+ APR_KILL_ONLY_ONCE\r
+} apr_kill_conditions_e;\r
+# 218 "../include/apr_thread_proc.h"\r
+apr_status_t apr_threadattr_create(apr_threadattr_t **new_attr,\r
+ apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,\r
+ apr_int32_t on);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadattr_stacksize_set(apr_threadattr_t *attr,\r
+ apr_size_t stacksize);\r
+# 255 "../include/apr_thread_proc.h"\r
+apr_status_t apr_threadattr_guardsize_set(apr_threadattr_t *attr,\r
+ apr_size_t guardsize);\r
+# 266 "../include/apr_thread_proc.h"\r
+apr_status_t apr_thread_create(apr_thread_t **new_thread,\r
+ apr_threadattr_t *attr,\r
+ apr_thread_start_t func,\r
+ void *data, apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_thread_exit(apr_thread_t *thd,\r
+ apr_status_t retval);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_thread_join(apr_status_t *retval,\r
+ apr_thread_t *thd);\r
+\r
+\r
+\r
+\r
+void apr_thread_yield(void);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_thread_once_init(apr_thread_once_t **control,\r
+ apr_pool_t *p);\r
+# 310 "../include/apr_thread_proc.h"\r
+apr_status_t apr_thread_once(apr_thread_once_t *control,\r
+ void (*func)(void));\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_thread_detach(apr_thread_t *thd);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_thread_data_get(void **data, const char *key,\r
+ apr_thread_t *thread);\r
+# 335 "../include/apr_thread_proc.h"\r
+apr_status_t apr_thread_data_set(void *data, const char *key,\r
+ apr_status_t (*cleanup) (void *),\r
+ apr_thread_t *thread);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,\r
+ void (*dest)(void *),\r
+ apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadkey_private_get(void **new_mem,\r
+ apr_threadkey_t *key);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadkey_private_set(void *priv,\r
+ apr_threadkey_t *key);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadkey_data_get(void **data, const char *key,\r
+ apr_threadkey_t *threadkey);\r
+# 387 "../include/apr_thread_proc.h"\r
+apr_status_t apr_threadkey_data_set(void *data, const char *key,\r
+ apr_status_t (*cleanup) (void *),\r
+ apr_threadkey_t *threadkey);\r
+# 398 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_create(apr_procattr_t **new_attr,\r
+ apr_pool_t *cont);\r
+# 415 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_io_set(apr_procattr_t *attr,\r
+ apr_int32_t in, apr_int32_t out,\r
+ apr_int32_t err);\r
+# 434 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_child_in_set(struct apr_procattr_t *attr,\r
+ apr_file_t *child_in,\r
+ apr_file_t *parent_in);\r
+# 451 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_child_out_set(struct apr_procattr_t *attr,\r
+ apr_file_t *child_out,\r
+ apr_file_t *parent_out);\r
+# 468 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_child_err_set(struct apr_procattr_t *attr,\r
+ apr_file_t *child_err,\r
+ apr_file_t *parent_err);\r
+# 479 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_dir_set(apr_procattr_t *attr,\r
+ const char *dir);\r
+# 493 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr,\r
+ apr_cmdtype_e cmd);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_procattr_detach_set(apr_procattr_t *attr,\r
+ apr_int32_t detach);\r
+# 517 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_limit_set(apr_procattr_t *attr,\r
+ apr_int32_t what,\r
+ struct rlimit *limit);\r
+# 533 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_child_errfn_set(apr_procattr_t *attr,\r
+ apr_child_errfn_t *errfn);\r
+# 548 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_error_check_set(apr_procattr_t *attr,\r
+ apr_int32_t chk);\r
+# 558 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_addrspace_set(apr_procattr_t *attr,\r
+ apr_int32_t addrspace);\r
+# 569 "../include/apr_thread_proc.h"\r
+apr_status_t apr_procattr_user_set(apr_procattr_t *attr,\r
+ const char *username,\r
+ const char *password);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_procattr_group_set(apr_procattr_t *attr,\r
+ const char *groupname);\r
+# 591 "../include/apr_thread_proc.h"\r
+apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont);\r
+# 610 "../include/apr_thread_proc.h"\r
+apr_status_t apr_proc_create(apr_proc_t *new_proc,\r
+ const char *progname,\r
+ const char * const *args,\r
+ const char * const *env,\r
+ apr_procattr_t *attr,\r
+ apr_pool_t *pool);\r
+# 643 "../include/apr_thread_proc.h"\r
+apr_status_t apr_proc_wait(apr_proc_t *proc,\r
+ int *exitcode, apr_exit_why_e *exitwhy,\r
+ apr_wait_how_e waithow);\r
+# 673 "../include/apr_thread_proc.h"\r
+apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc,\r
+ int *exitcode,\r
+ apr_exit_why_e *exitwhy,\r
+ apr_wait_how_e waithow,\r
+ apr_pool_t *p);\r
+# 688 "../include/apr_thread_proc.h"\r
+apr_status_t apr_proc_detach(int daemonize);\r
+# 707 "../include/apr_thread_proc.h"\r
+void apr_proc_other_child_register(apr_proc_t *proc,\r
+ void (*maintenance) (int reason,\r
+ void *,\r
+ int status),\r
+ void *data, apr_file_t *write_fd,\r
+ apr_pool_t *p);\r
+# 723 "../include/apr_thread_proc.h"\r
+void apr_proc_other_child_unregister(void *data);\r
+# 745 "../include/apr_thread_proc.h"\r
+apr_status_t apr_proc_other_child_alert(apr_proc_t *proc,\r
+ int reason,\r
+ int status);\r
+# 756 "../include/apr_thread_proc.h"\r
+void apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,\r
+ int reason);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_proc_other_child_refresh_all(int reason);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_proc_kill(apr_proc_t *proc, int sig);\r
+# 787 "../include/apr_thread_proc.h"\r
+void apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *proc,\r
+ apr_kill_conditions_e how);\r
+# 798 "../include/apr_thread_proc.h"\r
+apr_status_t apr_setup_signal_thread(void);\r
+# 807 "../include/apr_thread_proc.h"\r
+apr_status_t apr_signal_thread(int(*signal_handler)(int signum));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_thread_pool_get (const apr_thread_t *thethread);\r
+# 20 "./../test/testatomic.c" 2\r
+\r
+\r
+# 1 "../include/apr_atomic.h" 1\r
+# 47 "../include/apr_atomic.h"\r
+apr_status_t apr_atomic_init(apr_pool_t *p);\r
+# 59 "../include/apr_atomic.h"\r
+apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem);\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem);\r
+\r
+\r
+\r
+\r
+\r
+\r
+int apr_atomic_dec32(volatile apr_uint32_t *mem);\r
+# 105 "../include/apr_atomic.h"\r
+apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,\r
+ apr_uint32_t cmp);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val);\r
+# 124 "../include/apr_atomic.h"\r
+void* apr_atomic_casptr(volatile void **mem, void *with, const void *cmp);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void* apr_atomic_xchgptr(volatile void **mem, void *with);\r
+# 23 "./../test/testatomic.c" 2\r
+# 37 "./../test/testatomic.c"\r
+static void test_init(abts_case *tc, void *data)\r
+{\r
+ apr_assert_success(tc, "Could not initliaze atomics", apr_atomic_init(p), 39);\r
+}\r
+\r
+static void test_set32(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t y32;\r
+ apr_atomic_set32(&y32, 2);\r
+ abts_int_equal(tc, 2, y32, 46);\r
+}\r
+\r
+static void test_read32(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t y32;\r
+ apr_atomic_set32(&y32, 2);\r
+ abts_int_equal(tc, 2, apr_atomic_read32(&y32), 53);\r
+}\r
+\r
+static void test_dec32(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t y32;\r
+ int rv;\r
+\r
+ apr_atomic_set32(&y32, 2);\r
+\r
+ rv = apr_atomic_dec32(&y32);\r
+ abts_int_equal(tc, 1, y32, 64);\r
+ abts_assert(tc, "atomic_dec returned zero when it shouldn't", rv != 0, 65);;\r
+\r
+ rv = apr_atomic_dec32(&y32);\r
+ abts_int_equal(tc, 0, y32, 68);\r
+ abts_assert(tc, "atomic_dec didn't returned zero when it should", rv == 0, 69);;\r
+}\r
+\r
+static void test_xchg32(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t oldval;\r
+ apr_uint32_t y32;\r
+\r
+ apr_atomic_set32(&y32, 100);\r
+ oldval = apr_atomic_xchg32(&y32, 50);\r
+\r
+ abts_int_equal(tc, 100, oldval, 80);\r
+ abts_int_equal(tc, 50, y32, 81);\r
+}\r
+\r
+static void test_xchgptr(abts_case *tc, void *data)\r
+{\r
+ int a;\r
+ void *ref = "little piggy";\r
+ volatile void *target_ptr = ref;\r
+ void *old_ptr;\r
+\r
+ old_ptr = apr_atomic_xchgptr(&target_ptr, &a);\r
+ abts_ptr_equal(tc, ref, old_ptr, 92);\r
+ abts_ptr_equal(tc, &a, (void *) target_ptr, 93);\r
+}\r
+\r
+static void test_cas_equal(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t casval = 0;\r
+ apr_uint32_t oldval;\r
+\r
+ oldval = apr_atomic_cas32(&casval, 12, 0);\r
+ abts_int_equal(tc, 0, oldval, 102);\r
+ abts_int_equal(tc, 12, casval, 103);\r
+}\r
+\r
+static void test_cas_equal_nonnull(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t casval = 12;\r
+ apr_uint32_t oldval;\r
+\r
+ oldval = apr_atomic_cas32(&casval, 23, 12);\r
+ abts_int_equal(tc, 12, oldval, 112);\r
+ abts_int_equal(tc, 23, casval, 113);\r
+}\r
+\r
+static void test_cas_notequal(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t casval = 12;\r
+ apr_uint32_t oldval;\r
+\r
+ oldval = apr_atomic_cas32(&casval, 23, 2);\r
+ abts_int_equal(tc, 12, oldval, 122);\r
+ abts_int_equal(tc, 12, casval, 123);\r
+}\r
+\r
+static void test_casptr_equal(abts_case *tc, void *data)\r
+{\r
+ int a;\r
+ volatile void *target_ptr = ((void*)0);\r
+ void *old_ptr;\r
+\r
+ old_ptr = apr_atomic_casptr(&target_ptr, &a, ((void*)0));\r
+ abts_ptr_equal(tc, ((void*)0), old_ptr, 133);\r
+ abts_ptr_equal(tc, &a, (void *) target_ptr, 134);\r
+}\r
+\r
+static void test_casptr_equal_nonnull(abts_case *tc, void *data)\r
+{\r
+ int a, b;\r
+ volatile void *target_ptr = &a;\r
+ void *old_ptr;\r
+\r
+ old_ptr = apr_atomic_casptr(&target_ptr, &b, &a);\r
+ abts_ptr_equal(tc, &a, old_ptr, 144);\r
+ abts_ptr_equal(tc, &b, (void *) target_ptr, 145);\r
+}\r
+\r
+static void test_casptr_notequal(abts_case *tc, void *data)\r
+{\r
+ int a, b;\r
+ volatile void *target_ptr = &a;\r
+ void *old_ptr;\r
+\r
+ old_ptr = apr_atomic_casptr(&target_ptr, &a, &b);\r
+ abts_ptr_equal(tc, &a, old_ptr, 155);\r
+ abts_ptr_equal(tc, &a, (void *) target_ptr, 156);\r
+}\r
+\r
+static void test_add32(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t oldval;\r
+ apr_uint32_t y32;\r
+\r
+ apr_atomic_set32(&y32, 23);\r
+ oldval = apr_atomic_add32(&y32, 4);\r
+ abts_int_equal(tc, 23, oldval, 166);\r
+ abts_int_equal(tc, 27, y32, 167);\r
+}\r
+\r
+static void test_add32_neg(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t oldval;\r
+ apr_uint32_t y32;\r
+\r
+ apr_atomic_set32(&y32, 23);\r
+ oldval = apr_atomic_add32(&y32, -10);\r
+ abts_int_equal(tc, 23, oldval, 177);\r
+ abts_int_equal(tc, 13, y32, 178);\r
+}\r
+\r
+static void test_inc32(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t oldval;\r
+ apr_uint32_t y32;\r
+\r
+ apr_atomic_set32(&y32, 23);\r
+ oldval = apr_atomic_inc32(&y32);\r
+ abts_int_equal(tc, 23, oldval, 188);\r
+ abts_int_equal(tc, 24, y32, 189);\r
+}\r
+\r
+static void test_set_add_inc_sub(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t y32;\r
+\r
+ apr_atomic_set32(&y32, 0);\r
+ apr_atomic_add32(&y32, 20);\r
+ apr_atomic_inc32(&y32);\r
+ apr_atomic_sub32(&y32, 10);\r
+\r
+ abts_int_equal(tc, 11, y32, 201);\r
+}\r
+\r
+static void test_wrap_zero(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t y32;\r
+ apr_uint32_t rv;\r
+ apr_uint32_t minus1 = -1;\r
+ char *str;\r
+\r
+ apr_atomic_set32(&y32, 0);\r
+ rv = apr_atomic_dec32(&y32);\r
+\r
+ abts_assert(tc, "apr_atomic_dec32 on zero returned zero.", rv != 0, 214);;\r
+ str = apr_psprintf(p, "zero wrap failed: 0 - 1 = %d", y32);\r
+ abts_assert(tc, str, y32 == minus1, 216);;\r
+}\r
+\r
+static void test_inc_neg1(abts_case *tc, void *data)\r
+{\r
+ apr_uint32_t y32 = -1;\r
+ apr_uint32_t minus1 = -1;\r
+ apr_uint32_t rv;\r
+ char *str;\r
+\r
+ rv = apr_atomic_inc32(&y32);\r
+\r
+ abts_assert(tc, "apr_atomic_inc32 didn't return the old value.", rv == minus1, 228);;\r
+ str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);\r
+ abts_assert(tc, str, y32 == 0, 230);;\r
+}\r
+\r
+\r
+\r
+\r
+void * thread_func_mutex(apr_thread_t *thd, void *data);\r
+void * thread_func_atomic(apr_thread_t *thd, void *data);\r
+\r
+apr_thread_mutex_t *thread_lock;\r
+volatile apr_uint32_t mutex_locks = 0;\r
+volatile apr_uint32_t atomic_ops = 0;\r
+apr_status_t exit_ret_val = 123;\r
+\r
+void * thread_func_mutex(apr_thread_t *thd, void *data)\r
+{\r
+ int i;\r
+\r
+ for (i = 0; i < 1; i++) {\r
+ apr_thread_mutex_lock(thread_lock);\r
+ mutex_locks++;\r
+ apr_thread_mutex_unlock(thread_lock);\r
+ }\r
+ apr_thread_exit(thd, exit_ret_val);\r
+ return ((void*)0);\r
+}\r
+\r
+void * thread_func_atomic(apr_thread_t *thd, void *data)\r
+{\r
+ int i;\r
+\r
+ for (i = 0; i < 1 ; i++) {\r
+ apr_atomic_inc32(&atomic_ops);\r
+ apr_atomic_add32(&atomic_ops, 2);\r
+ apr_atomic_dec32(&atomic_ops);\r
+ apr_atomic_dec32(&atomic_ops);\r
+ }\r
+ apr_thread_exit(thd, exit_ret_val);\r
+ return ((void*)0);\r
+}\r
+\r
+static void test_atomics_threaded(abts_case *tc, void *data)\r
+{\r
+ apr_thread_t *t1[3];\r
+ apr_thread_t *t2[3];\r
+ apr_status_t rv;\r
+ int i;\r
+\r
+\r
+\r
+\r
+\r
+ rv = apr_thread_mutex_create(&thread_lock, 0x0, p);\r
+ apr_assert_success(tc, "Could not create lock", rv, 283);\r
+\r
+ for (i = 0; i < 3; i++) {\r
+ apr_status_t r1, r2;\r
+ r1 = apr_thread_create(&t1[i], ((void*)0), thread_func_mutex, ((void*)0), p);\r
+ r2 = apr_thread_create(&t2[i], ((void*)0), thread_func_atomic, ((void*)0), p);\r
+ abts_assert(tc, "Failed creating threads", !r1 && !r2, 289);;\r
+ }\r
+\r
+ for (i = 0; i < 3; i++) {\r
+ apr_status_t s1, s2;\r
+ apr_thread_join(&s1, t1[i]);\r
+ apr_thread_join(&s2, t2[i]);\r
+\r
+ abts_assert(tc, "Invalid return value from thread_join", s1 == exit_ret_val && s2 == exit_ret_val, 298);;\r
+\r
+ }\r
+\r
+ abts_int_equal(tc, 3 * 1, mutex_locks, 301);\r
+ abts_int_equal(tc, 3 * 1, apr_atomic_read32(&atomic_ops), 303);\r
+\r
+\r
+ rv = apr_thread_mutex_destroy(thread_lock);\r
+ abts_assert(tc, "Failed creating threads", rv == 0, 306);;\r
+}\r
+\r
+typedef struct tbox_t tbox_t;\r
+\r
+struct tbox_t {\r
+ abts_case *tc;\r
+ apr_uint32_t *mem;\r
+ apr_uint32_t preval;\r
+ apr_uint32_t postval;\r
+ apr_uint32_t loop;\r
+ void (*func)(tbox_t *box);\r
+};\r
+\r
+static __inline__ void busyloop_read32(tbox_t *tbox)\r
+{\r
+ apr_uint32_t val;\r
+\r
+ do {\r
+ val = apr_atomic_read32(tbox->mem);\r
+\r
+ if (val != tbox->preval) {\r
+ apr_thread_yield();\r
+ } else {\r
+ break;\r
+ }\r
+ } while (1);\r
+}\r
+\r
+static void busyloop_set32(tbox_t *tbox)\r
+{\r
+ do {\r
+ busyloop_read32(tbox);\r
+ apr_atomic_set32(tbox->mem, tbox->postval);\r
+ } while (--tbox->loop);\r
+}\r
+\r
+static void busyloop_add32(tbox_t *tbox)\r
+{\r
+ apr_uint32_t val;\r
+\r
+ do {\r
+ busyloop_read32(tbox);\r
+ val = apr_atomic_add32(tbox->mem, tbox->postval);\r
+ apr_thread_mutex_lock(thread_lock);\r
+ abts_int_equal(tbox->tc, val, tbox->preval, 350);\r
+ apr_thread_mutex_unlock(thread_lock);\r
+ } while (--tbox->loop);\r
+}\r
+\r
+static void busyloop_sub32(tbox_t *tbox)\r
+{\r
+ do {\r
+ busyloop_read32(tbox);\r
+ apr_atomic_sub32(tbox->mem, tbox->postval);\r
+ } while (--tbox->loop);\r
+}\r
+\r
+static void busyloop_inc32(tbox_t *tbox)\r
+{\r
+ apr_uint32_t val;\r
+\r
+ do {\r
+ busyloop_read32(tbox);\r
+ val = apr_atomic_inc32(tbox->mem);\r
+ apr_thread_mutex_lock(thread_lock);\r
+ abts_int_equal(tbox->tc, val, tbox->preval, 371);\r
+ apr_thread_mutex_unlock(thread_lock);\r
+ } while (--tbox->loop);\r
+}\r
+\r
+static void busyloop_dec32(tbox_t *tbox)\r
+{\r
+ apr_uint32_t val;\r
+\r
+ do {\r
+ busyloop_read32(tbox);\r
+ val = apr_atomic_dec32(tbox->mem);\r
+ apr_thread_mutex_lock(thread_lock);\r
+ abts_int_nequal(tbox->tc, 0, val, 384);\r
+ apr_thread_mutex_unlock(thread_lock);\r
+ } while (--tbox->loop);\r
+}\r
+\r
+static void busyloop_cas32(tbox_t *tbox)\r
+{\r
+ apr_uint32_t val;\r
+\r
+ do {\r
+ do {\r
+ val = apr_atomic_cas32(tbox->mem, tbox->postval, tbox->preval);\r
+\r
+ if (val != tbox->preval) {\r
+ apr_thread_yield();\r
+ } else {\r
+ break;\r
+ }\r
+ } while (1);\r
+ } while (--tbox->loop);\r
+}\r
+\r
+static void busyloop_xchg32(tbox_t *tbox)\r
+{\r
+ apr_uint32_t val;\r
+\r
+ do {\r
+ busyloop_read32(tbox);\r
+ val = apr_atomic_xchg32(tbox->mem, tbox->postval);\r
+ apr_thread_mutex_lock(thread_lock);\r
+ abts_int_equal(tbox->tc, val, tbox->preval, 413);\r
+ apr_thread_mutex_unlock(thread_lock);\r
+ } while (--tbox->loop);\r
+}\r
+\r
+static void * thread_func_busyloop(apr_thread_t *thd, void *data)\r
+{\r
+ tbox_t *tbox = data;\r
+\r
+ tbox->func(tbox);\r
+\r
+ apr_thread_exit(thd, 0);\r
+\r
+ return ((void*)0);\r
+}\r
+\r
+static void test_atomics_busyloop_threaded(abts_case *tc, void *data)\r
+{\r
+ unsigned int i;\r
+ apr_status_t rv;\r
+ apr_uint32_t count = 0;\r
+ tbox_t tbox[3];\r
+ apr_thread_t *thread[3];\r
+\r
+ rv = apr_thread_mutex_create(&thread_lock, 0x0, p);\r
+ apr_assert_success(tc, "Could not create lock", rv, 438);\r
+\r
+\r
+ for (i = 0; i < 3; i++) {\r
+ tbox[i].tc = tc;\r
+ tbox[i].mem = &count;\r
+ tbox[i].loop = 50;\r
+ }\r
+\r
+ tbox[0].preval = 98;\r
+ tbox[0].postval = 3891;\r
+ tbox[0].func = busyloop_add32;\r
+\r
+ tbox[1].preval = 3989;\r
+ tbox[1].postval = 1010;\r
+ tbox[1].func = busyloop_sub32;\r
+\r
+ tbox[2].preval = 2979;\r
+ tbox[2].postval = 0;\r
+ tbox[2].func = busyloop_inc32;\r
+\r
+ tbox[3].preval = 2980;\r
+ tbox[3].postval = 16384;\r
+ tbox[3].func = busyloop_set32;\r
+\r
+ tbox[4].preval = 16384;\r
+ tbox[4].postval = 0;\r
+ tbox[4].func = busyloop_dec32;\r
+\r
+ tbox[5].preval = 16383;\r
+ tbox[5].postval = 1048576;\r
+ tbox[5].func = busyloop_cas32;\r
+\r
+ tbox[6].preval = 1048576;\r
+ tbox[6].postval = 98;\r
+ tbox[6].func = busyloop_xchg32;\r
+\r
+\r
+ for (i = 0; i < 3; i++) {\r
+ rv = apr_thread_create(&thread[i], ((void*)0), thread_func_busyloop,\r
+ &tbox[i], p);\r
+ abts_assert(tc, "Failed creating thread", rv == 0, 479);;\r
+ }\r
+\r
+\r
+ apr_atomic_set32(tbox->mem, 98);\r
+\r
+ for (i = 0; i < 3; i++) {\r
+ apr_status_t retval;\r
+ rv = apr_thread_join(&retval, thread[i]);\r
+ abts_assert(tc, "Thread join failed", rv == 0, 488);;\r
+ abts_assert(tc, "Invalid return value from thread_join", retval == 0, 489);;\r
+ }\r
+\r
+ abts_int_equal(tbox->tc, 98, count, 492);\r
+\r
+ rv = apr_thread_mutex_destroy(thread_lock);\r
+ abts_assert(tc, "Failed creating threads", rv == 0, 495);;\r
+}\r
+\r
+\r
+\r
+abts_suite *testatomic(abts_suite *suite)\r
+{\r
+ suite = abts_add_suite(suite, "./../test/testatomic.c");\r
+\r
+ abts_run_test(suite, test_init, ((void*)0));\r
+ abts_run_test(suite, test_set32, ((void*)0));\r
+ abts_run_test(suite, test_read32, ((void*)0));\r
+ abts_run_test(suite, test_dec32, ((void*)0));\r
+ abts_run_test(suite, test_xchg32, ((void*)0));\r
+ abts_run_test(suite, test_xchgptr, ((void*)0));\r
+ abts_run_test(suite, test_cas_equal, ((void*)0));\r
+ abts_run_test(suite, test_cas_equal_nonnull, ((void*)0));\r
+ abts_run_test(suite, test_cas_notequal, ((void*)0));\r
+ abts_run_test(suite, test_casptr_equal, ((void*)0));\r
+ abts_run_test(suite, test_casptr_equal_nonnull, ((void*)0));\r
+ abts_run_test(suite, test_casptr_notequal, ((void*)0));\r
+ abts_run_test(suite, test_add32, ((void*)0));\r
+ abts_run_test(suite, test_add32_neg, ((void*)0));\r
+ abts_run_test(suite, test_inc32, ((void*)0));\r
+ abts_run_test(suite, test_set_add_inc_sub, ((void*)0));\r
+ abts_run_test(suite, test_wrap_zero, ((void*)0));\r
+ abts_run_test(suite, test_inc_neg1, ((void*)0));\r
+\r
+\r
+ abts_run_test(suite, test_atomics_threaded, ((void*)0));\r
+ abts_run_test(suite, test_atomics_busyloop_threaded, ((void*)0));\r
+\r
+\r
+ return suite;\r
+}\r
+# 11 "main1.c" 2\r
+# 1 "./../test/testutil.c" 1\r
+# 20 "./../test/testutil.c"\r
+# 1 "./../test/abts.h" 1\r
+# 21 "./../test/testutil.c" 2\r
+# 1 "./../test/testutil.h" 1\r
+# 19 "./../test/testutil.h"\r
+# 1 "./../test/abts.h" 1\r
+# 20 "./../test/testutil.h" 2\r
+# 22 "./../test/testutil.c" 2\r
+\r
+\r
+apr_pool_t *p;\r
+\r
+void apr_assert_success(abts_case* tc, const char* context, apr_status_t rv,\r
+ int lineno)\r
+{\r
+ if (rv == ((20000 + 50000) + 23)) {\r
+ abts_not_impl(tc, context, lineno);\r
+ } else if (rv != 0) {\r
+ char buf[8096], ebuf[128];\r
+ sprintf(buf, "%s (%d): %s\n", context, rv,\r
+ apr_strerror(rv, ebuf, sizeof ebuf));\r
+ abts_fail(tc, buf, lineno);\r
+ }\r
+}\r
+\r
+void initialize(void) {\r
+ apr_initialize();\r
+ atexit(apr_terminate);\r
+\r
+ apr_pool_create_ex(&p, ((void*)0), ((void*)0), ((void*)0));\r
+}\r
+# 12 "main1.c" 2\r
+# 1 "./../locks/unix/thread_mutex.c" 1\r
+# 17 "./../locks/unix/thread_mutex.c"\r
+# 1 "../include/arch/unix/apr_arch_thread_mutex.h" 1\r
+# 21 "../include/arch/unix/apr_arch_thread_mutex.h"\r
+# 1 "../include/arch/unix/apr_private.h" 1\r
+# 999 "../include/arch/unix/apr_private.h"\r
+# 1 "../include/arch/unix/../apr_private_common.h" 1\r
+# 27 "../include/arch/unix/../apr_private_common.h"\r
+apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,\r
+ const char *liststr,\r
+ char separator,\r
+ apr_pool_t *p);\r
+\r
+apr_status_t apr_filepath_list_merge_impl(char **liststr,\r
+ apr_array_header_t *pathelts,\r
+ char separator,\r
+ apr_pool_t *p);\r
+# 1000 "../include/arch/unix/apr_private.h" 2\r
+# 22 "../include/arch/unix/apr_arch_thread_mutex.h" 2\r
+\r
+\r
+# 1 "../include/apr_portable.h" 1\r
+# 32 "../include/apr_portable.h"\r
+# 1 "../include/apr_network_io.h" 1\r
+# 31 "../include/apr_network_io.h"\r
+# 1 "/usr/include/netinet/in.h" 1 3 4\r
+# 22 "/usr/include/netinet/in.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stdint.h" 1 3 4\r
+# 23 "/usr/include/netinet/in.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef uint32_t in_addr_t;\r
+struct in_addr\r
+ {\r
+ in_addr_t s_addr;\r
+ };\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/in.h" 1 3 4\r
+# 112 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4\r
+struct ip_opts\r
+ {\r
+ struct in_addr ip_dst;\r
+ char ip_opts[40];\r
+ };\r
+\r
+\r
+struct ip_mreqn\r
+ {\r
+ struct in_addr imr_multiaddr;\r
+ struct in_addr imr_address;\r
+ int imr_ifindex;\r
+ };\r
+\r
+\r
+struct in_pktinfo\r
+ {\r
+ int ipi_ifindex;\r
+ struct in_addr ipi_spec_dst;\r
+ struct in_addr ipi_addr;\r
+ };\r
+# 38 "/usr/include/netinet/in.h" 2 3 4\r
+\r
+\r
+enum\r
+ {\r
+ IPPROTO_IP = 0,\r
+\r
+ IPPROTO_ICMP = 1,\r
+\r
+ IPPROTO_IGMP = 2,\r
+\r
+ IPPROTO_IPIP = 4,\r
+\r
+ IPPROTO_TCP = 6,\r
+\r
+ IPPROTO_EGP = 8,\r
+\r
+ IPPROTO_PUP = 12,\r
+\r
+ IPPROTO_UDP = 17,\r
+\r
+ IPPROTO_IDP = 22,\r
+\r
+ IPPROTO_TP = 29,\r
+\r
+ IPPROTO_DCCP = 33,\r
+\r
+ IPPROTO_IPV6 = 41,\r
+\r
+ IPPROTO_RSVP = 46,\r
+\r
+ IPPROTO_GRE = 47,\r
+\r
+ IPPROTO_ESP = 50,\r
+\r
+ IPPROTO_AH = 51,\r
+\r
+ IPPROTO_MTP = 92,\r
+\r
+ IPPROTO_BEETPH = 94,\r
+\r
+ IPPROTO_ENCAP = 98,\r
+\r
+ IPPROTO_PIM = 103,\r
+\r
+ IPPROTO_COMP = 108,\r
+\r
+ IPPROTO_SCTP = 132,\r
+\r
+ IPPROTO_UDPLITE = 136,\r
+\r
+ IPPROTO_RAW = 255,\r
+\r
+ IPPROTO_MAX\r
+ };\r
+\r
+\r
+\r
+\r
+\r
+enum\r
+ {\r
+ IPPROTO_HOPOPTS = 0,\r
+\r
+ IPPROTO_ROUTING = 43,\r
+\r
+ IPPROTO_FRAGMENT = 44,\r
+\r
+ IPPROTO_ICMPV6 = 58,\r
+\r
+ IPPROTO_NONE = 59,\r
+\r
+ IPPROTO_DSTOPTS = 60,\r
+\r
+ IPPROTO_MH = 135\r
+\r
+ };\r
+\r
+\r
+\r
+typedef uint16_t in_port_t;\r
+\r
+\r
+enum\r
+ {\r
+ IPPORT_ECHO = 7,\r
+ IPPORT_DISCARD = 9,\r
+ IPPORT_SYSTAT = 11,\r
+ IPPORT_DAYTIME = 13,\r
+ IPPORT_NETSTAT = 15,\r
+ IPPORT_FTP = 21,\r
+ IPPORT_TELNET = 23,\r
+ IPPORT_SMTP = 25,\r
+ IPPORT_TIMESERVER = 37,\r
+ IPPORT_NAMESERVER = 42,\r
+ IPPORT_WHOIS = 43,\r
+ IPPORT_MTP = 57,\r
+\r
+ IPPORT_TFTP = 69,\r
+ IPPORT_RJE = 77,\r
+ IPPORT_FINGER = 79,\r
+ IPPORT_TTYLINK = 87,\r
+ IPPORT_SUPDUP = 95,\r
+\r
+\r
+ IPPORT_EXECSERVER = 512,\r
+ IPPORT_LOGINSERVER = 513,\r
+ IPPORT_CMDSERVER = 514,\r
+ IPPORT_EFSSERVER = 520,\r
+\r
+\r
+ IPPORT_BIFFUDP = 512,\r
+ IPPORT_WHOSERVER = 513,\r
+ IPPORT_ROUTESERVER = 520,\r
+\r
+\r
+ IPPORT_RESERVED = 1024,\r
+\r
+\r
+ IPPORT_USERRESERVED = 5000\r
+ };\r
+# 209 "/usr/include/netinet/in.h" 3 4\r
+struct in6_addr\r
+ {\r
+ union\r
+ {\r
+ uint8_t __u6_addr8[16];\r
+\r
+ uint16_t __u6_addr16[8];\r
+ uint32_t __u6_addr32[4];\r
+\r
+ } __in6_u;\r
+\r
+\r
+\r
+\r
+\r
+ };\r
+\r
+\r
+extern const struct in6_addr in6addr_any;\r
+extern const struct in6_addr in6addr_loopback;\r
+# 237 "/usr/include/netinet/in.h" 3 4\r
+struct sockaddr_in\r
+ {\r
+ sa_family_t sin_family;\r
+ in_port_t sin_port;\r
+ struct in_addr sin_addr;\r
+\r
+\r
+ unsigned char sin_zero[sizeof (struct sockaddr) -\r
+ (sizeof (unsigned short int)) -\r
+ sizeof (in_port_t) -\r
+ sizeof (struct in_addr)];\r
+ };\r
+\r
+\r
+\r
+struct sockaddr_in6\r
+ {\r
+ sa_family_t sin6_family;\r
+ in_port_t sin6_port;\r
+ uint32_t sin6_flowinfo;\r
+ struct in6_addr sin6_addr;\r
+ uint32_t sin6_scope_id;\r
+ };\r
+\r
+\r
+\r
+\r
+struct ip_mreq\r
+ {\r
+\r
+ struct in_addr imr_multiaddr;\r
+\r
+\r
+ struct in_addr imr_interface;\r
+ };\r
+\r
+struct ip_mreq_source\r
+ {\r
+\r
+ struct in_addr imr_multiaddr;\r
+\r
+\r
+ struct in_addr imr_interface;\r
+\r
+\r
+ struct in_addr imr_sourceaddr;\r
+ };\r
+\r
+\r
+\r
+\r
+struct ipv6_mreq\r
+ {\r
+\r
+ struct in6_addr ipv6mr_multiaddr;\r
+\r
+\r
+ unsigned int ipv6mr_interface;\r
+ };\r
+\r
+\r
+\r
+\r
+struct group_req\r
+ {\r
+\r
+ uint32_t gr_interface;\r
+\r
+\r
+ struct sockaddr_storage gr_group;\r
+ };\r
+\r
+struct group_source_req\r
+ {\r
+\r
+ uint32_t gsr_interface;\r
+\r
+\r
+ struct sockaddr_storage gsr_group;\r
+\r
+\r
+ struct sockaddr_storage gsr_source;\r
+ };\r
+\r
+\r
+\r
+struct ip_msfilter\r
+ {\r
+\r
+ struct in_addr imsf_multiaddr;\r
+\r
+\r
+ struct in_addr imsf_interface;\r
+\r
+\r
+ uint32_t imsf_fmode;\r
+\r
+\r
+ uint32_t imsf_numsrc;\r
+\r
+ struct in_addr imsf_slist[1];\r
+ };\r
+\r
+\r
+\r
+\r
+\r
+struct group_filter\r
+ {\r
+\r
+ uint32_t gf_interface;\r
+\r
+\r
+ struct sockaddr_storage gf_group;\r
+\r
+\r
+ uint32_t gf_fmode;\r
+\r
+\r
+ uint32_t gf_numsrc;\r
+\r
+ struct sockaddr_storage gf_slist[1];\r
+};\r
+# 374 "/usr/include/netinet/in.h" 3 4\r
+extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+extern uint16_t ntohs (uint16_t __netshort)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+extern uint32_t htonl (uint32_t __hostlong)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+extern uint16_t htons (uint16_t __hostshort)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4\r
+# 386 "/usr/include/netinet/in.h" 2 3 4\r
+# 501 "/usr/include/netinet/in.h" 3 4\r
+extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)\r
+ __attribute__ ((__nothrow__ ));\r
+# 32 "../include/apr_network_io.h" 2\r
+# 108 "../include/apr_network_io.h"\r
+typedef enum {\r
+ APR_SHUTDOWN_READ,\r
+ APR_SHUTDOWN_WRITE,\r
+ APR_SHUTDOWN_READWRITE\r
+} apr_shutdown_how_e;\r
+# 172 "../include/apr_network_io.h"\r
+typedef enum {\r
+ APR_LOCAL,\r
+ APR_REMOTE\r
+} apr_interface_e;\r
+# 193 "../include/apr_network_io.h"\r
+typedef struct apr_socket_t apr_socket_t;\r
+\r
+\r
+\r
+typedef struct apr_hdtr_t apr_hdtr_t;\r
+\r
+typedef struct in_addr apr_in_addr_t;\r
+\r
+typedef struct apr_ipsubnet_t apr_ipsubnet_t;\r
+\r
+\r
+typedef apr_uint16_t apr_port_t;\r
+\r
+\r
+\r
+\r
+typedef struct apr_sockaddr_t apr_sockaddr_t;\r
+\r
+\r
+\r
+struct apr_sockaddr_t {\r
+\r
+ apr_pool_t *pool;\r
+\r
+ char *hostname;\r
+\r
+ char *servname;\r
+\r
+ apr_port_t port;\r
+\r
+ apr_int32_t family;\r
+\r
+ apr_socklen_t salen;\r
+\r
+ int ipaddr_len;\r
+\r
+\r
+ int addr_str_len;\r
+\r
+\r
+ void *ipaddr_ptr;\r
+\r
+\r
+ apr_sockaddr_t *next;\r
+\r
+ union {\r
+\r
+ struct sockaddr_in sin;\r
+\r
+\r
+ struct sockaddr_in6 sin6;\r
+\r
+\r
+\r
+\r
+ struct sockaddr_storage sas;\r
+\r
+ } sa;\r
+};\r
+# 263 "../include/apr_network_io.h"\r
+struct apr_hdtr_t {\r
+\r
+ struct iovec* headers;\r
+\r
+ int numheaders;\r
+\r
+ struct iovec* trailers;\r
+\r
+ int numtrailers;\r
+};\r
+# 287 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_create(apr_socket_t **new_sock,\r
+ int family, int type,\r
+ int protocol,\r
+ apr_pool_t *cont);\r
+# 305 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_shutdown(apr_socket_t *thesocket,\r
+ apr_shutdown_how_e how);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_socket_close(apr_socket_t *thesocket);\r
+# 321 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_bind(apr_socket_t *sock,\r
+ apr_sockaddr_t *sa);\r
+# 331 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_listen(apr_socket_t *sock,\r
+ apr_int32_t backlog);\r
+# 345 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_accept(apr_socket_t **new_sock,\r
+ apr_socket_t *sock,\r
+ apr_pool_t *connection_pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_socket_connect(apr_socket_t *sock,\r
+ apr_sockaddr_t *sa);\r
+# 370 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_atreadeof(apr_socket_t *sock,\r
+ int *atreadeof);\r
+# 396 "../include/apr_network_io.h"\r
+apr_status_t apr_sockaddr_info_get(apr_sockaddr_t **sa,\r
+ const char *hostname,\r
+ apr_int32_t family,\r
+ apr_port_t port,\r
+ apr_int32_t flags,\r
+ apr_pool_t *p);\r
+# 411 "../include/apr_network_io.h"\r
+apr_status_t apr_getnameinfo(char **hostname,\r
+ apr_sockaddr_t *sa,\r
+ apr_int32_t flags);\r
+# 445 "../include/apr_network_io.h"\r
+apr_status_t apr_parse_addr_port(char **addr,\r
+ char **scope_id,\r
+ apr_port_t *port,\r
+ const char *str,\r
+ apr_pool_t *p);\r
+# 459 "../include/apr_network_io.h"\r
+apr_status_t apr_gethostname(char *buf, int len, apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_socket_data_get(void **data, const char *key,\r
+ apr_socket_t *sock);\r
+# 477 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_data_set(apr_socket_t *sock, void *data,\r
+ const char *key,\r
+ apr_status_t (*cleanup)(void*));\r
+# 498 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf,\r
+ apr_size_t *len);\r
+# 519 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_sendv(apr_socket_t *sock,\r
+ const struct iovec *vec,\r
+ apr_int32_t nvec, apr_size_t *len);\r
+# 530 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_sendto(apr_socket_t *sock,\r
+ apr_sockaddr_t *where,\r
+ apr_int32_t flags, const char *buf,\r
+ apr_size_t *len);\r
+# 548 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_recvfrom(apr_sockaddr_t *from,\r
+ apr_socket_t *sock,\r
+ apr_int32_t flags, char *buf,\r
+ apr_size_t *len);\r
+# 573 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_sendfile(apr_socket_t *sock,\r
+ apr_file_t *file,\r
+ apr_hdtr_t *hdtr,\r
+ apr_off_t *offset,\r
+ apr_size_t *len,\r
+ apr_int32_t flags);\r
+# 601 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_recv(apr_socket_t *sock,\r
+ char *buf, apr_size_t *len);\r
+# 626 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_opt_set(apr_socket_t *sock,\r
+ apr_int32_t opt, apr_int32_t on);\r
+# 640 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_timeout_set(apr_socket_t *sock,\r
+ apr_interval_time_t t);\r
+# 662 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_opt_get(apr_socket_t *sock,\r
+ apr_int32_t opt, apr_int32_t *on);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_socket_timeout_get(apr_socket_t *sock,\r
+ apr_interval_time_t *t);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_socket_atmark(apr_socket_t *sock,\r
+ int *atmark);\r
+# 690 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_addr_get(apr_sockaddr_t **sa,\r
+ apr_interface_e which,\r
+ apr_socket_t *sock);\r
+# 701 "../include/apr_network_io.h"\r
+apr_status_t apr_sockaddr_ip_get(char **addr,\r
+ apr_sockaddr_t *sockaddr);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_sockaddr_ip_getbuf(char *buf, apr_size_t buflen,\r
+ apr_sockaddr_t *sockaddr);\r
+# 722 "../include/apr_network_io.h"\r
+int apr_sockaddr_equal(const apr_sockaddr_t *addr1,\r
+ const apr_sockaddr_t *addr2);\r
+# 733 "../include/apr_network_io.h"\r
+int apr_sockaddr_is_wildcard(const apr_sockaddr_t *addr);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_socket_type_get(apr_socket_t *sock,\r
+ int *type);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_getservbyname(apr_sockaddr_t *sockaddr,\r
+ const char *servname);\r
+# 758 "../include/apr_network_io.h"\r
+apr_status_t apr_ipsubnet_create(apr_ipsubnet_t **ipsub,\r
+ const char *ipstr,\r
+ const char *mask_or_numbits,\r
+ apr_pool_t *p);\r
+# 770 "../include/apr_network_io.h"\r
+int apr_ipsubnet_test(apr_ipsubnet_t *ipsub, apr_sockaddr_t *sa);\r
+# 791 "../include/apr_network_io.h"\r
+apr_status_t apr_socket_protocol_get(apr_socket_t *sock,\r
+ int *protocol);\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_socket_pool_get (const apr_socket_t *thesocket);\r
+\r
+\r
+\r
+\r
+apr_status_t apr_socket_inherit_set( apr_socket_t *thesocket);\r
+\r
+\r
+\r
+\r
+apr_status_t apr_socket_inherit_unset( apr_socket_t *thesocket);\r
+# 823 "../include/apr_network_io.h"\r
+apr_status_t apr_mcast_join(apr_socket_t *sock,\r
+ apr_sockaddr_t *join,\r
+ apr_sockaddr_t *iface,\r
+ apr_sockaddr_t *source);\r
+# 838 "../include/apr_network_io.h"\r
+apr_status_t apr_mcast_leave(apr_socket_t *sock,\r
+ apr_sockaddr_t *addr,\r
+ apr_sockaddr_t *iface,\r
+ apr_sockaddr_t *source);\r
+# 850 "../include/apr_network_io.h"\r
+apr_status_t apr_mcast_hops(apr_socket_t *sock,\r
+ apr_byte_t ttl);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_mcast_loopback(apr_socket_t *sock,\r
+ apr_byte_t opt);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_mcast_interface(apr_socket_t *sock,\r
+ apr_sockaddr_t *iface);\r
+# 33 "../include/apr_portable.h" 2\r
+\r
+# 1 "../include/apr_global_mutex.h" 1\r
+# 26 "../include/apr_global_mutex.h"\r
+# 1 "../include/apr_proc_mutex.h" 1\r
+# 44 "../include/apr_proc_mutex.h"\r
+typedef enum {\r
+ APR_LOCK_FCNTL,\r
+ APR_LOCK_FLOCK,\r
+ APR_LOCK_SYSVSEM,\r
+ APR_LOCK_PROC_PTHREAD,\r
+ APR_LOCK_POSIXSEM,\r
+ APR_LOCK_DEFAULT\r
+} apr_lockmech_e;\r
+\r
+\r
+typedef struct apr_proc_mutex_t apr_proc_mutex_t;\r
+# 79 "../include/apr_proc_mutex.h"\r
+apr_status_t apr_proc_mutex_create(apr_proc_mutex_t **mutex,\r
+ const char *fname,\r
+ apr_lockmech_e mech,\r
+ apr_pool_t *pool);\r
+# 95 "../include/apr_proc_mutex.h"\r
+apr_status_t apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,\r
+ const char *fname,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_proc_mutex_lock(apr_proc_mutex_t *mutex);\r
+# 113 "../include/apr_proc_mutex.h"\r
+apr_status_t apr_proc_mutex_trylock(apr_proc_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_proc_mutex_unlock(apr_proc_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_proc_mutex_destroy(apr_proc_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_proc_mutex_cleanup(void *mutex);\r
+\r
+\r
+\r
+\r
+\r
+\r
+const char * apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+\r
+const char * apr_proc_mutex_name(apr_proc_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+const char * apr_proc_mutex_defname(void);\r
+\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_proc_mutex_pool_get (const apr_proc_mutex_t *theproc_mutex);\r
+# 27 "../include/apr_global_mutex.h" 2\r
+# 46 "../include/apr_global_mutex.h"\r
+typedef struct apr_global_mutex_t apr_global_mutex_t;\r
+# 74 "../include/apr_global_mutex.h"\r
+apr_status_t apr_global_mutex_create(apr_global_mutex_t **mutex,\r
+ const char *fname,\r
+ apr_lockmech_e mech,\r
+ apr_pool_t *pool);\r
+# 90 "../include/apr_global_mutex.h"\r
+apr_status_t apr_global_mutex_child_init(\r
+ apr_global_mutex_t **mutex,\r
+ const char *fname,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_global_mutex_lock(apr_global_mutex_t *mutex);\r
+# 109 "../include/apr_global_mutex.h"\r
+apr_status_t apr_global_mutex_trylock(apr_global_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_global_mutex_unlock(apr_global_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_global_mutex_destroy(apr_global_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+const char * apr_global_mutex_lockfile(apr_global_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+const char * apr_global_mutex_name(apr_global_mutex_t *mutex);\r
+\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_global_mutex_pool_get (const apr_global_mutex_t *theglobal_mutex);\r
+# 35 "../include/apr_portable.h" 2\r
+\r
+\r
+# 1 "../include/apr_dso.h" 1\r
+# 44 "../include/apr_dso.h"\r
+typedef struct apr_dso_handle_t apr_dso_handle_t;\r
+\r
+\r
+\r
+\r
+typedef void * apr_dso_handle_sym_t;\r
+# 59 "../include/apr_dso.h"\r
+apr_status_t apr_dso_load(apr_dso_handle_t **res_handle,\r
+ const char *path, apr_pool_t *ctx);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_dso_unload(apr_dso_handle_t *handle);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_dso_sym(apr_dso_handle_sym_t *ressym,\r
+ apr_dso_handle_t *handle,\r
+ const char *symname);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+const char * apr_dso_error(apr_dso_handle_t *dso, char *buf, apr_size_t bufsize);\r
+# 38 "../include/apr_portable.h" 2\r
+# 1 "../include/apr_shm.h" 1\r
+# 43 "../include/apr_shm.h"\r
+typedef struct apr_shm_t apr_shm_t;\r
+# 69 "../include/apr_shm.h"\r
+apr_status_t apr_shm_create(apr_shm_t **m,\r
+ apr_size_t reqsize,\r
+ const char *filename,\r
+ apr_pool_t *pool);\r
+# 114 "../include/apr_shm.h"\r
+apr_status_t apr_shm_create_ex(apr_shm_t **m,\r
+ apr_size_t reqsize,\r
+ const char *filename,\r
+ apr_pool_t *pool,\r
+ apr_int32_t flags);\r
+# 135 "../include/apr_shm.h"\r
+apr_status_t apr_shm_remove(const char *filename,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_shm_destroy(apr_shm_t *m);\r
+# 153 "../include/apr_shm.h"\r
+apr_status_t apr_shm_attach(apr_shm_t **m,\r
+ const char *filename,\r
+ apr_pool_t *pool);\r
+# 167 "../include/apr_shm.h"\r
+apr_status_t apr_shm_attach_ex(apr_shm_t **m,\r
+ const char *filename,\r
+ apr_pool_t *pool,\r
+ apr_int32_t flags);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_shm_detach(apr_shm_t *m);\r
+# 188 "../include/apr_shm.h"\r
+void * apr_shm_baseaddr_get(const apr_shm_t *m);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_size_t apr_shm_size_get(const apr_shm_t *m);\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_shm_pool_get (const apr_shm_t *theshm);\r
+# 39 "../include/apr_portable.h" 2\r
+\r
+\r
+# 1 "/usr/include/dirent.h" 1 3 4\r
+# 61 "/usr/include/dirent.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 1 3 4\r
+# 22 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 3 4\r
+struct dirent\r
+ {\r
+\r
+ __ino_t d_ino;\r
+ __off_t d_off;\r
+\r
+\r
+\r
+\r
+ unsigned short int d_reclen;\r
+ unsigned char d_type;\r
+ char d_name[256];\r
+ };\r
+# 62 "/usr/include/dirent.h" 2 3 4\r
+# 97 "/usr/include/dirent.h" 3 4\r
+enum\r
+ {\r
+ DT_UNKNOWN = 0,\r
+\r
+ DT_FIFO = 1,\r
+\r
+ DT_CHR = 2,\r
+\r
+ DT_DIR = 4,\r
+\r
+ DT_BLK = 6,\r
+\r
+ DT_REG = 8,\r
+\r
+ DT_LNK = 10,\r
+\r
+ DT_SOCK = 12,\r
+\r
+ DT_WHT = 14\r
+\r
+ };\r
+# 127 "/usr/include/dirent.h" 3 4\r
+typedef struct __dirstream DIR;\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern DIR *fdopendir (int __fd);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));\r
+# 162 "/usr/include/dirent.h" 3 4\r
+extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));\r
+# 183 "/usr/include/dirent.h" 3 4\r
+extern int readdir_r (DIR *__restrict __dirp,\r
+ struct dirent *__restrict __entry,\r
+ struct dirent **__restrict __result)\r
+ __attribute__ ((__nonnull__ (1, 2, 3)));\r
+# 208 "/usr/include/dirent.h" 3 4\r
+extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 244 "/usr/include/dirent.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 245 "/usr/include/dirent.h" 2 3 4\r
+# 254 "/usr/include/dirent.h" 3 4\r
+extern int scandir (const char *__restrict __dir,\r
+ struct dirent ***__restrict __namelist,\r
+ int (*__selector) (const struct dirent *),\r
+ int (*__cmp) (const struct dirent **,\r
+ const struct dirent **))\r
+ __attribute__ ((__nonnull__ (1, 2)));\r
+# 324 "/usr/include/dirent.h" 3 4\r
+extern int alphasort (const struct dirent **__e1,\r
+ const struct dirent **__e2)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));\r
+# 352 "/usr/include/dirent.h" 3 4\r
+extern __ssize_t getdirentries (int __fd, char *__restrict __buf,\r
+ size_t __nbytes,\r
+ __off_t *__restrict __basep)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
+# 42 "../include/apr_portable.h" 2\r
+\r
+\r
+# 1 "/usr/include/fcntl.h" 1 3 4\r
+# 35 "/usr/include/fcntl.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 1 3 4\r
+# 35 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4\r
+struct flock\r
+ {\r
+ short int l_type;\r
+ short int l_whence;\r
+\r
+ __off_t l_start;\r
+ __off_t l_len;\r
+\r
+\r
+\r
+\r
+ __pid_t l_pid;\r
+ };\r
+# 61 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 1 3 4\r
+# 62 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 2 3 4\r
+# 36 "/usr/include/fcntl.h" 2 3 4\r
+# 67 "/usr/include/fcntl.h" 3 4\r
+# 1 "/usr/include/time.h" 1 3 4\r
+# 68 "/usr/include/fcntl.h" 2 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4\r
+# 46 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
+struct stat\r
+ {\r
+ __dev_t st_dev;\r
+\r
+\r
+\r
+\r
+ __ino_t st_ino;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ __nlink_t st_nlink;\r
+ __mode_t st_mode;\r
+\r
+ __uid_t st_uid;\r
+ __gid_t st_gid;\r
+\r
+ int __pad0;\r
+\r
+ __dev_t st_rdev;\r
+\r
+\r
+\r
+\r
+ __off_t st_size;\r
+\r
+\r
+\r
+ __blksize_t st_blksize;\r
+\r
+ __blkcnt_t st_blocks;\r
+# 91 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
+ struct timespec st_atim;\r
+ struct timespec st_mtim;\r
+ struct timespec st_ctim;\r
+# 106 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
+ __syscall_slong_t __glibc_reserved[3];\r
+# 115 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4\r
+ };\r
+# 69 "/usr/include/fcntl.h" 2 3 4\r
+# 137 "/usr/include/fcntl.h" 3 4\r
+extern int fcntl (int __fd, int __cmd, ...);\r
+# 146 "/usr/include/fcntl.h" 3 4\r
+extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));\r
+# 170 "/usr/include/fcntl.h" 3 4\r
+extern int openat (int __fd, const char *__file, int __oflag, ...)\r
+ __attribute__ ((__nonnull__ (2)));\r
+# 192 "/usr/include/fcntl.h" 3 4\r
+extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1)));\r
+# 238 "/usr/include/fcntl.h" 3 4\r
+extern int posix_fadvise (int __fd, off_t __offset, off_t __len,\r
+ int __advise) __attribute__ ((__nothrow__ ));\r
+# 260 "/usr/include/fcntl.h" 3 4\r
+extern int posix_fallocate (int __fd, off_t __offset, off_t __len);\r
+# 45 "../include/apr_portable.h" 2\r
+\r
+\r
+# 1 "/usr/include/pthread.h" 1 3 4\r
+# 23 "/usr/include/pthread.h" 3 4\r
+# 1 "/usr/include/sched.h" 1 3 4\r
+# 28 "/usr/include/sched.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 29 "/usr/include/sched.h" 2 3 4\r
+\r
+\r
+\r
+# 1 "/usr/include/time.h" 1 3 4\r
+# 33 "/usr/include/sched.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4\r
+# 72 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
+struct sched_param\r
+ {\r
+ int __sched_priority;\r
+ };\r
+# 103 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
+struct __sched_param\r
+ {\r
+ int __sched_priority;\r
+ };\r
+# 118 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
+typedef unsigned long int __cpu_mask;\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef struct\r
+{\r
+ __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];\r
+} cpu_set_t;\r
+# 203 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4\r
+extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)\r
+ __attribute__ ((__nothrow__ ));\r
+extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ )) ;\r
+extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ ));\r
+# 42 "/usr/include/sched.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)\r
+ __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sched_setscheduler (__pid_t __pid, int __policy,\r
+ const struct sched_param *__param) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sched_yield (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ ));\r
+# 24 "/usr/include/pthread.h" 2 3 4\r
+# 1 "/usr/include/time.h" 1 3 4\r
+# 37 "/usr/include/time.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 38 "/usr/include/time.h" 2 3 4\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4\r
+# 42 "/usr/include/time.h" 2 3 4\r
+# 133 "/usr/include/time.h" 3 4\r
+struct tm\r
+{\r
+ int tm_sec;\r
+ int tm_min;\r
+ int tm_hour;\r
+ int tm_mday;\r
+ int tm_mon;\r
+ int tm_year;\r
+ int tm_wday;\r
+ int tm_yday;\r
+ int tm_isdst;\r
+\r
+\r
+ long int tm_gmtoff;\r
+ const char *tm_zone;\r
+\r
+\r
+\r
+\r
+};\r
+# 161 "/usr/include/time.h" 3 4\r
+struct itimerspec\r
+ {\r
+ struct timespec it_interval;\r
+ struct timespec it_value;\r
+ };\r
+\r
+\r
+struct sigevent;\r
+# 189 "/usr/include/time.h" 3 4\r
+extern clock_t clock (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern double difftime (time_t __time1, time_t __time0)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+\r
+\r
+extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern size_t strftime (char *__restrict __s, size_t __maxsize,\r
+ const char *__restrict __format,\r
+ const struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
+# 223 "/usr/include/time.h" 3 4\r
+extern size_t strftime_l (char *__restrict __s, size_t __maxsize,\r
+ const char *__restrict __format,\r
+ const struct tm *__restrict __tp,\r
+ __locale_t __loc) __attribute__ ((__nothrow__ ));\r
+# 239 "/usr/include/time.h" 3 4\r
+extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern struct tm *gmtime_r (const time_t *__restrict __timer,\r
+ struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern struct tm *localtime_r (const time_t *__restrict __timer,\r
+ struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern char *asctime_r (const struct tm *__restrict __tp,\r
+ char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern char *ctime_r (const time_t *__restrict __timer,\r
+ char *__restrict __buf) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern char *__tzname[2];\r
+extern int __daylight;\r
+extern long int __timezone;\r
+\r
+\r
+\r
+\r
+extern char *tzname[2];\r
+\r
+\r
+\r
+extern void tzset (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int daylight;\r
+extern long int timezone;\r
+\r
+\r
+\r
+\r
+\r
+extern int stime (const time_t *__when) __attribute__ ((__nothrow__ ));\r
+# 319 "/usr/include/time.h" 3 4\r
+extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int dysize (int __year) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+# 334 "/usr/include/time.h" 3 4\r
+extern int nanosleep (const struct timespec *__requested_time,\r
+ struct timespec *__remaining);\r
+\r
+\r
+\r
+extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)\r
+ __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int clock_nanosleep (clockid_t __clock_id, int __flags,\r
+ const struct timespec *__req,\r
+ struct timespec *__rem);\r
+\r
+\r
+extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int timer_create (clockid_t __clock_id,\r
+ struct sigevent *__restrict __evp,\r
+ timer_t *__restrict __timerid) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int timer_settime (timer_t __timerid, int __flags,\r
+ const struct itimerspec *__restrict __value,\r
+ struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)\r
+ __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ ));\r
+# 25 "/usr/include/pthread.h" 2 3 4\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4\r
+# 26 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4\r
+\r
+\r
+\r
+\r
+typedef long int __jmp_buf[8];\r
+# 28 "/usr/include/pthread.h" 2 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 29 "/usr/include/pthread.h" 2 3 4\r
+\r
+\r
+\r
+enum\r
+{\r
+ PTHREAD_CREATE_JOINABLE,\r
+\r
+ PTHREAD_CREATE_DETACHED\r
+\r
+};\r
+\r
+\r
+\r
+enum\r
+{\r
+ PTHREAD_MUTEX_TIMED_NP,\r
+ PTHREAD_MUTEX_RECURSIVE_NP,\r
+ PTHREAD_MUTEX_ERRORCHECK_NP,\r
+ PTHREAD_MUTEX_ADAPTIVE_NP\r
+\r
+ ,\r
+ PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,\r
+ PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,\r
+ PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,\r
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL\r
+\r
+\r
+\r
+\r
+\r
+};\r
+\r
+\r
+\r
+\r
+enum\r
+{\r
+ PTHREAD_MUTEX_STALLED,\r
+ PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,\r
+ PTHREAD_MUTEX_ROBUST,\r
+ PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST\r
+};\r
+\r
+\r
+\r
+\r
+\r
+enum\r
+{\r
+ PTHREAD_PRIO_NONE,\r
+ PTHREAD_PRIO_INHERIT,\r
+ PTHREAD_PRIO_PROTECT\r
+};\r
+# 125 "/usr/include/pthread.h" 3 4\r
+enum\r
+{\r
+ PTHREAD_RWLOCK_PREFER_READER_NP,\r
+ PTHREAD_RWLOCK_PREFER_WRITER_NP,\r
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\r
+ PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP\r
+};\r
+# 166 "/usr/include/pthread.h" 3 4\r
+enum\r
+{\r
+ PTHREAD_INHERIT_SCHED,\r
+\r
+ PTHREAD_EXPLICIT_SCHED\r
+\r
+};\r
+\r
+\r
+\r
+enum\r
+{\r
+ PTHREAD_SCOPE_SYSTEM,\r
+\r
+ PTHREAD_SCOPE_PROCESS\r
+\r
+};\r
+\r
+\r
+\r
+enum\r
+{\r
+ PTHREAD_PROCESS_PRIVATE,\r
+\r
+ PTHREAD_PROCESS_SHARED\r
+\r
+};\r
+# 201 "/usr/include/pthread.h" 3 4\r
+struct _pthread_cleanup_buffer\r
+{\r
+ void (*__routine) (void *);\r
+ void *__arg;\r
+ int __canceltype;\r
+ struct _pthread_cleanup_buffer *__prev;\r
+};\r
+\r
+\r
+enum\r
+{\r
+ PTHREAD_CANCEL_ENABLE,\r
+\r
+ PTHREAD_CANCEL_DISABLE\r
+\r
+};\r
+enum\r
+{\r
+ PTHREAD_CANCEL_DEFERRED,\r
+\r
+ PTHREAD_CANCEL_ASYNCHRONOUS\r
+\r
+};\r
+# 244 "/usr/include/pthread.h" 3 4\r
+extern int pthread_create (pthread_t *__restrict __newthread,\r
+ const pthread_attr_t *__restrict __attr,\r
+ void *(*__start_routine) (void *),\r
+ void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));\r
+\r
+\r
+\r
+\r
+\r
+extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_join (pthread_t __th, void **__thread_return);\r
+# 282 "/usr/include/pthread.h" 3 4\r
+extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+\r
+\r
+extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_attr_destroy (pthread_attr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,\r
+ int *__detachstate)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,\r
+ int __detachstate)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,\r
+ size_t *__guardsize)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_attr_setguardsize (pthread_attr_t *__attr,\r
+ size_t __guardsize)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,\r
+ struct sched_param *__restrict __param)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,\r
+ const struct sched_param *__restrict\r
+ __param) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict\r
+ __attr, int *__restrict __policy)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict\r
+ __attr, int *__restrict __inherit)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,\r
+ int __inherit)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,\r
+ int *__restrict __scope)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict\r
+ __attr, void **__restrict __stackaddr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,\r
+ void *__stackaddr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));\r
+\r
+\r
+extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict\r
+ __attr, size_t *__restrict __stacksize)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+extern int pthread_attr_setstacksize (pthread_attr_t *__attr,\r
+ size_t __stacksize)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,\r
+ void **__restrict __stackaddr,\r
+ size_t *__restrict __stacksize)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3)));\r
+\r
+\r
+\r
+\r
+extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,\r
+ size_t __stacksize) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 440 "/usr/include/pthread.h" 3 4\r
+extern int pthread_setschedparam (pthread_t __target_thread, int __policy,\r
+ const struct sched_param *__param)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));\r
+\r
+\r
+extern int pthread_getschedparam (pthread_t __target_thread,\r
+ int *__restrict __policy,\r
+ struct sched_param *__restrict __param)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
+\r
+\r
+extern int pthread_setschedprio (pthread_t __target_thread, int __prio)\r
+ __attribute__ ((__nothrow__ ));\r
+# 505 "/usr/include/pthread.h" 3 4\r
+extern int pthread_once (pthread_once_t *__once_control,\r
+ void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));\r
+# 517 "/usr/include/pthread.h" 3 4\r
+extern int pthread_setcancelstate (int __state, int *__oldstate);\r
+\r
+\r
+\r
+extern int pthread_setcanceltype (int __type, int *__oldtype);\r
+\r
+\r
+extern int pthread_cancel (pthread_t __th);\r
+\r
+\r
+\r
+\r
+extern void pthread_testcancel (void);\r
+\r
+\r
+\r
+\r
+typedef struct\r
+{\r
+ struct\r
+ {\r
+ __jmp_buf __cancel_jmp_buf;\r
+ int __mask_was_saved;\r
+ } __cancel_jmp_buf[1];\r
+ void *__pad[4];\r
+} __pthread_unwind_buf_t __attribute__ ((__aligned__));\r
+# 551 "/usr/include/pthread.h" 3 4\r
+struct __pthread_cleanup_frame\r
+{\r
+ void (*__cancel_routine) (void *);\r
+ void *__cancel_arg;\r
+ int __do_it;\r
+ int __cancel_type;\r
+};\r
+# 691 "/usr/include/pthread.h" 3 4\r
+extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)\r
+ ;\r
+# 703 "/usr/include/pthread.h" 3 4\r
+extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)\r
+ ;\r
+# 744 "/usr/include/pthread.h" 3 4\r
+extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)\r
+ __attribute__ ((__noreturn__))\r
+\r
+ __attribute__ ((__weak__))\r
+\r
+ ;\r
+\r
+\r
+\r
+struct __jmp_buf_tag;\r
+extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_mutex_init (pthread_mutex_t *__mutex,\r
+ const pthread_mutexattr_t *__mutexattr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_mutex_lock (pthread_mutex_t *__mutex)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,\r
+ const struct timespec *__restrict\r
+ __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_mutex_getprioceiling (const pthread_mutex_t *\r
+ __restrict __mutex,\r
+ int *__restrict __prioceiling)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,\r
+ int __prioceiling,\r
+ int *__restrict __old_ceiling)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));\r
+\r
+\r
+\r
+\r
+extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 817 "/usr/include/pthread.h" 3 4\r
+extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *\r
+ __restrict __attr,\r
+ int *__restrict __pshared)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,\r
+ int __pshared)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict\r
+ __attr, int *__restrict __kind)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *\r
+ __restrict __attr,\r
+ int *__restrict __protocol)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,\r
+ int __protocol)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *\r
+ __restrict __attr,\r
+ int *__restrict __prioceiling)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,\r
+ int __prioceiling)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,\r
+ int *__robustness)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,\r
+ int __robustness)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 899 "/usr/include/pthread.h" 3 4\r
+extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,\r
+ const pthread_rwlockattr_t *__restrict\r
+ __attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,\r
+ const struct timespec *__restrict\r
+ __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,\r
+ const struct timespec *__restrict\r
+ __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *\r
+ __restrict __attr,\r
+ int *__restrict __pshared)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,\r
+ int __pshared)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *\r
+ __restrict __attr,\r
+ int *__restrict __pref)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,\r
+ int __pref) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_cond_init (pthread_cond_t *__restrict __cond,\r
+ const pthread_condattr_t *__restrict __cond_attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_cond_destroy (pthread_cond_t *__cond)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_cond_signal (pthread_cond_t *__cond)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_cond_broadcast (pthread_cond_t *__cond)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,\r
+ pthread_mutex_t *__restrict __mutex)\r
+ __attribute__ ((__nonnull__ (1, 2)));\r
+# 1011 "/usr/include/pthread.h" 3 4\r
+extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,\r
+ pthread_mutex_t *__restrict __mutex,\r
+ const struct timespec *__restrict __abstime)\r
+ __attribute__ ((__nonnull__ (1, 2, 3)));\r
+\r
+\r
+\r
+\r
+extern int pthread_condattr_init (pthread_condattr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_condattr_destroy (pthread_condattr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_condattr_getpshared (const pthread_condattr_t *\r
+ __restrict __attr,\r
+ int *__restrict __pshared)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,\r
+ int __pshared) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_condattr_getclock (const pthread_condattr_t *\r
+ __restrict __attr,\r
+ __clockid_t *__restrict __clock_id)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_condattr_setclock (pthread_condattr_t *__attr,\r
+ __clockid_t __clock_id)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 1055 "/usr/include/pthread.h" 3 4\r
+extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_spin_destroy (pthread_spinlock_t *__lock)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_spin_lock (pthread_spinlock_t *__lock)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_spin_trylock (pthread_spinlock_t *__lock)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_spin_unlock (pthread_spinlock_t *__lock)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,\r
+ const pthread_barrierattr_t *__restrict\r
+ __attr, unsigned int __count)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_barrier_wait (pthread_barrier_t *__barrier)\r
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *\r
+ __restrict __attr,\r
+ int *__restrict __pshared)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,\r
+ int __pshared)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+# 1122 "/usr/include/pthread.h" 3 4\r
+extern int pthread_key_create (pthread_key_t *__key,\r
+ void (*__destr_function) (void *))\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int pthread_setspecific (pthread_key_t __key,\r
+ const void *__pointer) __attribute__ ((__nothrow__ )) ;\r
+\r
+\r
+\r
+\r
+extern int pthread_getcpuclockid (pthread_t __thread_id,\r
+ __clockid_t *__clock_id)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+# 1156 "/usr/include/pthread.h" 3 4\r
+extern int pthread_atfork (void (*__prepare) (void),\r
+ void (*__parent) (void),\r
+ void (*__child) (void)) __attribute__ ((__nothrow__ ));\r
+# 48 "../include/apr_portable.h" 2\r
+# 127 "../include/apr_portable.h"\r
+struct apr_os_proc_mutex_t {\r
+\r
+\r
+ int crossproc;\r
+\r
+\r
+\r
+ pthread_mutex_t *pthread_interproc;\r
+\r
+\r
+\r
+\r
+\r
+ pthread_mutex_t *intraproc;\r
+\r
+\r
+};\r
+\r
+typedef int apr_os_file_t;\r
+typedef DIR apr_os_dir_t;\r
+typedef int apr_os_sock_t;\r
+typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;\r
+\r
+\r
+\r
+typedef pthread_t apr_os_thread_t;\r
+typedef pthread_key_t apr_os_threadkey_t;\r
+\r
+\r
+typedef pid_t apr_os_proc_t;\r
+typedef struct timeval apr_os_imp_time_t;\r
+typedef struct tm apr_os_exp_time_t;\r
+# 169 "../include/apr_portable.h"\r
+typedef void * apr_os_dso_handle_t;\r
+\r
+typedef void* apr_os_shm_t;\r
+# 183 "../include/apr_portable.h"\r
+struct apr_os_sock_info_t {\r
+ apr_os_sock_t *os_sock;\r
+ struct sockaddr *local;\r
+ struct sockaddr *remote;\r
+ int family;\r
+ int type;\r
+ int protocol;\r
+};\r
+\r
+typedef struct apr_os_sock_info_t apr_os_sock_info_t;\r
+# 203 "../include/apr_portable.h"\r
+ struct apr_os_global_mutex_t {\r
+ apr_pool_t *pool;\r
+ apr_proc_mutex_t *proc_mutex;\r
+\r
+ apr_thread_mutex_t *thread_mutex;\r
+\r
+ };\r
+ typedef struct apr_os_global_mutex_t apr_os_global_mutex_t;\r
+\r
+apr_status_t apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex,\r
+ apr_global_mutex_t *pmutex);\r
+# 224 "../include/apr_portable.h"\r
+apr_status_t apr_os_file_get(apr_os_file_t *thefile,\r
+ apr_file_t *file);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_dir_get(apr_os_dir_t **thedir,\r
+ apr_dir_t *dir);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_sock_get(apr_os_sock_t *thesock,\r
+ apr_socket_t *sock);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,\r
+ apr_proc_mutex_t *pmutex);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,\r
+ apr_time_exp_t *aprtime);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime,\r
+ apr_time_t *aprtime);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_shm_get(apr_os_shm_t *osshm,\r
+ apr_shm_t *shm);\r
+# 285 "../include/apr_portable.h"\r
+apr_status_t apr_os_thread_get(apr_os_thread_t **thethd,\r
+ apr_thread_t *thd);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey,\r
+ apr_threadkey_t *key);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_thread_put(apr_thread_t **thd,\r
+ apr_os_thread_t *thethd,\r
+ apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,\r
+ apr_os_threadkey_t *thekey,\r
+ apr_pool_t *cont);\r
+\r
+\r
+\r
+apr_os_thread_t apr_os_thread_current(void);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+int apr_os_thread_equal(apr_os_thread_t tid1,\r
+ apr_os_thread_t tid2);\r
+# 341 "../include/apr_portable.h"\r
+apr_status_t apr_os_file_put(apr_file_t **file,\r
+ apr_os_file_t *thefile,\r
+ apr_int32_t flags, apr_pool_t *cont);\r
+# 353 "../include/apr_portable.h"\r
+apr_status_t apr_os_pipe_put(apr_file_t **file,\r
+ apr_os_file_t *thefile,\r
+ apr_pool_t *cont);\r
+# 367 "../include/apr_portable.h"\r
+apr_status_t apr_os_pipe_put_ex(apr_file_t **file,\r
+ apr_os_file_t *thefile,\r
+ int register_cleanup,\r
+ apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_dir_put(apr_dir_t **dir,\r
+ apr_os_dir_t *thedir,\r
+ apr_pool_t *cont);\r
+# 390 "../include/apr_portable.h"\r
+apr_status_t apr_os_sock_put(apr_socket_t **sock,\r
+ apr_os_sock_t *thesock,\r
+ apr_pool_t *cont);\r
+# 404 "../include/apr_portable.h"\r
+apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,\r
+ apr_os_sock_info_t *os_sock_info,\r
+ apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,\r
+ apr_os_proc_mutex_t *ospmutex,\r
+ apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_imp_time_put(apr_time_t *aprtime,\r
+ apr_os_imp_time_t **ostime,\r
+ apr_pool_t *cont);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime,\r
+ apr_os_exp_time_t **ostime,\r
+ apr_pool_t *cont);\r
+# 447 "../include/apr_portable.h"\r
+apr_status_t apr_os_shm_put(apr_shm_t **shm,\r
+ apr_os_shm_t *osshm,\r
+ apr_pool_t *cont);\r
+# 463 "../include/apr_portable.h"\r
+apr_status_t apr_os_dso_handle_put(apr_dso_handle_t **dso,\r
+ apr_os_dso_handle_t thedso,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_os_dso_handle_get(apr_os_dso_handle_t *dso,\r
+ apr_dso_handle_t *aprdso);\r
+# 491 "../include/apr_portable.h"\r
+const char* apr_os_default_encoding(apr_pool_t *pool);\r
+# 500 "../include/apr_portable.h"\r
+const char* apr_os_locale_encoding(apr_pool_t *pool);\r
+# 25 "../include/arch/unix/apr_arch_thread_mutex.h" 2\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+struct apr_thread_mutex_t {\r
+ apr_pool_t *pool;\r
+ pthread_mutex_t mutex;\r
+};\r
+# 18 "./../locks/unix/thread_mutex.c" 2\r
+\r
+# 1 "../include/apr_want.h" 1\r
+# 20 "./../locks/unix/thread_mutex.c" 2\r
+\r
+\r
+\r
+static apr_status_t thread_mutex_cleanup(void *data)\r
+{\r
+ apr_thread_mutex_t *mutex = data;\r
+ apr_status_t rv;\r
+\r
+ rv = pthread_mutex_destroy(&mutex->mutex);\r
+\r
+\r
+\r
+\r
+\r
+ return rv;\r
+}\r
+\r
+apr_status_t apr_thread_mutex_create(apr_thread_mutex_t **mutex,\r
+ unsigned int flags,\r
+ apr_pool_t *pool)\r
+{\r
+ apr_thread_mutex_t *new_mutex;\r
+ apr_status_t rv;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ new_mutex = memset(apr_palloc(pool, sizeof(apr_thread_mutex_t)), 0, sizeof(apr_thread_mutex_t));\r
+ new_mutex->pool = pool;\r
+\r
+\r
+ if (flags & 0x1) {\r
+ pthread_mutexattr_t mattr;\r
+\r
+ rv = pthread_mutexattr_init(&mattr);\r
+ if (rv) return rv;\r
+\r
+ rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);\r
+ if (rv) {\r
+ pthread_mutexattr_destroy(&mattr);\r
+ return rv;\r
+ }\r
+\r
+ rv = pthread_mutex_init(&new_mutex->mutex, &mattr);\r
+\r
+ pthread_mutexattr_destroy(&mattr);\r
+ } else\r
+\r
+ rv = pthread_mutex_init(&new_mutex->mutex, ((void*)0));\r
+\r
+ if (rv) {\r
+\r
+\r
+\r
+ return rv;\r
+ }\r
+\r
+ apr_pool_cleanup_register(new_mutex->pool,\r
+ new_mutex, thread_mutex_cleanup,\r
+ apr_pool_cleanup_null);\r
+\r
+ *mutex = new_mutex;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_thread_mutex_lock(apr_thread_mutex_t *mutex)\r
+{\r
+ apr_status_t rv;\r
+\r
+ rv = pthread_mutex_lock(&mutex->mutex);\r
+\r
+\r
+\r
+\r
+\r
+\r
+ return rv;\r
+}\r
+\r
+apr_status_t apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)\r
+{\r
+ apr_status_t rv;\r
+\r
+ rv = pthread_mutex_trylock(&mutex->mutex);\r
+ if (rv) {\r
+\r
+\r
+\r
+ return (rv == 16) ? ((20000 + 50000) + 25) : rv;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)\r
+{\r
+ apr_status_t status;\r
+\r
+ status = pthread_mutex_unlock(&mutex->mutex);\r
+\r
+\r
+\r
+\r
+\r
+\r
+ return status;\r
+}\r
+\r
+apr_status_t apr_thread_mutex_destroy(apr_thread_mutex_t *mutex)\r
+{\r
+ return apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup);\r
+}\r
+\r
+apr_pool_t * apr_thread_mutex_pool_get (const apr_thread_mutex_t *thethread_mutex) { return thethread_mutex->pool; }\r
+# 13 "main1.c" 2\r
+# 1 "./../locks/unix/proc_mutex.c" 1\r
+# 19 "./../locks/unix/proc_mutex.c"\r
+# 1 "../include/arch/unix/apr_arch_proc_mutex.h" 1\r
+# 23 "../include/arch/unix/apr_arch_proc_mutex.h"\r
+# 1 "../include/apr_lib.h" 1\r
+# 32 "../include/apr_lib.h"\r
+# 1 "/usr/include/ctype.h" 1 3 4\r
+# 46 "/usr/include/ctype.h" 3 4\r
+enum\r
+{\r
+ _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),\r
+ _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),\r
+ _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),\r
+ _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),\r
+ _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),\r
+ _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),\r
+ _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),\r
+ _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),\r
+ _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),\r
+ _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),\r
+ _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),\r
+ _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))\r
+};\r
+# 79 "/usr/include/ctype.h" 3 4\r
+extern const unsigned short int **__ctype_b_loc (void)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+extern const __int32_t **__ctype_tolower_loc (void)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+extern const __int32_t **__ctype_toupper_loc (void)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\r
+# 110 "/usr/include/ctype.h" 3 4\r
+extern int isalnum (int) __attribute__ ((__nothrow__ ));\r
+extern int isalpha (int) __attribute__ ((__nothrow__ ));\r
+extern int iscntrl (int) __attribute__ ((__nothrow__ ));\r
+extern int isdigit (int) __attribute__ ((__nothrow__ ));\r
+extern int islower (int) __attribute__ ((__nothrow__ ));\r
+extern int isgraph (int) __attribute__ ((__nothrow__ ));\r
+extern int isprint (int) __attribute__ ((__nothrow__ ));\r
+extern int ispunct (int) __attribute__ ((__nothrow__ ));\r
+extern int isspace (int) __attribute__ ((__nothrow__ ));\r
+extern int isupper (int) __attribute__ ((__nothrow__ ));\r
+extern int isxdigit (int) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int tolower (int __c) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int toupper (int __c) __attribute__ ((__nothrow__ ));\r
+# 136 "/usr/include/ctype.h" 3 4\r
+extern int isblank (int) __attribute__ ((__nothrow__ ));\r
+# 150 "/usr/include/ctype.h" 3 4\r
+extern int isascii (int __c) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int toascii (int __c) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int _toupper (int) __attribute__ ((__nothrow__ ));\r
+extern int _tolower (int) __attribute__ ((__nothrow__ ));\r
+# 271 "/usr/include/ctype.h" 3 4\r
+extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+\r
+extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
+extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
+extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ ));\r
+# 33 "../include/apr_lib.h" 2\r
+# 59 "../include/apr_lib.h"\r
+typedef struct apr_vformatter_buff_t apr_vformatter_buff_t;\r
+\r
+\r
+\r
+\r
+struct apr_vformatter_buff_t {\r
+\r
+ char *curpos;\r
+\r
+ char *endpos;\r
+};\r
+# 84 "../include/apr_lib.h"\r
+const char * apr_filepath_name_get(const char *pathname);\r
+# 174 "../include/apr_lib.h"\r
+int apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *b),\r
+ apr_vformatter_buff_t *c, const char *fmt,\r
+ va_list ap);\r
+# 189 "../include/apr_lib.h"\r
+apr_status_t apr_password_get(const char *prompt, char *pwbuf,\r
+ apr_size_t *bufsize);\r
+# 24 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
+\r
+\r
+\r
+\r
+# 1 "../include/arch/unix/apr_arch_file_io.h" 1\r
+# 41 "../include/arch/unix/apr_arch_file_io.h"\r
+# 1 "/usr/include/errno.h" 1 3 4\r
+# 42 "../include/arch/unix/apr_arch_file_io.h" 2\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/strings.h" 1 3 4\r
+# 48 "../include/arch/unix/apr_arch_file_io.h" 2\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/stat.h" 1 3 4\r
+# 105 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4\r
+# 106 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4\r
+# 209 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
+extern int stat (const char *__restrict __file,\r
+ struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+\r
+\r
+\r
+extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+# 238 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
+extern int fstatat (int __fd, const char *__restrict __file,\r
+ struct stat *__restrict __buf, int __flag)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
+# 263 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
+extern int lstat (const char *__restrict __file,\r
+ struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));\r
+# 284 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
+extern int chmod (const char *__file, __mode_t __mode)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern int lchmod (const char *__file, __mode_t __mode)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int fchmodat (int __fd, const char *__file, __mode_t __mode,\r
+ int __flag)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) ;\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ ));\r
+# 321 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
+extern int mkdir (const char *__path, __mode_t __mode)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern int mkdirat (int __fd, const char *__path, __mode_t __mode)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern int mknodat (int __fd, const char *__path, __mode_t __mode,\r
+ __dev_t __dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+\r
+\r
+extern int mkfifo (const char *__path, __mode_t __mode)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));\r
+\r
+\r
+\r
+\r
+\r
+extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+\r
+\r
+extern int utimensat (int __fd, const char *__path,\r
+ const struct timespec __times[2],\r
+ int __flags)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));\r
+\r
+\r
+\r
+\r
+extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ ));\r
+# 399 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
+extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));\r
+extern int __xstat (int __ver, const char *__filename,\r
+ struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
+extern int __lxstat (int __ver, const char *__filename,\r
+ struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));\r
+extern int __fxstatat (int __ver, int __fildes, const char *__filename,\r
+ struct stat *__stat_buf, int __flag)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4)));\r
+# 442 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4\r
+extern int __xmknod (int __ver, const char *__path, __mode_t __mode,\r
+ __dev_t *__dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));\r
+\r
+extern int __xmknodat (int __ver, int __fd, const char *__path,\r
+ __mode_t __mode, __dev_t *__dev)\r
+ __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 5)));\r
+# 54 "../include/arch/unix/apr_arch_file_io.h" 2\r
+# 75 "../include/arch/unix/apr_arch_file_io.h"\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/param.h" 1 3 4\r
+# 23 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/param.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/bits/param.h" 3 4\r
+# 1 "/usr/include/linux/param.h" 1 3 4\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/asm/param.h" 1 3 4\r
+# 1 "/usr/include/asm-generic/param.h" 1 3 4\r
+# 2 "/usr/include/x86_64-linux-gnu/asm/param.h" 2 3 4\r
+# 5 "/usr/include/linux/param.h" 2 3 4\r
+# 29 "/usr/include/x86_64-linux-gnu/bits/param.h" 2 3 4\r
+# 32 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4\r
+# 76 "../include/arch/unix/apr_arch_file_io.h" 2\r
+# 93 "../include/arch/unix/apr_arch_file_io.h"\r
+struct apr_file_t {\r
+ apr_pool_t *pool;\r
+ int filedes;\r
+ char *fname;\r
+ apr_int32_t flags;\r
+ int eof_hit;\r
+ int is_pipe;\r
+ apr_interval_time_t timeout;\r
+ int buffered;\r
+ enum {BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;\r
+ int ungetchar;\r
+\r
+\r
+\r
+\r
+\r
+ char *buffer;\r
+ apr_size_t bufpos;\r
+ apr_size_t bufsize;\r
+ unsigned long dataRead;\r
+ int direction;\r
+ apr_off_t filePtr;\r
+\r
+ struct apr_thread_mutex_t *thlock;\r
+\r
+};\r
+# 142 "../include/arch/unix/apr_arch_file_io.h"\r
+typedef struct stat struct_stat;\r
+# 151 "../include/arch/unix/apr_arch_file_io.h"\r
+struct apr_dir_t {\r
+ apr_pool_t *pool;\r
+ char *dirname;\r
+ DIR *dirstruct;\r
+\r
+\r
+\r
+ struct dirent *entry;\r
+\r
+};\r
+\r
+apr_status_t apr_unix_file_cleanup(void *);\r
+apr_status_t apr_unix_child_file_cleanup(void *);\r
+\r
+mode_t apr_unix_perms2mode(apr_fileperms_t perms);\r
+apr_fileperms_t apr_unix_mode2perms(mode_t mode);\r
+\r
+apr_status_t apr_file_flush_locked(apr_file_t *thefile);\r
+apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,\r
+ apr_file_t *thefile);\r
+# 29 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
+# 42 "../include/arch/unix/apr_arch_proc_mutex.h"\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/ipctypes.h" 1 3 4\r
+# 28 "/usr/include/x86_64-linux-gnu/bits/ipctypes.h" 3 4\r
+typedef int __ipc_pid_t;\r
+# 29 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 2 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/ipc.h" 1 3 4\r
+# 42 "/usr/include/x86_64-linux-gnu/bits/ipc.h" 3 4\r
+struct ipc_perm\r
+ {\r
+ __key_t __key;\r
+ __uid_t uid;\r
+ __gid_t gid;\r
+ __uid_t cuid;\r
+ __gid_t cgid;\r
+ unsigned short int mode;\r
+ unsigned short int __pad1;\r
+ unsigned short int __seq;\r
+ unsigned short int __pad2;\r
+ __syscall_ulong_t __glibc_reserved1;\r
+ __syscall_ulong_t __glibc_reserved2;\r
+ };\r
+# 30 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 2 3 4\r
+# 54 "/usr/include/x86_64-linux-gnu/sys/ipc.h" 3 4\r
+extern key_t ftok (const char *__pathname, int __proj_id) __attribute__ ((__nothrow__ ));\r
+# 43 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/sem.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/sys/sem.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 25 "/usr/include/x86_64-linux-gnu/sys/sem.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/sem.h" 1 3 4\r
+# 38 "/usr/include/x86_64-linux-gnu/bits/sem.h" 3 4\r
+struct semid_ds\r
+{\r
+ struct ipc_perm sem_perm;\r
+ __time_t sem_otime;\r
+ __syscall_ulong_t __glibc_reserved1;\r
+ __time_t sem_ctime;\r
+ __syscall_ulong_t __glibc_reserved2;\r
+ __syscall_ulong_t sem_nsems;\r
+ __syscall_ulong_t __glibc_reserved3;\r
+ __syscall_ulong_t __glibc_reserved4;\r
+};\r
+# 72 "/usr/include/x86_64-linux-gnu/bits/sem.h" 3 4\r
+struct seminfo\r
+{\r
+ int semmap;\r
+ int semmni;\r
+ int semmns;\r
+ int semmnu;\r
+ int semmsl;\r
+ int semopm;\r
+ int semume;\r
+ int semusz;\r
+ int semvmx;\r
+ int semaem;\r
+};\r
+# 31 "/usr/include/x86_64-linux-gnu/sys/sem.h" 2 3 4\r
+# 41 "/usr/include/x86_64-linux-gnu/sys/sem.h" 3 4\r
+struct sembuf\r
+{\r
+ unsigned short int sem_num;\r
+ short int sem_op;\r
+ short int sem_flg;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+extern int semctl (int __semid, int __semnum, int __cmd, ...) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int semget (key_t __key, int __nsems, int __semflg) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __attribute__ ((__nothrow__ ));\r
+# 46 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
+\r
+\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/file.h" 1 3 4\r
+# 50 "/usr/include/x86_64-linux-gnu/sys/file.h" 3 4\r
+extern int flock (int __fd, int __operation) __attribute__ ((__nothrow__ ));\r
+# 49 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
+# 60 "../include/arch/unix/apr_arch_proc_mutex.h"\r
+# 1 "/usr/include/x86_64-linux-gnu/sys/mman.h" 1 3 4\r
+# 25 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
+# 1 "/usr/lib/llvm-3.5/bin/../lib/clang/3.5.0/include/stddef.h" 1 3 4\r
+# 26 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4\r
+# 41 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/mman.h" 1 3 4\r
+# 45 "/usr/include/x86_64-linux-gnu/bits/mman.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 1 3 4\r
+# 46 "/usr/include/x86_64-linux-gnu/bits/mman.h" 2 3 4\r
+# 42 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4\r
+# 57 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
+extern void *mmap (void *__addr, size_t __len, int __prot,\r
+ int __flags, int __fd, __off_t __offset) __attribute__ ((__nothrow__ ));\r
+# 76 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
+extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int msync (void *__addr, size_t __len, int __flags);\r
+\r
+\r
+\r
+\r
+extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int mlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int munlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+extern int mlockall (int __flags) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+extern int munlockall (void) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int mincore (void *__start, size_t __len, unsigned char *__vec)\r
+ __attribute__ ((__nothrow__ ));\r
+# 144 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4\r
+extern int shm_open (const char *__name, int __oflag, mode_t __mode);\r
+\r
+\r
+extern int shm_unlink (const char *__name);\r
+# 61 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/semaphore.h" 1 3 4\r
+# 29 "/usr/include/semaphore.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 1 3 4\r
+# 23 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4\r
+# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4\r
+# 24 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 2 3 4\r
+# 36 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4\r
+typedef union\r
+{\r
+ char __size[32];\r
+ long int __align;\r
+} sem_t;\r
+# 30 "/usr/include/semaphore.h" 2 3 4\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)\r
+ __attribute__ ((__nothrow__ ));\r
+\r
+extern int sem_destroy (sem_t *__sem) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern sem_t *sem_open (const char *__name, int __oflag, ...) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sem_close (sem_t *__sem) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+extern int sem_unlink (const char *__name) __attribute__ ((__nothrow__ ));\r
+\r
+\r
+\r
+\r
+\r
+extern int sem_wait (sem_t *__sem);\r
+\r
+\r
+\r
+\r
+\r
+\r
+extern int sem_timedwait (sem_t *__restrict __sem,\r
+ const struct timespec *__restrict __abstime);\r
+\r
+\r
+\r
+extern int sem_trywait (sem_t *__sem) __attribute__ ((__nothrow__));\r
+\r
+\r
+extern int sem_post (sem_t *__sem) __attribute__ ((__nothrow__));\r
+\r
+\r
+extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)\r
+ __attribute__ ((__nothrow__ ));\r
+# 67 "../include/arch/unix/apr_arch_proc_mutex.h" 2\r
+\r
+\r
+\r
+struct apr_proc_mutex_unix_lock_methods_t {\r
+ unsigned int flags;\r
+ apr_status_t (*create)(apr_proc_mutex_t *, const char *);\r
+ apr_status_t (*acquire)(apr_proc_mutex_t *);\r
+ apr_status_t (*tryacquire)(apr_proc_mutex_t *);\r
+ apr_status_t (*release)(apr_proc_mutex_t *);\r
+ apr_status_t (*cleanup)(void *);\r
+ apr_status_t (*child_init)(apr_proc_mutex_t **, apr_pool_t *, const char *);\r
+ const char *name;\r
+};\r
+typedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lock_methods_t;\r
+\r
+\r
+\r
+\r
+\r
+union semun {\r
+ int val;\r
+ struct semid_ds *buf;\r
+ unsigned short *array;\r
+};\r
+\r
+\r
+struct apr_proc_mutex_t {\r
+ apr_pool_t *pool;\r
+ const apr_proc_mutex_unix_lock_methods_t *meth;\r
+ const apr_proc_mutex_unix_lock_methods_t *inter_meth;\r
+ int curr_locked;\r
+ char *fname;\r
+\r
+ apr_file_t *interproc;\r
+\r
+\r
+ sem_t *psem_interproc;\r
+\r
+\r
+ pthread_mutex_t *pthread_interproc;\r
+\r
+};\r
+\r
+void apr_proc_mutex_unix_setup_lock(void);\r
+# 20 "./../locks/unix/proc_mutex.c" 2\r
+\r
+# 1 "../include/apr_hash.h" 1\r
+# 52 "../include/apr_hash.h"\r
+typedef struct apr_hash_t apr_hash_t;\r
+\r
+\r
+\r
+\r
+typedef struct apr_hash_index_t apr_hash_index_t;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef unsigned int (*apr_hashfunc_t)(const char *key, apr_ssize_t *klen);\r
+\r
+\r
+\r
+\r
+unsigned int apr_hashfunc_default(const char *key,\r
+ apr_ssize_t *klen);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_hash_t * apr_hash_make(apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_hash_t * apr_hash_make_custom(apr_pool_t *pool,\r
+ apr_hashfunc_t hash_func);\r
+# 96 "../include/apr_hash.h"\r
+apr_hash_t * apr_hash_copy(apr_pool_t *pool,\r
+ const apr_hash_t *h);\r
+# 107 "../include/apr_hash.h"\r
+void apr_hash_set(apr_hash_t *ht, const void *key,\r
+ apr_ssize_t klen, const void *val);\r
+# 117 "../include/apr_hash.h"\r
+void * apr_hash_get(apr_hash_t *ht, const void *key,\r
+ apr_ssize_t klen);\r
+# 147 "../include/apr_hash.h"\r
+apr_hash_index_t * apr_hash_first(apr_pool_t *p, apr_hash_t *ht);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_hash_index_t * apr_hash_next(apr_hash_index_t *hi);\r
+# 166 "../include/apr_hash.h"\r
+void apr_hash_this(apr_hash_index_t *hi, const void **key,\r
+ apr_ssize_t *klen, void **val);\r
+\r
+\r
+\r
+\r
+\r
+\r
+const void* apr_hash_this_key(apr_hash_index_t *hi);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_ssize_t apr_hash_this_key_len(apr_hash_index_t *hi);\r
+\r
+\r
+\r
+\r
+\r
+\r
+void* apr_hash_this_val(apr_hash_index_t *hi);\r
+\r
+\r
+\r
+\r
+\r
+\r
+unsigned int apr_hash_count(apr_hash_t *ht);\r
+\r
+\r
+\r
+\r
+\r
+void apr_hash_clear(apr_hash_t *ht);\r
+# 212 "../include/apr_hash.h"\r
+apr_hash_t * apr_hash_overlay(apr_pool_t *p,\r
+ const apr_hash_t *overlay,\r
+ const apr_hash_t *base);\r
+# 230 "../include/apr_hash.h"\r
+apr_hash_t * apr_hash_merge(apr_pool_t *p,\r
+ const apr_hash_t *h1,\r
+ const apr_hash_t *h2,\r
+ void * (*merger)(apr_pool_t *p,\r
+ const void *key,\r
+ apr_ssize_t klen,\r
+ const void *h1_val,\r
+ const void *h2_val,\r
+ const void *data),\r
+ const void *data);\r
+# 252 "../include/apr_hash.h"\r
+typedef int (apr_hash_do_callback_fn_t)(void *rec, const void *key,\r
+ apr_ssize_t klen,\r
+ const void *value);\r
+# 268 "../include/apr_hash.h"\r
+int apr_hash_do(apr_hash_do_callback_fn_t *comp,\r
+ void *rec, const apr_hash_t *ht);\r
+\r
+\r
+\r
+\r
+apr_pool_t * apr_hash_pool_get (const apr_hash_t *thehash);\r
+# 22 "./../locks/unix/proc_mutex.c" 2\r
+\r
+apr_status_t apr_proc_mutex_destroy(apr_proc_mutex_t *mutex)\r
+{\r
+ return apr_pool_cleanup_run(mutex->pool, mutex, apr_proc_mutex_cleanup);\r
+}\r
+\r
+\r
+\r
+static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex,\r
+ apr_pool_t *cont,\r
+ const char *fname)\r
+{\r
+ return 0;\r
+}\r
+# 44 "./../locks/unix/proc_mutex.c"\r
+static apr_status_t proc_mutex_posix_cleanup(void *mutex_)\r
+{\r
+ apr_proc_mutex_t *mutex = mutex_;\r
+\r
+ if (sem_close(mutex->psem_interproc) < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static unsigned int rshash (char *p) {\r
+\r
+ unsigned int b = 378551;\r
+ unsigned int a = 63689;\r
+ unsigned int retval = 0;\r
+\r
+ for( ; *p; p++)\r
+ {\r
+ retval = retval * a + (*p);\r
+ a *= b;\r
+ }\r
+\r
+ return retval;\r
+}\r
+\r
+static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,\r
+ const char *fname)\r
+{\r
+\r
+ sem_t *psem;\r
+ char semname[32];\r
+\r
+ new_mutex->interproc = apr_palloc(new_mutex->pool,\r
+ sizeof(*new_mutex->interproc));\r
+# 101 "./../locks/unix/proc_mutex.c"\r
+ if (fname) {\r
+ apr_ssize_t flen = strlen(fname);\r
+ char *p = apr_pstrndup(new_mutex->pool, fname, strlen(fname));\r
+ unsigned int h1, h2;\r
+ h1 = (apr_hashfunc_default((const char *)p, &flen) & 0xffffffff);\r
+ h2 = (rshash(p) & 0xffffffff);\r
+ apr_snprintf(semname, sizeof(semname), "/ApR.%xH%x", h1, h2);\r
+ } else {\r
+ apr_time_t now;\r
+ unsigned long sec;\r
+ unsigned long usec;\r
+ now = apr_time_now();\r
+ sec = ((now) / 1000000L);\r
+ usec = ((now) % 1000000L);\r
+ apr_snprintf(semname, sizeof(semname), "/ApR.%lxZ%lx", sec, usec);\r
+ }\r
+ psem = sem_open(semname, 0100 | 0200, 0644, 1);\r
+ if (psem == (sem_t *)((sem_t *) 0)) {\r
+ if ((*__errno_location ()) == 36) {\r
+\r
+ semname[13] = '\0';\r
+ } else {\r
+ return (*__errno_location ());\r
+ }\r
+ psem = sem_open(semname, 0100 | 0200, 0644, 1);\r
+ }\r
+\r
+ if (psem == (sem_t *)((sem_t *) 0)) {\r
+ return (*__errno_location ());\r
+ }\r
+\r
+ sem_unlink(semname);\r
+ new_mutex->psem_interproc = psem;\r
+ new_mutex->fname = apr_pstrdup(new_mutex->pool, semname);\r
+ apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,\r
+ apr_proc_mutex_cleanup,\r
+ apr_pool_cleanup_null);\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_posix_acquire(apr_proc_mutex_t *mutex)\r
+{\r
+ if (sem_wait(mutex->psem_interproc) < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_posix_tryacquire(apr_proc_mutex_t *mutex)\r
+{\r
+ if (sem_trywait(mutex->psem_interproc) < 0) {\r
+ if ((*__errno_location ()) == 11) {\r
+ return ((20000 + 50000) + 25);\r
+ }\r
+ return (*__errno_location ());\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_posix_release(apr_proc_mutex_t *mutex)\r
+{\r
+ mutex->curr_locked = 0;\r
+ if (sem_post(mutex->psem_interproc) < 0) {\r
+\r
+\r
+ return (*__errno_location ());\r
+ }\r
+ return 0;\r
+}\r
+\r
+static const apr_proc_mutex_unix_lock_methods_t mutex_posixsem_methods =\r
+{\r
+\r
+\r
+\r
+ 0,\r
+\r
+ proc_mutex_posix_create,\r
+ proc_mutex_posix_acquire,\r
+ proc_mutex_posix_tryacquire,\r
+ proc_mutex_posix_release,\r
+ proc_mutex_posix_cleanup,\r
+ proc_mutex_no_child_init,\r
+ "posixsem"\r
+};\r
+\r
+\r
+\r
+\r
+\r
+static struct sembuf proc_mutex_op_on;\r
+static struct sembuf proc_mutex_op_try;\r
+static struct sembuf proc_mutex_op_off;\r
+\r
+static void proc_mutex_sysv_setup(void)\r
+{\r
+ proc_mutex_op_on.sem_num = 0;\r
+ proc_mutex_op_on.sem_op = -1;\r
+ proc_mutex_op_on.sem_flg = 0x1000;\r
+ proc_mutex_op_try.sem_num = 0;\r
+ proc_mutex_op_try.sem_op = -1;\r
+ proc_mutex_op_try.sem_flg = 0x1000 | 04000;\r
+ proc_mutex_op_off.sem_num = 0;\r
+ proc_mutex_op_off.sem_op = 1;\r
+ proc_mutex_op_off.sem_flg = 0x1000;\r
+}\r
+\r
+static apr_status_t proc_mutex_sysv_cleanup(void *mutex_)\r
+{\r
+ apr_proc_mutex_t *mutex=mutex_;\r
+ union semun ick;\r
+\r
+ if (mutex->interproc->filedes != -1) {\r
+ ick.val = 0;\r
+ semctl(mutex->interproc->filedes, 0, 0, ick);\r
+ }\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_sysv_create(apr_proc_mutex_t *new_mutex,\r
+ const char *fname)\r
+{\r
+ union semun ick;\r
+ apr_status_t rv;\r
+\r
+ new_mutex->interproc = apr_palloc(new_mutex->pool, sizeof(*new_mutex->interproc));\r
+ new_mutex->interproc->filedes = semget(((__key_t) 0), 1, 01000 | 0600);\r
+\r
+ if (new_mutex->interproc->filedes < 0) {\r
+ rv = (*__errno_location ());\r
+ proc_mutex_sysv_cleanup(new_mutex);\r
+ return rv;\r
+ }\r
+ ick.val = 1;\r
+ if (semctl(new_mutex->interproc->filedes, 0, 16, ick) < 0) {\r
+ rv = (*__errno_location ());\r
+ proc_mutex_sysv_cleanup(new_mutex);\r
+ return rv;\r
+ }\r
+ new_mutex->curr_locked = 0;\r
+ apr_pool_cleanup_register(new_mutex->pool,\r
+ (void *)new_mutex, apr_proc_mutex_cleanup,\r
+ apr_pool_cleanup_null);\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_sysv_acquire(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ do {\r
+ rc = semop(mutex->interproc->filedes, &proc_mutex_op_on, 1);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_sysv_tryacquire(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ do {\r
+ rc = semop(mutex->interproc->filedes, &proc_mutex_op_try, 1);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+ if ((*__errno_location ()) == 11) {\r
+ return ((20000 + 50000) + 25);\r
+ }\r
+ return (*__errno_location ());\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_sysv_release(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ mutex->curr_locked = 0;\r
+ do {\r
+ rc = semop(mutex->interproc->filedes, &proc_mutex_op_off, 1);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+ return 0;\r
+}\r
+\r
+static const apr_proc_mutex_unix_lock_methods_t mutex_sysv_methods =\r
+{\r
+\r
+\r
+\r
+ 0,\r
+\r
+ proc_mutex_sysv_create,\r
+ proc_mutex_sysv_acquire,\r
+ proc_mutex_sysv_tryacquire,\r
+ proc_mutex_sysv_release,\r
+ proc_mutex_sysv_cleanup,\r
+ proc_mutex_no_child_init,\r
+ "sysvsem"\r
+};\r
+\r
+\r
+\r
+\r
+\r
+static apr_status_t proc_mutex_proc_pthread_cleanup(void *mutex_)\r
+{\r
+ apr_proc_mutex_t *mutex=mutex_;\r
+ apr_status_t rv;\r
+\r
+ if (mutex->curr_locked == 1) {\r
+ if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {\r
+\r
+\r
+\r
+ return rv;\r
+ }\r
+ }\r
+\r
+ if (mutex->curr_locked != -1) {\r
+ if ((rv = pthread_mutex_destroy(mutex->pthread_interproc))) {\r
+\r
+\r
+\r
+ return rv;\r
+ }\r
+ }\r
+ if (munmap((caddr_t)mutex->pthread_interproc, sizeof(pthread_mutex_t))) {\r
+ return (*__errno_location ());\r
+ }\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,\r
+ const char *fname)\r
+{\r
+ apr_status_t rv;\r
+ int fd;\r
+ pthread_mutexattr_t mattr;\r
+\r
+ fd = open("/dev/zero", 02);\r
+ if (fd < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+\r
+ new_mutex->pthread_interproc = (pthread_mutex_t *)mmap(\r
+ (caddr_t) 0,\r
+ sizeof(pthread_mutex_t),\r
+ 0x1 | 0x2, 0x01,\r
+ fd, 0);\r
+ if (new_mutex->pthread_interproc == (pthread_mutex_t *) (caddr_t) -1) {\r
+ close(fd);\r
+ return (*__errno_location ());\r
+ }\r
+ close(fd);\r
+\r
+ new_mutex->curr_locked = -1;\r
+\r
+ if ((rv = pthread_mutexattr_init(&mattr))) {\r
+\r
+\r
+\r
+ proc_mutex_proc_pthread_cleanup(new_mutex);\r
+ return rv;\r
+ }\r
+ if ((rv = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))) {\r
+\r
+\r
+\r
+ proc_mutex_proc_pthread_cleanup(new_mutex);\r
+ pthread_mutexattr_destroy(&mattr);\r
+ return rv;\r
+ }\r
+\r
+\r
+ if ((rv = pthread_mutexattr_setrobust_np(&mattr,\r
+ PTHREAD_MUTEX_ROBUST_NP))) {\r
+\r
+\r
+\r
+ proc_mutex_proc_pthread_cleanup(new_mutex);\r
+ pthread_mutexattr_destroy(&mattr);\r
+ return rv;\r
+ }\r
+ if ((rv = pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT))) {\r
+\r
+\r
+\r
+ proc_mutex_proc_pthread_cleanup(new_mutex);\r
+ pthread_mutexattr_destroy(&mattr);\r
+ return rv;\r
+ }\r
+\r
+\r
+ if ((rv = pthread_mutex_init(new_mutex->pthread_interproc, &mattr))) {\r
+\r
+\r
+\r
+ proc_mutex_proc_pthread_cleanup(new_mutex);\r
+ pthread_mutexattr_destroy(&mattr);\r
+ return rv;\r
+ }\r
+\r
+ new_mutex->curr_locked = 0;\r
+\r
+ if ((rv = pthread_mutexattr_destroy(&mattr))) {\r
+\r
+\r
+\r
+ proc_mutex_proc_pthread_cleanup(new_mutex);\r
+ return rv;\r
+ }\r
+\r
+ apr_pool_cleanup_register(new_mutex->pool,\r
+ (void *)new_mutex,\r
+ apr_proc_mutex_cleanup,\r
+ apr_pool_cleanup_null);\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_proc_pthread_acquire(apr_proc_mutex_t *mutex)\r
+{\r
+ apr_status_t rv;\r
+\r
+ if ((rv = pthread_mutex_lock(mutex->pthread_interproc))) {\r
+\r
+\r
+\r
+\r
+\r
+ if (rv == 130) {\r
+ pthread_mutex_consistent_np(mutex->pthread_interproc);\r
+ }\r
+ else\r
+ return rv;\r
+\r
+\r
+\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_proc_pthread_tryacquire(apr_proc_mutex_t *mutex)\r
+{\r
+ apr_status_t rv;\r
+\r
+ if ((rv = pthread_mutex_trylock(mutex->pthread_interproc))) {\r
+\r
+\r
+\r
+ if (rv == 16) {\r
+ return ((20000 + 50000) + 25);\r
+ }\r
+\r
+\r
+ if (rv == 130) {\r
+ pthread_mutex_consistent_np(mutex->pthread_interproc);\r
+ rv = 0;\r
+ }\r
+ else\r
+ return rv;\r
+\r
+\r
+\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return rv;\r
+}\r
+\r
+static apr_status_t proc_mutex_proc_pthread_release(apr_proc_mutex_t *mutex)\r
+{\r
+ apr_status_t rv;\r
+\r
+ mutex->curr_locked = 0;\r
+ if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {\r
+\r
+\r
+\r
+ return rv;\r
+ }\r
+ return 0;\r
+}\r
+\r
+static const apr_proc_mutex_unix_lock_methods_t mutex_proc_pthread_methods =\r
+{\r
+ 1,\r
+ proc_mutex_proc_pthread_create,\r
+ proc_mutex_proc_pthread_acquire,\r
+ proc_mutex_proc_pthread_tryacquire,\r
+ proc_mutex_proc_pthread_release,\r
+ proc_mutex_proc_pthread_cleanup,\r
+ proc_mutex_no_child_init,\r
+ "pthread"\r
+};\r
+\r
+\r
+\r
+\r
+\r
+static struct flock proc_mutex_lock_it;\r
+static struct flock proc_mutex_unlock_it;\r
+\r
+static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *);\r
+\r
+static void proc_mutex_fcntl_setup(void)\r
+{\r
+ proc_mutex_lock_it.l_whence = 0;\r
+ proc_mutex_lock_it.l_start = 0;\r
+ proc_mutex_lock_it.l_len = 0;\r
+ proc_mutex_lock_it.l_type = 1;\r
+ proc_mutex_lock_it.l_pid = 0;\r
+ proc_mutex_unlock_it.l_whence = 0;\r
+ proc_mutex_unlock_it.l_start = 0;\r
+ proc_mutex_unlock_it.l_len = 0;\r
+ proc_mutex_unlock_it.l_type = 2;\r
+ proc_mutex_unlock_it.l_pid = 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)\r
+{\r
+ apr_status_t status;\r
+ apr_proc_mutex_t *mutex=mutex_;\r
+\r
+ if (mutex->curr_locked == 1) {\r
+ status = proc_mutex_fcntl_release(mutex);\r
+ if (status != 0)\r
+ return status;\r
+ }\r
+\r
+ return apr_file_close(mutex->interproc);\r
+}\r
+\r
+static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,\r
+ const char *fname)\r
+{\r
+ int rv;\r
+\r
+ if (fname) {\r
+ new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);\r
+ rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
+ 0x00004 | 0x00002 | 0x00040,\r
+ 0x0400 | 0x0200 | 0x0040 | 0x0004,\r
+ new_mutex->pool);\r
+ }\r
+ else {\r
+ new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");\r
+ rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,\r
+ 0x00004 | 0x00002 | 0x00040,\r
+ new_mutex->pool);\r
+ }\r
+\r
+ if (rv != 0) {\r
+ return rv;\r
+ }\r
+\r
+ new_mutex->curr_locked = 0;\r
+ unlink(new_mutex->fname);\r
+ apr_pool_cleanup_register(new_mutex->pool,\r
+ (void*)new_mutex,\r
+ apr_proc_mutex_cleanup,\r
+ apr_pool_cleanup_null);\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_fcntl_acquire(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ do {\r
+ rc = fcntl(mutex->interproc->filedes, 7, &proc_mutex_lock_it);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+ mutex->curr_locked=1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_fcntl_tryacquire(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ do {\r
+ rc = fcntl(mutex->interproc->filedes, 6, &proc_mutex_lock_it);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+\r
+\r
+\r
+ if ((*__errno_location ()) == 11) {\r
+\r
+ return ((20000 + 50000) + 25);\r
+ }\r
+ return (*__errno_location ());\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ mutex->curr_locked=0;\r
+ do {\r
+ rc = fcntl(mutex->interproc->filedes, 7, &proc_mutex_unlock_it);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+ return 0;\r
+}\r
+\r
+static const apr_proc_mutex_unix_lock_methods_t mutex_fcntl_methods =\r
+{\r
+\r
+\r
+\r
+ 0,\r
+\r
+ proc_mutex_fcntl_create,\r
+ proc_mutex_fcntl_acquire,\r
+ proc_mutex_fcntl_tryacquire,\r
+ proc_mutex_fcntl_release,\r
+ proc_mutex_fcntl_cleanup,\r
+ proc_mutex_no_child_init,\r
+ "fcntl"\r
+};\r
+\r
+\r
+\r
+\r
+\r
+static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *);\r
+\r
+static apr_status_t proc_mutex_flock_cleanup(void *mutex_)\r
+{\r
+ apr_status_t status;\r
+ apr_proc_mutex_t *mutex=mutex_;\r
+\r
+ if (mutex->curr_locked == 1) {\r
+ status = proc_mutex_flock_release(mutex);\r
+ if (status != 0)\r
+ return status;\r
+ }\r
+ if (mutex->interproc) {\r
+ apr_file_close(mutex->interproc);\r
+ }\r
+ unlink(mutex->fname);\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,\r
+ const char *fname)\r
+{\r
+ int rv;\r
+\r
+ if (fname) {\r
+ new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);\r
+ rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
+ 0x00004 | 0x00002 | 0x00040,\r
+ 0x0400 | 0x0200,\r
+ new_mutex->pool);\r
+ }\r
+ else {\r
+ new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");\r
+ rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,\r
+ 0x00004 | 0x00002 | 0x00040,\r
+ new_mutex->pool);\r
+ }\r
+\r
+ if (rv != 0) {\r
+ proc_mutex_flock_cleanup(new_mutex);\r
+ return (*__errno_location ());\r
+ }\r
+ new_mutex->curr_locked = 0;\r
+ apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,\r
+ apr_proc_mutex_cleanup,\r
+ apr_pool_cleanup_null);\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_flock_acquire(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ do {\r
+ rc = flock(mutex->interproc->filedes, 2);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_flock_tryacquire(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ do {\r
+ rc = flock(mutex->interproc->filedes, 2 | 4);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+ if ((*__errno_location ()) == 11 || (*__errno_location ()) == 11) {\r
+ return ((20000 + 50000) + 25);\r
+ }\r
+ return (*__errno_location ());\r
+ }\r
+ mutex->curr_locked = 1;\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *mutex)\r
+{\r
+ int rc;\r
+\r
+ mutex->curr_locked = 0;\r
+ do {\r
+ rc = flock(mutex->interproc->filedes, 8);\r
+ } while (rc < 0 && (*__errno_location ()) == 4);\r
+ if (rc < 0) {\r
+ return (*__errno_location ());\r
+ }\r
+ return 0;\r
+}\r
+\r
+static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex,\r
+ apr_pool_t *pool,\r
+ const char *fname)\r
+{\r
+ apr_proc_mutex_t *new_mutex;\r
+ int rv;\r
+\r
+ new_mutex = (apr_proc_mutex_t *)apr_palloc(pool, sizeof(apr_proc_mutex_t));\r
+\r
+ memcpy(new_mutex, *mutex, sizeof *new_mutex);\r
+ new_mutex->pool = pool;\r
+ if (!fname) {\r
+ fname = (*mutex)->fname;\r
+ }\r
+ new_mutex->fname = apr_pstrdup(pool, fname);\r
+ rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,\r
+ 0x00002, 0, new_mutex->pool);\r
+ if (rv != 0) {\r
+ return rv;\r
+ }\r
+ *mutex = new_mutex;\r
+ return 0;\r
+}\r
+\r
+static const apr_proc_mutex_unix_lock_methods_t mutex_flock_methods =\r
+{\r
+\r
+\r
+\r
+ 0,\r
+\r
+ proc_mutex_flock_create,\r
+ proc_mutex_flock_acquire,\r
+ proc_mutex_flock_tryacquire,\r
+ proc_mutex_flock_release,\r
+ proc_mutex_flock_cleanup,\r
+ proc_mutex_flock_child_init,\r
+ "flock"\r
+};\r
+\r
+\r
+\r
+void apr_proc_mutex_unix_setup_lock(void)\r
+{\r
+\r
+\r
+ proc_mutex_sysv_setup();\r
+\r
+\r
+ proc_mutex_fcntl_setup();\r
+\r
+}\r
+\r
+static apr_status_t proc_mutex_choose_method(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech)\r
+{\r
+ switch (mech) {\r
+ case APR_LOCK_FCNTL:\r
+\r
+ new_mutex->inter_meth = &mutex_fcntl_methods;\r
+\r
+\r
+\r
+ break;\r
+ case APR_LOCK_FLOCK:\r
+\r
+ new_mutex->inter_meth = &mutex_flock_methods;\r
+\r
+\r
+\r
+ break;\r
+ case APR_LOCK_SYSVSEM:\r
+\r
+ new_mutex->inter_meth = &mutex_sysv_methods;\r
+\r
+\r
+\r
+ break;\r
+ case APR_LOCK_POSIXSEM:\r
+\r
+ new_mutex->inter_meth = &mutex_posixsem_methods;\r
+\r
+\r
+\r
+ break;\r
+ case APR_LOCK_PROC_PTHREAD:\r
+\r
+ new_mutex->inter_meth = &mutex_proc_pthread_methods;\r
+\r
+\r
+\r
+ break;\r
+ case APR_LOCK_DEFAULT:\r
+\r
+\r
+\r
+ new_mutex->inter_meth = &mutex_sysv_methods;\r
+# 842 "./../locks/unix/proc_mutex.c"\r
+ break;\r
+ default:\r
+ return ((20000 + 50000) + 23);\r
+ }\r
+ return 0;\r
+}\r
+\r
+const char * apr_proc_mutex_defname(void)\r
+{\r
+ apr_status_t rv;\r
+ apr_proc_mutex_t mutex;\r
+\r
+ if ((rv = proc_mutex_choose_method(&mutex, APR_LOCK_DEFAULT)) != 0) {\r
+ return "unknown";\r
+ }\r
+ mutex.meth = mutex.inter_meth;\r
+\r
+ return apr_proc_mutex_name(&mutex);\r
+}\r
+\r
+static apr_status_t proc_mutex_create(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech, const char *fname)\r
+{\r
+ apr_status_t rv;\r
+\r
+ if ((rv = proc_mutex_choose_method(new_mutex, mech)) != 0) {\r
+ return rv;\r
+ }\r
+\r
+ new_mutex->meth = new_mutex->inter_meth;\r
+\r
+ if ((rv = new_mutex->meth->create(new_mutex, fname)) != 0) {\r
+ return rv;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_proc_mutex_create(apr_proc_mutex_t **mutex,\r
+ const char *fname,\r
+ apr_lockmech_e mech,\r
+ apr_pool_t *pool)\r
+{\r
+ apr_proc_mutex_t *new_mutex;\r
+ apr_status_t rv;\r
+\r
+ new_mutex = memset(apr_palloc(pool, sizeof(apr_proc_mutex_t)), 0, sizeof(apr_proc_mutex_t));\r
+ new_mutex->pool = pool;\r
+\r
+ if ((rv = proc_mutex_create(new_mutex, mech, fname)) != 0)\r
+ return rv;\r
+\r
+ *mutex = new_mutex;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,\r
+ const char *fname,\r
+ apr_pool_t *pool)\r
+{\r
+ return (*mutex)->meth->child_init(mutex, pool, fname);\r
+}\r
+\r
+apr_status_t apr_proc_mutex_lock(apr_proc_mutex_t *mutex)\r
+{\r
+ return mutex->meth->acquire(mutex);\r
+}\r
+\r
+apr_status_t apr_proc_mutex_trylock(apr_proc_mutex_t *mutex)\r
+{\r
+ return mutex->meth->tryacquire(mutex);\r
+}\r
+\r
+apr_status_t apr_proc_mutex_unlock(apr_proc_mutex_t *mutex)\r
+{\r
+ return mutex->meth->release(mutex);\r
+}\r
+\r
+apr_status_t apr_proc_mutex_cleanup(void *mutex)\r
+{\r
+ return ((apr_proc_mutex_t *)mutex)->meth->cleanup(mutex);\r
+}\r
+\r
+const char * apr_proc_mutex_name(apr_proc_mutex_t *mutex)\r
+{\r
+ return mutex->meth->name;\r
+}\r
+\r
+const char * apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)\r
+{\r
+\r
+\r
+\r
+ if (mutex->meth == &mutex_flock_methods) {\r
+ return mutex->fname;\r
+ }\r
+\r
+\r
+ if (mutex->meth == &mutex_fcntl_methods) {\r
+ return mutex->fname;\r
+ }\r
+\r
+ return ((void*)0);\r
+}\r
+\r
+apr_pool_t * apr_proc_mutex_pool_get (const apr_proc_mutex_t *theproc_mutex) { return theproc_mutex->pool; }\r
+\r
+\r
+\r
+apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,\r
+ apr_proc_mutex_t *pmutex)\r
+{\r
+\r
+ if (pmutex->interproc) {\r
+ ospmutex->crossproc = pmutex->interproc->filedes;\r
+ }\r
+ else {\r
+ ospmutex->crossproc = -1;\r
+ }\r
+\r
+\r
+ ospmutex->pthread_interproc = pmutex->pthread_interproc;\r
+\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,\r
+ apr_os_proc_mutex_t *ospmutex,\r
+ apr_pool_t *pool)\r
+{\r
+ if (pool == ((void*)0)) {\r
+ return (20000 + 2);\r
+ }\r
+ if ((*pmutex) == ((void*)0)) {\r
+ (*pmutex) = (apr_proc_mutex_t *)memset(apr_palloc(pool, sizeof(apr_proc_mutex_t)), 0, sizeof(apr_proc_mutex_t));\r
+\r
+ (*pmutex)->pool = pool;\r
+ }\r
+\r
+ apr_os_file_put(&(*pmutex)->interproc, &ospmutex->crossproc, 0, pool);\r
+\r
+\r
+ (*pmutex)->pthread_interproc = ospmutex->pthread_interproc;\r
+\r
+ return 0;\r
+}\r
+# 14 "main1.c" 2\r
+# 1 "./../memory/unix/apr_pools.c" 1\r
+# 31 "./../memory/unix/apr_pools.c"\r
+# 1 "../include/apr_want.h" 1\r
+# 32 "./../memory/unix/apr_pools.c" 2\r
+# 1 "../include/apr_env.h" 1\r
+# 42 "../include/apr_env.h"\r
+apr_status_t apr_env_get(char **value, const char *envvar,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_env_set(const char *envvar, const char *value,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_env_delete(const char *envvar, apr_pool_t *pool);\r
+# 33 "./../memory/unix/apr_pools.c" 2\r
+# 85 "./../memory/unix/apr_pools.c"\r
+struct apr_allocator_t {\r
+\r
+ apr_uint32_t max_index;\r
+\r
+\r
+\r
+\r
+\r
+ apr_uint32_t max_free_index;\r
+\r
+\r
+\r
+\r
+ apr_uint32_t current_free_index;\r
+\r
+ apr_thread_mutex_t *mutex;\r
+\r
+ apr_pool_t *owner;\r
+# 113 "./../memory/unix/apr_pools.c"\r
+ apr_memnode_t *free[20];\r
+};\r
+# 123 "./../memory/unix/apr_pools.c"\r
+apr_status_t apr_allocator_create(apr_allocator_t **allocator)\r
+{\r
+ apr_allocator_t *new_allocator;\r
+\r
+ *allocator = ((void*)0);\r
+\r
+ if ((new_allocator = malloc((((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0))\r
+ return 12;\r
+\r
+ memset(new_allocator, 0, (((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)));\r
+ new_allocator->max_free_index = 0;\r
+\r
+ *allocator = new_allocator;\r
+\r
+ return 0;\r
+}\r
+\r
+void apr_allocator_destroy(apr_allocator_t *allocator)\r
+{\r
+ apr_uint32_t index;\r
+ apr_memnode_t *node, **ref;\r
+\r
+ for (index = 0; index < 20; index++) {\r
+ ref = &allocator->free[index];\r
+ while ((node = *ref) != ((void*)0)) {\r
+ *ref = node->next;\r
+\r
+\r
+\r
+ free(node);\r
+\r
+ }\r
+ }\r
+\r
+ free(allocator);\r
+}\r
+\r
+\r
+void apr_allocator_mutex_set(apr_allocator_t *allocator,\r
+ apr_thread_mutex_t *mutex)\r
+{\r
+ allocator->mutex = mutex;\r
+}\r
+\r
+apr_thread_mutex_t * apr_allocator_mutex_get(\r
+ apr_allocator_t *allocator)\r
+{\r
+ return allocator->mutex;\r
+}\r
+\r
+\r
+void apr_allocator_owner_set(apr_allocator_t *allocator,\r
+ apr_pool_t *pool)\r
+{\r
+ allocator->owner = pool;\r
+}\r
+\r
+apr_pool_t * apr_allocator_owner_get(apr_allocator_t *allocator)\r
+{\r
+ return allocator->owner;\r
+}\r
+\r
+void apr_allocator_max_free_set(apr_allocator_t *allocator,\r
+ apr_size_t in_size)\r
+{\r
+ apr_uint32_t max_free_index;\r
+ apr_uint32_t size = (apr_uint32_t)in_size;\r
+\r
+\r
+ apr_thread_mutex_t *mutex;\r
+\r
+ mutex = apr_allocator_mutex_get(allocator);\r
+ if (mutex != ((void*)0))\r
+ apr_thread_mutex_lock(mutex);\r
+\r
+\r
+ max_free_index = (((size) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) >> 12;\r
+ allocator->current_free_index += max_free_index;\r
+ allocator->current_free_index -= allocator->max_free_index;\r
+ allocator->max_free_index = max_free_index;\r
+ if (allocator->current_free_index > max_free_index)\r
+ allocator->current_free_index = max_free_index;\r
+\r
+\r
+ if (mutex != ((void*)0))\r
+ apr_thread_mutex_unlock(mutex);\r
+\r
+}\r
+\r
+static __inline__\r
+apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)\r
+{\r
+ apr_memnode_t *node, **ref;\r
+ apr_uint32_t max_index;\r
+ apr_size_t size, i, index;\r
+\r
+\r
+\r
+\r
+ size = (((in_size + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1))) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1));\r
+ if (size < in_size) {\r
+ return ((void*)0);\r
+ }\r
+ if (size < (2 * (1 << 12)))\r
+ size = (2 * (1 << 12));\r
+\r
+\r
+\r
+\r
+ index = (size >> 12) - 1;\r
+\r
+ if (index > (4294967295U)) {\r
+ return ((void*)0);\r
+ }\r
+\r
+\r
+\r
+\r
+ if (index <= allocator->max_index) {\r
+\r
+ if (allocator->mutex)\r
+ apr_thread_mutex_lock(allocator->mutex);\r
+# 257 "./../memory/unix/apr_pools.c"\r
+ max_index = allocator->max_index;\r
+ ref = &allocator->free[index];\r
+ i = index;\r
+ while (*ref == ((void*)0) && i < max_index) {\r
+ ref++;\r
+ i++;\r
+ }\r
+\r
+ if ((node = *ref) != ((void*)0)) {\r
+\r
+\r
+\r
+\r
+\r
+ if ((*ref = node->next) == ((void*)0) && i >= max_index) {\r
+ do {\r
+ ref--;\r
+ max_index--;\r
+ }\r
+ while (*ref == ((void*)0) && max_index > 0);\r
+\r
+ allocator->max_index = max_index;\r
+ }\r
+\r
+ allocator->current_free_index += node->index + 1;\r
+ if (allocator->current_free_index > allocator->max_free_index)\r
+ allocator->current_free_index = allocator->max_free_index;\r
+\r
+\r
+ if (allocator->mutex)\r
+ apr_thread_mutex_unlock(allocator->mutex);\r
+\r
+\r
+ node->next = ((void*)0);\r
+ node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
+\r
+ return node;\r
+ }\r
+\r
+\r
+ if (allocator->mutex)\r
+ apr_thread_mutex_unlock(allocator->mutex);\r
+\r
+ }\r
+\r
+\r
+\r
+\r
+ else if (allocator->free[0]) {\r
+\r
+ if (allocator->mutex)\r
+ apr_thread_mutex_lock(allocator->mutex);\r
+\r
+\r
+\r
+\r
+\r
+ ref = &allocator->free[0];\r
+ while ((node = *ref) != ((void*)0) && index > node->index)\r
+ ref = &node->next;\r
+\r
+ if (node) {\r
+ *ref = node->next;\r
+\r
+ allocator->current_free_index += node->index + 1;\r
+ if (allocator->current_free_index > allocator->max_free_index)\r
+ allocator->current_free_index = allocator->max_free_index;\r
+\r
+\r
+ if (allocator->mutex)\r
+ apr_thread_mutex_unlock(allocator->mutex);\r
+\r
+\r
+ node->next = ((void*)0);\r
+ node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
+\r
+ return node;\r
+ }\r
+\r
+\r
+ if (allocator->mutex)\r
+ apr_thread_mutex_unlock(allocator->mutex);\r
+\r
+ }\r
+# 349 "./../memory/unix/apr_pools.c"\r
+ if ((node = malloc(size)) == ((void*)0))\r
+\r
+ return ((void*)0);\r
+\r
+ node->next = ((void*)0);\r
+ node->index = (apr_uint32_t)index;\r
+ node->first_avail = (char *)node + (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1));\r
+ node->endp = (char *)node + size;\r
+\r
+ return node;\r
+}\r
+\r
+static __inline__\r
+void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)\r
+{\r
+ apr_memnode_t *next; apr_memnode_t *freelist = ((void*)0);\r
+ apr_uint32_t index, max_index;\r
+ apr_uint32_t max_free_index, current_free_index;\r
+\r
+\r
+ if (allocator->mutex)\r
+ apr_thread_mutex_lock(allocator->mutex);\r
+\r
+\r
+ max_index = allocator->max_index;\r
+ max_free_index = allocator->max_free_index;\r
+ current_free_index = allocator->current_free_index;\r
+\r
+\r
+\r
+\r
+ do {\r
+ next = node->next;\r
+ index = node->index;\r
+\r
+ if (max_free_index != 0\r
+ && index + 1 > current_free_index) {\r
+ node->next = freelist;\r
+ freelist = node;\r
+ }\r
+ else if (index < 20) {\r
+\r
+\r
+\r
+ if ((node->next = allocator->free[index]) == ((void*)0)\r
+ && index > max_index) {\r
+ max_index = index;\r
+ }\r
+ allocator->free[index] = node;\r
+ if (current_free_index >= index + 1)\r
+ current_free_index -= index + 1;\r
+ else\r
+ current_free_index = 0;\r
+ }\r
+ else {\r
+\r
+\r
+\r
+ node->next = allocator->free[0];\r
+ allocator->free[0] = node;\r
+ if (current_free_index >= index + 1)\r
+ current_free_index -= index + 1;\r
+ else\r
+ current_free_index = 0;\r
+ }\r
+ } while ((node = next) != ((void*)0));\r
+\r
+ allocator->max_index = max_index;\r
+ allocator->current_free_index = current_free_index;\r
+\r
+\r
+ if (allocator->mutex)\r
+ apr_thread_mutex_unlock(allocator->mutex);\r
+\r
+\r
+ while (freelist != ((void*)0)) {\r
+ node = freelist;\r
+ freelist = node->next;\r
+\r
+\r
+\r
+ free(node);\r
+\r
+ }\r
+}\r
+\r
+apr_memnode_t * apr_allocator_alloc(apr_allocator_t *allocator,\r
+ apr_size_t size)\r
+{\r
+ return allocator_alloc(allocator, size);\r
+}\r
+\r
+void apr_allocator_free(apr_allocator_t *allocator,\r
+ apr_memnode_t *node)\r
+{\r
+ allocator_free(allocator, node);\r
+}\r
+# 467 "./../memory/unix/apr_pools.c"\r
+typedef struct cleanup_t cleanup_t;\r
+\r
+\r
+struct process_chain {\r
+\r
+ apr_proc_t *proc;\r
+ apr_kill_conditions_e kill_how;\r
+\r
+ struct process_chain *next;\r
+};\r
+# 500 "./../memory/unix/apr_pools.c"\r
+struct apr_pool_t {\r
+ apr_pool_t *parent;\r
+ apr_pool_t *child;\r
+ apr_pool_t *sibling;\r
+ apr_pool_t **ref;\r
+ cleanup_t *cleanups;\r
+ cleanup_t *free_cleanups;\r
+ apr_allocator_t *allocator;\r
+ struct process_chain *subprocesses;\r
+ apr_abortfunc_t abort_fn;\r
+ apr_hash_t *user_data;\r
+ const char *tag;\r
+\r
+\r
+ apr_memnode_t *active;\r
+ apr_memnode_t *self;\r
+ char *self_first_avail;\r
+# 535 "./../memory/unix/apr_pools.c"\r
+ cleanup_t *pre_cleanups;\r
+};\r
+# 545 "./../memory/unix/apr_pools.c"\r
+static apr_byte_t apr_pools_initialized = 0;\r
+static apr_pool_t *global_pool = ((void*)0);\r
+\r
+\r
+static apr_allocator_t *global_allocator = ((void*)0);\r
+# 560 "./../memory/unix/apr_pools.c"\r
+static void run_cleanups(cleanup_t **c);\r
+static void free_proc_chain(struct process_chain *procs);\r
+# 572 "./../memory/unix/apr_pools.c"\r
+apr_status_t apr_pool_initialize(void)\r
+{\r
+ apr_status_t rv;\r
+\r
+ if (apr_pools_initialized++)\r
+ return 0;\r
+# 587 "./../memory/unix/apr_pools.c"\r
+ if ((rv = apr_allocator_create(&global_allocator)) != 0) {\r
+ apr_pools_initialized = 0;\r
+ return rv;\r
+ }\r
+\r
+ if ((rv = apr_pool_create_ex(&global_pool, ((void*)0), ((void*)0),\r
+ global_allocator)) != 0) {\r
+ apr_allocator_destroy(global_allocator);\r
+ global_allocator = ((void*)0);\r
+ apr_pools_initialized = 0;\r
+ return rv;\r
+ }\r
+\r
+ apr_pool_tag(global_pool, "apr_global_pool");\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ if ((rv = apr_atomic_init(global_pool)) != 0) {\r
+ return rv;\r
+ }\r
+\r
+\r
+ {\r
+ apr_thread_mutex_t *mutex;\r
+\r
+ if ((rv = apr_thread_mutex_create(&mutex,\r
+ 0x0,\r
+ global_pool)) != 0) {\r
+ return rv;\r
+ }\r
+\r
+ apr_allocator_mutex_set(global_allocator, mutex);\r
+ }\r
+\r
+\r
+ apr_allocator_owner_set(global_allocator, global_pool);\r
+\r
+ return 0;\r
+}\r
+\r
+void apr_pool_terminate(void)\r
+{\r
+ if (!apr_pools_initialized)\r
+ return;\r
+\r
+ if (--apr_pools_initialized)\r
+ return;\r
+\r
+ apr_pool_destroy(global_pool);\r
+ global_pool = ((void*)0);\r
+\r
+ global_allocator = ((void*)0);\r
+}\r
+# 668 "./../memory/unix/apr_pools.c"\r
+void * apr_palloc(apr_pool_t *pool, apr_size_t in_size)\r
+{\r
+ apr_memnode_t *active, *node;\r
+ void *mem;\r
+ apr_size_t size, free_index;\r
+\r
+ size = (((in_size) + ((8) - 1)) & ~((8) - 1));\r
+ if (size < in_size) {\r
+ if (pool->abort_fn)\r
+ pool->abort_fn(12);\r
+\r
+ return ((void*)0);\r
+ }\r
+ active = pool->active;\r
+\r
+\r
+ if (size <= ((apr_size_t)(active->endp - active->first_avail))) {\r
+ mem = active->first_avail;\r
+ active->first_avail += size;\r
+\r
+ return mem;\r
+ }\r
+\r
+ node = active->next;\r
+ if (size <= ((apr_size_t)(node->endp - node->first_avail))) {\r
+ do { *node->ref = node->next; node->next->ref = node->ref; } while (0);\r
+ }\r
+ else {\r
+ if ((node = allocator_alloc(pool->allocator, size)) == ((void*)0)) {\r
+ if (pool->abort_fn)\r
+ pool->abort_fn(12);\r
+\r
+ return ((void*)0);\r
+ }\r
+ }\r
+\r
+ node->free_index = 0;\r
+\r
+ mem = node->first_avail;\r
+ node->first_avail += size;\r
+\r
+ do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
+\r
+ pool->active = node;\r
+\r
+ free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
+\r
+\r
+ active->free_index = (apr_uint32_t)free_index;\r
+ node = active->next;\r
+ if (free_index >= node->free_index)\r
+ return mem;\r
+\r
+ do {\r
+ node = node->next;\r
+ }\r
+ while (free_index < node->free_index);\r
+\r
+ do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
+ do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
+\r
+ return mem;\r
+}\r
+# 740 "./../memory/unix/apr_pools.c"\r
+void * apr_pcalloc(apr_pool_t *pool, apr_size_t size);\r
+void * apr_pcalloc(apr_pool_t *pool, apr_size_t size)\r
+{\r
+ void *mem;\r
+\r
+ if ((mem = apr_palloc(pool, size)) != ((void*)0)) {\r
+ memset(mem, 0, size);\r
+ }\r
+\r
+ return mem;\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_pool_clear(apr_pool_t *pool)\r
+{\r
+ apr_memnode_t *active;\r
+\r
+\r
+ run_cleanups(&pool->pre_cleanups);\r
+ pool->pre_cleanups = ((void*)0);\r
+\r
+\r
+\r
+\r
+ while (pool->child)\r
+ apr_pool_destroy(pool->child);\r
+\r
+\r
+ run_cleanups(&pool->cleanups);\r
+ pool->cleanups = ((void*)0);\r
+ pool->free_cleanups = ((void*)0);\r
+\r
+\r
+ free_proc_chain(pool->subprocesses);\r
+ pool->subprocesses = ((void*)0);\r
+\r
+\r
+ pool->user_data = ((void*)0);\r
+\r
+\r
+\r
+\r
+ active = pool->active = pool->self;\r
+ active->first_avail = pool->self_first_avail;\r
+\r
+ if (active->next == active)\r
+ return;\r
+\r
+ *active->ref = ((void*)0);\r
+ allocator_free(pool->allocator, active->next);\r
+ active->next = active;\r
+ active->ref = &active->next;\r
+}\r
+\r
+void apr_pool_destroy(apr_pool_t *pool)\r
+{\r
+ apr_memnode_t *active;\r
+ apr_allocator_t *allocator;\r
+\r
+\r
+ run_cleanups(&pool->pre_cleanups);\r
+ pool->pre_cleanups = ((void*)0);\r
+\r
+\r
+\r
+\r
+ while (pool->child)\r
+ apr_pool_destroy(pool->child);\r
+\r
+\r
+ run_cleanups(&pool->cleanups);\r
+\r
+\r
+ free_proc_chain(pool->subprocesses);\r
+\r
+\r
+ if (pool->parent) {\r
+\r
+ apr_thread_mutex_t *mutex;\r
+\r
+ if ((mutex = apr_allocator_mutex_get(pool->parent->allocator)) != ((void*)0))\r
+ apr_thread_mutex_lock(mutex);\r
+\r
+\r
+ if ((*pool->ref = pool->sibling) != ((void*)0))\r
+ pool->sibling->ref = pool->ref;\r
+\r
+\r
+ if (mutex)\r
+ apr_thread_mutex_unlock(mutex);\r
+\r
+ }\r
+\r
+\r
+\r
+\r
+ allocator = pool->allocator;\r
+ active = pool->self;\r
+ *active->ref = ((void*)0);\r
+\r
+\r
+ if (apr_allocator_owner_get(allocator) == pool) {\r
+\r
+\r
+\r
+ apr_allocator_mutex_set(allocator, ((void*)0));\r
+ }\r
+\r
+\r
+\r
+\r
+\r
+ allocator_free(allocator, active);\r
+\r
+\r
+\r
+\r
+\r
+\r
+ if (apr_allocator_owner_get(allocator) == pool) {\r
+ apr_allocator_destroy(allocator);\r
+ }\r
+}\r
+\r
+apr_status_t apr_pool_create_ex(apr_pool_t **newpool,\r
+ apr_pool_t *parent,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator)\r
+{\r
+ apr_pool_t *pool;\r
+ apr_memnode_t *node;\r
+\r
+ *newpool = ((void*)0);\r
+\r
+ if (!parent)\r
+ parent = global_pool;\r
+\r
+\r
+\r
+\r
+\r
+ if (!abort_fn && parent)\r
+ abort_fn = parent->abort_fn;\r
+\r
+ if (allocator == ((void*)0))\r
+ allocator = parent->allocator;\r
+\r
+ if ((node = allocator_alloc(allocator,\r
+ (2 * (1 << 12)) - (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
+ if (abort_fn)\r
+ abort_fn(12);\r
+\r
+ return 12;\r
+ }\r
+\r
+ node->next = node;\r
+ node->ref = &node->next;\r
+\r
+ pool = (apr_pool_t *)node->first_avail;\r
+ node->first_avail = pool->self_first_avail = (char *)pool + (((sizeof(apr_pool_t)) + ((8) - 1)) & ~((8) - 1));\r
+\r
+ pool->allocator = allocator;\r
+ pool->active = pool->self = node;\r
+ pool->abort_fn = abort_fn;\r
+ pool->child = ((void*)0);\r
+ pool->cleanups = ((void*)0);\r
+ pool->free_cleanups = ((void*)0);\r
+ pool->pre_cleanups = ((void*)0);\r
+ pool->subprocesses = ((void*)0);\r
+ pool->user_data = ((void*)0);\r
+ pool->tag = ((void*)0);\r
+\r
+\r
+\r
+\r
+\r
+ if ((pool->parent = parent) != ((void*)0)) {\r
+\r
+ apr_thread_mutex_t *mutex;\r
+\r
+ if ((mutex = apr_allocator_mutex_get(parent->allocator)) != ((void*)0))\r
+ apr_thread_mutex_lock(mutex);\r
+\r
+\r
+ if ((pool->sibling = parent->child) != ((void*)0))\r
+ pool->sibling->ref = &pool->sibling;\r
+\r
+ parent->child = pool;\r
+ pool->ref = &parent->child;\r
+\r
+\r
+ if (mutex)\r
+ apr_thread_mutex_unlock(mutex);\r
+\r
+ }\r
+ else {\r
+ pool->sibling = ((void*)0);\r
+ pool->ref = ((void*)0);\r
+ }\r
+\r
+ *newpool = pool;\r
+\r
+ return 0;\r
+}\r
+\r
+\r
+\r
+apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator)\r
+{\r
+ return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
+}\r
+\r
+apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator)\r
+{\r
+ apr_pool_t *pool;\r
+ apr_memnode_t *node;\r
+ apr_allocator_t *pool_allocator;\r
+\r
+ *newpool = ((void*)0);\r
+\r
+ if (!apr_pools_initialized)\r
+ return (20000 + 2);\r
+ if ((pool_allocator = allocator) == ((void*)0)) {\r
+ if ((pool_allocator = malloc((((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
+ if (abort_fn)\r
+ abort_fn(12);\r
+\r
+ return 12;\r
+ }\r
+ memset(pool_allocator, 0, (((sizeof(apr_allocator_t)) + ((8) - 1)) & ~((8) - 1)));\r
+ pool_allocator->max_free_index = 0;\r
+ }\r
+ if ((node = allocator_alloc(pool_allocator,\r
+ (2 * (1 << 12)) - (((sizeof(apr_memnode_t)) + ((8) - 1)) & ~((8) - 1)))) == ((void*)0)) {\r
+ if (abort_fn)\r
+ abort_fn(12);\r
+\r
+ return 12;\r
+ }\r
+\r
+ node->next = node;\r
+ node->ref = &node->next;\r
+\r
+ pool = (apr_pool_t *)node->first_avail;\r
+ node->first_avail = pool->self_first_avail = (char *)pool + (((sizeof(apr_pool_t)) + ((8) - 1)) & ~((8) - 1));\r
+\r
+ pool->allocator = pool_allocator;\r
+ pool->active = pool->self = node;\r
+ pool->abort_fn = abort_fn;\r
+ pool->child = ((void*)0);\r
+ pool->cleanups = ((void*)0);\r
+ pool->free_cleanups = ((void*)0);\r
+ pool->pre_cleanups = ((void*)0);\r
+ pool->subprocesses = ((void*)0);\r
+ pool->user_data = ((void*)0);\r
+ pool->tag = ((void*)0);\r
+ pool->parent = ((void*)0);\r
+ pool->sibling = ((void*)0);\r
+ pool->ref = ((void*)0);\r
+\r
+\r
+\r
+\r
+ if (!allocator)\r
+ pool_allocator->owner = pool;\r
+ *newpool = pool;\r
+\r
+ return 0;\r
+}\r
+# 1036 "./../memory/unix/apr_pools.c"\r
+struct psprintf_data {\r
+ apr_vformatter_buff_t vbuff;\r
+ apr_memnode_t *node;\r
+ apr_pool_t *pool;\r
+ apr_byte_t got_a_new_node;\r
+ apr_memnode_t *free;\r
+};\r
+\r
+\r
+\r
+static int psprintf_flush(apr_vformatter_buff_t *vbuff)\r
+{\r
+ struct psprintf_data *ps = (struct psprintf_data *)vbuff;\r
+ apr_memnode_t *node, *active;\r
+ apr_size_t cur_len, size;\r
+ char *strp;\r
+ apr_pool_t *pool;\r
+ apr_size_t free_index;\r
+\r
+ pool = ps->pool;\r
+ active = ps->node;\r
+ strp = ps->vbuff.curpos;\r
+ cur_len = strp - active->first_avail;\r
+ size = cur_len << 1;\r
+\r
+\r
+\r
+\r
+\r
+\r
+ if (size < 32)\r
+ size = 32;\r
+\r
+ node = active->next;\r
+ if (!ps->got_a_new_node && size <= ((apr_size_t)(node->endp - node->first_avail))) {\r
+\r
+ do { *node->ref = node->next; node->next->ref = node->ref; } while (0);\r
+ do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
+\r
+ node->free_index = 0;\r
+\r
+ pool->active = node;\r
+\r
+ free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
+\r
+\r
+ active->free_index = (apr_uint32_t)free_index;\r
+ node = active->next;\r
+ if (free_index < node->free_index) {\r
+ do {\r
+ node = node->next;\r
+ }\r
+ while (free_index < node->free_index);\r
+\r
+ do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
+ do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
+ }\r
+\r
+ node = pool->active;\r
+ }\r
+ else {\r
+ if ((node = allocator_alloc(pool->allocator, size)) == ((void*)0))\r
+ return -1;\r
+\r
+ if (ps->got_a_new_node) {\r
+ active->next = ps->free;\r
+ ps->free = active;\r
+ }\r
+\r
+ ps->got_a_new_node = 1;\r
+ }\r
+\r
+ memcpy(node->first_avail, active->first_avail, cur_len);\r
+\r
+ ps->node = node;\r
+ ps->vbuff.curpos = node->first_avail + cur_len;\r
+ ps->vbuff.endpos = node->endp - 1;\r
+\r
+ return 0;\r
+}\r
+\r
+char * apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)\r
+{\r
+ struct psprintf_data ps;\r
+ char *strp;\r
+ apr_size_t size;\r
+ apr_memnode_t *active, *node;\r
+ apr_size_t free_index;\r
+\r
+ ps.node = active = pool->active;\r
+ ps.pool = pool;\r
+ ps.vbuff.curpos = ps.node->first_avail;\r
+\r
+\r
+ ps.vbuff.endpos = ps.node->endp - 1;\r
+ ps.got_a_new_node = 0;\r
+ ps.free = ((void*)0);\r
+\r
+\r
+\r
+\r
+ if (ps.node->first_avail == ps.node->endp) {\r
+ if (psprintf_flush(&ps.vbuff) == -1) {\r
+ if (pool->abort_fn) {\r
+ pool->abort_fn(12);\r
+ }\r
+\r
+ return ((void*)0);\r
+ }\r
+ }\r
+\r
+ if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) {\r
+ if (pool->abort_fn)\r
+ pool->abort_fn(12);\r
+\r
+ return ((void*)0);\r
+ }\r
+\r
+ strp = ps.vbuff.curpos;\r
+ *strp++ = '\0';\r
+\r
+ size = strp - ps.node->first_avail;\r
+ size = (((size) + ((8) - 1)) & ~((8) - 1));\r
+ strp = ps.node->first_avail;\r
+ ps.node->first_avail += size;\r
+\r
+ if (ps.free)\r
+ allocator_free(pool->allocator, ps.free);\r
+\r
+\r
+\r
+\r
+ if (!ps.got_a_new_node)\r
+ return strp;\r
+\r
+ active = pool->active;\r
+ node = ps.node;\r
+\r
+ node->free_index = 0;\r
+\r
+ do { node->ref = active->ref; *node->ref = node; node->next = active; active->ref = &node->next; } while (0);\r
+\r
+ pool->active = node;\r
+\r
+ free_index = ((((active->endp - active->first_avail + 1) + (((1 << 12)) - 1)) & ~(((1 << 12)) - 1)) - (1 << 12)) >> 12;\r
+\r
+\r
+ active->free_index = (apr_uint32_t)free_index;\r
+ node = active->next;\r
+\r
+ if (free_index >= node->free_index)\r
+ return strp;\r
+\r
+ do {\r
+ node = node->next;\r
+ }\r
+ while (free_index < node->free_index);\r
+\r
+ do { *active->ref = active->next; active->next->ref = active->ref; } while (0);\r
+ do { active->ref = node->ref; *active->ref = active; active->next = node; node->ref = &active->next; } while (0);\r
+\r
+ return strp;\r
+}\r
+# 2049 "./../memory/unix/apr_pools.c"\r
+char * apr_psprintf(apr_pool_t *p, const char *fmt, ...)\r
+{\r
+ va_list ap;\r
+ char *res;\r
+\r
+ __builtin_va_start(ap, fmt);\r
+ res = apr_pvsprintf(p, fmt, ap);\r
+ __builtin_va_end(ap);\r
+ return res;\r
+}\r
+\r
+\r
+\r
+\r
+\r
+void apr_pool_abort_set(apr_abortfunc_t abort_fn,\r
+ apr_pool_t *pool)\r
+{\r
+ pool->abort_fn = abort_fn;\r
+}\r
+\r
+apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)\r
+{\r
+ return pool->abort_fn;\r
+}\r
+\r
+apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)\r
+{\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ return pool->parent;\r
+}\r
+\r
+apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)\r
+{\r
+ return pool->allocator;\r
+}\r
+\r
+\r
+\r
+\r
+int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)\r
+{\r
+ if (a == ((void*)0))\r
+ return 1;\r
+# 2108 "./../memory/unix/apr_pools.c"\r
+ while (b) {\r
+ if (a == b)\r
+ return 1;\r
+\r
+ b = b->parent;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+void apr_pool_tag(apr_pool_t *pool, const char *tag)\r
+{\r
+ pool->tag = tag;\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_pool_userdata_set(const void *data, const char *key,\r
+ apr_status_t (*cleanup) (void *),\r
+ apr_pool_t *pool)\r
+{\r
+\r
+\r
+\r
+\r
+ if (pool->user_data == ((void*)0))\r
+ pool->user_data = apr_hash_make(pool);\r
+\r
+ if (apr_hash_get(pool->user_data, key, (-1)) == ((void*)0)) {\r
+ char *new_key = apr_pstrdup(pool, key);\r
+ apr_hash_set(pool->user_data, new_key, (-1), data);\r
+ }\r
+ else {\r
+ apr_hash_set(pool->user_data, key, (-1), data);\r
+ }\r
+\r
+ if (cleanup)\r
+ apr_pool_cleanup_register(pool, data, cleanup, cleanup);\r
+\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_pool_userdata_setn(const void *data,\r
+ const char *key,\r
+ apr_status_t (*cleanup)(void *),\r
+ apr_pool_t *pool)\r
+{\r
+\r
+\r
+\r
+\r
+ if (pool->user_data == ((void*)0))\r
+ pool->user_data = apr_hash_make(pool);\r
+\r
+ apr_hash_set(pool->user_data, key, (-1), data);\r
+\r
+ if (cleanup)\r
+ apr_pool_cleanup_register(pool, data, cleanup, cleanup);\r
+\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_pool_userdata_get(void **data, const char *key,\r
+ apr_pool_t *pool)\r
+{\r
+\r
+\r
+\r
+\r
+ if (pool->user_data == ((void*)0)) {\r
+ *data = ((void*)0);\r
+ }\r
+ else {\r
+ *data = apr_hash_get(pool->user_data, key, (-1));\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+struct cleanup_t {\r
+ struct cleanup_t *next;\r
+ const void *data;\r
+ apr_status_t (*plain_cleanup_fn)(void *data);\r
+ apr_status_t (*child_cleanup_fn)(void *data);\r
+};\r
+\r
+void apr_pool_cleanup_register(apr_pool_t *p, const void *data,\r
+ apr_status_t (*plain_cleanup_fn)(void *data),\r
+ apr_status_t (*child_cleanup_fn)(void *data))\r
+{\r
+ cleanup_t *c;\r
+\r
+\r
+\r
+\r
+\r
+ if (p != ((void*)0)) {\r
+ if (p->free_cleanups) {\r
+\r
+ c = p->free_cleanups;\r
+ p->free_cleanups = c->next;\r
+ } else {\r
+ c = apr_palloc(p, sizeof(cleanup_t));\r
+ }\r
+ c->data = data;\r
+ c->plain_cleanup_fn = plain_cleanup_fn;\r
+ c->child_cleanup_fn = child_cleanup_fn;\r
+ c->next = p->cleanups;\r
+ p->cleanups = c;\r
+ }\r
+}\r
+\r
+void apr_pool_pre_cleanup_register(apr_pool_t *p, const void *data,\r
+ apr_status_t (*plain_cleanup_fn)(void *data))\r
+{\r
+ cleanup_t *c;\r
+\r
+\r
+\r
+\r
+\r
+ if (p != ((void*)0)) {\r
+ if (p->free_cleanups) {\r
+\r
+ c = p->free_cleanups;\r
+ p->free_cleanups = c->next;\r
+ } else {\r
+ c = apr_palloc(p, sizeof(cleanup_t));\r
+ }\r
+ c->data = data;\r
+ c->plain_cleanup_fn = plain_cleanup_fn;\r
+ c->next = p->pre_cleanups;\r
+ p->pre_cleanups = c;\r
+ }\r
+}\r
+\r
+void apr_pool_cleanup_kill(apr_pool_t *p, const void *data,\r
+ apr_status_t (*cleanup_fn)(void *))\r
+{\r
+ cleanup_t *c, **lastp;\r
+\r
+\r
+\r
+\r
+\r
+ if (p == ((void*)0))\r
+ return;\r
+\r
+ c = p->cleanups;\r
+ lastp = &p->cleanups;\r
+ while (c) {\r
+# 2276 "./../memory/unix/apr_pools.c"\r
+ if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {\r
+ *lastp = c->next;\r
+\r
+ c->next = p->free_cleanups;\r
+ p->free_cleanups = c;\r
+ break;\r
+ }\r
+\r
+ lastp = &c->next;\r
+ c = c->next;\r
+ }\r
+\r
+\r
+ c = p->pre_cleanups;\r
+ lastp = &p->pre_cleanups;\r
+ while (c) {\r
+# 2301 "./../memory/unix/apr_pools.c"\r
+ if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {\r
+ *lastp = c->next;\r
+\r
+ c->next = p->free_cleanups;\r
+ p->free_cleanups = c;\r
+ break;\r
+ }\r
+\r
+ lastp = &c->next;\r
+ c = c->next;\r
+ }\r
+\r
+}\r
+\r
+void apr_pool_child_cleanup_set(apr_pool_t *p, const void *data,\r
+ apr_status_t (*plain_cleanup_fn)(void *),\r
+ apr_status_t (*child_cleanup_fn)(void *))\r
+{\r
+ cleanup_t *c;\r
+\r
+\r
+\r
+\r
+\r
+ if (p == ((void*)0))\r
+ return;\r
+\r
+ c = p->cleanups;\r
+ while (c) {\r
+ if (c->data == data && c->plain_cleanup_fn == plain_cleanup_fn) {\r
+ c->child_cleanup_fn = child_cleanup_fn;\r
+ break;\r
+ }\r
+\r
+ c = c->next;\r
+ }\r
+}\r
+\r
+apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data,\r
+ apr_status_t (*cleanup_fn)(void *))\r
+{\r
+ apr_pool_cleanup_kill(p, data, cleanup_fn);\r
+ return (*cleanup_fn)(data);\r
+}\r
+\r
+static void run_cleanups(cleanup_t **cref)\r
+{\r
+ cleanup_t *c = *cref;\r
+\r
+ while (c) {\r
+ *cref = c->next;\r
+ (*c->plain_cleanup_fn)((void *)c->data);\r
+ c = *cref;\r
+ }\r
+}\r
+\r
+\r
+\r
+static void run_child_cleanups(cleanup_t **cref)\r
+{\r
+ cleanup_t *c = *cref;\r
+\r
+ while (c) {\r
+ *cref = c->next;\r
+ (*c->child_cleanup_fn)((void *)c->data);\r
+ c = *cref;\r
+ }\r
+}\r
+\r
+static void cleanup_pool_for_exec(apr_pool_t *p)\r
+{\r
+ run_child_cleanups(&p->cleanups);\r
+\r
+ for (p = p->child; p; p = p->sibling)\r
+ cleanup_pool_for_exec(p);\r
+}\r
+\r
+void apr_pool_cleanup_for_exec(void)\r
+{\r
+ cleanup_pool_for_exec(global_pool);\r
+}\r
+# 2402 "./../memory/unix/apr_pools.c"\r
+apr_status_t apr_pool_cleanup_null(void *data)\r
+{\r
+\r
+ return 0;\r
+}\r
+# 2415 "./../memory/unix/apr_pools.c"\r
+void apr_pool_note_subprocess(apr_pool_t *pool, apr_proc_t *proc,\r
+ apr_kill_conditions_e how)\r
+{\r
+ struct process_chain *pc = apr_palloc(pool, sizeof(struct process_chain));\r
+\r
+ pc->proc = proc;\r
+ pc->kill_how = how;\r
+ pc->next = pool->subprocesses;\r
+ pool->subprocesses = pc;\r
+}\r
+\r
+static void free_proc_chain(struct process_chain *procs)\r
+{\r
+\r
+\r
+\r
+\r
+ struct process_chain *pc;\r
+ int need_timeout = 0;\r
+ apr_time_t timeout_interval;\r
+\r
+ if (!procs)\r
+ return;\r
+# 2448 "./../memory/unix/apr_pools.c"\r
+ for (pc = procs; pc; pc = pc->next) {\r
+ if (apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_NOWAIT) != ((20000 + 50000) + 6))\r
+ pc->kill_how = APR_KILL_NEVER;\r
+ }\r
+\r
+\r
+ for (pc = procs; pc; pc = pc->next) {\r
+\r
+ if ((pc->kill_how == APR_KILL_AFTER_TIMEOUT)\r
+ || (pc->kill_how == APR_KILL_ONLY_ONCE)) {\r
+\r
+\r
+\r
+\r
+\r
+\r
+ if (apr_proc_kill(pc->proc, 15) == 0)\r
+ need_timeout = 1;\r
+ }\r
+ else if (pc->kill_how == APR_KILL_ALWAYS) {\r
+\r
+\r
+\r
+\r
+\r
+ apr_proc_kill(pc->proc, 9);\r
+ }\r
+ }\r
+\r
+\r
+\r
+\r
+\r
+ if (need_timeout) {\r
+ timeout_interval = 46875;\r
+ apr_sleep(timeout_interval);\r
+\r
+ do {\r
+\r
+ need_timeout = 0;\r
+ for (pc = procs; pc; pc = pc->next) {\r
+ if (pc->kill_how == APR_KILL_AFTER_TIMEOUT) {\r
+ if (apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_NOWAIT)\r
+ == ((20000 + 50000) + 6))\r
+ need_timeout = 1;\r
+ else\r
+ pc->kill_how = APR_KILL_NEVER;\r
+ }\r
+ }\r
+ if (need_timeout) {\r
+ if (timeout_interval >= 3000000) {\r
+ break;\r
+ }\r
+ apr_sleep(timeout_interval);\r
+ timeout_interval *= 2;\r
+ }\r
+ } while (need_timeout);\r
+ }\r
+\r
+\r
+\r
+\r
+\r
+ for (pc = procs; pc; pc = pc->next) {\r
+ if (pc->kill_how == APR_KILL_AFTER_TIMEOUT)\r
+ apr_proc_kill(pc->proc, 9);\r
+ }\r
+\r
+\r
+ for (pc = procs; pc; pc = pc->next) {\r
+ if (pc->kill_how != APR_KILL_NEVER)\r
+ (void)apr_proc_wait(pc->proc, ((void*)0), ((void*)0), APR_WAIT);\r
+ }\r
+}\r
+# 2530 "./../memory/unix/apr_pools.c"\r
+void * apr_palloc_debug(apr_pool_t *pool, apr_size_t size,\r
+ const char *file_line)\r
+{\r
+ return apr_palloc(pool, size);\r
+}\r
+\r
+void * apr_pcalloc_debug(apr_pool_t *pool, apr_size_t size,\r
+ const char *file_line)\r
+{\r
+ return apr_pcalloc(pool, size);\r
+}\r
+\r
+void apr_pool_clear_debug(apr_pool_t *pool,\r
+ const char *file_line)\r
+{\r
+ apr_pool_clear(pool);\r
+}\r
+\r
+void apr_pool_destroy_debug(apr_pool_t *pool,\r
+ const char *file_line)\r
+{\r
+ apr_pool_destroy(pool);\r
+}\r
+\r
+apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool,\r
+ apr_pool_t *parent,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator,\r
+ const char *file_line)\r
+{\r
+ return apr_pool_create_ex(newpool, parent, abort_fn, allocator);\r
+}\r
+\r
+apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator,\r
+ const char *file_line)\r
+{\r
+ return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
+}\r
+\r
+apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,\r
+ apr_abortfunc_t abort_fn,\r
+ apr_allocator_t *allocator,\r
+ const char *file_line)\r
+{\r
+ return apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator);\r
+}\r
+# 15 "main1.c" 2\r
+# 1 "./../misc/unix/start.c" 1\r
+# 20 "./../misc/unix/start.c"\r
+# 1 "../include/apr_signal.h" 1\r
+# 57 "../include/apr_signal.h"\r
+typedef void apr_sigfunc_t(int);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_sigfunc_t * apr_signal(int signo, apr_sigfunc_t * func);\r
+# 80 "../include/apr_signal.h"\r
+const char * apr_signal_description_get(int signum);\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_signal_init(apr_pool_t *pglobal);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_signal_block(int signum);\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_signal_unblock(int signum);\r
+# 21 "./../misc/unix/start.c" 2\r
+\r
+\r
+\r
+# 1 "../include/arch/unix/apr_arch_internal_time.h" 1\r
+# 22 "../include/arch/unix/apr_arch_internal_time.h"\r
+void apr_unix_setup_time(void);\r
+# 25 "./../misc/unix/start.c" 2\r
+\r
+\r
+apr_status_t apr_app_initialize(int *argc,\r
+ const char * const * *argv,\r
+ const char * const * *env)\r
+{\r
+\r
+\r
+\r
+\r
+\r
+ return apr_initialize();\r
+}\r
+\r
+static int initialized = 0;\r
+\r
+apr_status_t apr_initialize(void)\r
+{\r
+ apr_pool_t *pool;\r
+ apr_status_t status;\r
+\r
+ if (initialized++) {\r
+ return 0;\r
+ }\r
+\r
+\r
+ apr_proc_mutex_unix_setup_lock();\r
+ apr_unix_setup_time();\r
+\r
+\r
+ if ((status = apr_pool_initialize()) != 0)\r
+ return status;\r
+\r
+ if (apr_pool_create_ex(&pool, ((void*)0), ((void*)0), ((void*)0)) != 0) {\r
+ return (20000 + 2);\r
+ }\r
+\r
+ apr_pool_tag(pool, "apr_initialize");\r
+# 71 "./../misc/unix/start.c"\r
+ apr_signal_init(pool);\r
+\r
+ return 0;\r
+}\r
+\r
+void apr_terminate(void)\r
+{\r
+ initialized--;\r
+ if (initialized) {\r
+ return;\r
+ }\r
+ apr_pool_terminate();\r
+\r
+}\r
+\r
+void apr_terminate2(void)\r
+{\r
+ apr_terminate();\r
+}\r
+# 16 "main1.c" 2\r
+# 1 "./../time/unix/time.c" 1\r
+# 43 "./../time/unix/time.c"\r
+static apr_int32_t get_offset(struct tm *tm)\r
+{\r
+\r
+ return tm->tm_gmtoff;\r
+# 64 "./../time/unix/time.c"\r
+}\r
+\r
+apr_status_t apr_time_ansi_put(apr_time_t *result,\r
+ time_t input)\r
+{\r
+ *result = (apr_time_t)input * 1000000L;\r
+ return 0;\r
+}\r
+\r
+\r
+apr_time_t apr_time_now(void)\r
+{\r
+ struct timeval tv;\r
+ gettimeofday(&tv, ((void*)0));\r
+ return tv.tv_sec * 1000000L + tv.tv_usec;\r
+}\r
+\r
+static void explode_time(apr_time_exp_t *xt, apr_time_t t,\r
+ apr_int32_t offset, int use_localtime)\r
+{\r
+ struct tm tm;\r
+ time_t tt = (t / 1000000L) + offset;\r
+ xt->tm_usec = t % 1000000L;\r
+\r
+\r
+ if (use_localtime)\r
+ localtime_r(&tt, &tm);\r
+ else\r
+ gmtime_r(&tt, &tm);\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ xt->tm_sec = tm.tm_sec;\r
+ xt->tm_min = tm.tm_min;\r
+ xt->tm_hour = tm.tm_hour;\r
+ xt->tm_mday = tm.tm_mday;\r
+ xt->tm_mon = tm.tm_mon;\r
+ xt->tm_year = tm.tm_year;\r
+ xt->tm_wday = tm.tm_wday;\r
+ xt->tm_yday = tm.tm_yday;\r
+ xt->tm_isdst = tm.tm_isdst;\r
+ xt->tm_gmtoff = get_offset(&tm);\r
+}\r
+\r
+apr_status_t apr_time_exp_tz(apr_time_exp_t *result,\r
+ apr_time_t input, apr_int32_t offs)\r
+{\r
+ explode_time(result, input, offs, 0);\r
+ result->tm_gmtoff = offs;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_time_exp_gmt(apr_time_exp_t *result,\r
+ apr_time_t input)\r
+{\r
+ return apr_time_exp_tz(result, input, 0);\r
+}\r
+\r
+apr_status_t apr_time_exp_lt(apr_time_exp_t *result,\r
+ apr_time_t input)\r
+{\r
+\r
+\r
+\r
+\r
+ explode_time(result, input, 0, 1);\r
+ return 0;\r
+\r
+}\r
+\r
+apr_status_t apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt)\r
+{\r
+ apr_time_t year = xt->tm_year;\r
+ apr_time_t days;\r
+ static const int dayoffset[12] =\r
+ {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};\r
+\r
+\r
+\r
+ if (xt->tm_mon < 2)\r
+ year--;\r
+\r
+\r
+\r
+ days = year * 365 + year / 4 - year / 100 + (year / 100 + 3) / 4;\r
+ days += dayoffset[xt->tm_mon] + xt->tm_mday - 1;\r
+ days -= 25508;\r
+ days = ((days * 24 + xt->tm_hour) * 60 + xt->tm_min) * 60 + xt->tm_sec;\r
+\r
+ if (days < 0) {\r
+ return (20000 + 4);\r
+ }\r
+ *t = days * 1000000L + xt->tm_usec;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_time_exp_gmt_get(apr_time_t *t,\r
+ apr_time_exp_t *xt)\r
+{\r
+ apr_status_t status = apr_time_exp_get(t, xt);\r
+ if (status == 0)\r
+ *t -= (apr_time_t) xt->tm_gmtoff * 1000000L;\r
+ return status;\r
+}\r
+\r
+apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime,\r
+ apr_time_t *aprtime)\r
+{\r
+ (*ostime)->tv_usec = *aprtime % 1000000L;\r
+ (*ostime)->tv_sec = *aprtime / 1000000L;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,\r
+ apr_time_exp_t *aprtime)\r
+{\r
+ (*ostime)->tm_sec = aprtime->tm_sec;\r
+ (*ostime)->tm_min = aprtime->tm_min;\r
+ (*ostime)->tm_hour = aprtime->tm_hour;\r
+ (*ostime)->tm_mday = aprtime->tm_mday;\r
+ (*ostime)->tm_mon = aprtime->tm_mon;\r
+ (*ostime)->tm_year = aprtime->tm_year;\r
+ (*ostime)->tm_wday = aprtime->tm_wday;\r
+ (*ostime)->tm_yday = aprtime->tm_yday;\r
+ (*ostime)->tm_isdst = aprtime->tm_isdst;\r
+\r
+\r
+ (*ostime)->tm_gmtoff = aprtime->tm_gmtoff;\r
+\r
+\r
+\r
+\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_os_imp_time_put(apr_time_t *aprtime,\r
+ apr_os_imp_time_t **ostime,\r
+ apr_pool_t *cont)\r
+{\r
+ *aprtime = (*ostime)->tv_sec * 1000000L + (*ostime)->tv_usec;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime,\r
+ apr_os_exp_time_t **ostime,\r
+ apr_pool_t *cont)\r
+{\r
+ aprtime->tm_sec = (*ostime)->tm_sec;\r
+ aprtime->tm_min = (*ostime)->tm_min;\r
+ aprtime->tm_hour = (*ostime)->tm_hour;\r
+ aprtime->tm_mday = (*ostime)->tm_mday;\r
+ aprtime->tm_mon = (*ostime)->tm_mon;\r
+ aprtime->tm_year = (*ostime)->tm_year;\r
+ aprtime->tm_wday = (*ostime)->tm_wday;\r
+ aprtime->tm_yday = (*ostime)->tm_yday;\r
+ aprtime->tm_isdst = (*ostime)->tm_isdst;\r
+\r
+\r
+ aprtime->tm_gmtoff = (*ostime)->tm_gmtoff;\r
+\r
+\r
+\r
+\r
+ return 0;\r
+}\r
+\r
+void apr_sleep(apr_interval_time_t t)\r
+{\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ struct timeval tv;\r
+ tv.tv_usec = t % 1000000L;\r
+ tv.tv_sec = t / 1000000L;\r
+ select(0, ((void*)0), ((void*)0), ((void*)0), &tv);\r
+\r
+}\r
+# 296 "./../time/unix/time.c"\r
+void apr_unix_setup_time(void)\r
+{\r
+# 339 "./../time/unix/time.c"\r
+}\r
+\r
+\r
+\r
+\r
+void apr_time_clock_hires(apr_pool_t *p)\r
+{\r
+ return;\r
+}\r
+# 17 "main1.c" 2\r
+# 1 "./../atomic/unix/builtins.c" 1\r
+# 17 "./../atomic/unix/builtins.c"\r
+# 1 "../include/arch/unix/apr_arch_atomic.h" 1\r
+# 18 "./../atomic/unix/builtins.c" 2\r
+\r
+\r
+\r
+apr_status_t apr_atomic_init(apr_pool_t *p)\r
+{\r
+ return 0;\r
+}\r
+\r
+apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem)\r
+{\r
+ return *mem;\r
+}\r
+\r
+void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
+{\r
+ *mem = val;\r
+}\r
+\r
+apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
+{\r
+ return __sync_fetch_and_add(mem, val);\r
+}\r
+\r
+void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
+{\r
+ __sync_fetch_and_sub(mem, val);\r
+}\r
+\r
+apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)\r
+{\r
+ return __sync_fetch_and_add(mem, 1);\r
+}\r
+\r
+int apr_atomic_dec32(volatile apr_uint32_t *mem)\r
+{\r
+ return __sync_sub_and_fetch(mem, 1);\r
+}\r
+\r
+apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,\r
+ apr_uint32_t cmp)\r
+{\r
+ return __sync_val_compare_and_swap(mem, cmp, with);\r
+}\r
+\r
+apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)\r
+{\r
+ __sync_synchronize();\r
+\r
+ return __sync_lock_test_and_set(mem, val);\r
+}\r
+\r
+void* apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)\r
+{\r
+ return (void*) __sync_val_compare_and_swap(mem, cmp, with);\r
+}\r
+\r
+void* apr_atomic_xchgptr(volatile void **mem, void *with)\r
+{\r
+ __sync_synchronize();\r
+\r
+ return (void*) __sync_lock_test_and_set(mem, with);\r
+}\r
+# 18 "main1.c" 2\r
+# 1 "./../threadproc/unix/signals.c" 1\r
+# 18 "./../threadproc/unix/signals.c"\r
+# 1 "../include/arch/unix/apr_arch_threadproc.h" 1\r
+# 55 "../include/arch/unix/apr_arch_threadproc.h"\r
+struct apr_thread_t {\r
+ apr_pool_t *pool;\r
+ pthread_t *td;\r
+ void *data;\r
+ apr_thread_start_t func;\r
+ apr_status_t exitval;\r
+};\r
+\r
+struct apr_threadattr_t {\r
+ apr_pool_t *pool;\r
+ pthread_attr_t attr;\r
+};\r
+\r
+struct apr_threadkey_t {\r
+ apr_pool_t *pool;\r
+ pthread_key_t key;\r
+};\r
+\r
+struct apr_thread_once_t {\r
+ pthread_once_t once;\r
+};\r
+\r
+\r
+\r
+struct apr_procattr_t {\r
+ apr_pool_t *pool;\r
+ apr_file_t *parent_in;\r
+ apr_file_t *child_in;\r
+ apr_file_t *parent_out;\r
+ apr_file_t *child_out;\r
+ apr_file_t *parent_err;\r
+ apr_file_t *child_err;\r
+ char *currdir;\r
+ apr_int32_t cmdtype;\r
+ apr_int32_t detached;\r
+\r
+ struct rlimit *limit_cpu;\r
+\r
+\r
+ struct rlimit *limit_mem;\r
+\r
+\r
+ struct rlimit *limit_nproc;\r
+\r
+\r
+ struct rlimit *limit_nofile;\r
+\r
+ apr_child_errfn_t *errfn;\r
+ apr_int32_t errchk;\r
+ apr_uid_t uid;\r
+ apr_gid_t gid;\r
+};\r
+# 19 "./../threadproc/unix/signals.c" 2\r
+\r
+\r
+\r
+\r
+\r
+# 1 "/usr/include/assert.h" 1 3 4\r
+# 25 "./../threadproc/unix/signals.c" 2\r
+# 35 "./../threadproc/unix/signals.c"\r
+apr_status_t apr_proc_kill(apr_proc_t *proc, int signum)\r
+{\r
+# 48 "./../threadproc/unix/signals.c"\r
+ if (kill(proc->pid, signum) == -1) {\r
+ return (*__errno_location ());\r
+ }\r
+\r
+ return 0;\r
+}\r
+# 74 "./../threadproc/unix/signals.c"\r
+apr_sigfunc_t * apr_signal(int signo, apr_sigfunc_t * func)\r
+{\r
+ struct sigaction act, oact;\r
+\r
+ act.__sigaction_handler.sa_handler = func;\r
+ sigemptyset(&act.sa_mask);\r
+ act.sa_flags = 0;\r
+\r
+ act.sa_flags |= 0x20000000;\r
+# 103 "./../threadproc/unix/signals.c"\r
+ if (sigaction(signo, &act, &oact) < 0)\r
+ return ((__sighandler_t) -1);\r
+ return oact.__sigaction_handler.sa_handler;\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void apr_signal_init(apr_pool_t *pglobal)\r
+{\r
+}\r
+const char *apr_signal_description_get(int signum)\r
+{\r
+ return (signum >= 0) ? sys_siglist[signum] : "unknown signal (number)";\r
+}\r
+# 274 "./../threadproc/unix/signals.c"\r
+static void remove_sync_sigs(sigset_t *sig_mask)\r
+{\r
+\r
+ sigdelset(sig_mask, 6);\r
+\r
+\r
+ sigdelset(sig_mask, 7);\r
+\r
+\r
+\r
+\r
+\r
+ sigdelset(sig_mask, 8);\r
+\r
+\r
+ sigdelset(sig_mask, 4);\r
+\r
+\r
+ sigdelset(sig_mask, 6);\r
+\r
+\r
+ sigdelset(sig_mask, 13);\r
+\r
+\r
+ sigdelset(sig_mask, 11);\r
+\r
+\r
+ sigdelset(sig_mask, 31);\r
+\r
+\r
+ sigdelset(sig_mask, 5);\r
+# 315 "./../threadproc/unix/signals.c"\r
+ sigdelset(sig_mask, 12);\r
+\r
+}\r
+\r
+apr_status_t apr_signal_thread(int(*signal_handler)(int signum))\r
+{\r
+ sigset_t sig_mask;\r
+\r
+ int (*sig_func)(int signum) = (int (*)(int))signal_handler;\r
+\r
+\r
+\r
+ sigfillset(&sig_mask);\r
+\r
+\r
+\r
+\r
+\r
+\r
+ sigdelset(&sig_mask, 9);\r
+\r
+\r
+ sigdelset(&sig_mask, 19);\r
+\r
+\r
+ sigdelset(&sig_mask, 18);\r
+\r
+\r
+\r
+\r
+\r
+\r
+ remove_sync_sigs(&sig_mask);\r
+# 379 "./../threadproc/unix/signals.c"\r
+ while (1) {\r
+\r
+ int signal_received;\r
+\r
+ if (sigwait((&sig_mask),(&signal_received)) != 0)\r
+ {\r
+\r
+ }\r
+\r
+ if (sig_func(signal_received) == 1) {\r
+ return 0;\r
+ }\r
+\r
+\r
+\r
+\r
+\r
+ }\r
+}\r
+\r
+apr_status_t apr_setup_signal_thread(void)\r
+{\r
+ sigset_t sig_mask;\r
+ int rv;\r
+# 416 "./../threadproc/unix/signals.c"\r
+ sigfillset(&sig_mask);\r
+ remove_sync_sigs(&sig_mask);\r
+\r
+\r
+\r
+\r
+\r
+\r
+ if ((rv = pthread_sigmask(2, &sig_mask, ((void*)0))) != 0) {\r
+\r
+\r
+\r
+ }\r
+\r
+ return rv;\r
+}\r
+\r
+\r
+\r
+apr_status_t apr_signal_block(int signum)\r
+{\r
+\r
+ sigset_t sig_mask;\r
+ int rv;\r
+\r
+ sigemptyset(&sig_mask);\r
+\r
+ sigaddset(&sig_mask, signum);\r
+\r
+\r
+\r
+\r
+\r
+\r
+ if ((rv = pthread_sigmask(0, &sig_mask, ((void*)0))) != 0) {\r
+\r
+\r
+\r
+ }\r
+\r
+ return rv;\r
+\r
+\r
+\r
+}\r
+\r
+apr_status_t apr_signal_unblock(int signum)\r
+{\r
+\r
+ sigset_t sig_mask;\r
+ int rv;\r
+\r
+ sigemptyset(&sig_mask);\r
+\r
+ sigaddset(&sig_mask, signum);\r
+\r
+\r
+\r
+\r
+\r
+\r
+ if ((rv = pthread_sigmask(1, &sig_mask, ((void*)0))) != 0) {\r
+\r
+\r
+\r
+ }\r
+\r
+ return rv;\r
+\r
+\r
+\r
+}\r
+# 19 "main1.c" 2\r
+# 1 "./../threadproc/unix/thread.c" 1\r
+# 19 "./../threadproc/unix/thread.c"\r
+# 1 "../include/arch/unix/apr_arch_threadproc.h" 1\r
+# 20 "./../threadproc/unix/thread.c" 2\r
+\r
+\r
+\r
+\r
+\r
+\r
+static apr_status_t threadattr_cleanup(void *data)\r
+{\r
+ apr_threadattr_t *attr = data;\r
+ apr_status_t rv;\r
+\r
+ rv = pthread_attr_destroy(&attr->attr);\r
+\r
+\r
+\r
+\r
+\r
+ return rv;\r
+}\r
+\r
+apr_status_t apr_threadattr_create(apr_threadattr_t **new,\r
+ apr_pool_t *pool)\r
+{\r
+ apr_status_t stat;\r
+\r
+ (*new) = apr_palloc(pool, sizeof(apr_threadattr_t));\r
+ (*new)->pool = pool;\r
+ stat = pthread_attr_init(&(*new)->attr);\r
+\r
+ if (stat == 0) {\r
+ apr_pool_cleanup_register(pool, *new, threadattr_cleanup,\r
+ apr_pool_cleanup_null);\r
+ return 0;\r
+ }\r
+\r
+\r
+\r
+\r
+ return stat;\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,\r
+ apr_int32_t on)\r
+{\r
+ apr_status_t stat;\r
+\r
+\r
+\r
+\r
+\r
+ if ((stat = pthread_attr_setdetachstate(&attr->attr,\r
+ ((on) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE))) == 0) {\r
+\r
+ return 0;\r
+ }\r
+ else {\r
+\r
+\r
+\r
+\r
+ return stat;\r
+ }\r
+}\r
+\r
+apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)\r
+{\r
+ int state;\r
+\r
+\r
+\r
+\r
+ pthread_attr_getdetachstate(&attr->attr, &state);\r
+\r
+ if (state == ((1) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE))\r
+ return ((20000 + 50000) + 3);\r
+ return ((20000 + 50000) + 4);\r
+}\r
+\r
+apr_status_t apr_threadattr_stacksize_set(apr_threadattr_t *attr,\r
+ apr_size_t stacksize)\r
+{\r
+ int stat;\r
+\r
+ stat = pthread_attr_setstacksize(&attr->attr, stacksize);\r
+ if (stat == 0) {\r
+ return 0;\r
+ }\r
+\r
+\r
+\r
+\r
+ return stat;\r
+}\r
+\r
+apr_status_t apr_threadattr_guardsize_set(apr_threadattr_t *attr,\r
+ apr_size_t size)\r
+{\r
+\r
+ apr_status_t rv;\r
+\r
+ rv = pthread_attr_setguardsize(&attr->attr, size);\r
+ if (rv == 0) {\r
+ return 0;\r
+ }\r
+\r
+\r
+\r
+ return rv;\r
+\r
+\r
+\r
+}\r
+\r
+static void *dummy_worker(void *opaque)\r
+{\r
+ apr_thread_t *thread = (apr_thread_t*)opaque;\r
+ return thread->func(thread, thread->data);\r
+}\r
+\r
+apr_status_t apr_thread_create(apr_thread_t **new,\r
+ apr_threadattr_t *attr,\r
+ apr_thread_start_t func,\r
+ void *data,\r
+ apr_pool_t *pool)\r
+{\r
+ apr_status_t stat;\r
+ pthread_attr_t *temp;\r
+\r
+ (*new) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));\r
+\r
+ if ((*new) == ((void*)0)) {\r
+ return 12;\r
+ }\r
+\r
+ (*new)->td = (pthread_t *)apr_pcalloc(pool, sizeof(pthread_t));\r
+\r
+ if ((*new)->td == ((void*)0)) {\r
+ return 12;\r
+ }\r
+\r
+ (*new)->data = data;\r
+ (*new)->func = func;\r
+\r
+ if (attr)\r
+ temp = &attr->attr;\r
+ else\r
+ temp = ((void*)0);\r
+\r
+ stat = apr_pool_create_ex(&(*new)->pool, pool, ((void*)0), ((void*)0));\r
+ if (stat != 0) {\r
+ return stat;\r
+ }\r
+\r
+ if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {\r
+ return 0;\r
+ }\r
+ else {\r
+\r
+\r
+\r
+\r
+ return stat;\r
+ }\r
+}\r
+\r
+apr_os_thread_t apr_os_thread_current(void)\r
+{\r
+ return pthread_self();\r
+}\r
+\r
+int apr_os_thread_equal(apr_os_thread_t tid1,\r
+ apr_os_thread_t tid2)\r
+{\r
+ return pthread_equal(tid1, tid2);\r
+}\r
+\r
+apr_status_t apr_thread_exit(apr_thread_t *thd,\r
+ apr_status_t retval)\r
+{\r
+ thd->exitval = retval;\r
+ apr_pool_destroy(thd->pool);\r
+ pthread_exit(((void*)0));\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_thread_join(apr_status_t *retval,\r
+ apr_thread_t *thd)\r
+{\r
+ apr_status_t stat;\r
+ apr_status_t *thread_stat;\r
+\r
+ if ((stat = pthread_join(*thd->td,(void *)&thread_stat)) == 0) {\r
+ *retval = thd->exitval;\r
+ return 0;\r
+ }\r
+ else {\r
+\r
+\r
+\r
+\r
+ return stat;\r
+ }\r
+}\r
+\r
+apr_status_t apr_thread_detach(apr_thread_t *thd)\r
+{\r
+ apr_status_t stat;\r
+\r
+\r
+\r
+\r
+ if ((stat = pthread_detach(*thd->td)) == 0) {\r
+\r
+\r
+ return 0;\r
+ }\r
+ else {\r
+\r
+\r
+\r
+\r
+ return stat;\r
+ }\r
+}\r
+\r
+void apr_thread_yield(void)\r
+{\r
+\r
+\r
+\r
+\r
+ pthread_yield();\r
+\r
+\r
+\r
+\r
+\r
+\r
+}\r
+\r
+apr_status_t apr_thread_data_get(void **data, const char *key,\r
+ apr_thread_t *thread)\r
+{\r
+ return apr_pool_userdata_get(data, key, thread->pool);\r
+}\r
+\r
+apr_status_t apr_thread_data_set(void *data, const char *key,\r
+ apr_status_t (*cleanup)(void *),\r
+ apr_thread_t *thread)\r
+{\r
+ return apr_pool_userdata_set(data, key, cleanup, thread->pool);\r
+}\r
+\r
+apr_status_t apr_os_thread_get(apr_os_thread_t **thethd,\r
+ apr_thread_t *thd)\r
+{\r
+ *thethd = thd->td;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_os_thread_put(apr_thread_t **thd,\r
+ apr_os_thread_t *thethd,\r
+ apr_pool_t *pool)\r
+{\r
+ if (pool == ((void*)0)) {\r
+ return (20000 + 2);\r
+ }\r
+\r
+ if ((*thd) == ((void*)0)) {\r
+ (*thd) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));\r
+ (*thd)->pool = pool;\r
+ }\r
+\r
+ (*thd)->td = thethd;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_thread_once_init(apr_thread_once_t **control,\r
+ apr_pool_t *p)\r
+{\r
+ static const pthread_once_t once_init = 0;\r
+\r
+ *control = apr_palloc(p, sizeof(**control));\r
+ (*control)->once = once_init;\r
+ return 0;\r
+}\r
+\r
+apr_status_t apr_thread_once(apr_thread_once_t *control,\r
+ void (*func)(void))\r
+{\r
+ return pthread_once(&control->once, func);\r
+}\r
+\r
+apr_pool_t * apr_thread_pool_get (const apr_thread_t *thethread) { return thethread->pool; }\r
+# 20 "main1.c" 2\r
+# 1 "./../test/abts.c" 1\r
+# 17 "./../test/abts.c"\r
+# 1 "./../test/abts.h" 1\r
+# 18 "./../test/abts.c" 2\r
+# 1 "./../test/abts_tests.h" 1\r
+# 20 "./../test/abts_tests.h"\r
+# 1 "./../test/abts.h" 1\r
+# 21 "./../test/abts_tests.h" 2\r
+# 1 "./../test/testutil.h" 1\r
+# 19 "./../test/testutil.h"\r
+# 1 "./../test/abts.h" 1\r
+# 20 "./../test/testutil.h" 2\r
+# 22 "./../test/abts_tests.h" 2\r
+\r
+const struct testlist {\r
+ abts_suite *(*func)(abts_suite *suite);\r
+} alltests[] = {\r
+ {testatomic},\r
+ {testdir},\r
+ {testdso},\r
+ {testdup},\r
+ {testenv},\r
+ {testescape},\r
+ {testfile},\r
+ {testfilecopy},\r
+ {testfileinfo},\r
+ {testflock},\r
+ {testfmt},\r
+ {testfnmatch},\r
+ {testgetopt},\r
+\r
+\r
+\r
+ {testhash},\r
+ {testipsub},\r
+ {testlock},\r
+ {testcond},\r
+ {testlfs},\r
+ {testmmap},\r
+ {testnames},\r
+ {testoc},\r
+ {testpath},\r
+ {testpipe},\r
+ {testpoll},\r
+ {testpool},\r
+ {testproc},\r
+ {testprocmutex},\r
+ {testrand},\r
+ {testsleep},\r
+ {testshm},\r
+ {testsock},\r
+ {testsockets},\r
+ {testsockopt},\r
+ {teststr},\r
+ {teststrnatcmp},\r
+ {testtable},\r
+ {testtemp},\r
+ {testthread},\r
+ {testtime},\r
+ {testud},\r
+ {testuser},\r
+ {testvsn}\r
+};\r
+# 19 "./../test/abts.c" 2\r
+# 1 "./../test/testutil.h" 1\r
+# 19 "./../test/testutil.h"\r
+# 1 "./../test/abts.h" 1\r
+# 20 "./../test/testutil.h" 2\r
+# 20 "./../test/abts.c" 2\r
+\r
+\r
+static char status[6] = {'|', '/', '-', '|', '\\', '-'};\r
+static int curr_char;\r
+static int verbose = 0;\r
+static int exclude = 0;\r
+static int quiet = 0;\r
+static int list_tests = 0;\r
+\r
+const char **testlist = ((void*)0);\r
+\r
+static int find_test_name(const char *testname) {\r
+ int i;\r
+ for (i = 0; testlist[i] != ((void*)0); i++) {\r
+ if (!strcmp(testlist[i], testname)) {\r
+ return 1;\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+\r
+static int should_test_run(const char *testname) {\r
+ int found = 0;\r
+ if (list_tests == 1) {\r
+ return 0;\r
+ }\r
+ if (testlist == ((void*)0)) {\r
+ return 1;\r
+ }\r
+ found = find_test_name(testname);\r
+ if ((found && !exclude) || (!found && exclude)) {\r
+ return 1;\r
+ }\r
+ return 0;\r
+}\r
+\r
+static void reset_status(void)\r
+{\r
+ curr_char = 0;\r
+}\r
+\r
+static void update_status(void)\r
+{\r
+ if (!quiet) {\r
+ curr_char = (curr_char + 1) % 6;\r
+ fprintf(stdout, "\b%c", status[curr_char]);\r
+ fflush(stdout);\r
+ }\r
+}\r
+\r
+static void end_suite(abts_suite *suite)\r
+{\r
+ if (suite != ((void*)0)) {\r
+ sub_suite *last = suite->tail;\r
+ if (!quiet) {\r
+ fprintf(stdout, "\b");\r
+ fflush(stdout);\r
+ }\r
+ if (last->failed == 0) {\r
+ fprintf(stdout, "SUCCESS\n");\r
+ fflush(stdout);\r
+ }\r
+ else {\r
+ fprintf(stdout, "FAILED %d of %d\n", last->failed, last->num_test);\r
+ fflush(stdout);\r
+ }\r
+ }\r
+}\r
+\r
+abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full)\r
+{\r
+ sub_suite *subsuite;\r
+ char *p;\r
+ const char *suite_name;\r
+ curr_char = 0;\r
+\r
+\r
+ if (suite && suite->tail &&!suite->tail->not_run) {\r
+ end_suite(suite);\r
+ }\r
+\r
+ subsuite = malloc(sizeof(*subsuite));\r
+ subsuite->num_test = 0;\r
+ subsuite->failed = 0;\r
+ subsuite->next = ((void*)0);\r
+\r
+\r
+ suite_name = strrchr(suite_name_full, '/');\r
+ if (!suite_name) {\r
+ suite_name = strrchr(suite_name_full, '\\');\r
+ }\r
+ if (suite_name) {\r
+ suite_name++;\r
+ } else {\r
+ suite_name = suite_name_full;\r
+ }\r
+ p = strrchr(suite_name, '.');\r
+ if (p) {\r
+ subsuite->name = memcpy(calloc(p - suite_name + 1, 1),\r
+ suite_name, p - suite_name);\r
+ }\r
+ else {\r
+ subsuite->name = suite_name;\r
+ }\r
+\r
+ if (list_tests) {\r
+ fprintf(stdout, "%s\n", subsuite->name);\r
+ }\r
+\r
+ subsuite->not_run = 0;\r
+\r
+ if (suite == ((void*)0)) {\r
+ suite = malloc(sizeof(*suite));\r
+ suite->head = subsuite;\r
+ suite->tail = subsuite;\r
+ }\r
+ else {\r
+ suite->tail->next = subsuite;\r
+ suite->tail = subsuite;\r
+ }\r
+\r
+ if (!should_test_run(subsuite->name)) {\r
+ subsuite->not_run = 1;\r
+ return suite;\r
+ }\r
+\r
+ reset_status();\r
+ fprintf(stdout, "%-20s: ", subsuite->name);\r
+ update_status();\r
+ fflush(stdout);\r
+\r
+ return suite;\r
+}\r
+\r
+void abts_run_test(abts_suite *ts, test_func f, void *value)\r
+{\r
+ abts_case tc;\r
+ sub_suite *ss;\r
+\r
+ if (!should_test_run(ts->tail->name)) {\r
+ return;\r
+ }\r
+ ss = ts->tail;\r
+\r
+ tc.failed = 0;\r
+ tc.suite = ss;\r
+\r
+ ss->num_test++;\r
+ update_status();\r
+\r
+ f(&tc, value);\r
+\r
+ if (tc.failed) {\r
+ ss->failed++;\r
+ }\r
+}\r
+\r
+static int report(abts_suite *suite)\r
+{\r
+ int count = 0;\r
+ sub_suite *dptr;\r
+\r
+ if (suite && suite->tail &&!suite->tail->not_run) {\r
+ end_suite(suite);\r
+ }\r
+\r
+ for (dptr = suite->head; dptr; dptr = dptr->next) {\r
+ count += dptr->failed;\r
+ }\r
+\r
+ if (list_tests) {\r
+ return 0;\r
+ }\r
+\r
+ if (count == 0) {\r
+ printf("All tests passed.\n");\r
+ return 0;\r
+ }\r
+\r
+ dptr = suite->head;\r
+ fprintf(stdout, "%-15s\t\tTotal\tFail\tFailed %%\n", "Failed Tests");\r
+ fprintf(stdout, "===================================================\n");\r
+ while (dptr != ((void*)0)) {\r
+ if (dptr->failed != 0) {\r
+ float percent = ((float)dptr->failed / (float)dptr->num_test);\r
+ fprintf(stdout, "%-15s\t\t%5d\t%4d\t%6.2f%%\n", dptr->name,\r
+ dptr->num_test, dptr->failed, percent * 100);\r
+ }\r
+ dptr = dptr->next;\r
+ }\r
+ return 1;\r
+}\r
+\r
+void abts_log_message(const char *fmt, ...)\r
+{\r
+ va_list args;\r
+ update_status();\r
+\r
+ if (verbose) {\r
+ __builtin_va_start(args, fmt);\r
+ vfprintf(stderr, fmt, args);\r
+ __builtin_va_end(args);\r
+ fprintf(stderr, "\n");\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) return;\r
+\r
+ if (expected == actual) return;\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) return;\r
+\r
+ if (expected != actual) return;\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: expected something other than <%d>, but saw <%d>\n",\r
+ lineno, expected, actual);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) return;\r
+\r
+ if (expected == actual) return;\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+\r
+ fprintf(stderr, "Line %d: expected %lu, but saw %lu\n", lineno,\r
+ (unsigned long)expected, (unsigned long)actual);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) return;\r
+\r
+ if (!expected && !actual) return;\r
+ if (expected && actual)\r
+ if (!strcmp(expected, actual)) { return; }\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,\r
+ size_t n, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) { return; }\r
+\r
+ if (!strncmp(expected, actual, n)) { return; }\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: expected something other than <%s>, but saw <%s>\n",\r
+ lineno, expected, actual);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) { return; }\r
+\r
+ if (ptr != ((void*)0)) { return; }\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: expected non-NULL, but saw NULL\n", lineno);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) { return; }\r
+\r
+ if (expected == actual) { return; }\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: expected <%p>, but saw <%p>\n", lineno, expected, actual);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_fail(abts_case *tc, const char *message, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) { return; }\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: %s\n", lineno, message);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_assert(abts_case *tc, const char *message, int condition, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) { return; }\r
+\r
+ if (condition) { return; }\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: %s\n", lineno, message);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_true(abts_case *tc, int condition, int lineno)\r
+{\r
+ update_status();\r
+ if (tc->failed) { return; }\r
+\r
+ if (condition) { return; }\r
+\r
+ tc->failed = 1;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: Condition is false, but expected true\n", lineno);\r
+ fflush(stderr);\r
+ }\r
+}\r
+\r
+void abts_not_impl(abts_case *tc, const char *message, int lineno)\r
+{\r
+ update_status();\r
+\r
+ tc->suite->not_impl++;\r
+ if (verbose) {\r
+ fprintf(stderr, "Line %d: %s\n", lineno, message);\r
+ fflush(stderr);\r
+ }\r
+}\r
+# 21 "main1.c" 2\r
+\r
+\r
+\r
+\r
+\r
+\r
+int fflush(FILE *stream){\r
+ return 0;\r
+}\r
+\r
+int fprintf(FILE *stream, const char *format, ...){\r
+ return 0;\r
+}\r
+\r
+void test_atomics_threaded_1(abts_case *tc, void *data)\r
+{\r
+ apr_thread_t *t1[3];\r
+ apr_status_t rv;\r
+ int i;\r
+\r
+\r
+\r
+\r
+\r
+ rv = apr_thread_mutex_create(&thread_lock, 0x0, p);\r
+ (((rv == 0) && "Could not create lock") ? (void) (0) : __assert_fail ("(rv == 0) && \"Could not create lock\"", "main1.c", 46, __PRETTY_FUNCTION__));\r
+\r
+ for (i = 0; i < 3; i++) {\r
+ apr_status_t r1;\r
+ r1 = apr_thread_create(&t1[i], ((void*)0), thread_func_mutex, ((void*)0), p);\r
+ ((!r1 && "Failed creating threads") ? (void) (0) : __assert_fail ("!r1 && \"Failed creating threads\"", "main1.c", 51, __PRETTY_FUNCTION__));\r
+ }\r
+\r
+ for (i = 0; i < 3; i++) {\r
+ apr_status_t s1;\r
+ apr_thread_join(&s1, t1[i]);\r
+\r
+ ((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
+\r
+ }\r
+\r
+ abts_int_equal(tc, 3 * 1, mutex_locks, 62);\r
+\r
+ rv = apr_thread_mutex_destroy(thread_lock);\r
+ ((rv == 0 && "Failed creating threads") ? (void) (0) : __assert_fail ("rv == 0 && \"Failed creating threads\"", "main1.c", 65, __PRETTY_FUNCTION__));\r
+}\r
+\r
+int main(int argc, char *argv[]){\r
+\r
+ initialize();\r
+\r
+ abts_case tc;\r
+ tc.failed = 0;\r
+ tc.suite = ((void*)0);\r
+ test_atomics_threaded_1(&tc,((void*)0));\r
+\r
+ return 0;\r
+}\r