]> err.no Git - sope/commitdiff
64bit fixes
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 4 Jul 2006 00:15:51 +0000 (00:15 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 4 Jul 2006 00:15:51 +0000 (00:15 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1300 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

13 files changed:
sope-gdl1/GDLAccess/EOObjectUniquer.m
sope-gdl1/GDLContentStore/GNUmakefile.preamble
sope-gdl1/GDLContentStore/fhs.make
sope-gdl1/MySQL/GNUmakefile.preamble
sope-gdl1/MySQL/MySQL4Channel.m
sope-gdl1/MySQL/NSString+MySQL4.m
sope-gdl1/MySQL/fhs.make
sope-gdl1/PostgreSQL/GNUmakefile.preamble
sope-gdl1/PostgreSQL/fhs.make
sope-gdl1/SQLite3/GNUmakefile.preamble
sope-gdl1/SQLite3/NSString+SQLite.m
sope-gdl1/SQLite3/SQLiteChannel.m
sope-gdl1/SQLite3/fhs.make

index 8a4dc0a13cce5c3263e59f077cf4a5223ad31945..68a1673277054d448af6d7799ef318e919a12a96 100644 (file)
@@ -35,7 +35,7 @@ static unsigned uniquerHash(NSMapTable* table, EOUniquerRecord* rec) {
   // efficient hash for dictionaries is done in the concrete
   // dictionaries implementation; dictionaries are allocated
   // from EOPrimaryKeyDictionary concrete subclasses
-  return  ((unsigned)(rec->entity) >> 4) +
+  return  ((unsigned long)(rec->entity) >> 4L) +
           ((EOPrimaryKeyDictionary*)(rec->pkey))->fastHash;
 }
 
index 975780012b0068bda54257f7f1c03649d1db9b5f..e1624ee0ea69fda060fbf97d1cdb63cf027475d8 100644 (file)
@@ -63,7 +63,11 @@ 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
 
 
 # platform specific settings
index 8e576cd04ac61bf9ff91fa1cb248ce6d7958e966..c78c575ea8b3a5ffbbea2ac09051bff25631c372 100644 (file)
@@ -7,9 +7,14 @@
 ifneq ($(FHS_INSTALL_ROOT),)
 
 FHS_INCLUDE_DIR=$(FHS_INSTALL_ROOT)/include/
-FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/
 FHS_BIN_DIR=$(FHS_INSTALL_ROOT)/bin/
 
+ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
+SYSTEM_LIB_DIR += -L/usr/local/lib64
+else
+SYSTEM_LIB_DIR += -L/usr/local/lib
+endif
+
 NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/"
 NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)"
 NONFHS_BINDIR="$(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)"
index 29f4a5e84bd848ed96cf5434df02a12a5193aab2..5b1c29d07d5201d55ae900cb43ef24325f0dacce 100644 (file)
@@ -75,4 +75,10 @@ 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
+
index 1d40a1201e03a6350b2981af6ef5f63639aeda9f..93bfe8c9910c7964347f13a11e2bcf8f561206a8 100644 (file)
@@ -197,7 +197,7 @@ static int openConnectionCount = 0;
 
   if (isDebuggingEnabled) {
     NSLog(@"MySQL4 channel 0x%p opened (connection=0x%p,%s)",
-          (unsigned)self, self->_connection, cDBName);
+          self, self->_connection, cDBName);
   }
   return YES;
 }
@@ -680,9 +680,7 @@ static int openConnectionCount = 0;
 
   ms = [NSMutableString stringWithCapacity:64];
   [ms appendFormat:@"<%@[0x%p] connection=0x%p",
-                     NSStringFromClass([self class]),
-                     self,
-                     (unsigned)self->_connection];
+        NSStringFromClass([self class]), self, self->_connection];
   [ms appendString:@">"];
   return ms;
 }
