]> err.no Git - sope/commitdiff
fixed gcc 4.1 warnings
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Jul 2006 19:34:05 +0000 (19:34 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Jul 2006 19:34:05 +0000 (19:34 +0000)
use %p for pointer formats
install/lookup in lib64 on 64bit systems
various minor cleanups

git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1282 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

67 files changed:
sope-core/EOControl/ChangeLog
sope-core/EOControl/EOAndQualifier.m
sope-core/EOControl/EOClassDescription.m
sope-core/EOControl/EOFetchSpecification.m
sope-core/EOControl/EOGenericRecord.m
sope-core/EOControl/EOKeyGlobalID.m
sope-core/EOControl/EOKeyValueArchiver.m
sope-core/EOControl/EOKeyValueCoding.m
sope-core/EOControl/EOKeyValueQualifier.m
sope-core/EOControl/EOOrQualifier.m
sope-core/EOControl/EOQualifierParser.m
sope-core/EOControl/EOQualifierVariable.m
sope-core/EOControl/EOSortOrdering.m
sope-core/EOControl/Version
sope-core/EOCoreData/EOCoreDataSource.m
sope-core/EOCoreData/EOQualifier+CoreData.m
sope-core/NGExtensions/ChangeLog
sope-core/NGExtensions/EOExt.subproj/EOCacheDataSource.m
sope-core/NGExtensions/EOExt.subproj/EOFilterDataSource.m
sope-core/NGExtensions/EOExt.subproj/EOKeyMapDataSource.m
sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m
sope-core/NGExtensions/FdExt.subproj/NSAutoreleasePool+misc.m
sope-core/NGExtensions/FdExt.subproj/NSException+misc.m
sope-core/NGExtensions/FdExt.subproj/NSFileManager+Extensions.m
sope-core/NGExtensions/FdExt.subproj/NSObject+Logs.m
sope-core/NGExtensions/FdExt.subproj/NSProcessInfo+misc.m
sope-core/NGExtensions/FdExt.subproj/NSSet+enumerator.m
sope-core/NGExtensions/FdExt.subproj/NSString+Ext.m
sope-core/NGExtensions/FdExt.subproj/NSString+misc.m
sope-core/NGExtensions/GNUmakefile.preamble
sope-core/NGExtensions/NGBitSet.m
sope-core/NGExtensions/NGBundleManager.m
sope-core/NGExtensions/NGDirectoryEnumerator.m
sope-core/NGExtensions/NGHashMap.m
sope-core/NGExtensions/NGLogging.subproj/NGLogEvent.m
sope-core/NGExtensions/NGLogging.subproj/NGLogger.m
sope-core/NGExtensions/NGLogging.subproj/NGLoggerManager.m
sope-core/NGExtensions/NGObjCRuntime.m
sope-core/NGExtensions/NGResourceLocator.m
sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleAssignment.m
sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleContext.m
sope-core/NGExtensions/NGStack.m
sope-core/NGExtensions/Version
sope-core/NGStreams/ChangeLog
sope-core/NGStreams/GNUmakefile.preamble
sope-core/NGStreams/NGActiveSocket.m
sope-core/NGStreams/NGByteBuffer.m
sope-core/NGStreams/NGCTextStream.m
sope-core/NGStreams/NGCharBuffer.m
sope-core/NGStreams/NGDatagramPacket.m
sope-core/NGStreams/NGDescriptorFunctions.m
sope-core/NGStreams/NGFileStream.m
sope-core/NGStreams/NGFilterStream.m
sope-core/NGStreams/NGInternetSocketAddress.m
sope-core/NGStreams/NGInternetSocketDomain.m
sope-core/NGStreams/NGLocalSocketAddress.m
sope-core/NGStreams/NGLocalSocketDomain.m
sope-core/NGStreams/NGSocket.m
sope-core/NGStreams/NGSocketExceptions.m
sope-core/NGStreams/NGStream.m
sope-core/NGStreams/NGStreamCoder.m
sope-core/NGStreams/NGStreamPipe.m
sope-core/NGStreams/NGTaskStream.m
sope-core/NGStreams/NGTerminalSupport.m
sope-core/NGStreams/Version
sope-core/NGStreams/fhs.make
sope-core/samples/subclassing.m

index deffe6d5aaf8244f90ab7f30ba9cda8c7cdd49d3..bb7a9ec75c17f69185bb1e6568d3bc7dead27918 100644 (file)
@@ -1,3 +1,11 @@
+2006-07-03  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v4.5.65
+
+       * EOKeyValueCoding.m: reduced autorelease usage in KVC key creation
+
+       * use %p for pointer formats, fixed gcc 4.1 warnings
+
 2006-05-02  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * EOSortOrdering.m: use keyPaths instead of just keys in
index 558b5cf0e5cda483260906a4e90e43c2b51c5796..7e27315c63ed47b6d4e6487bfcacf21a9b386205 100644 (file)
@@ -129,7 +129,7 @@ static BOOL debugTransform = NO;
     }
   }
   
-  return keys ? [keys allObjects] : [NSArray array];
+  return keys ? [keys allObjects] : (NSArray *)[NSArray array];
 }
 
 /* keys */
index 2947cafb0b31b866f6e3055845aa711634bc3577..7f68fb43d2966681df3574a93f8624cc0207aa67 100644 (file)
@@ -149,7 +149,7 @@ static NSMapTable *classToDesc  = NULL;
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%08X]: entity=%@>",
+  return [NSString stringWithFormat:@"<%@[0x%p]: entity=%@>",
                      NSStringFromClass([self class]), self,
                      [self entityName]];
 }
index 78614c1f62806037d0b1729a90ebb4050affff0b..37fa0b410c3843266d4eea2c288559629139dcfc 100644 (file)
   id tmp;
   
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self];
+  [ms appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self];
 
   if ((tmp = [self entityName]))
     [ms appendFormat:@" entity=%@", tmp];
