]> err.no Git - sope/commitdiff
64bit fixes
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Jul 2006 21:56:22 +0000 (21:56 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Jul 2006 21:56:22 +0000 (21:56 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1289 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

26 files changed:
sope-core/EOControl/ChangeLog
sope-core/EOControl/EOKeyValueCoding.m
sope-core/EOControl/EOQualifierParser.m
sope-core/EOControl/EOSortOrdering.m
sope-core/EOControl/GNUmakefile.preamble
sope-core/EOControl/Version
sope-core/EOControl/fhs.make
sope-core/NGExtensions/ChangeLog
sope-core/NGExtensions/FdExt.subproj/NSAutoreleasePool+misc.m
sope-core/NGExtensions/NGBitSet.m
sope-core/NGExtensions/NGStack.m
sope-core/NGExtensions/Version
sope-core/NGExtensions/fhs.make
sope-core/NGStreams/ChangeLog
sope-core/NGStreams/NGActiveSocket.m
sope-core/NGStreams/NGCharBuffer.m
sope-core/NGStreams/NGDatagramPacket.m
sope-core/NGStreams/NGFileStream.m
sope-core/NGStreams/NGFilterStream.m
sope-core/NGStreams/NGInternetSocketAddress.m
sope-core/NGStreams/NGInternetSocketDomain.m
sope-core/NGStreams/NGLocalSocketDomain.m
sope-core/NGStreams/NGSocket.m
sope-core/NGStreams/NGStream.m
sope-core/NGStreams/NGStreams/NGCharBuffer.h
sope-core/NGStreams/Version

index bb7a9ec75c17f69185bb1e6568d3bc7dead27918..5315c2be5ad3216e48dd127a73fc42e2b288ce28 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * 64bit fixes (v4.5.66)
+
 2006-07-03  Helge Hess  <helge.hess@opengroupware.org>
 
        * v4.5.65
index 2c46503e929a52be499d8805e68cf1eec52fab67..a08e3f430d6f70adefad12d8ef021881c04f4548 100644 (file)
@@ -195,11 +195,11 @@ static GetKeyValueBinding* newGetBinding(NSString* key, id instance)
         info2 = (void*)(mth->method_name);
       }
     }
-    if (cbuf) free(cbuf);
+    if (cbuf != NULL) free(cbuf);
   }
         
   // Lookup ivar name
