Cleanup and fix to build additipns library on apple systems.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32737 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-03-29 11:18:10 +00:00
parent afb3405c5d
commit 7aee0158bc
7 changed files with 22 additions and 61 deletions

View file

@ -1,3 +1,13 @@
2011-03-29 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/GNUstepBase/GSUnion.h: Remove problematic types.
* Source/unix/Makefile.preamble: Remove unused include directory
* Source/win32/Makefile.preamble: ditto
* Source/ObjectiveC2/Makefile.preamble: ditto
* Source/Additions/Makefile.preamble: ditto
* Source/Additions/Makefile.postamble: link to extra headers for apple
so we can build the additons library on a pure apple system again.
2011-03-29 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/GNUstepBase/GSIMap.h:
@ -14,8 +24,7 @@
union holding map keys and values will have undefined content if we
assign an integer to it and then use it as a pointer!
So, we change to use the .nsu accessor for a pointer sized integer
throughout, and we remove all the odd sized union members unless
GSUNION_DEPRECATED is defined.
throughout, and we remove all the odd sized union members.
2011-03-28 Riccardo Mottola <rm@gnu.org>

View file

@ -42,15 +42,7 @@ typedef uintptr_t NSUInteger;
#define GSUNION_OBJ 0x0001
#define GSUNION_CLS 0x0002
#define GSUNION_SEL 0x0004
#define GSUNION_CHAR 0x0008
#define GSUNION_SHORT 0x0010
#define GSUNION_INT 0x0020
#define GSUNION_LONG 0x0040
#define GSUNION_PTR 0x0080
#define GSUNION_8B 0x0100
#define GSUNION_16B 0x0200
#define GSUNION_32B 0x0400
#define GSUNION_64B 0x0800
#define GSUNION_NSINT 0x1000
#define GSUNION_ALL 0x1fff
@ -92,43 +84,6 @@ typedef union {
const char *cstr;
#endif
/* The next group are deprecated ... define GSUNION_DEPRECATED to use them
*/
#if defined(GSUNION_DEPRECATED)
#if ((GSUNION_TYPES) & GSUNION_CHAR)
char schr;
unsigned char uchr;
#endif
#if ((GSUNION_TYPES) & GSUNION_SHORT)
short ssht;
unsigned short usht;
#endif
#if ((GSUNION_TYPES) & GSUNION_INT)
int sint;
unsigned uint;
#endif
#if ((GSUNION_TYPES) & GSUNION_LONG)
long slng;
unsigned long ulng;
#endif
#if ((GSUNION_TYPES) & GSUNION_8B)
int8_t s8;
uint8_t u8;
#endif
#if ((GSUNION_TYPES) & GSUNION_16B)
int16_t s16;
uint16_t u16;
#endif
#if ((GSUNION_TYPES) & GSUNION_32B)
int32_t s32;
uint32_t u32;
#endif
#if ((GSUNION_TYPES) & GSUNION_64B)
int64_t s64;
uint64_t u64;
#endif
#endif
/* Warning ... if this value is declared in the union, and its type is not
* the same size as a pointer, then care must be taken in case of confusion
* caused when an assignment to a variable using one of the union's types

View file

@ -1,12 +1,15 @@
#
# If building with the Apple Foundation, we don't include the base 'Headers'
# directory in the includes path, but we need the additions headers so we
# link to them from the current directory.
#
ifeq ($(FOUNDATION_LIB),apple)
# Things to do before compiling
before-all::
rm -f GNUstepBase
ln -s ../../Headers/GNUstepBase GNUstepBase
# Things to do after cleaning
after-clean::
rm -f GNUstepBase

View file

@ -56,9 +56,10 @@ ADDITIONAL_CFLAGS =
# Additional include directories the compiler should search
# FIXME - the -I../ is for GSPrivate.h
ADDITIONAL_INCLUDE_DIRS = -I../../Headers/Additions \
-I../$(GNUSTEP_TARGET_DIR) -I../
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR) -I../
# We include the main base Headers if we are building using the base library
# (but not if we are using the Apple foundation).
ifeq ($(FOUNDATION_LIB),gnu)
ADDITIONAL_INCLUDE_DIRS += -I../../Headers
endif

View file

@ -56,12 +56,7 @@ ADDITIONAL_CFLAGS =
# Additional include directories the compiler should search
# FIXME - the -I../ is for GSPrivate.h
ADDITIONAL_INCLUDE_DIRS = -I../../Headers/Additions \
-I../$(GNUSTEP_TARGET_DIR) -I../
ifeq ($(FOUNDATION_LIB),gnu)
ADDITIONAL_INCLUDE_DIRS += -I../../Headers
endif
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR) -I../
# Additional LDFLAGS to pass to the linker
ADDITIONAL_LDFLAGS =

View file

@ -55,8 +55,7 @@ endif
ADDITIONAL_CFLAGS =
# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS = -I../../Headers/Additions \
-I../$(GNUSTEP_TARGET_DIR)
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR)
ifeq ($(FOUNDATION_LIB),gnu)
ADDITIONAL_INCLUDE_DIRS += -I../../Headers

View file

@ -55,8 +55,7 @@ endif
ADDITIONAL_CFLAGS =
# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS = -I../../Headers/Additions \
-I../$(GNUSTEP_TARGET_DIR)
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR)
ifeq ($(FOUNDATION_LIB),gnu)
ADDITIONAL_INCLUDE_DIRS += -I../../Headers