index d1343c05eebc22e9ecbd691bd8199f0022a0c27c..f4ab5d69a9178fc6a12b4426a094a7e616fd71e5 100644 (file)
@@ -155,7 +155,7 @@ static inline void _willChange(EOGenericRecord *self) {
   if (_value == nil) _value = null;
   
 #if DEBUG
-  NSAssert1(_key, @"called -takeValue:0x%08X forKey:nil !", _value);
+  NSAssert1(_key, @"called -takeValue:0x%p forKey:nil !", _value);
 #endif
   
   value = eoGet(self, _key);
index 4b6e9af80508fde791c42a37181452e3c4d8d965..c11e3db67e11316efc0939aefa0a33d8b97b740f 100644 (file)
   unsigned int i;
   
   s = [[NSMutableString alloc] init];
-  [s appendFormat:@"<0x%08X[%@]: %@",
+  [s appendFormat:@"<0x%p[%@]: %@",
        self, NSStringFromClass([self class]),
        [self entityName]];
 
index 8649be35b55695ec3360a86821f101d542cf014a..636e17b7fbf425d07b1e158d006072b2736886b4 100644 (file)
@@ -256,7 +256,7 @@ static BOOL isPListObject(id _obj) {
   self->plist  = self->parent;
   self->parent = lastParent;
   
-  return obj ? obj : [NSNull null];
+  return obj != nil ? obj : (id)[NSNull null];
 }
 
 - (id)decodeObjectForKey:(NSString *)_key {
index ff694c64f90423770c240d8177bca6b13c76e5f5..2c46503e929a52be499d8805e68cf1eec52fab67 100644 (file)
@@ -818,11 +818,14 @@ static inline BOOL setValue(NSString* key, id instance, id value)
       NSString *key;
       
       key = (start < i)
-        ? [StringClass stringWithCString:(const char *)
-                      &(buf[start]) length:(i - start)]
-        : @"";
+        ? [[StringClass alloc] initWithCString:(const char *)&(buf[start]) 
+                              length:(i - start)]
+        : (NSString *)@"";
       
-      if ((value = [value valueForKey:key]) == nil)
+      value = [value valueForKey:key];
+      [key release]; key = nil;
+      
+      if (value == nil)
         return nil;
       
       start = (i + 1); /* next part is after the pt */
@@ -831,12 +834,15 @@ static inline BOOL setValue(NSString* key, id instance, id value)
   /* check last part */
   {
     NSString *key;
+    id v;
     
     key = (start < i)
-      ? [StringClass stringWithCString:(const char *)
-                    &(buf[start]) length:(i - start)]
-      : @"";
-    return [value valueForKey:key];
+      ? [[StringClass alloc] initWithCString:(const char *)&(buf[start]) 
+                            length:(i - start)]
+      : (id)@"";
+    v = [value valueForKey:key];
+    [key release]; key = nil;
+    return v;
   }
 #else
   /* naive implementation */
index 4e97e5959290daa9891b2b744b7d6963b7cde00c..9c941fc2340539cacbefb637b62ce6f3fc850a14 100644 (file)
@@ -175,7 +175,7 @@ static EONull *null = nil;
     [(NSMutableDictionary *)_ctx setObject:lv forKey:self->key];
   }
   
-  rv = self->value ? self->value : null;
+  rv = self->value != nil ? self->value : (id)null;
   
   if (debugEval) {
     NSLog(@"Eval: EOKeyValueQualifier:(%@ %@)\n"
index 8cb1b70cbea0af44ae866d6791ecaed0b90a90e9..c448ebb7b71c8e98258b5c2870ea582f30fd7cc3 100644 (file)
@@ -127,7 +127,7 @@ static BOOL debugTransform = NO;
     }
   }
   
-  return keys ? [keys allObjects] : [NSArray array];
+  return keys ? [keys allObjects] : (NSArray *)[NSArray array];
 }
 
 /* keys */
index 1860bc8d6481014dc6c734db9c3ebbbfe01c3e94..52321db40c22871262d6b71f2e8215915697bc84 100644 (file)
@@ -1081,18 +1081,19 @@ static id _parseValue(id _ctx, const char *_buf, unsigned _bufLen,
   
   if (qDebug) {
     NSLog(@"%s: return <%@> for <%s> ", __PRETTY_FUNCTION__, 
-         obj?obj:@"<nil>", _buf);
+         obj != nil ? obj : (id)@"<nil>", _buf);
   }
   
   if (obj != nil) {
+    NSDictionary *d;
     id keys[2], values[2];
     
     keys[0] = @"length"; values[0] = [NSNumber numberWithUnsignedInt:pos];
     keys[1] = @"object"; values[1] = obj;
     
-    [_ctx setResult:
-            [NSDictionary dictionaryWithObjects:values forKeys:keys count:2]
-          forFunction:@"parseValue" atPos:(unsigned)_buf];
+    d = [[NSDictionary alloc] initWithObjects:values forKeys:keys count:2];
+    [_ctx setResult:d forFunction:@"parseValue" atPos:(unsigned)_buf];
+    [d release];
     *_keyLen = pos;
   }
   return obj;
index fe5a69d57e58a620f9657baad0882729b35e442b..b8b942d801cbd80467a5c225d031a67aa9c2661b 100644 (file)
@@ -89,7 +89,7 @@
 }
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%08X]: variable=%@>",
+  return [NSString stringWithFormat:@"<%@[0x%p]: variable=%@>",
                      NSStringFromClass([self class]), self,
                      [self key]];
 }
index 586ad1a83970034cd2099cd25c5dfdeedf5adfcf..7d3ac07dd1d9ab9b9a5f7cf3e2d722343c4c8849 100644 (file)
@@ -144,7 +144,7 @@ EOControl_DECLARE SEL EOCompareCaseInsensitiveDescending =
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<0x%08X[%@]: key=%@ selector=%@>",
+                     @"<0x%p[%@]: key=%@ selector=%@>",
                      self, NSStringFromClass([self class]),
                      [self key], NSStringFromSelector([self selector])];
 }
index c41a410afe17ef80110f2389ce30444bb7fee116..81e751c749c2665edbfc49c2423a84aeb6488bb4 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=64
+SUBMINOR_VERSION:=65
index d569d1bd6188b1457a0580ee4dc58f4af8f75a5f..eac404e14870f37ef56de755c3a668ea89ec488b 100644 (file)
@@ -408,7 +408,7 @@ static BOOL debugOn = NO;
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:64];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   
   if (self->fetchSpecification != nil) 
     [ms appendFormat:@" fs=%@", self->fetchSpecification];
