From 2f9fdd24b87efa43a57cf631321c6e332383ae0d Mon Sep 17 00:00:00 2001 From: rfm Date: Sat, 15 Oct 2011 05:02:22 +0000 Subject: [PATCH] Use _POSIX_C_SOURCE=199506L git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33998 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 12 ++++++++++++ SSL/Makefile.preamble | 2 +- Source/Additions/Makefile.preamble | 4 ++-- Source/GNUmakefile | 2 +- Source/Makefile.preamble | 3 +-- Source/ObjectiveC2/Makefile.preamble | 1 - Source/unix/Makefile.preamble | 1 - Source/win32/Makefile.preamble | 1 - Tools/Makefile.preamble | 2 +- config.mak.in | 2 ++ 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe18138e1..b4fd788b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-10-15 Richard Frith-Macdonald + + * Source/unix/Makefile.preamble: + * Source/win32/Makefile.preamble: + * Source/ObjectiveC2/Makefile.preamble: + * Source/Additions/Makefile.preamble: + * Source/Makefile.preamble: + * config.mak.in: + It seems various BSD operating systems have bugs in their _XOPEN_SOURCE + implementation, so we can't generally use it. Try _POSIX_C_SOURCE + instead. + 2011-10-14 Richard Frith-Macdonald * Source/unix/Makefile.preamble: diff --git a/SSL/Makefile.preamble b/SSL/Makefile.preamble index 1fe06cd78..123438e75 100644 --- a/SSL/Makefile.preamble +++ b/SSL/Makefile.preamble @@ -39,7 +39,7 @@ # # Additional flags to pass to the preprocessor -ADDITIONAL_CPPFLAGS = $(DEFS) $(CONFIG_SYSTEM_DEFS) $(WARN_FLAGS) +ADDITIONAL_CPPFLAGS = $(DEFS) $(WARN_FLAGS) # Additional flags to pass to the Objective-C compiler ADDITIONAL_OBJCFLAGS = $(SSLFLAGS) diff --git a/Source/Additions/Makefile.preamble b/Source/Additions/Makefile.preamble index 00cf71dc0..0ec289725 100644 --- a/Source/Additions/Makefile.preamble +++ b/Source/Additions/Makefile.preamble @@ -40,8 +40,8 @@ # Additional flags to pass to the preprocessor ADDITIONAL_CPPFLAGS = $(DEFS) \ --D_XOPEN_SOURCE=600 -D_REENTRANT\ -$(WARN_FLAGS) -DNO_GNUSTEP=1 +$(WARN_FLAGS) \ +-DNO_GNUSTEP=1 # Additional flags to pass to the Objective-C compiler #ADDITIONAL_OBJCFLAGS = diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 099317403..e4c70ec6b 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -86,7 +86,7 @@ else libgnustep-base_SUBPROJECTS += unix endif -DEFS= -DGNUSTEP_TARGET_DIR=\"$(GNUSTEP_TARGET_DIR)\" \ +DEFS+= -DGNUSTEP_TARGET_DIR=\"$(GNUSTEP_TARGET_DIR)\" \ -DGNUSTEP_TARGET_CPU=\"$(GNUSTEP_TARGET_CPU)\" \ -DGNUSTEP_TARGET_OS=\"$(GNUSTEP_TARGET_OS)\" \ -DGNUSTEP_IS_FLATTENED=\"$(GNUSTEP_IS_FLATTENED)\" \ diff --git a/Source/Makefile.preamble b/Source/Makefile.preamble index f31cdf8e0..f9156a55f 100644 --- a/Source/Makefile.preamble +++ b/Source/Makefile.preamble @@ -39,8 +39,7 @@ # # Additional flags to pass to the preprocessor -ADDITIONAL_CPPFLAGS = $(DEFS) $(CONFIG_SYSTEM_DEFS) \ --D_XOPEN_SOURCE=600 -D_REENTRANT\ +ADDITIONAL_CPPFLAGS = $(DEFS) \ $(WARN_FLAGS) \ -Wcast-align \ #-Wstrict-prototypes \ diff --git a/Source/ObjectiveC2/Makefile.preamble b/Source/ObjectiveC2/Makefile.preamble index 45f8d978c..9f0d83985 100644 --- a/Source/ObjectiveC2/Makefile.preamble +++ b/Source/ObjectiveC2/Makefile.preamble @@ -40,7 +40,6 @@ # Additional flags to pass to the preprocessor ADDITIONAL_CPPFLAGS = $(DEFS) \ --D_XOPEN_SOURCE=600 -D_REENTRANT\ $(WARN_FLAGS) # Additional flags to pass to the Objective-C compiler diff --git a/Source/unix/Makefile.preamble b/Source/unix/Makefile.preamble index 12dd80990..23df28c69 100644 --- a/Source/unix/Makefile.preamble +++ b/Source/unix/Makefile.preamble @@ -40,7 +40,6 @@ # Additional flags to pass to the preprocessor ADDITIONAL_CPPFLAGS = $(DEFS) \ --D_XOPEN_SOURCE=600 -D_REENTRANT\ $(WARN_FLAGS) # Additional flags to pass to the Objective-C compiler diff --git a/Source/win32/Makefile.preamble b/Source/win32/Makefile.preamble index 12dd80990..23df28c69 100644 --- a/Source/win32/Makefile.preamble +++ b/Source/win32/Makefile.preamble @@ -40,7 +40,6 @@ # Additional flags to pass to the preprocessor ADDITIONAL_CPPFLAGS = $(DEFS) \ --D_XOPEN_SOURCE=600 -D_REENTRANT\ $(WARN_FLAGS) # Additional flags to pass to the Objective-C compiler diff --git a/Tools/Makefile.preamble b/Tools/Makefile.preamble index 5aaf3eee8..980482a1f 100644 --- a/Tools/Makefile.preamble +++ b/Tools/Makefile.preamble @@ -37,7 +37,7 @@ # # Additional flags to pass to the preprocessor -ADDITIONAL_CPPFLAGS += $(WARN_FLAGS) +ADDITIONAL_CPPFLAGS += $(DEFS) $(WARN_FLAGS) ifneq ($(GNUSTEP_GDOMAP_PORT_OVERRIDE),no) ADDITIONAL_CPPFLAGS += -DGDOMAP_PORT_OVERRIDE=$(GNUSTEP_GDOMAP_PORT_OVERRIDE) endif diff --git a/config.mak.in b/config.mak.in index 6203baeff..404cb8315 100644 --- a/config.mak.in +++ b/config.mak.in @@ -51,6 +51,8 @@ endif GNUSTEP_BASE_DOMAIN=@GNUSTEP_BASE_DOMAIN@ GNUSTEP_BASE_RELATIVE_PATHS=@GNUSTEP_BASE_RELATIVE_PATHS@ +DEFS=-D_POSIX_C_SOURCE=199506L + ifeq ($(GNUSTEP_BASE_RELATIVE_PATHS), yes) ifneq ($(GNUSTEP_BASE_DOMAIN), $(GNUSTEP_INSTALLATION_DOMAIN)) $(warning "Error: GNUSTEP_INSTALLATION_DOMAIN does not match GNUSTEP_BASE_DOMAIN")