index e9b9e8ada81708fb552f9af094103c3daf33ff14..e525b5bc58f4388289f59a6a53400f2e94a1affe 100644 (file)
 - (NSString *)_mySQL4StripEndSpaces {
   NSCharacterSet  *spaceSet;
   NSMutableString *str;
-  IMP             charAtIndex;
+  unichar         (*charAtIndex)(id, SEL, int);
   NSRange         range;
   
   if ([self length] == 0)
   
   spaceSet = [NSCharacterSet whitespaceCharacterSet];
   str      = [NSMutableString stringWithCapacity:[self length]];
-  charAtIndex  = [self methodForSelector:@selector(characterAtIndex:)];
+  charAtIndex  = (unichar (*)(id, SEL, int))
+    [self methodForSelector:@selector(characterAtIndex:)];
   range.length = 0;
 
   for (range.location = ([self length] - 1);
          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;
   }
index 6c5bd960d91b35712e403ed9c097468e80f3ec95..3e054e5f3542174b5ade020f341228b68958d010 100644 (file)
@@ -4,7 +4,13 @@
 
 ifneq ($(FHS_INSTALL_ROOT),)
 
-FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/
+ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
+SYSTEM_LIB_DIR += -L/usr/local/lib64
+else
+SYSTEM_LIB_DIR += -L/usr/local/lib
+endif
+
+
 FHS_DB_DIR=$(FHS_LIB_DIR)sope-$(SOPE_MAJOR_VERSION).$(SOPE_MINOR_VERSION)/dbadaptors/
 
 fhs-db-dirs ::
index 220b5d4cd143f9b4ec196d61a2b310ef5e31b5e5..2a84eb78007f1855491398f078ae13cc5914b321 100644 (file)
@@ -80,8 +80,12 @@ ADDITIONAL_LIB_DIRS += \
        $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
 endif
 
-SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
 
+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
 
 # TODO: not necessary? covered by pg_config?
 #ifeq ($(FOUNDATION_LIB),apple)
index 6c5bd960d91b35712e403ed9c097468e80f3ec95..aae3415aa2f6ba7a01bc1bdbb4adac05521c38ec 100644 (file)
@@ -4,7 +4,12 @@
 
 ifneq ($(FHS_INSTALL_ROOT),)
 
-FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/
+ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
+SYSTEM_LIB_DIR += -L/usr/local/lib64
+else
+SYSTEM_LIB_DIR += -L/usr/local/lib
+endif
+
 FHS_DB_DIR=$(FHS_LIB_DIR)sope-$(SOPE_MAJOR_VERSION).$(SOPE_MINOR_VERSION)/dbadaptors/
 
 fhs-db-dirs ::
index 8620c94cf1fd9fc5fc87c0a7208a9f59891d2883..95c5ae01f30af1f6378ac8a27ffd0e2a4965f959 100644 (file)
@@ -73,4 +73,8 @@ 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
index 3d729b38fa61bc0180a69cd518d28523a10b2702..5df70fdf48c9d80aa156c9cc7838e6c8660d3d79 100644 (file)
 }
 
 - (NSString *)_sqlite3StripEndSpaces {
-  if ([self length] > 0) {
-    NSCharacterSet  *spaceSet = [NSCharacterSet whitespaceCharacterSet];
-    NSMutableString *str      = [NSMutableString stringWithCapacity:[self length]];
-    IMP             charAtIndex;
+  if ([self isNotEmpty]) {
+    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);
index acc1e472a1196cb7be702ad7f9dbb0c11743634e..11d1439f72515a79331feb56c0e1f76a00185199 100644 (file)
@@ -164,7 +164,7 @@ static int openConnectionCount = 0;
 
   if (isDebuggingEnabled) {
     NSLog(@"SQLite channel 0x%p opened (connection=0x%p,%s)",
-          (unsigned)self, self->_connection, cDBName);
+          self, self->_connection, cDBName);
   }
   return YES;
 }
@@ -619,8 +619,7 @@ static int openConnectionCount = 0;
   ms = [NSMutableString stringWithCapacity:64];
   [ms appendFormat:@"<%@[0x%p] connection=0x%p",
                      NSStringFromClass([self class]),
-                     self,
-                     (unsigned)self->_connection];
+                     self, self->_connection];
   [ms appendString:@">"];
   return ms;
 }
index 6c5bd960d91b35712e403ed9c097468e80f3ec95..aae3415aa2f6ba7a01bc1bdbb4adac05521c38ec 100644 (file)
@@ -4,7 +4,12 @@
 
 ifneq ($(FHS_INSTALL_ROOT),)
 
-FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/
+ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
+SYSTEM_LIB_DIR += -L/usr/local/lib64
+else
+SYSTEM_LIB_DIR += -L/usr/local/lib
+endif
+
 FHS_DB_DIR=$(FHS_LIB_DIR)sope-$(SOPE_MAJOR_VERSION).$(SOPE_MINOR_VERSION)/dbadaptors/
 
 fhs-db-dirs ::