index f39d5ac98b7103bfb31c872373ecada0381712be..0e5babd00b8d5db4cf35eeacc2ef2a5c603d2b6e 100644 (file)
   unsigned popts;
 
   if (_selector == NULL) {
-    NSLog(@"ERROR(0x%08X/%@): missing selector for predicate construction: %@",
+    NSLog(@"ERROR(0x%p/%@): missing selector for predicate construction: %@",
          self, NSStringFromClass([self class]), self);
     return nil;
   }
index d952a4b6c4d7734a5b15ce39fe700d1d71f06945..c947cc9a7959da4a222411f2d2b20e56309b33a0 100644 (file)
@@ -1,3 +1,13 @@
+2006-07-03  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v4.5.184
+
+       * NGHashMap.m: improved memory management with exceptions
+
+       * FdExt.subproj/NSSet+enumerator.m: code cleanups
+
+       * use %p for pointer formats, fixed gcc 4.1 warnings
+
 2006-05-16  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * *.h, *m: changed EOControl related includes into imports
index 989b2d44220b941dabb08e36c46785bb23f66db0..0364ee0b5105ab56883ed94d0b920fff72effcaf 100644 (file)
 - (NSString *)description {
   NSString *fmt;
 
-  fmt = [NSString stringWithFormat:@"<%@[0x%08X]: source=%@>",
+  fmt = [NSString stringWithFormat:@"<%@[0x%p]: source=%@>",
                     NSStringFromClass([self class]), self,
                     self->source];
   return fmt;
index f4d2938127b0a5769ae42a927f45508955b4e49d..8173849f13bca59063d7fa193e9474f6149d20fb 100644 (file)
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:64];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
 
   if (self->source != nil)
     [ms appendFormat:@" source=%@", self->source];
index 700fd6094fc273e4a481e6f15bdf2991a4c34035..f2e58d65ade291cf35bbe5b4a0a208007d2dee21 100644 (file)
 - (NSString *)description {
   NSString *fmt;
 
-  fmt = [NSString stringWithFormat:@"<%@[0x%08X]: source=%@ map=%@>",
+  fmt = [NSString stringWithFormat:@"<%@[0x%p]: source=%@ map=%@>",
                     NSStringFromClass([self class]), self,
                     self->source, self->map];
   return fmt;
index f5c7e76eef59edb119f41cba2aa2ea6153cfc6eb..8e9fb4cc706a685d8cab2fced2147ebe669fdd77 100644 (file)
@@ -484,7 +484,7 @@ static NSException *_makeException(NSException *_exception,
                }
             }
             else
-                NSLog(@"startPos=0x%08X endPos=0x%08X", startPos, endPos);
+                NSLog(@"startPos=0x%p endPos=0x%p", startPos, endPos);
         }
     
         [exception setUserInfo:ui];
index 75547e36d23a792ffbd9b181691b68633c6de81c..c578bc4a252391c1dccbadc9c9d0769e37c4410c 100644 (file)
@@ -107,7 +107,7 @@ BOOL __autoreleaseEnableRetainRemove = NO;
     if (__autoreleaseEnableCheck) {
        unsigned int toCome = [NSAutoreleasePool autoreleaseCountForObject:self];
        if (toCome+1 > [self retainCount]) {
-           NSLog(@"Release[0x%08X<%@>] release check for object %@ "
+           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]),
index c06ff8809cc3adbdd37377e15708b23484e04e5a..254490be55bd64dbe4a05e726ea9ff7a3ecec837 100644 (file)
@@ -71,9 +71,9 @@
     NSLog(@"ERROR(%s): missing format!", __PRETTY_FUNCTION__);
   
   va_start(ap, _format);
-  tmp = [[NSString allocWithZone:[self zone]]
-                   initWithFormat:_format ? _format : @"Exception"
-                  arguments:ap];
+  tmp = [[NSString alloc] initWithFormat:
+                           _format ? _format : (NSString *)@"Exception"
+                         arguments:ap];
   va_end(ap);
 
   self = [self initWithReason:tmp userInfo:nil];
index 9e95d8f0a2f602b7300c84892cf17ae929bf728d..aa142299d411a1bc4105c87511e48c2e5566ae71 100644 (file)
 - (NSString *)description {
   NSMutableString *ms = [NSMutableString stringWithCapacity:32];
   
-  [ms appendFormat:@"<0x%08X[%@]", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]", self, NSStringFromClass([self class])];
   [ms appendFormat:@" path=%@", self->path];
   [ms appendString:@">"];
   return ms;
index 6f5ba65a7a88ac374443535655e20611f802fde2..1f36818fc8f703e13e8d0027d98521068ff5bbad 100644 (file)
@@ -67,7 +67,7 @@ static inline Class NSStringClass(void) {
 
 - (NSString *)loggingPrefix {
   /* improve perf ... */
-  return [NSStringClass() stringWithFormat:@"<0x%08X[%@]>",
+  return [NSStringClass() stringWithFormat:@"<0x%p[%@]>",
                        self, NSStringFromClass([self class])];
 }
 
index 0c7bc1bb5d3c4d6af6cb54178fa8750e9aa315de..537293bb21428cc3957f2243311c80f2a1328e63 100644 (file)
@@ -58,7 +58,7 @@
     [ma addObject:arg];
   }
   
-  return foundDefault ? (id)ma : a;
+  return foundDefault ? (NSArray *)ma : a;
 }
 
 /* create temp file name */
@@ -99,7 +99,7 @@
   if (![[NSFileManager defaultManager] fileExistsAtPath:p isDirectory:&isDir])
     return nil;
   
-  return isDir ? p : nil;
+  return isDir ? p : (NSString *)nil;
 }
 
 - (NSDictionary *)procStatusDictionary {
index b0de3e552e191f4fabc6538fcfe3bab42044dbc7..49087ba7ef328a0749ee6a7b83652be76dcaf958 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.
 
@@ -19,8 +20,8 @@
   02111-1307, USA.
 */
 
-#import "common.h"
-#import "NSSet+enumerator.h"
+#include "NSSet+enumerator.h"
+#include "common.h"
 
 @implementation NSSet(enumerator)
 
   return self;
 }
 
-// mapping
+/* mapping */
 
 - (NSArray *)mappedArrayUsingSelector:(SEL)_selector {
-  NSArray *array = nil;
-  NSSet   *set   = nil;
-
-  set = [self mappedSetUsingSelector:_selector];
-  if (set) {
-    array = [[NSArray allocWithZone:[self zone]]
-                      initWithObjectsFromEnumerator:[set objectEnumerator]];
-  }
-  set = nil;
+  NSArray *array;
+  NSSet   *set;
+
+  if ((set = [self mappedSetUsingSelector:_selector]) == nil)
+    return nil;
+  
+  array = [[NSArray alloc]
+                   initWithObjectsFromEnumerator:[set objectEnumerator]];
   return [array autorelease];
 }
 - (NSArray *)mappedArrayUsingSelector:(SEL)_selector withObject:(id)_object {
-  NSArray *array = nil;
-  NSSet   *set   = nil;
-
-  set = [self mappedSetUsingSelector:_selector withObject:_object];
-  if (set) {
-    array = [[NSArray allocWithZone:[self zone]]
-                      initWithObjectsFromEnumerator:[set objectEnumerator]];
-  }
-  set = nil;
+  NSArray *array;
+  NSSet   *set;
+
+  if ((set = [self mappedSetUsingSelector:_selector withObject:_object])== nil)
+    return nil;
+  
+  array = [[NSArray allocWithZone:[self zone]]
+                    initWithObjectsFromEnumerator:[set objectEnumerator]];
   return [array autorelease];
 }
 
 - (NSSet *)mappedSetUsingSelector:(SEL)_selector {
-  NSMutableSet *set   = [NSMutableSet setWithCapacity:[self count]];
-  NSEnumerator *e     = [self objectEnumerator];
-  id           object = nil;
+  NSMutableSet *set;
+  NSEnumerator *e;
+  id           object;
 
-  while ((object = [e nextObject])) {
+  set = [NSMutableSet setWithCapacity:[self count]];
+  e   = [self objectEnumerator];
+  while ((object = [e nextObject]) != nil) {
     object = [object performSelector:_selector];
-
-    [set addObject:object ? object : [NSNull null]];
+    
+    [set addObject:(object != nil ? object : (id)[NSNull null])];
   }
   return set;
 }
 - (NSSet *)mappedSetUsingSelector:(SEL)_selector withObject:(id)_object {
-  NSMutableSet *set = [NSMutableSet setWithCapacity:[self count]];
-  NSEnumerator *e     = [self objectEnumerator];
-  id           object = nil;
-
-  while ((object = [e nextObject])) {
+  NSMutableSet *set;
+  NSEnumerator *e;
+  id           object;
+  
+  set = [NSMutableSet setWithCapacity:[self count]];
+  e   = [self objectEnumerator];
+  while ((object = [e nextObject]) != nil) {
     object = [object performSelector:_selector withObject:_object];
 
-    [set addObject:object ? object : [NSNull null]];
+    [set addObject:(object != nil ? object : (id)[NSNull null])];
   }
   return set;
 }
 
-@end
+@end /* NSSet(enumerator) */
+
 
 @implementation NSMutableSet(enumerator) 
 
 - (id)initWithObjectsFromEnumerator:(NSEnumerator *)_enumerator {
-  if ((self = [self init])) {
-    id obj = nil;
+  if ((self = [self init]) != nil) {
+    id obj;
      
-    while ((obj = [_enumerator nextObject]))
+    while ((obj = [_enumerator nextObject]) != nil)
       [self addObject:obj];
   }
   return self;
 }
 
-@end
+@end /* NSMutableSet(enumerator)  */
 
 void __link_NGExtensions_NSSetEnumerator() {
   __link_NGExtensions_NSSetEnumerator();
index 7d53d37a7eff0b39462fced9f862ebe47ca51b5b..fdf9f5d317e448e3145943ba24a1e71d481ed184 100644 (file)
 {
     return ([self hasPrefix:_prefix])
         ? [self substringFromIndex:[_prefix length]]
-        : [[self copy] autorelease];
+        : (NSString *)[[self copy] autorelease];
 }
 
 - (NSString *)stringWithoutSuffix:(NSString *)_suffix
 {
     return ([self hasSuffix:_suffix])
         ? [self substringToIndex:([self length] - [_suffix length])]
-        : [[self copy] autorelease];
+        : (NSString *)[[self copy] autorelease];
 }
 
 - (NSString *)stringByReplacingString:(NSString *)_orignal
index 0c1963cc9909d475854cca6f5929ae96175ab453..fcdb4faa9aec6bed2c81012fb211cd511dcdf4cb 100644 (file)
   if (r.length > 0) {
     return ([self length] > r.location)
       ? [self substringFromIndex:(r.location + r.length)]
-      : @"";
+      : (NSString *)@"";
   }
   return nil;
 }
index ff4bc08c461817aaee7786260a10a9bc3979f0d8..7bb62f8742e18fb2ba3e42f93bf1c958f869be2e 100644 (file)
@@ -36,7 +36,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
 
 
 # Apple
index 0bd83475dfa447d4f622596affd906b41c3f1632..effd572935e51aa4c818bf129b5d533139322894 100644 (file)
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<NGBitSet[0x%08X]: capacity=%u count=%u content=%@>",
+                     @"<NGBitSet[0x%p]: capacity=%u count=%u content=%@>",
                      (unsigned)self, self->universe, self->count,
                      [[self toArray] description]];
 }
index 305e11afd075d7be84b135e856401aa82f22b139..f284ee95f460f5e3831ba8d5a6c9875b61e40a60 100644 (file)
@@ -568,7 +568,7 @@ static NSString *NGEnvVarPathSeparator = @":";
       p = [bundle bundlePath];
       if ([p hasSuffix:@"Libraries"]) {
        if (debugOn) {
-         fprintf(stderr, "%s: Dylib bundle: 0x%08X: %s\n",
+         fprintf(stderr, "%s: Dylib bundle: 0x%p: %s\n",
                  __PRETTY_FUNCTION__,
                  (unsigned int )bundle, [[bundle bundlePath] cString]);
        }
@@ -576,7 +576,7 @@ static NSString *NGEnvVarPathSeparator = @":";
       }
       else if ([p hasSuffix:@"Tools"]) {
        if (debugOn) {
-         fprintf(stderr, "%s: Tool bundle: 0x%08X: %s\n",
+         fprintf(stderr, "%s: Tool bundle: 0x%p: %s\n",
                  __PRETTY_FUNCTION__,
                  (unsigned int )bundle, [[bundle bundlePath] cString]);
        }
@@ -1400,7 +1400,7 @@ static BOOL _doesInfoMatch(NSArray *keys, NSDictionary *dict, NSDictionary *info
   
   rnKeys = ([_resourceName respondsToSelector:@selector(objectForKey:)])
     ? [_resourceName allKeys]
-    : nil;
+    : (NSArray *)nil;
   
   menum = NSEnumerateMapTable(self->pathToBundleInfo);
   while (NSNextMapEnumeratorPair(&menum, (void *)&path, (void *)&bundleInfo)) {
index 5462cc9ffbb48c185555803a30205c843fa99450..1be4ae3c3a216e28ad3524f4c047e7eedfc7dd9a 100644 (file)
   
   ms = [NSMutableString stringWithCapacity:128];
 
-  [ms appendFormat:@"<%@[0x%08X]: ", NSStringFromClass([self class]), self];
+  [ms appendFormat:@"<%@[0x%p]: ", NSStringFromClass([self class]), self];
 
   [ms appendFormat:@" dir='%@'", self->topPath];
   [ms appendFormat:@" cname='%@'", self->currentFileName];
index 9767611fffa654a96556cd60cef499d58fb4bf59..18a02b27f91e6e74b3cca410ed67a0af50f6e776 100644 (file)
@@ -49,32 +49,33 @@ static inline void checkForAddErrorMessage(id _self, id _object, id _key) {
   NSString     *r;
   
   if (_key == nil) {
-    r = [NSString stringWithFormat:@"nil key to be added in HashMap with object %@",
-           _object ? _object : @"<nil>"];
-    ui = [NSDictionary dictionaryWithObjectsAndKeys:
-                                     _self, @"map",
-                                     _key ? _key : @"<nil>",
-                                     @"key",
-                                     _object ? _object : @"<nil>",
-                                     @"object",
-                                     nil];
+    r = [[NSString alloc] initWithFormat:
+                           @"nil key to be added in HashMap with object %@",
+                           (_object != nil ? _object : (id)@"<nil>")];
+    ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+                                _self,                            @"map",
+                                _key ? _key : (id)@"<nil>",       @"key",
+                                _object ? _object : (id)@"<nil>", @"object",
+                              nil];
     exc = [NSException exceptionWithName:NSInvalidArgumentException
                        reason:r userInfo:ui];
+    [r  release]; r  = nil;
+    [ui release]; ui = nil;
     [exc raise];
   }
   if (_object == nil) {
-    r = [NSString stringWithFormat:
-                   @"nil object to be added in HashMap for key %@",
-                   _key ? _key : @"<nil>"];
-    ui = [NSDictionary dictionaryWithObjectsAndKeys:
-                                     _self, @"map",
-                                     _key ? _key : @"<nil>",
-                                     @"key",
-                                     _object ? _object : @"<nil>",
-                                     @"object",
-                                     nil];
+    r = [[NSString alloc] initWithFormat:
+                           @"nil object to be added in HashMap for key %@",
+                           _key ? _key : (id)@"<nil>"];
+    ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+                                _self,                            @"map",
+                                _key ? _key : (id)@"<nil>",       @"key",
+                                _object ? _object : (id)@"<nil>", @"object",
+                              nil];
     exc = [NSException exceptionWithName:NSInvalidArgumentException
                        reason:r userInfo:ui];
+    [r  release]; r  = nil;
+    [ui release]; ui = nil;
     [exc raise];
   }
 }
@@ -87,18 +88,18 @@ static inline void checkForRemoveErrorMessage(id _self, id _object, id _key) {
   if (_object != nil && _key != nil)
     return;
   
-  r = [NSString stringWithFormat:
-                 @"nil object to be removed in HashMap for key %@",
-                 _key ? _key : @"<nil>"];
-  ui = [NSDictionary dictionaryWithObjectsAndKeys:
-                                     _self, @"map",
-                                     _key ? _key : @"<nil>",
-                                     @"key",
-                                     _object ? _object : @"<nil>",
-                                     @"object",
-                                     nil];
+  r = [[NSString alloc] initWithFormat:
+                         @"nil object to be removed in HashMap for key %@",
+                         _key ? _key : (id)@"<nil>"];
+  ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+                              _self,                            @"map",
+                              _key ? _key : (id)@"<nil>",       @"key",
+                              _object ? _object : (id)@"<nil>", @"object",
+                            nil];
   exc = [NSException exceptionWithName:NSInvalidArgumentException
                      reason:r userInfo:ui];
+  [ui release]; ui = nil;
+  [r  release]; r  = nil;
   [exc raise];
 }
 
@@ -720,7 +721,7 @@ static inline unsigned __countObjectsForKey(NGHashMap *self, id _key) {
   if ((root = [self __structForKey:_key]) == NULL) {
     if (_index > 0) {
       [NSException raise:NSRangeException
-                   format:@"index %d out of range in map 0x%08X", 
+                   format:@"index %d out of range in map 0x%p", 
                     _index, self];
       return;
     }
@@ -732,7 +733,7 @@ static inline unsigned __countObjectsForKey(NGHashMap *self, id _key) {
   else {
     if (!(_index < root->count)) {
       [NSException raise:NSRangeException
-                   format:@"index %d out of range in map 0x%08X length %d", 
+                   format:@"index %d out of range in map 0x%p length %d", 
                     _index, self, root->count];
       return;
     }
index 1aa543e3a0df9c3090e50fc822454eec70963d68..c095c1900043651226e72dac5cd23e6094937d24 100644 (file)
@@ -80,7 +80,7 @@ static Class DateClass = Nil;
     case NGLogLevelFatal: lvl = @"FATAL"; break;
     default:              lvl = @"ALL";   break;
   }
-  return [NSString stringWithFormat:@"<%@[0x%08X] date=%@ level=%@ msg:%@>",
+  return [NSString stringWithFormat:@"<%@[0x%p] date=%@ level=%@ msg:%@>",
                       NSStringFromClass([self class]), self,
                       [self date], lvl, self->msg];
 }
index 7dbb536a0f0b74bb20d9fc74779bfb07d00e8a20..d6c5fc2bb1d5fddf778a8bf55cdce2296aeb6aea 100644 (file)
@@ -256,7 +256,7 @@ static NGLogLevel defaultLogLevel = NGLogLevelInfo;
     case NGLogLevelFatal: lvl = @"FATAL"; break;
     default:              lvl = @"ALL";   break;
   }
-  return [NSString stringWithFormat:@"<%@[0x%08X] logLevel=%@ appenders:%@>",
+  return [NSString stringWithFormat:@"<%@[0x%p] logLevel=%@ appenders:%@>",
                      NSStringFromClass([self class]), self,
                      lvl, self->appenders];
 }
index e30ad268d80a44bac40c9bb5efdfb3be71c50650..57e52e5ebbbfe35fb3da86f59725a623fe340760 100644 (file)
@@ -106,7 +106,7 @@ static BOOL            debugAll        = NO;
 - (NGLogger *)loggerForClass:(Class)_clazz {
   NSString *name;
   
-  name = _clazz != Nil ? NSStringFromClass(_clazz) : nil;
+  name = _clazz != Nil ? NSStringFromClass(_clazz) : (NSString *)nil;
   return [self loggerForFacilityNamed:name];
 }
 
@@ -122,7 +122,7 @@ static BOOL            debugAll        = NO;
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%08X] debugAll=%@ #loggers=%d>",
+  return [NSString stringWithFormat:@"<%@[0x%p] debugAll=%@ #loggers=%d>",
                      NSStringFromClass([self class]), self,
                      debugAll ? @"YES" : @"NO", [self->loggerMap count]];
 }
index 2f1174fa0802aac152edccb8acc076b3950188d2..b8aa29d72649caf95c6ff8e70b17a9c2e4fe2094 100644 (file)
@@ -134,7 +134,7 @@ fillMethodListWithSpecs(MethodList_t methods, SEL _selector, va_list *va)
   unsigned count;
   
   selector  = _selector;
-  signature = selector  ? va_arg(*va, NSString *) : nil;
+  signature = selector  ? va_arg(*va, NSString *) : (NSString *)nil;
   imp       = signature ? va_arg(*va, IMP) : NULL;
   count     = 0;
   while ((selector != NULL) && (signature != nil) && (imp != NULL)) {
index 303136d2fb5de5f30adba1c502e893b2be40eb65..3d01d3ad287c966c56efe138fdd15828f520cdc4 100644 (file)
@@ -62,7 +62,7 @@
   NSString *apath;
   
   if (pathes != nil)
-    return [pathes isNotNull] ? pathes : nil;
+    return [pathes isNotNull] ? pathes : (NSArray *)nil;
   
   env = [[NSProcessInfo processInfo] environment];
   if ((apath = [env objectForKey:@"GNUSTEP_PATHPREFIX_LIST"]) == nil)
@@ -90,8 +90,8 @@
   
   e = ([self->gsSubPath length] > 0)
     ? [[self gsRootPathes] objectEnumerator]
-    : nil;
-  while ((p = [e nextObject])) {
+    : (NSEnumerator *)nil;
+  while ((p = [e nextObject]) != nil) {
     p = [p stringByAppendingPathComponent:self->gsSubPath];
     if ([ma containsObject:p])
       continue;
   
   e = ([self->fhsSubPath length] > 0)
     ? [[self fhsRootPathes] objectEnumerator]
-    : nil;
-  while ((p = [e nextObject])) {
+    : (NSEnumerator *)nil;
+  while ((p = [e nextObject]) != nil) {
     p = [p stringByAppendingPathComponent:self->fhsSubPath];
     if ([ma containsObject:p])
       continue;
   if (self->nameToPathCache == nil)
     self->nameToPathCache = [[NSMutableDictionary alloc] initWithCapacity:64];
   
-  [self->nameToPathCache setObject:_path?_path:(id)[NSNull null] forKey:_name];
+  [self->nameToPathCache setObject:(_path ? _path : (NSString *)[NSNull null])
+                         forKey:_name];
 }
 
 /* operation */
   
   if (![_name isNotNull] || [_name length] == 0)
     return nil;
-  if ((p = [self->nameToPathCache objectForKey:_name]))
-    return [p isNotNull] ? p : nil;
+  if ((p = [self->nameToPathCache objectForKey:_name]) != nil)
+    return [p isNotNull] ? p : (NSString *)nil;
   
   e = [[self searchPathes] objectEnumerator];
   while ((p = [e nextObject]) != nil) {
   NSArray  *lSearchPathes;
   unsigned i, count;
   
-  _ext          = [_ext length] > 0 ? [@"." stringByAppendingString:_ext] :nil;
+  _ext  = ([_ext length] > 0)
+    ? [@"." stringByAppendingString:_ext]
+    : (NSString *)nil;
+  
   uniquer       = [NSMutableSet setWithCapacity:128];
   pathes        = _withPath ? [NSMutableArray arrayWithCapacity:64] : nil;
   lSearchPathes = [self searchPathes];
     }
   }
   
-  return _withPath ? pathes : [uniquer allObjects];
+  return _withPath ? (NSArray *)pathes : [uniquer allObjects];
 }
 
 /* description */
   NSMutableString *ms;
   
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   
   [ms appendFormat:@" gs=%@ fhs=%@", self->gsSubPath, self->fhsSubPath];
   
index 13e545360479f5e9a21c6d1799829a9d54e2fc37..dde2554f309cfb0d2494bdbd957a4519cf95a278 100644 (file)
 /* description */
 
 - (NSString *)valueStringValue {
-  return [self->value isKindOfClass:[NSNumber class]]
-    ? [self->value stringValue]
-    : [NSString stringWithFormat:@"\"%@\"", self->value];
+  NSMutableString *ms;
+
+  if ([self->value isKindOfClass:[NSNumber class]])
+    return [self->value stringValue];
+
+  ms = [NSMutableString stringWithCapacity:64];
+  [ms appendString:@"\""];
+  [ms appendString:[self->value stringValue]];
+  [ms appendString:@"\""];
+  return ms;
 }
 
 - (NSString *)stringValue {
-  return [NSString stringWithFormat:@"%@ = %@",
-                     [self keyPath],
-                     [self valueStringValue]];
+  NSMutableString *ms;
+
+  ms = [NSMutableString stringWithCapacity:64];
+  [ms appendString:[[self keyPath] description]];
+  [ms appendString:@" = "];
+  [ms appendString:[self valueStringValue]];
+  return ms;
 }
 
 - (NSString *)description {
 
 @end /* NGRuleAssignment */
 
+
 @implementation NGRuleKeyAssignment
 
 /* operations */
index ae780483f36c1ba7a9e3173b2f3da4876e266e47..7e38945d4037e43a2f304aadb5644bdbfa4a0c43 100644 (file)
         [self debugWithFormat:@"  rule %i matches: %@", i, rule];
       
       v = [[rule action] fireInContext:self];
-      [values addObject:(v ? v : [NSNull null])];
+      [values addObject:(v != nil ? v : (id)[NSNull null])];
     }
   }
   if (self->debugOn)
 
     /* calculate the rule value */
     ruleValue = [self valueForKey:_kp];
-    [results addObject:ruleValue ? ruleValue : [NSNull null]];
+    [results addObject:(ruleValue != nil ? ruleValue : (id)[NSNull null])];
   }
   return results;
 }
index 9a3f5eae179894e9c0b4859452c214de2d41175d..f2cd2c25af7d9e2148c80d26aacbaaf13cb50234 100644 (file)
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%08X] capacity=%u SP=%u count=%u content=%s>",
+                     @"<%@[0x%p] capacity=%u SP=%u count=%u content=%s>",
                      NSStringFromClass([self class]), (unsigned)self,
                      [self capacity], [self stackPointer], [self count],
                      [[[self toArray] description] cString]];
index 629cbb0c2a584ccd1d8a5686fd595e3b2359c276..6cd27609192c1c272185a4d0dd266204ab33c482 100644 (file)
@@ -1,6 +1,6 @@
 # version
 
-SUBMINOR_VERSION:=183
+SUBMINOR_VERSION:=184
 
 # v4.3.115 requires libFoundation v1.0.59
 # v4.2.72  requires libEOControl  v4.2.39
index b08c291953570c690b728a98fd26724dc5a21579..f9f12df00b8b3959c18ea0674bb7551e8afe3526 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-03  Helge Hess  <helge.hess@opengroupware.org>
+
+       * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.50)
+
 2005-08-10  Helge Hess  <helge.hess@opengroupware.org>
 
        * reorganized inclusion to support frameworks (v4.5.49)
index 25f2e99a14bed69d331600ed40c8d35342b21cf6..f135cd94bb68df730bb6acad2b575febb4c4a308 100644 (file)
@@ -37,7 +37,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
 
 
 # activating SSL support
index 0fcefd52d46a6ae364cc6466e66aacaeb908b5c0..841cb9cc3906772d16557d71e930b1b80059cc4f 100644 (file)
                                   : (int)(self->receiveTimeout * 1000.0));
 #if DEBUG
     if ((readResult < 0) && (errno == EINVAL)) {
-      NSLog(@"%s: invalid argument in NGDescriptorRecv(%i, 0x%08X, %i, %i)",
+      NSLog(@"%s: invalid argument in NGDescriptorRecv(%i, 0x%p, %i, %i)",
             __PRETTY_FUNCTION__,
             self->fd, _buf, _len, 0,
             (self->receiveTimeout == 0.0)
 - (NSString *)description {
   NSMutableString *d = [NSMutableString stringWithCapacity:64];
 
-  [d appendFormat:@"<%@[0x%08X]: mode=%@ address=%@",
+  [d appendFormat:@"<%@[0x%p]: mode=%@ address=%@",
        NSStringFromClass([self class]),
        (unsigned)self,
        [self modeDescription], [self localAddress]];
index 121b5722fef34fc204eed87a5f68e254d304f7fe..842cdd0aa2706441457f1eed852af6785d1ba7ea 100644 (file)
@@ -333,7 +333,7 @@ static Class DataStreamClass = Nil;
   
   ms = [NSMutableString stringWithCapacity:128];
 
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   
   if (self->source) [ms appendFormat:@" source=%@", self->source];
   [ms appendFormat:@" mode=%@", [self modeDescription]];
index a6b12f3cf92beb2d31e5e81e5b0793713c646911..a061c5a6f981869b7ff667a668bebf260d55f20f 100644 (file)
@@ -246,7 +246,7 @@ static void _flushAtExit(void) {
   }
   NS_ENDHANDLER;
   
-  return buffer ? NGCharBuffer8_makeStringAndDealloc(buffer) : nil;
+  return buffer ? NGCharBuffer8_makeStringAndDealloc(buffer) : (NSString *)nil;
 }
 
 - (NSEnumerator *)lineEnumerator {
index 0821efe8c55dea7fa7eb1fbf4b8e8ebb7d6171d7..0c74d2ac1d5c661a84c9d5dc06bd65ff3f743bc1 100644 (file)
@@ -184,7 +184,7 @@ typedef struct NGCharBufferLA {
 // description
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%08X] source=%@ la=%d",
+  return [NSString stringWithFormat:@"<%@[0x%p] source=%@ la=%d",
                      NSStringFromClass([self class]),
                      (unsigned)self,
                      self->source,
index c58484d9fdf5d27675e204e9bbc9b0a317054f06..62ff0611a9cddb68b09e3a2b7d6c76b472752ab6 100644 (file)
@@ -87,7 +87,7 @@
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%08X]: from=%@ to=%@ size=%i>",
+  return [NSString stringWithFormat:@"<%@[0x%p]: from=%@ to=%@ size=%i>",
                      NSStringFromClass([self class]), (unsigned)self,
                      [self sender], [self receiver], [self packetSize]];
 }
index 82fd975a8d28d0245e8f78295d0c0621c2afcdc9..362e9b5ae4d1d00dd4ed4976acd2cc5aa9f327de 100644 (file)
@@ -180,7 +180,7 @@ int NGDescriptorRecv(int _fd, char *_buf, int _len, int _flags, int _timeout /*
   }
   
   if (enableDescLogging) {
-    NSLog(@"%s(fd=%i,buf=0x%08X,len=%i,flags=%i,timeout=%i)", 
+    NSLog(@"%s(fd=%i,buf=0x%p,len=%i,flags=%i,timeout=%i)", 
          __PRETTY_FUNCTION__, _fd,_buf,_len,_flags,_timeout);
   }
   
@@ -193,7 +193,7 @@ int NGDescriptorRecv(int _fd, char *_buf, int _len, int _flags, int _timeout /*
   
   if (enableDescLogging) {
     if ((result < 0) && (errorCode == EINVAL)) {
-      NSLog(@"%s: invalid argument in recv(%i, 0x%08X, %i, %i)",
+      NSLog(@"%s: invalid argument in recv(%i, 0x%p, %i, %i)",
            __PRETTY_FUNCTION__, _fd, _buf, _len, _flags);
     }
   }
index 2784d83881f5d268b64eea6e42f8b6c73f958160..72824b7a25c969f927b768349bace8e0a7b2564d 100644 (file)
@@ -634,13 +634,14 @@ static void _checkOpen(NGFileStream *self, NSString *_reason) {
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%08X] path=%@ mode=%@>",
+                     @"<%@[0x%p] path=%@ mode=%@>",
                      NSStringFromClass([self class]), (unsigned)self,
-                     self->systemPath ? self->systemPath : @"nil",
+                    self->systemPath ? self->systemPath : (NSString *)@"nil",
                      [self modeDescription]];
 }
 
-@end
+@end /* NGFileStream */
+
 
 @implementation _NGConcreteFileStreamFileHandle
 
index de6ca3baf372e874049ffa26b7310af2cbdd7072..1b16f2201a4310ad4a2b2e0ddcccb6de9ba2791e 100644 (file)
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%08X] source=%@ mode=%@>",
+                     @"<%@[0x%p] source=%@ mode=%@>",
                      NSStringFromClass([self class]), (unsigned)self,
                      self->source ? (id)self->source : (id)@"nil",
                      [self modeDescription]];
index d50abdc421858c052006afb79a596db0c6d2645c..d029a9ded6757154e3e072b5f3b8ac8b36774b20 100644 (file)
@@ -638,7 +638,7 @@ static inline NSString *_nameOfLocalhost(void) {
   id tmp;
 
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   
   if ((tmp = [self hostName]) != nil)
     [ms appendFormat:@" host=%@", tmp];
index 0980416c312e06e9dd50cae0cb739ad115762f33..a95105ca61fd2a0750a563444744ad3e348465bd 100644 (file)
@@ -113,7 +113,7 @@ static NGInternetSocketDomain *domain = nil;
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<InternetDomain[0x%08X]>", (unsigned)self];
+  return [NSString stringWithFormat:@"<InternetDomain[0x%p]>", (unsigned)self];
 }
 
 @end /* NGInternetSocketDomain */
index dc16f5112a2c73275e21c622f57b7229f48b4fdd..2f2745c11f7227c5f04ab1306abd20ec6a1f947b 100644 (file)
@@ -100,7 +100,7 @@ static NSString *socketDirectoryPath = @"/tmp";
   int      addressCounter = 0;
   NSString *newPath;
   
-  newPath = [NSString stringWithFormat:@"_ngsocket_%08X_%08X_%03d",
+  newPath = [NSString stringWithFormat:@"_ngsocket_%p_%p_%03d",
                         getpid(), [NSThread currentThread], addressCounter];
   newPath = [socketDirectoryPath stringByAppendingPathComponent:newPath];
 
@@ -116,10 +116,12 @@ static NSString *socketDirectoryPath = @"/tmp";
   NSString *path;
 
   path = (_length < 3)
-    ? @""
-    : [NSString stringWithCString:nun->sun_path];
+    ? (id)@""
+    : [[NSString alloc] initWithCString:nun->sun_path];
   
-  return [self initWithPath:path];
+  self = [self initWithPath:path];
+  [path release]; path = nil;
+  return self;
 }
 
 - (void)dealloc {
@@ -219,7 +221,7 @@ static NSString *socketDirectoryPath = @"/tmp";
 
 - (NSString *)stringValue {
   NSString *p = [self path];
-  return [p length] == 0 ? @"*" : (id)p;
+  return [p length] == 0 ? (NSString *)@"*" : p;
 }
 
 - (NSString *)description {
@@ -228,11 +230,10 @@ static NSString *socketDirectoryPath = @"/tmp";
   if ([p length] == 0)
     p = @"[no path]";
 
-  return [NSString stringWithFormat:@"<0x%08X[%@]: %@>",
-                     self, NSStringFromClass([self class]),
-                     p];
+  return [NSString stringWithFormat:@"<0x%p[%@]: %@>",
+                     self, NSStringFromClass([self class]), p];
 }
 
-@end
+@end /* NGLocalSocketAddress */
 
 #endif /* !WIN32 */
index d5d57862572a4095e8b71c2128030ba895b30405..4f854f1bb14155ce8414f5d44826cc4812258e78 100644 (file)
@@ -130,7 +130,7 @@ static NGLocalSocketDomain *domain = nil;
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<UnixDomain: self=0x%08X>", (unsigned)self];
+                     @"<UnixDomain: self=0x%p>", (unsigned)self];
 }
 
 @end /* NGLocalSocketDomain */
index 2397491b157d63a2eae7c762601523e24179d5fd..8ccf24df6d096c44dda11efc373cc96a3cc7e9c2 100644 (file)
@@ -601,7 +601,7 @@ static inline BOOL getBoolOption(id self, int _option) {
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%08X]: fd=%i type=%i bound=%@ domain=%@>",
+                     @"<%@[0x%p]: fd=%i type=%i bound=%@ domain=%@>",
                      NSStringFromClass([self class]), (unsigned)self,
                      [self fileDescriptor],
                      [self socketType],
index 8ed3befa3228991ecee279d2aefed2bd92802997..50867f3f52f479ec5622d0ed2e181b6e62d1d4d9 100644 (file)
 }
 
 - (id)initWithHostName:(NSString *)_name reason:(NSString *)_reason {
-  self = [super initWithReason:
-                  [NSString stringWithFormat:
-                              @"Could not resolve host %@: %@",
-                            _name, _reason ? _reason : @"error"]
-                socket:nil];
-  if (self) {
+  NSString *r;
+
+  r = [[NSString alloc] initWithFormat:@"Could not resolve host %@: %@",
+                         _name, _reason ? _reason : (NSString *)@"error"];
+  if ((self = [super initWithReason:r socket:nil]) != nil) {
     self->hostName = [_name copy];
   }
+  [r release]; r = nil;
+  
   return self;
 }
 
index 486b787f5ff0aaf30ee3cf8a3fdd4aa0a25115b2..857f7feed039cb1153550797a9dccff292d1be91 100644 (file)
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%08X] mode=%@>",
+                     @"<%@[0x%p] mode=%@>",
                      NSStringFromClass([self class]), (unsigned)self,
                      [self modeDescription]];
 }