-  if (!fptr) {
+  if (fptr == NULL) {
     Class class = [instance class];
     unsigned   clen;
     char       *cbuf;
@@ -211,7 +211,7 @@ static GetKeyValueBinding* newGetBinding(NSString* key, id instance)
     [key getCString:cbuf]; cbuf[clen] = '\0';
     ckey = cbuf;
     
-    while (class) {
+    while (class != Nil) {
       for (i = 0; class->ivars && i < class->ivars->ivar_count; i++) {
         if (!Strcmp(ckey, class->ivars->ivar_list[i].ivar_name)) {
           switch(*objc_skip_type_qualifiers(class->ivars->ivar_list[i].ivar_type)) {
@@ -256,14 +256,15 @@ static GetKeyValueBinding* newGetBinding(NSString* key, id instance)
               break;
           }
           if (fptr) {
-            info2 = (void*)(class->ivars->ivar_list[i].ivar_offset);
+            info2 = (void *)(unsigned long)
+             (class->ivars->ivar_list[i].ivar_offset);
             break;
           }
         }
       }
       class = class->super_class;
     }
-    if (cbuf) free(cbuf);
+    if (cbuf != NULL) free(cbuf);
   }
     
   // Make binding and insert into map
@@ -433,8 +434,9 @@ static SetKeyValueBinding* newSetBinding(NSString* key, id instance)
               fptr = (void (*)(void*, void*, id, id))doubleIvarSetFunc;
               break;
           }
-          if (fptr) {
-            info2 = (void*)(class->ivars->ivar_list[i].ivar_offset);
+          if (fptr != NULL) {
+            info2 = (void *)(unsigned long)
+             (class->ivars->ivar_list[i].ivar_offset);
             break;
           }
         }
@@ -474,7 +476,7 @@ static SetKeyValueBinding* newSetBinding(NSString* key, id instance)
  */
 
 static unsigned keyValueMapHash(NSMapTable* table, KeyValueMethod* map) {
-  return [map->key hash] + (((int)(map->class)) >> 4);
+  return [map->key hash] + (((unsigned long)(map->class)) >> 4L);
 }
 
 static BOOL keyValueMapCompare(NSMapTable* table,
@@ -820,7 +822,7 @@ static inline BOOL setValue(NSString* key, id instance, id value)
       key = (start < i)
         ? [[StringClass alloc] initWithCString:(const char *)&(buf[start]) 
                               length:(i - start)]
-        : (NSString *)@"";
+        : (id)@"";
       
       value = [value valueForKey:key];
       [key release]; key = nil;
@@ -1078,13 +1080,13 @@ static inline BOOL setValue(NSString* key, id instance, id value)
 
 /* ACCESS to keys of id type. */
 
-static id idMethodGetFunc(void* info1, void* info2, id self) {
+static id idMethodGetFunc(void *info1, void *info2, id self) {
   id (*fptr)(id, SEL) = (id(*)(id, SEL))info1;
   id val = fptr(self, (SEL)info2);
   return val;
 }
-static id idIvarGetFunc(void* info1, void* info2, id self) {
-  id* ptr = (id*)((char*)self + (int)info2);
+static id idIvarGetFunc(void *info1, void *info2, id self) {
+  id *ptr = (id *)((char *)self + (unsigned long)info2);
   return *ptr;
 }
 
@@ -1095,7 +1097,7 @@ static void idMethodSetFunc(void* info1, void* info2, id self, id val) {
 
 static void idIvarSetFunc(void* info1, void* info2, id self, id val)
 {
-  id* ptr = (id*)((char*)self + (int)info2);
+  id *ptr = (id *)((char*)self + (unsigned long)info2);
   ASSIGN(*ptr, val);
 }
 
@@ -1110,19 +1112,19 @@ static id charMethodGetFunc(void* info1, void* info2, id self)
 
 static id charIvarGetFunc(void* info1, void* info2, id self)
 {
-  char* ptr = (char*)((char*)self + (int)info2);
+  char *ptr = (char *)((char *)self + (unsigned long)info2);
   return [NumberClass numberWithChar:*ptr];
 }
 
-static void charMethodSetFunc(void* info1, void* info2, id self, id val)
+static void charMethodSetFunc(void *info1, void *info2, id self, id val)
 {
   void (*fptr)(id, SEL, char) = (void(*)(id, SEL, char))info1;
   fptr(self, (SEL)info2, [val charValue]);
 }
 
-static void charIvarSetFunc(void* info1, void* info2, id self, id val)
+static void charIvarSetFunc(void *info1, void *info2, id self, id val)
 {
-  char* ptr = (char*)((char*)self + (int)info2);
+  char *ptr = (char *)((char *)self + (unsigned long)info2);
   *ptr = [val charValue];
 }
 
@@ -1138,7 +1140,7 @@ static id unsignedCharMethodGetFunc(void* info1, void* info2, id self)
 
 static id unsignedCharIvarGetFunc(void* info1, void* info2, id self)
 {
-  unsigned char* ptr = (unsigned char*)((char*)self + (int)info2);
+  unsigned char *ptr = (unsigned char *)((char *)self + (unsigned long)info2);
   return [NumberClass numberWithUnsignedChar:*ptr];
 }
 
@@ -1150,7 +1152,7 @@ static void unsignedCharMethodSetFunc(void* info1, void* info2, id self, id val)
 
 static void unsignedCharIvarSetFunc(void* info1, void* info2, id self, id val)
 {
-  unsigned char* ptr = (unsigned char*)((char*)self + (int)info2);
+  unsigned char *ptr = (unsigned char *)((char *)self + (unsigned long)info2);
   *ptr = [val unsignedCharValue];
 }
 
@@ -1166,7 +1168,7 @@ static id shortMethodGetFunc(void* info1, void* info2, id self)
 
 static id shortIvarGetFunc(void* info1, void* info2, id self)
 {
-  short* ptr = (short*)((char*)self + (int)info2);
+  short *ptr = (short *)((char *)self + (unsigned long)info2);
   return [NumberClass numberWithShort:*ptr];
 }
 
@@ -1178,7 +1180,7 @@ static void shortMethodSetFunc(void* info1, void* info2, id self, id val)
 
 static void shortIvarSetFunc(void* info1, void* info2, id self, id val)
 {
-  short* ptr = (short*)((char*)self + (int)info2);
+  short *ptr = (short *)((char *)self + (unsigned long)info2);
   *ptr = [val shortValue];
 }
 
@@ -1194,7 +1196,7 @@ static id unsignedShortMethodGetFunc(void* info1, void* info2, id self)
 
 static id unsignedShortIvarGetFunc(void* info1, void* info2, id self)
 {
-  unsigned short* ptr = (unsigned short*)((char*)self + (int)info2);
+  unsigned short *ptr = (unsigned short*)((char *)self + (unsigned long)info2);
   return [NumberClass numberWithUnsignedShort:*ptr];
 }
 
@@ -1206,7 +1208,7 @@ static void unsignedShortMethodSetFunc(void* info1, void* info2, id self, id val
 
 static void unsignedShortIvarSetFunc(void* info1, void* info2, id self, id val)
 {
-  unsigned short* ptr = (unsigned short*)((char*)self + (int)info2);
+  unsigned short *ptr = (unsigned short*)((char *)self + (unsigned long)info2);
   *ptr = [val unsignedShortValue];
 }
 
@@ -1220,9 +1222,9 @@ static id intMethodGetFunc(void* info1, void* info2, id self)
   return [NumberClass numberWithInt:val];
 }
 
-static id intIvarGetFunc(void* info1, void* info2, id self)
+static id intIvarGetFunc(void *info1, void *info2, id self)
 {
-  int* ptr = (int*)((char*)self + (int)info2);
+  int *ptr = (int *)((char *)self + (unsigned long)info2);
   return [NumberClass numberWithInt:*ptr];
 }
 
@@ -1234,7 +1236,7 @@ static void intMethodSetFunc(void* info1, void* info2, id self, id val)
 
 static void intIvarSetFunc(void* info1, void* info2, id self, id val)
 {
-  int* ptr = (int*)((char*)self + (int)info2);
+  int *ptr = (int *)((char *)self + (unsigned long)info2);
   *ptr = [val intValue];
 }
 
@@ -1250,7 +1252,7 @@ static id unsignedIntMethodGetFunc(void* info1, void* info2, id self)
 
 static id unsignedIntIvarGetFunc(void* info1, void* info2, id self)
 {
-  unsigned int* ptr = (unsigned int*)((char*)self + (int)info2);
+  unsigned int* ptr = (unsigned int*)((char*)self + (unsigned long)info2);
   return [NumberClass numberWithUnsignedInt:*ptr];
 }
 
@@ -1262,7 +1264,7 @@ static void unsignedIntMethodSetFunc(void* info1, void* info2, id self, id val)
 
 static void unsignedIntIvarSetFunc(void* info1, void* info2, id self, id val)
 {
-  unsigned int* ptr = (unsigned int*)((char*)self + (int)info2);
+  unsigned int* ptr = (unsigned int*)((char*)self + (unsigned long)info2);
   *ptr = [val unsignedIntValue];
 }
 
@@ -1278,7 +1280,7 @@ static id longMethodGetFunc(void* info1, void* info2, id self)
 
 static id longIvarGetFunc(void* info1, void* info2, id self)
 {
-  long* ptr = (long*)((char*)self + (int)info2);
+  long* ptr = (long*)((char*)self + (unsigned long)info2);
   return [NumberClass numberWithLong:*ptr];
 }
 
@@ -1290,7 +1292,7 @@ static void longMethodSetFunc(void* info1, void* info2, id self, id val)
 
 static void longIvarSetFunc(void* info1, void* info2, id self, id val)
 {
-  long* ptr = (long*)((char*)self + (int)info2);
+  long* ptr = (long*)((char*)self + (unsigned long)info2);
   *ptr = [val longValue];
 }
 
@@ -1304,7 +1306,7 @@ static id unsignedLongMethodGetFunc(void* info1, void* info2, id self) {
 }
 
 static id unsignedLongIvarGetFunc(void* info1, void* info2, id self) {
-  unsigned long* ptr = (unsigned long*)((char*)self + (int)info2);
+  unsigned long* ptr = (unsigned long*)((char*)self + (unsigned long)info2);
   return [NumberClass numberWithUnsignedLong:*ptr];
 }
 
@@ -1314,7 +1316,7 @@ static void unsignedLongMethodSetFunc(void* info1, void* info2, id self, id val)
 }
 
 static void unsignedLongIvarSetFunc(void* info1, void* info2, id self, id val) {
-  unsigned long* ptr = (unsigned long*)((char*)self + (int)info2);
+  unsigned long* ptr = (unsigned long*)((char*)self + (unsigned long)info2);
   *ptr = [val unsignedLongValue];
 }
 
@@ -1328,7 +1330,7 @@ static id longLongMethodGetFunc(void* info1, void* info2, id self) {
 }
 
 static id longLongIvarGetFunc(void* info1, void* info2, id self) {
-  long long* ptr = (long long*)((char*)self + (int)info2);
+  long long* ptr = (long long*)((char*)self + (unsigned long)info2);
   return [NumberClass numberWithLongLong:*ptr];
 }
 
@@ -1338,7 +1340,7 @@ static void longLongMethodSetFunc(void* info1, void* info2, id self, id val) {
 }
 
 static void longLongIvarSetFunc(void* info1, void* info2, id self, id val) {
-  long long* ptr = (long long*)((char*)self + (int)info2);
+  long long* ptr = (long long*)((char*)self + (unsigned long)info2);
   *ptr = [val longLongValue];
 }
 
@@ -1352,7 +1354,7 @@ static id unsignedLongLongMethodGetFunc(void* info1, void* info2, id self) {
 }
 
 static id unsignedLongLongIvarGetFunc(void* info1, void* info2, id self) {
-  unsigned long long* ptr = (unsigned long long*)((char*)self + (int)info2);
+  unsigned long long* ptr = (unsigned long long*)((char*)self + (unsigned long)info2);
   return [NumberClass numberWithUnsignedLongLong:*ptr];
 }
 
@@ -1362,7 +1364,7 @@ static void unsignedLongLongMethodSetFunc(void* info1, void* info2, id self, id
 }
 
 static void unsignedLongLongIvarSetFunc(void* info1, void* info2, id self, id val) {
-  unsigned long long* ptr = (unsigned long long*)((char*)self + (int)info2);
+  unsigned long long* ptr = (unsigned long long*)((char*)self + (unsigned long)info2);
   *ptr = [val unsignedLongLongValue];
 }
 
@@ -1376,7 +1378,7 @@ static id floatMethodGetFunc(void* info1, void* info2, id self) {
 }
 
 static id floatIvarGetFunc(void* info1, void* info2, id self) {
-  float* ptr = (float*)((char*)self + (int)info2);
+  float* ptr = (float*)((char*)self + (unsigned long)info2);
   return [NumberClass numberWithFloat:*ptr];
 }
 
@@ -1386,7 +1388,7 @@ static void floatMethodSetFunc(void* info1, void* info2, id self, id val) {
 }
 
 static void floatIvarSetFunc(void* info1, void* info2, id self, id val) {
-  float* ptr = (float*)((char*)self + (int)info2);
+  float* ptr = (float*)((char*)self + (unsigned long)info2);
   *ptr = [val floatValue];
 }
 
@@ -1400,7 +1402,7 @@ static id doubleMethodGetFunc(void* info1, void* info2, id self) {
 }
 
 static id doubleIvarGetFunc(void* info1, void* info2, id self) {
-  double* ptr = (double*)((char*)self + (int)info2);
+  double* ptr = (double*)((char*)self + (unsigned long)info2);
   return [NumberClass numberWithDouble:*ptr];
 }
 
@@ -1410,7 +1412,7 @@ static void doubleMethodSetFunc(void* info1, void* info2, id self, id val) {
 }
 
 static void doubleIvarSetFunc(void* info1, void* info2, id self, id val) {
-  double* ptr = (double*)((char*)self + (int)info2);
+  double* ptr = (double*)((char*)self + (unsigned long)info2);
   *ptr = [val doubleValue];
 }
 
index 52321db40c22871262d6b71f2e8215915697bc84..5f2286709701dd3bf3b63536fc60ac547b4ddd6e 100644 (file)
@@ -587,7 +587,8 @@ static EOQualifier *_parseKeyCompQualifier(id _ctx, const char *_buf,
   unsigned     pos        = 0;
   BOOL         valueIsKey = NO;
 
-  dict = [_ctx resultForFunction:@"parseKeyCompQualifier" atPos:(unsigned)_buf];
+  dict = [_ctx resultForFunction:@"parseKeyCompQualifier" 
+              atPos:(unsigned long)_buf];
   if (dict != nil) {
     if (qDebug)
       NSLog(@"_parseKeyCompQual return <%@> [cached] for <%s> ", dict, _buf);
@@ -655,7 +656,7 @@ static EOQualifier *_parseKeyCompQualifier(id _ctx, const char *_buf,
     [_ctx setResult:
             [NSDictionary dictionaryWithObjects:values forKeys:keys count:2]
           forFunction:@"parseKeyCompQualifier"
-          atPos:(unsigned)_buf];
+          atPos:(unsigned long)_buf];
     *_qualLen = pos;
   }
   return qual;
@@ -735,7 +736,7 @@ static NSString *_parseKey(id _ctx, const char *_buf, unsigned _bufLen,
     if (qDebug) NSLog(@"%s: _bufLen == 0 --> return nil", __PRETTY_FUNCTION__);
     return nil;
   }
-  dict = [_ctx resultForFunction:@"parseKey" atPos:(unsigned)_buf];
+  dict = [_ctx resultForFunction:@"parseKey" atPos:(unsigned long)_buf];
   if (dict != nil) {
     if (qDebug) {
       NSLog(@"%s: return <%@> [cached] for <%s> ", __PRETTY_FUNCTION__,
@@ -809,7 +810,7 @@ static NSString *_parseKey(id _ctx, const char *_buf, unsigned _bufLen,
     [_ctx setResult:
             [NSDictionary dictionaryWithObjects:values forKeys:keys count:2]
           forFunction:@"parseKey"
-          atPos:(unsigned)_buf];
+          atPos:(unsigned long)_buf];
     *_keyLen = pos;
   }
   return result;
@@ -832,7 +833,7 @@ static id _parseValue(id _ctx, const char *_buf, unsigned _bufLen,
     return nil;
   }
   
-  dict = [_ctx resultForFunction:@"parseValue" atPos:(unsigned)_buf];
+  dict = [_ctx resultForFunction:@"parseValue" atPos:(unsigned long)_buf];
   if (dict != nil) {
     if (qDebug) {
       NSLog(@"_parseKeyCompQualifier return <%@> [cached] for <%s> ",
@@ -1092,7 +1093,7 @@ static id _parseValue(id _ctx, const char *_buf, unsigned _bufLen,
     keys[1] = @"object"; values[1] = obj;
     
     d = [[NSDictionary alloc] initWithObjects:values forKeys:keys count:2];
-    [_ctx setResult:d forFunction:@"parseValue" atPos:(unsigned)_buf];
+    [_ctx setResult:d forFunction:@"parseValue" atPos:(unsigned long)_buf];
     [d release];
     *_keyLen = pos;
   }
index 7d3ac07dd1d9ab9b9a5f7cf3e2d722343c4c8849..1611e7057e4325db99bab295a23dec96e9fdbc26 100644 (file)
@@ -209,7 +209,7 @@ static int keyOrderComparator(id o1, id o2, EOSortOrderingContext *context) {
     else if ((ccmp = (void *)[v1 methodForSelector:sel]))
       result = ccmp(v1, sel, v2);
     else
-      result = (int)[v1 performSelector:sel withObject:v2];
+      result = (unsigned long)[v1 performSelector:sel withObject:v2];
 
     if (result != NSOrderedSame)
       return result;
index d4cdb0f98cf3c0cc140e86650e8742e3ff4c078e..5a4c19dd6cf6c377f22dccd399d347f6db90673c 100644 (file)
@@ -4,7 +4,11 @@ libEOControl_INCLUDE_DIRS += -I..
 
 ADDITIONAL_CPPFLAGS += -Wall -funsigned-char
 
+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
 
 # libFoundation, gstep-base
 
index 81e751c749c2665edbfc49c2423a84aeb6488bb4..bfe96d59df1ac0db864cb8a9ab0518949e775580 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=65
+SUBMINOR_VERSION:=66
index 20db66d2a976fd0b345e757fc8b6ca882665fca8..ce5de3b6b0a8d46774387c41098e79007ffc0477 100644 (file)
@@ -8,6 +8,12 @@ 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)
+FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib64/
+else
+FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/
+endif
+
 fhs-header-dirs ::
        $(MKDIRS) $(FHS_INCLUDE_DIR)$(libEOControl_HEADER_FILES_INSTALL_DIR)
 
index c947cc9a7959da4a222411f2d2b20e56309b33a0..19f29486fd1ad86bf0ccbab2ef1ae209f3422db1 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * 64bit fixes (v4.5.185)
+
 2006-07-03  Helge Hess  <helge.hess@opengroupware.org>
 
        * v4.5.184
index c578bc4a252391c1dccbadc9c9d0769e37c4410c..4421dee1ece0a22d1e6bdc9ebab01dd9d5e31ea5 100644 (file)
@@ -105,12 +105,13 @@ BOOL __autoreleaseEnableRetainRemove = NO;
 
     // check if retainCount is Ok
     if (__autoreleaseEnableCheck) {
-       unsigned int toCome = [NSAutoreleasePool autoreleaseCountForObject:self];
-       if (toCome+1 > [self retainCount]) {
+       unsigned int toCome = 
+         [NSAutoreleasePool autoreleaseCountForObject:self];
+       if (toCome + 1 > [self retainCount]) {
            NSLog(@"Release[0x%p<%@>] release check for object %@ "
                   @"has %d references "
                  @"and %d pending calls to release in autorelease pools\n", 
-                 (unsigned)self, NSStringFromClass([self class]),
+                 self, NSStringFromClass([self class]),
                   self,
                   [self retainCount], toCome);
             NSLog(@"  description='%@'", [self description]);
index effd572935e51aa4c818bf129b5d533139322894..64428702e7209a41467c58ca862ed5598987ce1a 100644 (file)
 - (NSString *)description {
   return [NSString stringWithFormat:
                      @"<NGBitSet[0x%p]: capacity=%u count=%u content=%@>",
-                     (unsigned)self, self->universe, self->count,
+                     self, self->universe, self->count,
                      [[self toArray] description]];
 }
 
index f2cd2c25af7d9e2148c80d26aacbaaf13cb50234..fda86b6b530da004b53bb87c836386139791d308 100644 (file)
 - (NSString *)description {
   return [NSString stringWithFormat:
                      @"<%@[0x%p] capacity=%u SP=%u count=%u content=%s>",
-                     NSStringFromClass([self class]), (unsigned)self,
+                     NSStringFromClass([self class]), self,
                      [self capacity], [self stackPointer], [self count],
                      [[[self toArray] description] cString]];
 }
index 6cd27609192c1c272185a4d0dd266204ab33c482..8ce1cdda1b126de1dfabee9f85ca251a59a4045a 100644 (file)
@@ -1,6 +1,6 @@
 # version
 
-SUBMINOR_VERSION:=184
+SUBMINOR_VERSION:=185
 
 # v4.3.115 requires libFoundation v1.0.59
 # v4.2.72  requires libEOControl  v4.2.39
index e9d3ea5e3a9685774ce73da82aec6fb1902849dc..dfe220a0a259c9c789ec94c7e4eda8206830d6f8 100644 (file)
@@ -5,9 +5,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)
+FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib64/
+else
+FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/
+endif
+
 fhs-header-dirs ::
        $(MKDIRS) $(FHS_INCLUDE_DIR)$(libNGExtensions_HEADER_FILES_INSTALL_DIR)
 
index f9f12df00b8b3959c18ea0674bb7551e8afe3526..10c26c598c8e238cf77fbf8b3faf4aa70f3e7010 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * 64bit fixes (v4.5.51)
+
 2006-07-03  Helge Hess  <helge.hess@opengroupware.org>
 
        * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.50)
index 841cb9cc3906772d16557d71e930b1b80059cc4f..b1dbd77e96a53a91e8f24acbe693b9855c30e816 100644 (file)
   NSMutableString *d = [NSMutableString stringWithCapacity:64];
 
   [d appendFormat:@"<%@[0x%p]: mode=%@ address=%@",
-       NSStringFromClass([self class]),
-       (unsigned)self,
+       NSStringFromClass([self class]), self,
        [self modeDescription], [self localAddress]];
 
   if ([self isConnected])
index 0c74d2ac1d5c661a84c9d5dc06bd65ff3f743bc1..23f3ac5eaceb2bc0596cd51a6d8e249e62cf6335 100644 (file)
@@ -60,7 +60,7 @@ typedef struct NGCharBufferLA {
     self->wasEOF      = NO;
 
     if ([self->source respondsToSelector:@selector(methodForSelector:)]) {
-      self->readCharacter =
+      self->readCharacter = (unichar (*)(id, SEL))
         [(NSObject *)self->source methodForSelector:@selector(readCharacter)];
     }
   }
@@ -130,9 +130,10 @@ typedef struct NGCharBufferLA {
 
           if (self->readCharacter == NULL) 
             character = [self->source readCharacter];
-          else
-            character = (int)self->readCharacter(self->source,
-                                                 @selector(readCharacter));
+          else {
+            character = self->readCharacter(self->source,
+                                           @selector(readCharacter));
+         }
           ix = (self->headIdx + i) & self->sizeLessOne;      
           self->la[ix].character = character;
           self->la[ix].isFetched = 1;
@@ -181,15 +182,12 @@ typedef struct NGCharBufferLA {
   }
 }
 
-// description
+/* description */
 
 - (NSString *)description {
   return [NSString stringWithFormat:@"<%@[0x%p] source=%@ la=%d",
-                     NSStringFromClass([self class]),
-                     (unsigned)self,
-                     self->source,
-                     self->bufLen
-                   ];
+                    NSStringFromClass([self class]), self,
+                     self->source, self->bufLen];
 }
 
-@end
+@end /* NGCharBuffer */
index 62ff0611a9cddb68b09e3a2b7d6c76b472752ab6..528efe3eb0e81730ba75ca2aa404b0ba0c6ab088 100644 (file)
@@ -88,7 +88,7 @@
 
 - (NSString *)description {
   return [NSString stringWithFormat:@"<%@[0x%p]: from=%@ to=%@ size=%i>",
-                     NSStringFromClass([self class]), (unsigned)self,
+                     NSStringFromClass([self class]), self,
                      [self sender], [self receiver], [self packetSize]];
 }
 
index 72824b7a25c969f927b768349bace8e0a7b2564d..c720ee64932183b286b6181c3e34363bc5b12525 100644 (file)
@@ -635,7 +635,7 @@ static void _checkOpen(NGFileStream *self, NSString *_reason) {
 - (NSString *)description {
   return [NSString stringWithFormat:
                      @"<%@[0x%p] path=%@ mode=%@>",
-                     NSStringFromClass([self class]), (unsigned)self,
+                     NSStringFromClass([self class]), self,
                     self->systemPath ? self->systemPath : (NSString *)@"nil",
                      [self modeDescription]];
 }
index 1b16f2201a4310ad4a2b2e0ddcccb6de9ba2791e..4394fe4c00cc88b4f6bd66ab0a1c4fb9153ea0eb 100644 (file)
     [self doesNotRecognizeSelector:[_invocation selector]];
 }
 
-// description
+/* description */
 
 - (NSString *)description {
   return [NSString stringWithFormat:
                      @"<%@[0x%p] source=%@ mode=%@>",
-                     NSStringFromClass([self class]), (unsigned)self,
+                     NSStringFromClass([self class]), self,
                      self->source ? (id)self->source : (id)@"nil",
                      [self modeDescription]];
 }
index d029a9ded6757154e3e072b5f3b8ac8b36774b20..40efcfd5beea955d181d98c526f28d72cb9d22b7 100644 (file)
@@ -125,10 +125,12 @@ static inline NSString *_nameOfLocalhost(void) {
   if (sockAddr->sin_addr.s_addr != 0) { // not a wildcard address
 #if !defined(HAVE_GETHOSTBYADDR_R)
     [systemLock lock];
-    newHost = NSMapGet(nameCache, (void *)sockAddr->sin_addr.s_addr);
+    newHost = NSMapGet(nameCache, 
+                      (void *)(unsigned long)sockAddr->sin_addr.s_addr);
 #else
     [systemLock lock];
-    newHost = NSMapGet(nameCache, (void *)sockAddr->sin_addr.s_addr);
+    newHost = NSMapGet(nameCache, 
+                      (void *)(unsigned long)sockAddr->sin_addr.s_addr);
     [systemLock unlock];
 #endif
     if (newHost == nil) { 
@@ -213,7 +215,8 @@ static inline NSString *_nameOfLocalhost(void) {
       }
       else if (newHost) {
         /* add to cache */
-        NSMapInsert(nameCache, (void *)sockAddr->sin_addr.s_addr, newHost);
+        NSMapInsert(nameCache, 
+                   (void *)(unsigned long)sockAddr->sin_addr.s_addr, newHost);
       }
       /* TODO: should also cache unknown IPs ! */
     }
@@ -517,8 +520,9 @@ static inline NSString *_nameOfLocalhost(void) {
   u_long *ia;
   ia = (u_long *)&(((struct sockaddr_in *)self->address)->sin_addr.s_addr);
 #else
-  unsigned int ia;
-  ia = (unsigned int)&(((struct sockaddr_in *)self->address)->sin_addr.s_addr);
+  unsigned long ia;
+  ia = (unsigned long)
+    &(((struct sockaddr_in *)self->address)->sin_addr.s_addr);
 #endif
 
   if (self->hostName == nil) /* wildcard */
index a95105ca61fd2a0750a563444744ad3e348465bd..64ec27631b9f012b95a296ec7f3b765c8a20060f 100644 (file)
@@ -113,7 +113,7 @@ static NGInternetSocketDomain *domain = nil;
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<InternetDomain[0x%p]>", (unsigned)self];
+  return [NSString stringWithFormat:@"<InternetDomain[0x%p]>", self];
 }
 
 @end /* NGInternetSocketDomain */
index 4f854f1bb14155ce8414f5d44826cc4812258e78..7668efeb86dd8f7f5f62eeeb9c9ad460c48e99a8 100644 (file)
@@ -129,8 +129,7 @@ static NGLocalSocketDomain *domain = nil;
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:
-                     @"<UnixDomain: self=0x%p>", (unsigned)self];
+  return [NSString stringWithFormat:@"<UnixDomain: self=0x%p>", self];
 }
 
 @end /* NGLocalSocketDomain */
index 8ccf24df6d096c44dda11efc373cc96a3cc7e9c2..609a46487f26ce281c6d2369f6eb37dfe3e24d56 100644 (file)
@@ -54,7 +54,7 @@
 #elif __APPLE__
 #  define SockAddrLenType unsigned int
 #else
-#  define SockAddrLenType size_t
+#  define SockAddrLenType socklen_t
 #endif
 
 @implementation NGSocket
@@ -597,12 +597,12 @@ static inline BOOL getBoolOption(id self, int _option) {
   return error;
 }
 
-// description
+/* description */
 
 - (NSString *)description {
   return [NSString stringWithFormat:
                      @"<%@[0x%p]: fd=%i type=%i bound=%@ domain=%@>",
-                     NSStringFromClass([self class]), (unsigned)self,
+                     NSStringFromClass([self class]), self,
                      [self fileDescriptor],
                      [self socketType],
                      [self localAddress] ? [self localAddress] : (id)@"no",
index 857f7feed039cb1153550797a9dccff292d1be91..3081eed7baeebabc5b983901a8a67e3009082d14 100644 (file)
 - (NSString *)description {
   return [NSString stringWithFormat:
                      @"<%@[0x%p] mode=%@>",
-                     NSStringFromClass([self class]), (unsigned)self,
+                     NSStringFromClass([self class]), self,
                      [self modeDescription]];
 }
 
index f3f02472407de068515cdd2160a37cbbd6c4d9f2..4a9594413a3cef606799dfbfc94d6637c4f8d338 100644 (file)
@@ -1,5 +1,6 @@
 /*
-  Copyright (C) 2000-2005 SKYRIX Software AG
+  Copyright (C) 2000-2006 SKYRIX Software AG
+  Copyright (C) 2006      Helge Hess
 
   This file is part of SOPE.
 
@@ -47,8 +48,8 @@ struct NGCharBufferLA;
   BOOL wasEOF;
   int  headIdx;
   int  sizeLessOne;
-
-  IMP readCharacter;
+  
+  unichar (*readCharacter)(id, SEL);
 }
 
 + (id)charBufferWithSource:(id<NGTextStream>)_source la:(int)_la;
index f7227d67578bc35ca68e7d35f47fb431a29918ea..b8f0fed54a42bb84fdba691a114d6b0872b2f977 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=50
+SUBMINOR_VERSION:=51