Commit cca9cce8 cca9cce8ade09d728dea8a59084b2b06b40ada6a by Sam Roberts

The pthread headers seem to define things that make the system headers

not prototype some non-POSIX but essential APIS, so I moved them (on QNX6).
1 parent 73ac79ed
...@@ -21,12 +21,6 @@ ...@@ -21,12 +21,6 @@
21 # include <config.h> 21 # include <config.h>
22 #endif 22 #endif
23 23
24 #ifdef WITH_PTHREAD
25 # ifdef HAVE_PTHREAD_H
26 # define _XOPEN_SOURCE 500
27 # include <pthread.h>
28 # endif
29 #endif
30 #include <stdlib.h> 24 #include <stdlib.h>
31 #include <stdio.h> 25 #include <stdio.h>
32 #include <time.h> 26 #include <time.h>
...@@ -40,6 +34,13 @@ ...@@ -40,6 +34,13 @@
40 #include <limits.h> 34 #include <limits.h>
41 #include <errno.h> 35 #include <errno.h>
42 36
37 #ifdef WITH_PTHREAD
38 # ifdef HAVE_PTHREAD_H
39 # define _XOPEN_SOURCE 500
40 # include <pthread.h>
41 # endif
42 #endif
43
43 #ifdef HAVE_ALLOCA_H 44 #ifdef HAVE_ALLOCA_H
44 # include <alloca.h> 45 # include <alloca.h>
45 #endif 46 #endif
......
...@@ -21,13 +21,6 @@ ...@@ -21,13 +21,6 @@
21 # include <config.h> 21 # include <config.h>
22 #endif 22 #endif
23 23
24 #ifdef WITH_PTHREAD
25 # ifdef HAVE_PTHREAD_H
26 # define _XOPEN_SOURCE 500
27 # include <pthread.h>
28 # endif
29 #endif
30
31 #include <sys/types.h> 24 #include <sys/types.h>
32 #include <stdlib.h> 25 #include <stdlib.h>
33 #include <stdio.h> 26 #include <stdio.h>
...@@ -39,6 +32,13 @@ ...@@ -39,6 +32,13 @@
39 32
40 #include <dirent.h> 33 #include <dirent.h>
41 34
35 #ifdef WITH_PTHREAD
36 # ifdef HAVE_PTHREAD_H
37 # define _XOPEN_SOURCE 500
38 # include <pthread.h>
39 # endif
40 #endif
41
42 #include <string.h> 42 #include <string.h>
43 #ifdef HAVE_STRINGS_H 43 #ifdef HAVE_STRINGS_H
44 # include <strings.h> 44 # include <strings.h>
......