index 5c674c6d7acb39dd4d2fb0234d13fcfa824c9ce0..4d18ffe72c3460cc99749275dd2f2cbe3085ab1e 100644 (file)
@@ -429,7 +429,7 @@ FINAL void _readObjC(NGStreamCoder *self, void *_value, const char *_type);
              class_get_class_name(_object));
     }
     else {
-      NSLog(@"encoding reference to object 0x%08X<%s> ..",
+      NSLog(@"encoding reference to object 0x%p<%s> ..",
              _object, class_get_class_name(*(Class *)_object));
     }
 #endif
@@ -447,7 +447,7 @@ FINAL void _readObjC(NGStreamCoder *self, void *_value, const char *_type);
              class_get_class_name(_object), [_object version]);
     }
     else {
-      NSLog(@"encoding object 0x%08X<%s> ..",
+      NSLog(@"encoding object 0x%p<%s> ..",
              _object, class_get_class_name(*(Class *)_object));
     }
 #endif
index 0153781a2311231cadb50fd1d6a6c57444a1ab47..90c43f3b5b35d9747c6447294ce71c462c0fa3b3 100644 (file)
@@ -196,7 +196,7 @@ static const int NGInvalidUnixDescriptor = -1;
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<0x%08X[%@]: in=%i out=%i>",
+  return [NSString stringWithFormat:@"<0x%p[%@]: in=%i out=%i>",
                      self, NSStringFromClass([self class]),
                      self->fildes[0], self->fildes[1]];
 }
