Define _REENTRANT as well as _PTHREADS if -pthread is specified on the

command line.
This commit is contained in:
thorpej 2003-02-28 17:30:12 +00:00
parent c2d825cbda
commit 5bfc4a9390
8 changed files with 11 additions and 8 deletions

View File

@ -162,7 +162,7 @@ const_section () \
#undef CPP_SPEC
#define CPP_SPEC "\
%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %(cpp_endian) \
%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
"
/* Because TARGET_DEFAULT sets ARM_FLAG_SOFT_FLOAT */

View File

@ -94,8 +94,8 @@ Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
#define CPP_SPEC \
"%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} %(cpp_cpu_spec) \
%(cpp_fpu_spec)"
"%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
%(cpp_cpu_spec) %(cpp_fpu_spec)"
#undef ASM_SPEC

View File

@ -128,7 +128,7 @@ Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
#define CPP_SPEC \
"%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
"%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
%{!mno-abicalls:-D__ABICALLS__} \
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \

View File

@ -40,7 +40,9 @@
for the 2.95.3 STL to work. */
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS}"
#define CPP_SPEC \
"%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
%{pthread:-D_REENTRANT -D_PTHREADS}"
/* Provide an ASM_SPEC appropriate for NetBSD. Currently we only deal
with the options for generating PIC code. */

View File

@ -69,5 +69,6 @@
#undef CPP_SPEC
#define CPP_SPEC "\
%{posix:-D_POSIX_SOURCE} \
%{pthread:-D_REENTRANT -D_PTHREADS} \
%{msoft-float:-D_SOFT_FLOAT} \
%{mcall-sysv: -D_CALL_SYSV} %{mcall-aix: -D_CALL_AIX} %{!mcall-sysv: %{!mcall-aix: -D_CALL_SYSV}}"

View File

@ -20,7 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
%{!mb:-D__LITTLE_ENDIAN__} \
%{m1:-D__sh1__} \
%{m2:-D__sh2__} \

View File

@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA. */
} while (0)
#undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
%{ml:-D__LITTLE_ENDIAN__} \
%{m1:-D__sh1__} \
%{m2:-D__sh2__} \

View File

@ -6,7 +6,7 @@
/* Fix up CPP_SPEC. This merges the code from <netbsd.h> and <sparc/sparc.h> */
#undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget)"
#undef CPP_PREDEFINES