summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-14 18:51:37 +0000
committerYang Tse <yangsita@gmail.com>2009-11-14 18:51:37 +0000
commit1cbc93fb54b773d1564bf2f2194d81c02a985a81 (patch)
tree37c22d1a2eeb535cce65c8f5c08738397ecb6c59 /lib
parenta8ddd6ce3141bc4c8745eddae31db1887eeacd0a (diff)
downloadcurl-1cbc93fb54b773d1564bf2f2194d81c02a985a81.tar.gz
Refactor how preprocessor symbol _THREAD_SAFE definition is done.
Diffstat (limited to 'lib')
-rw-r--r--lib/config-symbian.h8
-rw-r--r--lib/config-tpf.h8
-rw-r--r--lib/config-vxworks.h6
-rw-r--r--lib/setup.h11
4 files changed, 22 insertions, 11 deletions
diff --git a/lib/config-symbian.h b/lib/config-symbian.h
index b26fe46cd..d3bf20924 100644
--- a/lib/config-symbian.h
+++ b/lib/config-symbian.h
@@ -640,9 +640,12 @@
/* Define to 1 if you need the malloc.h header file even with stdlib.h */
/* #undef NEED_MALLOC_H */
-/* need REENTRANT defined */
+/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
/* #undef NEED_REENTRANT */
+/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */
+/* #undef NEED_THREAD_SAFE */
+
/* cpu-machine-OS */
#ifdef __WINS__
#define OS "i386-pc-epoc32"
@@ -767,9 +770,6 @@
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
-/* define this if you need it to compile thread-safe code */
-/* #undef _THREAD_SAFE */
-
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff --git a/lib/config-tpf.h b/lib/config-tpf.h
index cea5d3bd9..fd995bf4c 100644
--- a/lib/config-tpf.h
+++ b/lib/config-tpf.h
@@ -559,9 +559,12 @@
/* if you have the zlib.h header file */
/* #undef HAVE_ZLIB_H */
-/* need REENTRANT defined */
+/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
/* #undef NEED_REENTRANT */
+/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */
+/* #undef NEED_THREAD_SAFE */
+
/* cpu-machine-OS */
#define OS "s390x-ibm-tpf"
@@ -653,9 +656,6 @@
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
-/* define this if you need it to compile thread-safe code */
-/* #undef _THREAD_SAFE */
-
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff --git a/lib/config-vxworks.h b/lib/config-vxworks.h
index 34a8c7172..26b8074d5 100644
--- a/lib/config-vxworks.h
+++ b/lib/config-vxworks.h
@@ -745,6 +745,9 @@
/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
/* #undef NEED_REENTRANT */
+/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */
+/* #undef NEED_THREAD_SAFE */
+
/* Define to 1 if the open function requires three arguments. */
#define OPEN_NEEDS_ARG3 1
@@ -913,9 +916,6 @@
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
-/* define this if you need it to compile thread-safe code */
-/* #undef _THREAD_SAFE */
-
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff --git a/lib/setup.h b/lib/setup.h
index 5f0de9050..49d14ed09 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -86,6 +86,17 @@
/* ================================================================ */
/*
+ * AIX 4.3 and newer needs _THREAD_SAFE defined to build
+ * proper reentrant code. Others may also need it.
+ */
+
+#ifdef NEED_THREAD_SAFE
+# ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+# endif
+#endif
+
+/*
* Tru64 needs _REENTRANT set for a few function prototypes and
* things to appear in the system header files. Unixware needs it
* to build proper reentrant code. Others may also need it.