index 3319faf3e5258a29b1d208f83bb45ef932a14412..eda025588dd1f28e443ccc4d614023bd0eaf1633 100644 (file)
@@ -86,7 +86,7 @@
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%08X] task=%@ mode=%@>",
+                     @"<%@[0x%p] task=%@ mode=%@>",
                      NSStringFromClass([self class]), (unsigned)self,
                      self->task,
                      [self modeDescription]];
index dff719305ab2de4b1cc50d63048503d418ec8da9..2959c5d8a8dc36b755bc3f8210d22af393324c89 100644 (file)
 #if defined(WIN32)
   return nil;
 #else
-  return [self isOpen] ? NGDescriptorGetTtyName(self->fd) : nil;
+  return [self isOpen] ? NGDescriptorGetTtyName(self->fd) : (NSString *)nil;
 #endif
 }
 
-@end
+@end /* NGFileStream(NGTerminalSupport) */
+
 
 @implementation NGFilterStream(NGTerminalSupport)
 
@@ -75,7 +76,8 @@
     : NO;
 }
 
-@end
+@end /* NGFilterStream(NGTerminalSupport) */
+
 
 @implementation NGTextStream(NGTerminalSupport)
 
@@ -86,7 +88,8 @@
   return nil;
 }
 
-@end
+@end /* NGTextStream(NGTerminalSupport) */
+
 
 @implementation NGCTextStream(NGTerminalSupport)
 
     : NO;
 }
 
