Commit 5fcc3b95 5fcc3b95dd021063e2bf2cb3e366c1c7acf9d818 by Sergey Poznyakoff

Avoid redefinition of _XOPEN_SOURCE

1 parent 5bf74ddf
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
19 #include <sys/types.h> 19 #include <sys/types.h>
20 #include <stdlib.h> 20 #include <stdlib.h>
21 #include <stdio.h> 21 #include <stdio.h>
22 #define _XOPEN_SOURCE 22 #ifndef _XOPEN_SOURCE
23 # define _XOPEN_SOURCE
24 #endif
23 #include <unistd.h> 25 #include <unistd.h>
24 #include <pwd.h> 26 #include <pwd.h>
25 #include <errno.h> 27 #include <errno.h>
......
...@@ -82,7 +82,7 @@ static struct _record _imap_record = ...@@ -82,7 +82,7 @@ static struct _record _imap_record =
82 via the register entry/record. */ 82 via the register entry/record. */
83 record_t imap_record = &_imap_record; 83 record_t imap_record = &_imap_record;
84 84
85 #ifndef HAVE_DECL_STRTOK_R 85 #ifndef HAVE_STRTOK_R
86 char *strtok_r (char *, const char *, char **); 86 char *strtok_r (char *, const char *, char **);
87 #endif 87 #endif
88 88
......
...@@ -40,7 +40,9 @@ ...@@ -40,7 +40,9 @@
40 40
41 #ifdef WITH_PTHREAD 41 #ifdef WITH_PTHREAD
42 # ifdef HAVE_PTHREAD_H 42 # ifdef HAVE_PTHREAD_H
43 # ifndef _XOPEN_SOURCE
43 # define _XOPEN_SOURCE 500 44 # define _XOPEN_SOURCE 500
45 # endif
44 # include <pthread.h> 46 # include <pthread.h>
45 # endif 47 # endif
46 #endif 48 #endif
......
...@@ -31,7 +31,9 @@ ...@@ -31,7 +31,9 @@
31 31
32 #ifdef WITH_PTHREAD 32 #ifdef WITH_PTHREAD
33 # ifdef HAVE_PTHREAD_H 33 # ifdef HAVE_PTHREAD_H
34 # ifndef _XOPEN_SOURCE
34 # define _XOPEN_SOURCE 500 35 # define _XOPEN_SOURCE 500
36 # endif
35 # include <pthread.h> 37 # include <pthread.h>
36 # endif 38 # endif
37 #endif 39 #endif
......
...@@ -38,7 +38,9 @@ ...@@ -38,7 +38,9 @@
38 38
39 #ifdef WITH_PTHREAD 39 #ifdef WITH_PTHREAD
40 # ifdef HAVE_PTHREAD_H 40 # ifdef HAVE_PTHREAD_H
41 # ifndef _XOPEN_SOURCE
41 # define _XOPEN_SOURCE 500 42 # define _XOPEN_SOURCE 500
43 # endif
42 # include <pthread.h> 44 # include <pthread.h>
43 # endif 45 # endif
44 #endif 46 #endif
......