From 19e832c85950fa3d3b740d034cdb74c44afd16f2 Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 4 Jul 2006 16:48:48 +0000 Subject: [PATCH] 64bit cleanups / fixes git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1308 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-gdl1/GDLAccess/GNUmakefile.preamble | 6 +----- sope-gdl1/GDLAccess/fhs.make | 7 +------ sope-gdl1/GDLContentStore/GNUmakefile.preamble | 6 +----- sope-gdl1/GDLContentStore/fhs.make | 9 ++------- sope-gdl1/MySQL/GNUmakefile.preamble | 8 +------- sope-gdl1/MySQL/fhs.make | 6 +----- sope-gdl1/PostgreSQL/ChangeLog | 2 ++ sope-gdl1/PostgreSQL/GNUmakefile.preamble | 6 +----- sope-gdl1/PostgreSQL/NSString+PostgreSQL72.m | 17 ++++++++++------- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m | 4 ++-- sope-gdl1/PostgreSQL/Version | 2 +- sope-gdl1/PostgreSQL/fhs.make | 7 +------ sope-gdl1/SQLite3/GNUmakefile.preamble | 6 +----- sope-gdl1/SQLite3/fhs.make | 7 +------ 14 files changed, 26 insertions(+), 67 deletions(-) diff --git a/sope-gdl1/GDLAccess/GNUmakefile.preamble b/sope-gdl1/GDLAccess/GNUmakefile.preamble index a0141900..3c00014a 100644 --- a/sope-gdl1/GDLAccess/GNUmakefile.preamble +++ b/sope-gdl1/GDLAccess/GNUmakefile.preamble @@ -46,11 +46,7 @@ ADDITIONAL_LIB_DIRS += \ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir)) endif -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -SYSTEM_LIB_DIR += -L/usr/local/lib64 -L/usr/lib64 -else -SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib -endif +SYSTEM_LIB_DIR += $(CONFIGURE_SYSTEM_LIB_DIR) # TODO: add prebinding address diff --git a/sope-gdl1/GDLAccess/fhs.make b/sope-gdl1/GDLAccess/fhs.make index e0879982..66aa31bf 100644 --- a/sope-gdl1/GDLAccess/fhs.make +++ b/sope-gdl1/GDLAccess/fhs.make @@ -6,12 +6,7 @@ ifneq ($(FHS_INSTALL_ROOT),) FHS_INCLUDE_DIR=$(FHS_INSTALL_ROOT)/include/ FHS_BIN_DIR=$(FHS_INSTALL_ROOT)/bin/ - -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib64/ -else -FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/ -endif +FHS_LIB_DIR=$(CONFIGURE_FHS_INSTALL_LIBDIR) NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/" NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)" diff --git a/sope-gdl1/GDLContentStore/GNUmakefile.preamble b/sope-gdl1/GDLContentStore/GNUmakefile.preamble index e1624ee0..ada5aa19 100644 --- a/sope-gdl1/GDLContentStore/GNUmakefile.preamble +++ b/sope-gdl1/GDLContentStore/GNUmakefile.preamble @@ -63,11 +63,7 @@ ADDITIONAL_LIB_DIRS += \ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir)) endif -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -SYSTEM_LIB_DIR += -L/usr/local/lib64 -L/usr/lib64 -else -SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib -endif +SYSTEM_LIB_DIR += $(CONFIGURE_SYSTEM_LIB_DIR) # platform specific settings diff --git a/sope-gdl1/GDLContentStore/fhs.make b/sope-gdl1/GDLContentStore/fhs.make index f4caff91..24d1e43f 100644 --- a/sope-gdl1/GDLContentStore/fhs.make +++ b/sope-gdl1/GDLContentStore/fhs.make @@ -7,13 +7,8 @@ ifneq ($(FHS_INSTALL_ROOT),) FHS_INCLUDE_DIR=$(FHS_INSTALL_ROOT)/include/ -FHS_BIN_DIR=$(FHS_INSTALL_ROOT)/bin/ - -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib64/ -else -FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/ -endif +FHS_BIN_DIR=$(FHS_INSTALL_ROOT)/bin +FHS_LIB_DIR=$(CONFIGURE_FHS_INSTALL_LIBDIR) NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/" NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)" diff --git a/sope-gdl1/MySQL/GNUmakefile.preamble b/sope-gdl1/MySQL/GNUmakefile.preamble index 5b1c29d0..fb3df427 100644 --- a/sope-gdl1/MySQL/GNUmakefile.preamble +++ b/sope-gdl1/MySQL/GNUmakefile.preamble @@ -75,10 +75,4 @@ ADDITIONAL_LIB_DIRS += \ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir)) endif - -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -SYSTEM_LIB_DIR += -L/usr/local/lib64 -L/usr/lib64 -else -SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib -endif - +SYSTEM_LIB_DIR += $(CONFIGURE_SYSTEM_LIB_DIR) diff --git a/sope-gdl1/MySQL/fhs.make b/sope-gdl1/MySQL/fhs.make index d7a0a4d3..c673bf06 100644 --- a/sope-gdl1/MySQL/fhs.make +++ b/sope-gdl1/MySQL/fhs.make @@ -4,11 +4,7 @@ ifneq ($(FHS_INSTALL_ROOT),) -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib64/ -else -FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/ -endif +FHS_LIB_DIR=$(CONFIGURE_FHS_INSTALL_LIBDIR) FHS_DB_DIR=$(FHS_LIB_DIR)sope-$(SOPE_MAJOR_VERSION).$(SOPE_MINOR_VERSION)/dbadaptors/ fhs-db-dirs :: diff --git a/sope-gdl1/PostgreSQL/ChangeLog b/sope-gdl1/PostgreSQL/ChangeLog index bc493695..941782ae 100644 --- a/sope-gdl1/PostgreSQL/ChangeLog +++ b/sope-gdl1/PostgreSQL/ChangeLog @@ -1,5 +1,7 @@ 2006-07-04 Helge Hess + * fixed some 64bit issues (v4.5.47) + * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.46) 2005-08-16 Helge Hess diff --git a/sope-gdl1/PostgreSQL/GNUmakefile.preamble b/sope-gdl1/PostgreSQL/GNUmakefile.preamble index 2a84eb78..1a728365 100644 --- a/sope-gdl1/PostgreSQL/GNUmakefile.preamble +++ b/sope-gdl1/PostgreSQL/GNUmakefile.preamble @@ -81,11 +81,7 @@ ADDITIONAL_LIB_DIRS += \ endif -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -SYSTEM_LIB_DIR += -L/usr/local/lib64 -L/usr/lib64 -else -SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib -endif +SYSTEM_LIB_DIR += $(CONFIGURE_SYSTEM_LIB_DIR) # TODO: not necessary? covered by pg_config? #ifeq ($(FOUNDATION_LIB),apple) diff --git a/sope-gdl1/PostgreSQL/NSString+PostgreSQL72.m b/sope-gdl1/PostgreSQL/NSString+PostgreSQL72.m index 78d8ee40..20fc4656 100644 --- a/sope-gdl1/PostgreSQL/NSString+PostgreSQL72.m +++ b/sope-gdl1/PostgreSQL/NSString+PostgreSQL72.m @@ -126,12 +126,16 @@ - (NSString *)_pgStripEndSpaces { if ([self length] > 0) { - NSCharacterSet *spaceSet = [NSCharacterSet whitespaceCharacterSet]; - NSMutableString *str = [NSMutableString stringWithCapacity:[self length]]; - IMP charAtIndex; + NSCharacterSet *spaceSet; + NSMutableString *str; + unichar (*charAtIndex)(id, SEL, int); NSRange range; - charAtIndex = [self methodForSelector:@selector(characterAtIndex:)]; + spaceSet = [NSCharacterSet whitespaceCharacterSet]; + str = [NSMutableString stringWithCapacity:[self length]]; + + charAtIndex = (unichar (*)(id, SEL, int)) + [self methodForSelector:@selector(characterAtIndex:)]; range.length = 0; for (range.location = ([self length] - 1); @@ -139,8 +143,7 @@ range.location++, range.length++) { unichar c; - c = (unichar)(int)charAtIndex(self, @selector(characterAtIndex:), - range.location); + c = charAtIndex(self, @selector(characterAtIndex:), range.location); if (![spaceSet characterIsMember:c]) break; } @@ -154,7 +157,7 @@ return AUTORELEASE([self copy]); } -@end +@end /* NSString(PostgreSQL72MiscStrings) */ void __link_NSStringPostgreSQL72() { // used to force linking of object file diff --git a/sope-gdl1/PostgreSQL/PostgreSQL72Channel.m b/sope-gdl1/PostgreSQL/PostgreSQL72Channel.m index 4ea1fc3c..994e345a 100644 --- a/sope-gdl1/PostgreSQL/PostgreSQL72Channel.m +++ b/sope-gdl1/PostgreSQL/PostgreSQL72Channel.m @@ -227,7 +227,7 @@ static int openConnectionCount = 0; if (isDebuggingEnabled) { NSLog(@"PostgreSQL72 channel 0x%p opened (connection=%@)", - (unsigned)self, self->connection); + self, self->connection); } return YES; } @@ -641,7 +641,7 @@ static int openConnectionCount = 0; } if (isDebuggingEnabled) - NSLog(@"PG0x%p SQL: %@", (unsigned)self, _expression); + NSLog(@"PG0x%p SQL: %@", self, _expression); [self _resetEvaluationState]; diff --git a/sope-gdl1/PostgreSQL/Version b/sope-gdl1/PostgreSQL/Version index 324bcc30..6b9eee57 100644 --- a/sope-gdl1/PostgreSQL/Version +++ b/sope-gdl1/PostgreSQL/Version @@ -1,5 +1,5 @@ # version file -SUBMINOR_VERSION:=46 +SUBMINOR_VERSION:=47 # v4.5.41 requires libGDLAccess v4.5.50 diff --git a/sope-gdl1/PostgreSQL/fhs.make b/sope-gdl1/PostgreSQL/fhs.make index 01305296..c673bf06 100644 --- a/sope-gdl1/PostgreSQL/fhs.make +++ b/sope-gdl1/PostgreSQL/fhs.make @@ -4,12 +4,7 @@ ifneq ($(FHS_INSTALL_ROOT),) -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib64/ -else -FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/ -endif - +FHS_LIB_DIR=$(CONFIGURE_FHS_INSTALL_LIBDIR) FHS_DB_DIR=$(FHS_LIB_DIR)sope-$(SOPE_MAJOR_VERSION).$(SOPE_MINOR_VERSION)/dbadaptors/ fhs-db-dirs :: diff --git a/sope-gdl1/SQLite3/GNUmakefile.preamble b/sope-gdl1/SQLite3/GNUmakefile.preamble index 95c5ae01..be450d6a 100644 --- a/sope-gdl1/SQLite3/GNUmakefile.preamble +++ b/sope-gdl1/SQLite3/GNUmakefile.preamble @@ -73,8 +73,4 @@ ADDITIONAL_LIB_DIRS += \ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir)) endif -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -SYSTEM_LIB_DIR += -L/usr/local/lib64 -L/usr/lib64 -else -SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib -endif +SYSTEM_LIB_DIR += $(CONFIGURE_SYSTEM_LIB_DIR) diff --git a/sope-gdl1/SQLite3/fhs.make b/sope-gdl1/SQLite3/fhs.make index aae3415a..c673bf06 100644 --- a/sope-gdl1/SQLite3/fhs.make +++ b/sope-gdl1/SQLite3/fhs.make @@ -4,12 +4,7 @@ ifneq ($(FHS_INSTALL_ROOT),) -ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) -SYSTEM_LIB_DIR += -L/usr/local/lib64 -else -SYSTEM_LIB_DIR += -L/usr/local/lib -endif - +FHS_LIB_DIR=$(CONFIGURE_FHS_INSTALL_LIBDIR) FHS_DB_DIR=$(FHS_LIB_DIR)sope-$(SOPE_MAJOR_VERSION).$(SOPE_MINOR_VERSION)/dbadaptors/ fhs-db-dirs :: -- 2.39.5