-@end
+@end /* NGCTextStream(NGTerminalSupport) */
 
 void __link_NGStreams_NGTerminalSupport(void) {
   __link_NGStreams_NGTerminalSupport();
index 704a8fa27d1346e21ef88404845e691f6c157dca..f7227d67578bc35ca68e7d35f47fb431a29918ea 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=49
+SUBMINOR_VERSION:=50
index 1b5e8e02fe6438a4c4a2246bfe3853719231f051..d7ea4c059dd25c166870b742bc9e3e25b9db2a00 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)$(libNGStreams_HEADER_FILES_INSTALL_DIR)
 
index f7add526141e4bae7a0f8fc8760d904bd851bd03..1e8626f0386a8392f46fd0f0f18b83bf59fb1e75 100644 (file)
@@ -68,7 +68,7 @@ static void myPrint(id self, SEL _cmd, int arg) {
   c = [NSObject subclass:@"MyObject"
                 ivars:@"blah", @"@", @"blub", @"c", @"blab", @"s", nil];
   
-  printf("MyObject is 0x%08X\n", (unsigned)c);
+  printf("MyObject is 0x%p\n", (unsigned)c);
   printf("MyObject name is %s\n", c->name);
   printf("MyObject super-name is %s\n", c->super_class->name);
   
@@ -125,7 +125,7 @@ static void myPrint(id self, SEL _cmd, int arg) {
   c = [NSRunLoop subclass:@"MyRunLoop"
                  ivars:@"blah", @"@", @"blub", @"c", @"blab", @"s", nil];
 
-  printf("MyRunLoop is 0x%08X\n", (unsigned int)c);
+  printf("MyRunLoop is 0x%p\n", (unsigned int)c);
   printf("MyRunLoop name is %s\n", c->name);
   printf("MyRunLoop super-name is %s\n", c->super_class->name);