]> err.no Git - sope/commitdiff
merged libFoundation 1.1.3 into SOPE trunk
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 14 Jul 2006 13:06:21 +0000 (13:06 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 14 Jul 2006 13:06:21 +0000 (13:06 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1319 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

89 files changed:
libFoundation/ChangeLog
libFoundation/Foundation/FFCallInvocation.m
libFoundation/Foundation/GCDictionary.m
libFoundation/Foundation/GNUmakefile
libFoundation/Foundation/GarbageCollector.m
libFoundation/Foundation/NSArchiver.m
libFoundation/Foundation/NSArray.m
libFoundation/Foundation/NSAutoreleasePool.m
libFoundation/Foundation/NSBundle.m
libFoundation/Foundation/NSCalendarDate.m
libFoundation/Foundation/NSCharacterSet.m
libFoundation/Foundation/NSConcreteCharacterSet.h
libFoundation/Foundation/NSConcreteCharacterSet.m
libFoundation/Foundation/NSConcreteFileHandle.h
libFoundation/Foundation/NSConcreteFileHandle.m
libFoundation/Foundation/NSConcreteMutableDictionary.m
libFoundation/Foundation/NSConcreteMutableString.m
libFoundation/Foundation/NSConcreteNumber.m
libFoundation/Foundation/NSConcreteNumber.m.sh
libFoundation/Foundation/NSConcreteString.h
libFoundation/Foundation/NSConcreteString.m
libFoundation/Foundation/NSConcreteTimeZone.m
libFoundation/Foundation/NSConcreteUTF16String.m
libFoundation/Foundation/NSConcreteUnixTask.m
libFoundation/Foundation/NSConcreteValue.m
libFoundation/Foundation/NSData.m
libFoundation/Foundation/NSDate.h
libFoundation/Foundation/NSDate.m
libFoundation/Foundation/NSDecimalNumber.m
libFoundation/Foundation/NSDefaultZone.m
libFoundation/Foundation/NSDictionary.m
libFoundation/Foundation/NSException.m
libFoundation/Foundation/NSFileHandle.m
libFoundation/Foundation/NSFileManager.m
libFoundation/Foundation/NSHost.m
libFoundation/Foundation/NSMappedData.m
libFoundation/Foundation/NSMethodSignature.m
libFoundation/Foundation/NSNotification.m
libFoundation/Foundation/NSNotificationCenter.m
libFoundation/Foundation/NSNotificationQueue.m
libFoundation/Foundation/NSNull.m
libFoundation/Foundation/NSNumber.m
libFoundation/Foundation/NSNumberFormatter.m
libFoundation/Foundation/NSObject.m
libFoundation/Foundation/NSObjectAllocation.m
libFoundation/Foundation/NSObjectInvocation.m
libFoundation/Foundation/NSPathUtilities.m
libFoundation/Foundation/NSPredicateParser.m
libFoundation/Foundation/NSRunLoop.m
libFoundation/Foundation/NSSet.m
libFoundation/Foundation/NSString+StringEncoding.m
libFoundation/Foundation/NSString.m
libFoundation/Foundation/NSTask.m
libFoundation/Foundation/NSThread.m
libFoundation/Foundation/NSTimeZone.m
libFoundation/Foundation/NSURL.m
libFoundation/Foundation/NSUserDefaults.m
libFoundation/Foundation/NSValue.h
libFoundation/Foundation/NSZone.m
libFoundation/Foundation/PrintfScannerHandler.m
libFoundation/Foundation/PrivateThreadData.m
libFoundation/Foundation/PropertyListParser.m
libFoundation/Foundation/PropertyListParserUnichar.m
libFoundation/Foundation/StackZone.m
libFoundation/Foundation/UnixSignalHandler.m
libFoundation/Foundation/fhs.make
libFoundation/Foundation/libFoundation.make.in
libFoundation/GNUmakefile
libFoundation/Resources/GNUmakefile
libFoundation/Version
libFoundation/aclocal.m4
libFoundation/config.guess
libFoundation/config.sub
libFoundation/config/i386/openbsd3.8.h [new file with mode: 0644]
libFoundation/config/i386/openbsd3.9.h [new file with mode: 0644]
libFoundation/config/powerpc64/linux.h
libFoundation/config/x86_64/linux-gnu.h [new file with mode: 0644]
libFoundation/config/x86_64/linux.h [new file with mode: 0644]
libFoundation/config/x86_64/x86_64.h [new file with mode: 0644]
libFoundation/configure
libFoundation/configure.in
libFoundation/debian/changelog
libFoundation/debian/control
libFoundation/debian/libfoundation1.1-dev.install [new file with mode: 0644]
libFoundation/debian/libfoundation1.1.install [new file with mode: 0644]
libFoundation/debian/rules
libFoundation/examples/Defaults.m
libFoundation/examples/GNUmakefile
libFoundation/libfoundation.spec

index f49f1224a2fa89916e0e37131fcc80ceaf8a7f68..245b357b17a355e9c4824c3536cb9e676ba657a9 100644 (file)
@@ -1,3 +1,112 @@
+2006-07-14  Frank Reppin  <frank@opengroupware.org>
+
+       * added RPM and Debian build specifications (v1.1.3)
+
+2006-07-10  Helge Hess  <helge.hess@opengroupware.org>
+
+       * Foundation/GNUmakefile: include libFoundation.make after common.make
+         to properly load OBJCFLAGS (fixes another issue with
+         NSConstantString) (v1.1.2)
+
+2006-07-07  Helge Hess  <helge.hess@opengroupware.org>
+
+       * examples/GNUmakefile: properly include libFoundation.make (v1.1.1)
+
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v1.1.0
+
+       * Foundation/libFoundation.make.in: properly specify 
+         -fconstant-string-class=NSConstantString to activate the new
+         constant NSString class
+
+       * Foundation/NSConcreteString.m: activated NSConstantString,
+         deactivated NXConstantString, this requires GCC 3 plus a matching
+         runtime (libobjc.1), it obsoletes the lF specific libobjc.lf
+
+2006-07-03  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v1.0.86
+
+       * makefiles: lookup/install libraries in lib64 when compiling with a
+         64bit target CPU
+
+       * work on 64bit port. Use %p instead of %08X, use long instead
+         of int, etc
+
+       * fixed plenty of gcc 4.1 warnings (missing dealloc, conditional
+         types)
+
+2006-06-22  Frank Reppin  <frank@opengroupware.org>
+
+       * config/i386/openbsd3.9.h <- adjust for 3_9
+
+2006-06-16  Helge Hess  <helge.hess@opengroupware.org>
+
+       * added i386/OpenBSD 3.9 config file (v1.0.85)
+
+2005-12-05  Helge Hess  <helge.hess@skyrix.com>
+
+       * v1.0.84
+       
+       * Foundation/NSConcreteCharacterSet.m: added a -description to bitmap
+         character set. Fixed OGo bug #1594 (checking a bitmap charsets
+         always returned true, probably due to some gcc4 issue). Uses
+         'unsigned char' in bitmap macros.
+
+       * Foundation/NSValue.h, NSConcreteNumber.m.sh, NSConcreteNumber.m,
+         NSDecimalNumber.m: explicitly use 'signed char' in -charValue 
+         method
+
+       * Foundation/NSConcreteMutableString.m, NSCharacterSet.m: minor code
+         cleanups
+
+2005-11-20  Helge Hess  <helge.hess@opengroupware.org>
+
+       * config.guess/config.sub: updated to files from gstep-make 1.11.0
+         (v1.0.83)
+
+       * added x86_64 config files based on the i386 ones (v1.0.82)
+
+2005-08-28  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v1.0.81
+
+       * Foundation/NSNotificationCenter.m: do not use NSZone to avoid an
+         NSString issue with the gcc libobjc
+
+       * examples/Defaults.m (read_command): fixed gcc4 warnings
+
+2005-10-04  Sebastian Ley  <sebastian.ley@mmweg.rwth-aachen.de>
+
+       * config/powerpc64/linux.h: poperly include powerpc64.h instead of
+         i386.h, fixes bug #1559 (v1.0.80)
+
+2005-09-26  Helge Hess  <helge.hess@skyrix.com>
+
+       * v1.0.79
+
+       * aclocal.m4: include stdlib.h to avoid a gcc4 warning
+
+       * *GNUmakefile: prefer GNUSTEP_MAKEFILES over GNUSTEP_SYSTEM_ROOT
+
+       * configure.in: use GNUSTEP_MAKEFILES to locate build environment
+         instead of GNUSTEP_SYSTEM_ROOT
+
+2005-08-29  Helge Hess  <helge.hess@skyrix.com>
+
+       * Foundation/GNUmakefile: properly set SYSTEM_LIB_DIR so that a correct
+         libobjc can be found, link against -lm (v1.0.78)
+
+2005-08-28  Helge Hess  <helge.hess@opengroupware.org>
+
+       * Foundation: removed plenty of gcc4 warnings (v1.0.77)
+
+2005-07-15  Helge Hess  <helge.hess@opengroupware.org>
+
+       * Foundation/NSValue.h: added NSCopying / NSCoding to @interface as per
+         Panther documentation (v1.0.76)
+
 2005-06-02  Helge Hess  <helge.hess@skyrix.com>
 
        * Foundation/NSURL.m: added +fileURLWithPath: (v1.0.75)
index 15772995a2771390ffbf774f30053b98ed913c46..e066c749e9a2bea2345bfd6af8c1ca411c2dcc6e 100644 (file)
@@ -469,7 +469,7 @@ static inline void _getRetVal(FFCallInvocation *self, SEL _cmd, void *_value)
 - (NSString *)description
 {
     char buf[1024];
-    sprintf(buf, "<%s[0x%08X]: target=0x%08X selector=%s sig=%s>",
+    sprintf(buf, "<%s[0x%p]: target=0x%p selector=%s sig=%s>",
             class_get_class_name([self class]), (unsigned)self,
             (unsigned)self->target, sel_get_name(self->selector),
             self->types);
index 22d10e06d78911624a319bb9f19a607a56e4a291..59830c2cae5f50970f8bf6807e1d29e28b2236b7 100644 (file)
@@ -200,7 +200,8 @@ static const NSMapTableValueCallBacks GCOwnedStructValueCallBacks = {
 
 - (NSEnumerator *)keyEnumerator
 {
-    return AUTORELEASE([[_GCDictionaryKeyEnumerator alloc]
+    return AUTORELEASE([(_GCDictionaryKeyEnumerator *)
+                          [_GCDictionaryKeyEnumerator alloc]
                            initWithDictionary:self]);    
 }
 
@@ -224,10 +225,10 @@ static const NSMapTableValueCallBacks GCOwnedStructValueCallBacks = {
     else return        [[GCDictionary alloc] initWithDictionary:self copyItems:YES];
 }
 
-- (id)mutableCopyWithZone:(NSZone*)zone
+- (id)mutableCopyWithZone:(NSZone *)zone
 {
-    return [[GCMutableDictionary allocWithZone:zone]
-               initWithDictionary:self];
+    return [(GCMutableDictionary *)[GCMutableDictionary allocWithZone:zone]
+                                  initWithDictionary:self];
 }
 
 /* Private */
@@ -306,17 +307,18 @@ static const NSMapTableValueCallBacks GCOwnedStructValueCallBacks = {
 
 - (id)copyWithZone:(NSZone*)zone
 {
-    return [[GCDictionary allocWithZone:zone] initWithDictionary:self];
+    return [(GCDictionary *)[GCDictionary allocWithZone:zone] 
+                           initWithDictionary:self];
 }
 
 - (void)setObject:(id)anObject forKey:(id)aKey
 {
-    GCObjectCollectable *keyStruct = Malloc(sizeof(GCObjectCollectable));
+    GCObjectCollectable *keyStruct   = Malloc(sizeof(GCObjectCollectable));
     GCObjectCollectable *valueStruct = Malloc(sizeof(GCObjectCollectable));
-
-    keyStruct->object = aKey;
-    keyStruct->isGarbageCollectable = [aKey isGarbageCollectable];
-    valueStruct->object = anObject;
+    
+    keyStruct->object                 = aKey;
+    keyStruct->isGarbageCollectable   = [aKey isGarbageCollectable];
+    valueStruct->object               = anObject;
     valueStruct->isGarbageCollectable = [anObject isGarbageCollectable];
     NSMapInsert(table, keyStruct, valueStruct);
 }
@@ -338,10 +340,10 @@ static const NSMapTableValueCallBacks GCOwnedStructValueCallBacks = {
 }
 
 @end /* GCMutableDictionary */
+
 /*
   Local Variables:
   c-basic-offset: 4
   tab-width: 8
   End:
 */
-
index 437a9f72aa90990a930fd661194870a7e2d7d21e..2edcbe70fc4d8197a75b4eb787c2ff8e07eead9f 100644 (file)
@@ -25,9 +25,9 @@
 
 -include ../gsfix.make
 
-ifeq ($(GNUSTEP_SYSTEM_ROOT),)
+ifeq ($(GNUSTEP_MAKEFILES),)
 
-$(warning ERROR: Your $(GNUSTEP_SYSTEM_ROOT) environment variable is empty !)
+$(warning ERROR: Your $(GNUSTEP_MAKEFILES) environment variable is empty !)
 $(error Please try again after running ". $(GNUSTEP_MAKEFILES)/GNUstep.sh")
 
 else
@@ -37,8 +37,9 @@ OBJC_RUNTIME=GNU
 
 GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
 
-include libFoundation.make
+#include libFoundation.make
 include $(GNUSTEP_MAKEFILES)/common.make
+-include libFoundation.make # not available in make distclean
 -include $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/$(OBJC_RUNTIME)/config.mak
 include ../Version
 
@@ -63,11 +64,8 @@ endif
 LIBRARY_NAME = libFoundation
 
 libFoundation_DLL_DEF = libFoundation.def
-ifeq ($(GNUSTEP_TARGET_OS),mingw32)
-libFoundation_LIBRARIES_DEPEND_UPON += -lobjc
-endif
+
 ifeq ($(GNUSTEP_TARGET_OS),cygwin32)
-libFoundation_LIBRARIES_DEPEND_UPON += -lobjc
 ADDITIONAL_CPPFLAGS += -DWIN=1 -D__WIN32__=1
 endif
 
@@ -209,16 +207,27 @@ libFoundation_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
 # add the proper dynamic linking library, not being defined in current
 # gstep-make versions
 
+ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
+SYSTEM_LIB_DIR += \
+       -L$(FHS_INSTALL_ROOT)/lib64     \
+       -L/usr/local/lib64              \
+       -L/usr/lib64
+else
+SYSTEM_LIB_DIR += -L$(FHS_INSTALL_ROOT)/lib -L/usr/local/lib -L/usr/lib
+endif
+
+libFoundation_LIBRARIES_DEPEND_UPON += -lobjc
+
 ifeq ($(GNUSTEP_TARGET_OS),linux-gnu)
-  libFoundation_LIBRARIES_DEPEND_UPON += -ldl
+  libFoundation_LIBRARIES_DEPEND_UPON += -lm -ldl
 endif
 
 ifeq ($(findstring solaris, $(GNUSTEP_TARGET_OS)), solaris)
-  libFoundation_LIBARIES_DEPEND_UPON += -ldl
+  libFoundation_LIBARIES_DEPEND_UPON += -lm -ldl
 endif
 
 ifeq ($(findstring sysv4.2, $(GNUSTEP_TARGET_OS)), sysv4.2)
-  libFoundation_LIBRARIES_DEPEND_UPON += -ldl
+  libFoundation_LIBRARIES_DEPEND_UPON += -lm -ldl
 endif
 
 include $(GNUSTEP_MAKEFILES)/library.make
index dd8dd582c664f15776b896ce3aaee56df3d0a1f1..a0099887e51a2d326ca3a63a14521fb94163bde7 100644 (file)
@@ -55,6 +55,7 @@ extern Class __freedObjectClass;
 @end
 
 @implementation __DummyGCObject
+
 + allocWithZone:(NSZone*)zone
 {
     return NSAllocateObject(self, 0, zone);
@@ -62,8 +63,12 @@ extern Class __freedObjectClass;
 
 - (void)dealloc
 {
+    /* this is to please gcc 4.1 which otherwise issues a warning (and we
+       don't know the -W option to disable it, let me know if you do ;-)*/
+    if (0) [super dealloc];
 }
-@end
+
+@end /* __DummyGCObject */
 
 
 /* The GCDoubleLinkedList is a double linked list which contains as
index 87f7dba8fd046a78cbb620eb5206dff24c5f1ea1..51e04c50e361620d00b30fe7dba3425f5b75c670 100644 (file)
@@ -187,19 +187,19 @@ FINAL int _archiveIdOfObject(NSArchiver *self, id _object)
 {
     if (_object == nil)
         return 0;
-#if 1
+#if 0 /* this does not work with 64bit */
     else
         return (int)_object;
 #else
     else {
         int archiveId;
 
-        archiveId = (int)NSMapGet(self->outKeys, _object);
+        archiveId = (long)NSMapGet(self->outKeys, _object);
         if (archiveId == 0) {
             archiveId = self->archiveAddress;
-            NSMapInsert(self->outKeys, _object, (void*)archiveId);
+            NSMapInsert(self->outKeys, _object, (void*)(long)archiveId);
 #if ARCHIVE_DEBUGGING
-            NSLog(@"mapped 0x%08X => %i", _object, archiveId);
+            NSLog(@"mapped 0x%p => %i", _object, archiveId);
 #endif
             self->archiveAddress++;
         }
@@ -364,7 +364,7 @@ FINAL void _writeObjC(NSArchiver *self, const void *_value, const char *_type);
     if (_object == nil) // don't trace nil objects ..
         return;
 
-    //NSLog(@"lookup 0x%08X in outObjs=0x%08X", _object, self->outObjects);
+    //NSLog(@"lookup 0x%p in outObjs=0x%p", _object, self->outObjects);
     
     if (NSHashGet(self->outObjects, _object) == nil) {
         //NSLog(@"lookup failed, object wasn't traced yet !");
@@ -431,7 +431,7 @@ FINAL void _writeObjC(NSArchiver *self, const void *_value, const char *_type);
           class_get_class_name(_object), [_object version]);
           }
           else {
-          NGLogT(@"encoder", @"encoding object 0x%08X<%s> ..",
+          NGLogT(@"encoder", @"encoding object 0x%p<%s> ..",
           _object, class_get_class_name(*(Class *)_object));
           }
         */
@@ -440,19 +440,19 @@ FINAL void _writeObjC(NSArchiver *self, const void *_value, const char *_type);
         _writeInt(self, archiveId);
 
         if (tag == _C_CLASS) { // a class object
-            NSString      *className;
-            unsigned      len;
-            unsigned char *buf;
+            NSString *className;
+            unsigned len;
+            char *buf;
             
             className = NSStringFromClass(_object);
             className = [self classNameEncodedForTrueClassName:className];
             len = [className cStringLength];
-            buf = malloc(len + 1);
+            buf = malloc(len + 4);
             [className getCString:buf]; buf[len] = '\0';
             
             _writeCString(self, buf);
             _writeInt(self, [_object version]);
-            free(buf);
+            if (buf) free(buf);
         }
         else {
             Class archiveClass = Nil;
@@ -489,12 +489,12 @@ FINAL void _writeObjC(NSArchiver *self, const void *_value, const char *_type);
 
 - (void)_traceValueOfObjCType:(const char *)_type at:(const void *)_value
 {
-    //NSLog(@"_tracing value at 0x%08X of type %s", _value, _type);
+    //NSLog(@"_tracing value at 0x%p of type %s", _value, _type);
     
     switch (*_type) {
         case _C_ID:
         case _C_CLASS:
-            //NSLog(@"_traceObject 0x%08X", *(id *)_value);
+            //NSLog(@"_traceObject 0x%p", *(id *)_value);
             [self _traceObject:*(id *)_value];
             break;
         
@@ -618,7 +618,7 @@ FINAL void _writeObjC(NSArchiver *self, const void *_value, const char *_type);
                            at:(const void *)_value
 {
     if (self->traceMode) {
-        //NSLog(@"trace value at 0x%08X of type %s", _value, _type);
+        //NSLog(@"trace value at 0x%p of type %s", _value, _type);
         [self _traceValueOfObjCType:_type at:_value];
     }
     else {
@@ -989,9 +989,9 @@ FINAL void _readObjC(NSUnarchiver *self, void *_value, const char *_type);
     if (_isReference) {
         NSAssert(archiveId, @"archive id is 0 !");
         
-        result = (Class)NSMapGet(self->inClasses, (void *)archiveId);
+        result = (Class)NSMapGet(self->inClasses, (void *)(long)archiveId);
         if (result == nil)
-            result = (id)NSMapGet(self->inObjects, (void *)archiveId);
+            result = (id)NSMapGet(self->inObjects, (void *)(long)archiveId);
         if (result == nil) {
             [NSException raise:NSInconsistentArchiveException
                          format:@"did not find referenced class %i.", archiveId];
@@ -1041,9 +1041,9 @@ FINAL void _readObjC(NSUnarchiver *self, void *_value, const char *_type);
                          format:@"class versions do not match."];
         }
 
-        NSMapInsert(self->inClasses, (void *)archiveId, result);
+        NSMapInsert(self->inClasses, (void *)(long)archiveId, result);
 #if ARCHIVE_DEBUGGING
-        NSLog(@"read class %i => 0x%08X", archiveId, result);
+        NSLog(@"read class %i => 0x%p", archiveId, result);
 #endif
     }
   
@@ -1064,13 +1064,14 @@ FINAL void _readObjC(NSUnarchiver *self, void *_value, const char *_type);
     if (_isReference) {
         NSAssert(archiveId, @"archive id is 0 !");
         
-        result = (id)NSMapGet(self->inObjects, (void *)archiveId);
+        result = (id)NSMapGet(self->inObjects, (void *)(long)archiveId);
         if (result == nil)
-            result = (id)NSMapGet(self->inClasses, (void *)archiveId);
+            result = (id)NSMapGet(self->inClasses, (void *)(long)archiveId);
         
         if (result == nil) {
             [NSException raise:NSInconsistentArchiveException
-                         format:@"did not find referenced object %i.", archiveId];
+                         format:@"did not find referenced object %i.",
+                        archiveId];
         }
         result = RETAIN(result);
     }
@@ -1083,25 +1084,25 @@ FINAL void _readObjC(NSUnarchiver *self, void *_value, const char *_type);
         NSAssert(class, @"could not decode class for object.");
     
         result = [class allocWithZone:self->objectZone];
-        NSMapInsert(self->inObjects, (void *)archiveId, result);
+        NSMapInsert(self->inObjects, (void *)(long)archiveId, result);
         
 #if ARCHIVE_DEBUGGING
-        NSLog(@"read object %i => 0x%08X", archiveId, result);
+        NSLog(@"read object %i => 0x%p", archiveId, result);
 #endif
 
         replacement = [result initWithCoder:self];
         if (replacement != result) {
             /*
               NGLogT(@"decoder",
-              @"object 0x%08X<%s> replaced by 0x%08X<%s> in initWithCoder:",
+              @"object 0x%p<%s> replaced by 0x%p<%s> in initWithCoder:",
               result, class_get_class_name(*(Class *)result),
               replacement, class_get_class_name(*(Class *)replacement));
             */
 
             replacement = RETAIN(replacement);
-            NSMapRemove(self->inObjects, (void*)archiveId);
+            NSMapRemove(self->inObjects, (void *)(long)archiveId);
             result = replacement;
-            NSMapInsert(self->inObjects, (void *)archiveId, result);
+            NSMapInsert(self->inObjects, (void *)(long)archiveId, result);
             RELEASE(replacement);
         }
 
@@ -1109,19 +1110,19 @@ FINAL void _readObjC(NSUnarchiver *self, void *_value, const char *_type);
         if (replacement != result) {
             /*
               NGLogT(@"decoder",
-              @"object 0x%08X<%s> replaced by 0x%08X<%s> in awakeAfterUsingCoder:",
+              @"object 0x%p<%s> replaced by 0x%p<%s> in awakeAfterUsingCoder:",
               result, class_get_class_name(*(Class *)class),
               replacement, class_get_class_name(*(Class *)replacement));
             */
       
             replacement = RETAIN(replacement);
-            NSMapRemove(self->inObjects, (void*)archiveId);
+            NSMapRemove(self->inObjects, (void *)(long)archiveId);
             result = replacement;
-            NSMapInsert(self->inObjects, (void *)archiveId, result);
+            NSMapInsert(self->inObjects, (void *)(long)archiveId, result);
             RELEASE(replacement);
         }
 
-        //NGLogT(@"decoder", @"decoded object 0x%08X<%@>",
+        //NGLogT(@"decoder", @"decoded object 0x%p<%@>",
         //       (unsigned)result, NSStringFromClass([result class]));
     }
     
index a53114c49424fdad1f219e0209653a83665bf664..dba927d16d346d81285096f6e9119461eefcde13 100644 (file)
@@ -70,7 +70,7 @@ static Class NSConcreteArrayClass = Nil;
         NSConcreteArrayClass = [NSConcreteArray class];
     
     return NSAllocateObject( (self == NSArrayClass) ? 
-                             NSConcreteArrayClass : self, 0, zone);
+                             NSConcreteArrayClass : (Class)self, 0, zone);
 }
 
 + (id)array
@@ -852,7 +852,8 @@ static int compare(id elem1, id elem2, void* comparator)
         NSConcreteMutableArrayClass = [NSConcreteMutableArray class];
     
     return NSAllocateObject( (self == NSMutableArrayClass) ? 
-                             NSConcreteMutableArrayClass : self, 0, zone);
+                             NSConcreteMutableArrayClass : (Class)self,
+                            0, zone);
 }
 
 + (id)arrayWithCapacity:(unsigned int)aNumItems
index 9d9d43705101dfb3a1d4aac0600433809ac6d643..f5d028744499a9188b050f99a374f8f94889411b 100644 (file)
@@ -131,7 +131,7 @@ BOOL __autoreleaseEnableWarning = YES;
        
        if (pool != self) {
 #if LOG_RELEASE_COUNT
-           NSLog(@"auto release child pool 0x%08X ..", pool);
+           NSLog(@"auto release child pool 0x%p ..", pool);
 #endif
            RELEASE(pool);
            continue;
@@ -176,8 +176,8 @@ BOOL __autoreleaseEnableWarning = YES;
                ch->objects[i] = NULL;
 
 #if LOG_RELEASE
-               fprintf(fh, "%-30s 0x%08X %2i - ",
-                       oc->name, (unsigned)obj, [obj retainCount]);
+               fprintf(fh, "%-30s 0x%p %2i - ",
+                       oc->name, obj, [obj retainCount]);
 #endif
                
                if (lastClass != oc) {
@@ -310,10 +310,10 @@ inline void NSAutoreleasePool_AutoreleaseObject(id aObject)
         NSAutoreleasePool_AddObject(pool, aObject);
     else {
         fprintf(stderr,
-                "called -autorelease on object 0x%08X<%s> with no "
+                "called -autorelease on object 0x%p<%s> with no "
                 "autorelease pool in place, "
                 "will leak that memory !\n",
-                (unsigned int)aObject,
+                aObject,
                 (*(struct objc_class **)aObject)->name);
     }
 }
index 10fc9a13cc25b96869c0187dde9fc35b68c4a852..f12e739d4b782bbece65ccd1754c36bdd0b7ced7 100644 (file)
@@ -308,7 +308,7 @@ static void load_callback(Class class, Category* category)
     isFlattened = [NSBundle isFlattenedDirLayout];
     environment = useGNUstepEnv
        ? [[NSProcessInfo processInfo] environment]
-       : nil;
+       : (NSDictionary *)nil;
     
     fm = [NSFileManager defaultManager];
     
index 2d4c5f546e7c60e97682f3a0b34ba7dff7b93168..fa528dea970c27722b7e0307fd0a9ce55d7697a2 100644 (file)
@@ -173,7 +173,7 @@ static NSDictionary* defaultLocaleDictionary = nil;
     return (unsigned)self->timeSinceRef;
 }
 
-- (NSComparisonResult)compare:(NSDate *)other
+- (NSComparisonResult)compare:(id)other
 {
     if ([other isKindOfClass:[NSDate class]]) {
        NSTimeInterval diff
index ddd219c4e9efb8003b4aab2f1ba5a3536d614ed6..4475d7a77ed9b9904e5c599546dbd1c211f79a21 100644 (file)
@@ -43,7 +43,8 @@
 + (id)allocWithZone:(NSZone*)zone
 {
     return NSAllocateObject( (self == [NSCharacterSet class]) ? 
-       [NSBitmapCharacterSet class] : self, 0, zone);
+                            [NSBitmapCharacterSet class] : (Class)self,
+                            0, zone);
 }
 
 // Creating a shared Character Set from a standard file
@@ -100,9 +101,9 @@ extern NSRecursiveLock* libFoundationLock;
         if (aSet == nil) {
            fprintf(stderr, 
                    "ERROR(%s): could not create character set for "
-                   "data (0x%08X,len=%d) from file %s (%s)\n",
+                   "data (0x%p,len=%d) from file %s (%s)\n",
                    __PRETTY_FUNCTION__,
-                   (unsigned int)data, [data length], [fileName cString],
+                   data, [data length], [fileName cString],
                    [fullFilenamePath cString]);
         }
         
@@ -189,25 +190,28 @@ extern NSRecursiveLock* libFoundationLock;
                            initWithBitmapRepresentation:data]);
 }
 
-+ (NSCharacterSet*)characterSetWithCharactersInString:(NSString*)aString
++ (NSCharacterSet*)characterSetWithCharactersInString:(NSString *)aString
 {
-    char*      bytes = CallocAtomic(1, BITMAPDATABYTES);
-    id         data;
-    int                i, count = [aString length];
-    unichar    c;
+    unsigned char *bytes = CallocAtomic(1, BITMAPDATABYTES);
+    id           data;
+    unsigned int  i, count;
 
-    for (i = 0; i < count; i++) {
+    for (i = 0, count = [aString length]; i < count; i++) {
+        register unichar c;
+        
         c = [aString characterAtIndex:i];
         SETBIT(bytes, c);
     }
-
-    data = [NSData dataWithBytesNoCopy:bytes 
-                   length:BITMAPDATABYTES];
-    return [self isKindOfClass:[NSMutableCharacterSet class]]
+    
+    data = [[NSData alloc] initWithBytesNoCopy:bytes 
+                           length:BITMAPDATABYTES];
+    self = [self isKindOfClass:[NSMutableCharacterSet class]]
         ? AUTORELEASE([[NSMutableBitmapCharacterSet alloc] 
                           initWithBitmapRepresentation:data])
         : AUTORELEASE([[NSBitmapCharacterSet alloc] 
                           initWithBitmapRepresentation:data]);
+    [data release];
+    return self;
 }
 
 + (NSCharacterSet*)characterSetWithRange:(NSRange)aRange
@@ -297,8 +301,9 @@ extern NSRecursiveLock* libFoundationLock;
 
 + (id)allocWithZone:(NSZone*)zone
 {
-    return NSAllocateObject( (self == [NSMutableCharacterSet class]) ? 
-           [NSMutableBitmapCharacterSet class] : self, 0, zone);
+    return NSAllocateObject( (self == [NSMutableCharacterSet class])
+                            ? [NSMutableBitmapCharacterSet class] 
+                            : (Class)self, 0, zone);
 }
 
 // Creating a Custom Character Set 
@@ -308,12 +313,12 @@ extern NSRecursiveLock* libFoundationLock;
     return AUTORELEASE([[self alloc] initWithBitmapRepresentation:data]);
 }
 
-+ (NSCharacterSet*)characterSetWithContentsOfFile:(NSString*)fileName
++ (NSCharacterSet *)characterSetWithContentsOfFile:(NSString *)fileName
 {
     NSCharacterSet *set = [super characterSetWithContentsOfFile:fileName];
     return AUTORELEASE([set mutableCopy]);
 }
-+ (NSCharacterSet*)characterSetWithCharactersInString:(NSString*)aString
++ (NSCharacterSet *)characterSetWithCharactersInString:(NSString *)aString
 {
     NSCharacterSet *set = [super characterSetWithCharactersInString:aString];
     return AUTORELEASE([set mutableCopy]);
index e854ab0bf4f0f9a181d68c6626f251599315fcc0..8bced6aead55c940c6aee394ac25738e9aa99f18 100644 (file)
@@ -26,9 +26,9 @@
 #define                __NSConcreteCharacterSet_h__
 
 #define BITMAPDATABYTES 8192*sizeof(char)
-#define ISBITSET(v,n) ((((char*)v)[n/8] &   (1<<(n%8)))  ? YES : NO)
-#define SETBIT(v,n)    (((char*)v)[n/8] |=  (1<<(n%8))) 
-#define RESETBIT(v,n)  (((char*)v)[n/8] &= ~(1<<(n%8)))
+#define ISBITSET(v,n) ((((unsigned char*)v)[n/8] &   (1<<(n%8)))  ? YES : NO)
+#define SETBIT(v,n)    (((unsigned char*)v)[n/8] |=  (1<<(n%8))) 
+#define RESETBIT(v,n)  (((unsigned char*)v)[n/8] &= ~(1<<(n%8)))
 
 @interface NSRangeCharacterSet : NSCharacterSet
 {
 
 @interface NSBitmapCharacterSet : NSCharacterSet
 {
-    id         data;
-    char*      bytes;
-    BOOL       inverted;
+    id   data;
+    char *bytes;
+    BOOL inverted;
 }
-- initWithBitmapRepresentation:(id)data;
-- initWithBitmapRepresentation:(id)data inverted:(BOOL)inv;
+
+- (id)initWithBitmapRepresentation:(id)data;
+- (id)initWithBitmapRepresentation:(id)data inverted:(BOOL)inv;
+
 - (NSData *)bitmapRepresentation;
 - (BOOL)characterIsMember:(unichar)aCharacter;
 - (NSCharacterSet *)invertedSet;
+
 @end /* NSBitmapCharacterSet */
 
 @interface NSMutableBitmapCharacterSet : NSMutableCharacterSet
index 68af5f1e2cc462a1a2756174cbf84e5826700043..4ea7b5573475c5a25ed9fe7bd00ff5a4536c34d7 100644 (file)
 
 @implementation NSBitmapCharacterSet
 
-- init
+- (id)init
 {
     return [self initWithBitmapRepresentation:
            [[NSCharacterSet emptyCharacterSet] bitmapRepresentation] 
            inverted:NO];
 }
 
-- initWithBitmapRepresentation:(id)aData
+- (id)initWithBitmapRepresentation:(id)aData
 {
     return [self initWithBitmapRepresentation:aData inverted:NO];
 }
 
-- initWithBitmapRepresentation:(id)aData inverted:(BOOL)inv
+- (id)initWithBitmapRepresentation:(id)aData inverted:(BOOL)inv
 {
     [super init];
-    data = [aData copy];
-    bytes = (char*)[data bytes];
-    inverted = inv;
+    self->data     = [aData copy];
+    self->bytes    = (char *)[data bytes];
+    self->inverted = inv;
     return self;
 }
 
 
 - (NSData *)bitmapRepresentation
 {
-    if (inverted) {
+    if (self->inverted) {
        char* theBytes = CallocAtomic(1, BITMAPDATABYTES);
        unsigned i;
        
 
 - (BOOL)characterIsMember:(unichar)aCharacter
 {
-    return inverted ^ ISBITSET(bytes, aCharacter);
+#if 1 /* see OGo bug #1594 */
+    if (self->inverted) {
+        return ISBITSET(self->bytes, aCharacter) ? NO : YES;
+    }
+    else {
+        return ISBITSET(self->bytes, aCharacter);
+    }
+#else /* this is the original code, but it doesn't work (with gcc4?!) */
+    return self->inverted ^ ISBITSET(self->bytes, aCharacter);
+#endif
 }
 
 - (NSCharacterSet *)invertedSet
 {
     return AUTORELEASE([[NSBitmapCharacterSet alloc]
-                           initWithBitmapRepresentation:data
-                           inverted:!inverted]);
+                           initWithBitmapRepresentation:self->data
+                           inverted:!self->inverted]);
 }
 
 // NSCopying
 
-- copyWithZone:(NSZone*)zone
+- (id)copyWithZone:(NSZone *)zone
 {
     if ([self zone] == zone)
        return RETAIN(self);
     }
 }
 
+/* description */
+
+- (NSString *)description
+{
+    NSMutableString *ms;
+    unsigned int i;
+    
+    ms = [NSMutableString stringWithCapacity:128];
+    [ms appendFormat:@"<0x%p[%@]: chars-in-latin1-range:",
+        self, NSStringFromClass([self class])];
+
+    for (i = 0; i < 256; i++) {
+        if (ISBITSET(bytes, i))
+            [ms appendFormat:@" %i", i];
+    }
+
+    if (self->inverted)
+        [ms appendString:@" inverted"];
+    
+    [ms appendString:@">"];
+    return ms;
+}
+
 @end /* NSBitmapCharacterSet */
 
 /*
index 19a3c2348bb83926bb25ddbd0bd380bc749058ee..e613513ae9b0e0bef7c09ae7bb6bf0c70701af5b 100644 (file)
@@ -62,6 +62,10 @@ typedef enum {
 - (id)initWithFileDescriptor:(int)fd closeOnDealloc:(BOOL)flag;
 - (id)initWithPath:(NSString *)aPath flags:(int)flags createMode:(int)mode;
 
++ (id)fileHandleForReadingAtPath:(NSString *)path;
++ (id)fileHandleForWritingAtPath:(NSString *)path;
++ (id)fileHandleForUpdatingAtPath:(NSString *)path;
+
 @end
 
 
index 96d26c63f1929145e239d6904d7711acb2812b0d..bccd84a05f6ae5781fdc2abbb4e05a85057d8cdb 100644 (file)
@@ -96,13 +96,13 @@ static void _setFdBlocking(int fd, BOOL nonBlocking) {
 
 @implementation NSConcreteFileHandle
 
-+ (id)fileHandleForReadingAtPath:(NSString*)path
++ (id)fileHandleForReadingAtPath:(NSString *)path
 {
     return AUTORELEASE([[self alloc]
                            initWithPath:path flags:O_RDONLY createMode:0]);
 }
 
-+ (id)fileHandleForWritingAtPath:(NSString*)path
++ (id)fileHandleForWritingAtPath:(NSString *)path
 {
     /* note: it's intended that flags do not include O_CREAT ! (see doc) */
     return AUTORELEASE([[self alloc]
@@ -110,7 +110,7 @@ static void _setFdBlocking(int fd, BOOL nonBlocking) {
                               createMode:0]);
 }
 
-+ (id)fileHandleForUpdatingAtPath:(NSString*)path
++ (id)fileHandleForUpdatingAtPath:(NSString *)path
 {
     /* note: it's intended that flags do not include O_CREAT ! (see doc) */
     return AUTORELEASE([[self alloc]
@@ -249,7 +249,7 @@ static void _setFdBlocking(int fd, BOOL nonBlocking) {
         if (length == UINT_MAX)
             data = [self readFileLength:LONG_MAX];
         else {
-            NSAssert(length < LONG_MAX,
+            NSAssert(length < INT_MAX,
                      @"cannot handle read's with %d bytes",
                      length);
             data = [self readFileLength:length];
index e90aad873a7a3db11d9c626af234d01b13754cb3..eff11257945d90b3792aa8ae5c3ba4eaed789253 100644 (file)
@@ -407,7 +407,7 @@ static __inline__ void mdRemove(NSConcreteMutableDictionary *table, id key) {
     if (aKey == nil) {
        [[[InvalidArgumentException alloc]
                    initWithFormat:
-                      @"nil key to be added in dictionary (object=0x%08X)",
+                      @"nil key to be added in dictionary (object=0x%p)",
                       anObject] raise];
     }
     if (anObject == nil) {
index 442bf611c01c311223b8ed8a6f42e7b58484a4f6..6aee5a951868bcf2bfb1f43c1e0e318f8b5dcb1d 100644 (file)
@@ -61,7 +61,7 @@
 
     if ((bytes = NSReadContentsOfFile(_path, 1, &len))) {
         bytes[len] = '\0';
-        return [self initWithCString:bytes length:len copy:NO];
+        return [self initWithCString:(char *)bytes length:len copy:NO];
     }    
     else {
         self = AUTORELEASE(self);
@@ -98,7 +98,7 @@
     bytes = MallocAtomic (length);
     [aDecoder decodeArrayOfObjCType:@encode(char) count:length at:bytes];
     return [[NSMutableSimple8BitString alloc]
-               initWithCString:bytes length:length copy:NO];
+               initWithCString:(char *)bytes length:length copy:NO];
 }
 
 - (NSData *)dataUsingEncoding:(NSStringEncoding)encoding
         
         len = [self cStringLength];
         buf = NSZoneMallocAtomic(NULL, len + 1);
-        [self getCString:buf]; buf[len] = '\0';
+        [self getCString:(char *)buf]; buf[len] = '\0';
         
         return [NSData dataWithBytesNoCopy:buf length:len];
     }
         
         len = [self cStringLength];
         buf = NSZoneMallocAtomic(NULL, len + 1);
-        [self getCString:buf]; buf[len] = '\0';
+        [self getCString:(char *)buf]; buf[len] = '\0';
         
         if (!flag) {
             /* check for strict ANSI */
 
 /* Accessing characters        */
 
-- (void)getCharacters:(unichar*)buffer range:(NSRange)aRange
+- (void)getCharacters:(unichar *)buffer range:(NSRange)aRange
 {
     register unsigned int i = 0;
     register unsigned char *bytes;
             raise];
     }
     
-    bytes = [self __compact8BitBytes];
+    bytes = (unsigned char *)[self __compact8BitBytes];
     for (i = 0; i < aRange.length; i++)
         buffer[i] = bytes[i];
 }
 
 /* Finding characters and substrings */
 
-- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet*)aSet
+- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)aSet
   options:(unsigned int)mask range:(NSRange)aRange
 {
     // ENCODINGS - this code applies to the system's default encoding
     unsigned int i = 0;
-
+    
     IMP imp = [aSet methodForSelector:@selector(characterIsMember:)];
-    unsigned char *bytes = [self __compact8BitBytes];
+    unsigned char *bytes = (unsigned char *)[self __compact8BitBytes];
 
     if (NSMaxRange(aRange) > [self cStringLength]) {
         [[[IndexOutOfRangeException alloc] initWithFormat:
 
         for (i = aRange.location; i < max; i++) {
             unichar c = bytes[i];
+
+            if ((*imp)(aSet, @selector(characterIsMember:), c))
+                return NSMakeRange(i, 1);
             
-            if ((*imp)(aSet, @selector(characterIsMember:), c) ||
-                ((mask & NSCaseInsensitiveSearch) && 
-                 ((islower(c) &&
-                   (*imp)(aSet, @selector(characterIsMember:), toupper(c))) ||
-                  (isupper(c) &&
-                   (*imp)(aSet, @selector(characterIsMember:), tolower(c))))
-                 ))
+            if ((mask & NSCaseInsensitiveSearch) && 
+                ((islower(c) &&
+                  (*imp)(aSet, @selector(characterIsMember:), toupper(c))) ||
+                 (isupper(c) &&
+                  (*imp)(aSet, @selector(characterIsMember:), tolower(c))))
+                )
             {
                 return NSMakeRange(i, 1);
             }
             raise];
     }
 
-    mbytes = [self __compact8BitBytes] + aRange.location;
-    abytes = [(id)aString __compact8BitBytes];
+    mbytes = (unsigned char *)[self __compact8BitBytes] + aRange.location;
+    abytes = (unsigned char *)[(id)aString __compact8BitBytes];
     a = [aString cStringLength];
     
     if ((a == 0) || (aRange.length < a))
             raise];
     }
     
-    mbytes = [self __compact8BitBytes] + aRange.location;
-    abytes = [(id)aString __compact8BitBytes];
+    mbytes = (unsigned char *)[self __compact8BitBytes] + aRange.location;
+    abytes = (unsigned char *)[(id)aString __compact8BitBytes];
     
     a = [aString cStringLength];
     n = MIN(a, aRange.length);
 
 - (unsigned)hash
 {
-    unsigned char *bytes = [self __compact8BitBytes];
+    unsigned char *bytes = (unsigned char *)[self __compact8BitBytes];
     unsigned hash = 0, hash2;
     int i, n = [self cStringLength];
 
     
     mLen   = [self cStringLength];
     aLen   = [aString length];
-    mbytes = [self __compact8BitBytes];
-    abytes = [(NS8BitString *)aString __compact8BitBytes];
+    mbytes = (unsigned char *)[self __compact8BitBytes];
+    abytes = (unsigned char *)[(NS8BitString *)aString __compact8BitBytes];
 
     for (i = 0; (i < mLen) && (i < aLen); i++) {
        unsigned char c1 = mbytes[i];
     int           i;
     BOOL          f      = YES;
     int           length = [self cStringLength];
-    unsigned char *bytes  = [self __compact8BitBytes];
+    unsigned char *bytes  = (unsigned char *)[self __compact8BitBytes];
     unsigned char *chars  = MallocAtomic(sizeof(unichar)*(length+1));
 
     for (i = 0; i < length; i++) {
     chars[i] = 0;
     
     return AUTORELEASE([[NSOwned8BitString alloc]
-                           initWithCString:chars length:length copy:NO]);
+                           initWithCString:(char *)chars length:length
+                          copy:NO]);
 }
 
 - (NSString *)lowercaseString
     unsigned char *chars;
     
     length = [self cStringLength];
-    bytes  = [self __compact8BitBytes];
+    bytes  = (unsigned char *)[self __compact8BitBytes];
     chars  = MallocAtomic(sizeof(unsigned char) * (length + 1));
     
     for (i = 0; i < length; i++) {
     chars[i] = 0;
 
     return AUTORELEASE([[NSOwned8BitString alloc]
-                           initWithCString:chars length:length copy:NO]);
+                           initWithCString:(char *)chars length:length
+                          copy:NO]);
 }
 
 - (NSString *)uppercaseString
     // ENCODINGS - this code applies to the system's default encoding
     int i;
     int length = [self cStringLength];
-    unsigned char *bytes = [self __compact8BitBytes];
+    unsigned char *bytes = (unsigned char *)[self __compact8BitBytes];
     unsigned char *chars = MallocAtomic(sizeof(unichar)*(length+1));
 
     for (i = 0; i < length; i++) {
     chars[i] = 0;
 
     return AUTORELEASE([[NSOwned8BitString alloc]
-                           initWithCString:chars length:length copy:NO]);
+                           initWithCString:(char *)chars length:length
+                          copy:NO]);
 }
 
 /* Working with C strings */
 - (void)getCString:(char *)buffer maxLength:(unsigned int)maxLength
   range:(NSRange)aRange remainingRange:(NSRange *)leftoverRange
 {
-    unsigned char *bytes [self __compact8BitBytes];
-    unsigned int toMove = MIN(maxLength, aRange.length);
-    unsigned int cLength = [self cStringLength];
+    unsigned char *bytes  = (unsigned char *)[self __compact8BitBytes];
+    unsigned int  toMove  = MIN(maxLength, aRange.length);
+    unsigned int  cLength = [self cStringLength];
     
     if (NSMaxRange(aRange) > cLength) {
         [[[IndexOutOfRangeException alloc] initWithFormat:
     const unsigned char *cString;
     int i, length;
 
-    cString = [self __compact8BitBytes];
-    length = [self cStringLength];
+    cString = (unsigned char *)[self __compact8BitBytes];
+    length  = [self cStringLength];
 
     if (cString == NULL)    return @"\"\"";
     if (cString[0] == '\0') return @"\"\"";
     /* Check if the string can be parsed as a STRING token by the property list
        parser. Otherwise we must enclose it in double quotes. */
     if (lf_isPlistBreakChar(cString[0])) {
-        return lf_quoteString(cString, length);
+        return lf_quoteString((char *)cString, length);
     }
 
     for(i = 1; i < length; i++) {
         if (lf_isPlistBreakChar(cString[i]))
-           return lf_quoteString(cString, length);
+           return lf_quoteString((char *)cString, length);
     }
 
     return self;
     }
     else {
        lfFree(cString);
-       cString = byteString;
+       cString = (unsigned char *)byteString;
        cLength = cCapacity = length;
     }
     return self;
     [super dealloc];
 }
 
-- (const char*)cString
+- (const char *)cString
 {
     unsigned char *str = MallocAtomic(sizeof(char)*(cLength + 1));
 
 #if !LIB_FOUNDATION_BOEHM_GC
     [NSAutoreleasedPointer autoreleasePointer:str];
 #endif
-    return str;
+    return (const char *)str;
 }
 
 - (unsigned int)cStringLength
         : [NSInline8BitString class];
     
     return AUTORELEASE([[clazz allocForCapacity:aRange.length zone:NULL] 
-                               initWithCString:(self->cString + aRange.location)
+                               initWithCString:
+                              ((char *)self->cString + aRange.location)
                                length:aRange.length]);
 }
 
-- (char*)__compact8BitBytes
+- (char *)__compact8BitBytes
 {
-    return self->cString;
+    return (char *)self->cString;
 }
 
 - (void)replaceCharactersInRange:(NSRange)aRange
     if (strLength) {
        NSRange range = { 0, strLength };
         
-       [aString getCString:(self->cString + aRange.location)
+       [aString getCString:((char *)self->cString + aRange.location)
                  maxLength:strLength
                  range:range
                  remainingRange:NULL];
index 365565e97281cde7e32586fdd92301f546666bb8..57413c5d99612cf5ea406831828e8e2d92cd1d4b 100644 (file)
@@ -25,7 +25,7 @@ static NSString *strValues[64] = {
 #define CHK_STATIC_USTR \
   if (data < 64) return strValues[(short)data];
 
-static unsigned char buf[256];
+static char buf[256]; // THREAD
 #define FMT_NUMSTR(__FMT__) \
     if (NSStringClass == Nil) NSStringClass = [NSString class];\
     sprintf(buf, __FMT__, data);\
@@ -50,7 +50,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -208,7 +208,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -367,7 +367,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -526,7 +526,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -685,7 +685,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -844,7 +844,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -1003,7 +1003,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -1162,7 +1162,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -1321,7 +1321,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -1480,7 +1480,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -1639,7 +1639,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -1798,7 +1798,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
@@ -1956,7 +1956,7 @@ static unsigned char buf[256];
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
index 98d4b67cc7623b717dd47f0519cd0cc3706782f8..0e60ad2e2aa0d4dadbc9942fb77804a006eb061f 100755 (executable)
@@ -37,7 +37,7 @@ cat <<EOF
     return data;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     return data;
 }
index 27d1addf33124546bbe64953504d276ee6138f61..7bd2ef7afbfc95fcc32541d3a8a099a2994d7b26 100644 (file)
 /* Immutable. Constant (compiler generated), zero terminated */
 @interface NXConstantString : NSNonOwned8BitString
 @end
+@interface NSConstantString : NSNonOwned8BitString
+@end
 
 /* Immutable. Holds non owned pointer characters, not zero terminated */
 @interface NSNonOwnedOpen8BitString : NSNonOwned8BitString
index 5924254fc8d51a781e8be82e8d180c6b1b0f64ab..fa7e74217592a2b59e2c8a85760bf5220a59d6e9 100644 (file)
@@ -169,7 +169,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
     if ((l = [self cStringLength]) == 0)
        return;
     
-    bytes = [self __compact8BitBytes];
+    bytes = (unsigned char *)[self __compact8BitBytes];
     for (i = 0; i < l; i++)
         buffer[i] = (unichar)bytes[i];
 }
@@ -185,7 +185,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
             raise];
     }
     
-    bytes = [self __compact8BitBytes];
+    bytes = (unsigned char *)[self __compact8BitBytes];
     for (i = 0; i < aRange.length; i++)
         buffer[i] = bytes[i];
 }
@@ -207,7 +207,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
     unsigned int i = 0;
 
     IMP imp = [aSet methodForSelector:@selector(characterIsMember:)];
-    unsigned char *bytes = [self __compact8BitBytes];
+    unsigned char *bytes = (unsigned char *)[self __compact8BitBytes];
 
     if (NSMaxRange(aRange) > [self cStringLength]) {
        [[[IndexOutOfRangeException alloc] 
@@ -271,8 +271,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
             raise];
     }
 
-    mbytes = [self __compact8BitBytes] + aRange.location;
-    abytes = [(id)aString __compact8BitBytes];
+    mbytes = (unsigned char *)[self __compact8BitBytes] + aRange.location;
+    abytes = (unsigned char *)[(id)aString __compact8BitBytes];
     a = [aString cStringLength];
     
     if ((a == 0) || (aRange.length < a))
@@ -432,8 +432,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
             raise];
     }
 
-    mbytes = [self __compact8BitBytes] + aRange.location;
-    abytes = [(id)aString __compact8BitBytes];
+    mbytes = (unsigned char *)[self __compact8BitBytes] + aRange.location;
+    abytes = (unsigned char *)[(id)aString __compact8BitBytes];
     
     a = [aString cStringLength];
     n = MIN(a, aRange.length);
@@ -521,8 +521,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
     
     mLen   = [self cStringLength];
     aLen   = [aString length];
-    mbytes = [self __compact8BitBytes];
-    abytes = [(NS8BitString *)aString __compact8BitBytes];
+    mbytes = (unsigned char *)[self __compact8BitBytes];
+    abytes = (unsigned char *)[(NS8BitString *)aString __compact8BitBytes];
 
     for (i = 0; (i < mLen) && (i < aLen); i++) {
        unsigned char c1 = mbytes[i];
@@ -548,7 +548,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
     int            i;
     BOOL           f      = YES;
     int            length = [self cStringLength];
-    unsigned char* bytes  = [self __compact8BitBytes];
+    unsigned char* bytes  = (unsigned char *)[self __compact8BitBytes];
     unsigned char* chars  = MallocAtomic(sizeof(unichar)*(length+1));
 
     for (i = 0; i < length; i++) {
@@ -567,7 +567,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
     chars[i] = 0;
     
     return AUTORELEASE([[NSOwned8BitString alloc]
-                           initWithCString:chars length:length copy:NO]);
+                           initWithCString:(char *)chars length:length
+                          copy:NO]);
 }
 
 - (NSString *)lowercaseString
@@ -575,8 +576,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
     // ENCODINGS - this code applies to the system's default encoding
     int i;
     int length = [self cStringLength];
-    unsigned char *bytes = [self __compact8BitBytes];
-    unsigned char *chars = MallocAtomic(sizeof(unichar)*(length+1));
+    unsigned char *bytes = (unsigned char *)[self __compact8BitBytes];
+    unsigned char *chars = (unsigned char *)MallocAtomic(sizeof(unichar)*(length+1));
 
     for (i = 0; i < length; i++) {
        register unsigned char c = bytes[i];
@@ -585,7 +586,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
     chars[i] = 0;
 
     return AUTORELEASE([[NSOwned8BitString alloc]
-                           initWithCString:chars length:length copy:NO]);
+                           initWithCString:(char *)chars length:length copy:NO]);
 }
 
 - (NSString *)uppercaseString
@@ -593,8 +594,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
     // ENCODINGS - this code applies to the system's default encoding
     int i;
     int length = [self cStringLength];
-    unsigned char *bytes = [self __compact8BitBytes];
-    unsigned char *chars = MallocAtomic(sizeof(unichar)*(length+1));
+    unsigned char *bytes = (unsigned char *)[self __compact8BitBytes];
+    unsigned char *chars = (unsigned char *)MallocAtomic(sizeof(unichar)*(length+1));
 
     for (i = 0; i < length; i++) {
        register unsigned char c = bytes[i];
@@ -604,7 +605,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
     chars[i] = 0;
     
     return AUTORELEASE([[NSOwned8BitString alloc]
-                           initWithCString:chars length:length copy:NO]);
+                           initWithCString:(char *)chars length:length copy:NO]);
 }
 
 /* Working with C strings */
@@ -612,7 +613,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 - (void)getCString:(char *)buffer maxLength:(unsigned int)maxLength
   range:(NSRange)aRange remainingRange:(NSRange*)leftoverRange
 {
-    unsigned char* bytes = [self __compact8BitBytes];
+    unsigned char* bytes = (unsigned char *)[self __compact8BitBytes];
     unsigned int toMove = MIN(maxLength, aRange.length);
     unsigned int cLength = [self cStringLength];
     
@@ -646,7 +647,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 - (void)encodeWithCoder:(NSCoder*)aCoder
 {
-    const unsigned char* bytes = [self __compact8BitBytes];
+    const unsigned char* bytes = (unsigned char *)[self __compact8BitBytes];
     int length = [self cStringLength];
     
     [aCoder encodeValueOfObjCType:@encode(int) at:&length];
@@ -664,7 +665,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
     bytes = MallocAtomic (length + 1);
     [aDecoder decodeArrayOfObjCType:@encode(char) count:length at:bytes];
     bytes[length] = '\0';
-    return [[NSOwned8BitString alloc] initWithCString:bytes length:length copy:NO];
+    return [[NSOwned8BitString alloc] 
+              initWithCString:(char *)bytes length:length copy:NO];
 }
 
 - (NSString *)stringRepresentation
@@ -672,8 +674,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
     const unsigned char *cString;
     int i, length;
 
-    cString = [self __compact8BitBytes];
-    length = [self cStringLength];
+    cString = (unsigned char *)[self __compact8BitBytes];
+    length  = [self cStringLength];
     
     if (cString == NULL)    return @"\"\"";
     if (length  == 0)       return @"\"\"";
@@ -682,12 +684,12 @@ static unsigned int NSRange8BitString_total_len            = 0;
     /* Check if the string can be parsed as a STRING token by the property list
        parser. Otherwise we must enclose it in double quotes. */
     if (lf_isPlistBreakChar(cString[0])) {
-        return lf_quoteString(cString, length);
+        return lf_quoteString((char *)cString, length);
     }
 
     for(i = 1; i < length; i++) {
         if (lf_isPlistBreakChar(cString[i]))
-           return lf_quoteString(cString, length);
+           return lf_quoteString((char *)cString, length);
     }
 
     return self;
@@ -721,9 +723,10 @@ static unsigned int NSRange8BitString_total_len            = 0;
         
         len  = [self cStringLength];
         buf = NSZoneMalloc(NULL, sizeof(unsigned char) * len + 1);
-        [self getCString:buf];
+        [self getCString:(char *)buf];
         buf[len] = '\0';
-        return [NSDataClass dataWithBytesNoCopy:buf length:strlen(buf)];
+        return [NSDataClass dataWithBytesNoCopy:(char *)buf
+                           length:strlen((char *)buf)];
     }
     if (encoding == NSASCIIStringEncoding) {
         register unsigned len = [self cStringLength];
@@ -733,7 +736,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
         buf = NSZoneMalloc(NULL, sizeof(char) * len + 1);
         buf[len] = '\0';
             
-        [self getCString:buf];            
+        [self getCString:(char *)buf];            
         if (!flag) {
             /* check for strict ASCII */
             for (i = 0; i < len; i++)
@@ -762,7 +765,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 + (id)allocForCapacity:(unsigned int)capacity zone:(NSZone *)zone
 {
-    NSInline8BitString *str = NSAllocateObject(self, capacity, zone);
+    NSInline8BitString *str = (NSInline8BitString *)
+       NSAllocateObject(self, capacity, zone);
     str->cLength = -1;
     return str;
 }
@@ -819,7 +823,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 - (const char *)cString
 {
-    return self->cString;
+    return (const char *)self->cString;
 }
 
 - (unsigned int)cStringLength
@@ -855,13 +859,13 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
     return AUTORELEASE([[NSRange8BitString alloc]
                            initWithString:self
-                           bytes:(self->cString + aRange.location)
+                           bytes:((char *)self->cString + aRange.location)
                            length:aRange.length]);
 }
 
 - (char *)__compact8BitBytes
 {
-    return self->cString;
+    return (char *)self->cString;
 }
 
 - (unsigned)hash
@@ -890,7 +894,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 + (id)allocForCapacity:(unsigned int)capacity zone:(NSZone*)zone
 {
-    NSShortInline8BitString *str = NSAllocateObject(self, capacity, zone);
+    NSShortInline8BitString *str = (NSShortInline8BitString *)
+       NSAllocateObject(self, capacity, zone);
     str->cLength = 255;
     return str;
 }
@@ -948,7 +953,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 - (const char *)cString
 {
-    return self->cString;
+    return (const char *)self->cString;
 }
 
 - (unsigned int)cStringLength
@@ -1013,13 +1018,13 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
     return AUTORELEASE([[NSRange8BitString alloc]
                            initWithString:self
-                           bytes:(self->cString + aRange.location)
+                           bytes:((char *)self->cString + aRange.location)
                            length:aRange.length]);
 }
 
 - (char *)__compact8BitBytes
 {
-    return self->cString;
+    return (char *)self->cString;
 }
 
 - (NSComparisonResult)compare:(NSString *)aString
@@ -1060,7 +1065,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
     }
 
     mbytes = self->cString + aRange.location;
-    abytes = [(id)aString __compact8BitBytes];
+    abytes = (unsigned char *)[(id)aString __compact8BitBytes];
     
     a = [aString cStringLength];
     n = MIN(a, aRange.length);
@@ -1181,7 +1186,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
     /* same length */
     
     mbytes = self->cString;
-    abytes = [(id)aString __compact8BitBytes];
+    abytes = (unsigned char *)[(id)aString __compact8BitBytes];
     
     /* using memcmp is probably faster than looping on our own */
     return memcmp(self->cString, abytes, a) == 0 ? YES : NO;
@@ -1224,7 +1229,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 - (const char *)cString
 {
-    return &(self->c[0]);
+    return (const char *)&(self->c[0]);
 }
 
 - (unsigned int)cStringLength
@@ -1263,7 +1268,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 - (char *)__compact8BitBytes
 {
-    return &(self->c[0]);
+    return (char *)&(self->c[0]);
 }
 
 - (unsigned)hash
@@ -1296,7 +1301,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
             raise];
     }
     self->cLength = 0;
-    self->cString = "";
+    self->cString = (unsigned char *)"";
     return self;
 }
 
@@ -1314,7 +1319,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
            sel_get_name(_cmd), NSStringFromClass([self class])] raise];
     }
     cLength = length;
-    cString = byteString;
+    cString = (unsigned char *)byteString;
     return self;
 }
 
@@ -1329,7 +1334,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 - (const char *)cString
 {
-    return self->cString;
+    return (const char *)self->cString;
 }
 
 - (unsigned int)cStringLength
@@ -1366,13 +1371,13 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
     return AUTORELEASE([[NSRange8BitString alloc]
                            initWithString:self
-                           bytes:cString + aRange.location
+                           bytes:(char *)cString + aRange.location
                            length:aRange.length]);
 }
 
-- (char*)__compact8BitBytes
+- (char *)__compact8BitBytes
 {
-    return self->cString;
+    return (char *)self->cString;
 }
 
 @end /* NSNonOwned8BitString */
@@ -1410,7 +1415,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
        self->cString[self->cLength] = 0;
     }
     else
-       self->cString = byteString;
+       self->cString = (unsigned char *)byteString;
     return self;
 }
 
@@ -1426,7 +1431,17 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
 @end /* NSOwned8BitString */
 
-#if 1
+
+#define USE_LIB_FOUNDATION_CUSTOM_CONSTSTR 1
+#define USE_LIB_FOUNDATION_CONSTSTR 1
+
+#if USE_LIB_FOUNDATION_CONSTSTR
+
+#if USE_LIB_FOUNDATION_CUSTOM_CONSTSTR
+#  define NXConstantString NSConstantString
+#endif
+
+/* this requires that we use the special libFoundation libobjc */
 @implementation NXConstantString
 
 - (oneway void)release
@@ -1451,10 +1466,22 @@ static unsigned int NSRange8BitString_total_len            = 0;
 - (void)dealloc
 {
     [self shouldNotImplement:_cmd];
+
+    /* this is to please gcc 4.1 which otherwise issues a warning (and we
+       don't know the -W option to disable it, let me know if you do ;-)*/
+    if (0) [super dealloc];
 }
 
 @end /* NXConstantString */
+
+#if USE_LIB_FOUNDATION_CUSTOM_CONSTSTR
+#  undef NXConstantString
+#endif
+
 #else
+
+#warning NOT USING BUILTIN NXConstantString
+
 @interface DummyNXConstantString : NSNonOwned8BitString
 @end
 
@@ -1487,13 +1514,16 @@ static unsigned int NSRange8BitString_total_len            = 0;
 {
     static BOOL didLoad = NO;
 
+#warning DEBUG LOG
+    printf("LOAD DUMMY\n");
+
     if (!didLoad) {
         Class metaClass;
         Class constantStringClass;
         Class constantStringMetaClass;
 
         didLoad = YES;
-
+       
         metaClass               = ((DummyNXConstantString*)self)->isa;
         constantStringClass     = objc_lookup_class ("NXConstantString");
         constantStringMetaClass = constantStringClass->class_pointer;
@@ -1504,7 +1534,12 @@ static unsigned int NSRange8BitString_total_len            = 0;
         constantStringClass->name
             = constantStringMetaClass->name
             = "NXConstantString";
-
+       
+       /* 
+          Note: this doesn't work for dynamically loaded NSString categories,
+                that is categories either contained in bundles OR in libraries
+                which are loaded on-demand in case a bundle is loaded.
+       */
         class_add_behavior(constantStringClass, self);
     }
 }
@@ -1523,7 +1558,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 }
 #endif
 
-- (const char*)cString
+- (const char *)cString
 {
     unsigned char *str;
     
@@ -1533,7 +1568,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 #if !LIB_FOUNDATION_BOEHM_GC
     [NSAutoreleasedPointer autoreleasePointer:str];
 #endif
-    return str;
+    return (const char *)str;
 }
 
 @end /* NSNonOwnedOpen8BitString */
@@ -1565,7 +1600,8 @@ static unsigned int NSRange8BitString_total_len            = 0;
     }
     
     if (strlen(byteString) < length) {
-        printf("LENGTH DIFFERS: %i vs %i\n", strlen(byteString), length);
+        printf("LENGTH DIFFERS: %ld vs %d\n", 
+              (unsigned long)strlen(byteString), length);
         abort();
     }
     
@@ -1578,7 +1614,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
         cString[length] = 0;
     }
     else
-       self->cString = byteString;
+       self->cString = (unsigned char *)byteString;
     return self;
 }
 
@@ -1591,11 +1627,12 @@ static unsigned int NSRange8BitString_total_len            = 0;
 #if !LIB_FOUNDATION_BOEHM_GC
     [NSAutoreleasedPointer autoreleasePointer:str];
 #endif
-    return str;
+    return (const char *)str;
 }
 
 @end /* NSOwnedOpen8BitString */
 
+
 @implementation NSRange8BitString /* final */
 
 - (id)initWithString:(NSString *)aParent 
@@ -1607,7 +1644,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
             raise];
     }
     
-    self->cString = bytes;
+    self->cString = (unsigned char *)bytes;
     self->cLength = length;
     self->parent  = RETAIN(aParent);
     return self;
@@ -1636,7 +1673,7 @@ static unsigned int NSRange8BitString_total_len            = 0;
 
     return AUTORELEASE([[NSRange8BitString alloc] 
                            initWithString:parent
-                           bytes:cString+aRange.location 
+                           bytes:((char *)cString + aRange.location)
                            length:aRange.length]);
 }
 
index 3b8e4e23b2660bcc1ea6a9b99f2ba20d12e6b472..45f85f307e66d52c51474958905282de949a2ccc 100644 (file)
@@ -349,7 +349,7 @@ static NSTimeZone* gmtTimeZone = nil;
     return self;
 }
 
-- (id)detailForDate:(NSDate *)date
+- (id)detailForDate:(NSCalendarDate *)date
 {
     return self->detail;
 }
@@ -477,11 +477,11 @@ static NSTimeZone* gmtTimeZone = nil;
     }
 }
 
-- (NSDate *)startDate
+- (NSCalendarDate *)startDate
 {
     return self->startDate;
 }
-- (NSDate *)endDate
+- (NSCalendarDate *)endDate
 {
     return self->endDate;
 }
index 9fbbc27c24021fb71a0cceb5db22dcbe196f0d35..a72ef7a734ae40a8c3dfa122c78290acb989ca53 100644 (file)
@@ -132,13 +132,13 @@ extern int NSConvertUTF16toUTF8(unichar             **sourceStart,
         [data getBytes:self->cString];
         self->cString[len] = '\0';
     }
-    return self->cString;
+    return (const char *)self->cString;
 }
 - (unsigned int)cStringLength
 {
-    const unsigned char *cstr;
+    const char *cstr;
     
-    if ((cstr = [self cString]))
+    if ((cstr = [self cString]) != NULL)
         return strlen(cstr);
     return 0;
 }
@@ -158,7 +158,7 @@ extern int NSConvertUTF16toUTF8(unichar             **sourceStart,
     unsigned int toMove, i, cLength;
     const unsigned char *cstr;
     
-    cstr = [self cString];
+    cstr = (const unsigned char *)[self cString];
     
     toMove  = MIN(maxLength, aRange.length);
     cLength = [self cStringLength];
index 93042c98624450b1927420d550c358f034f0c05f..0ccc78b54170fc31e77087c5862459a6b02c2587 100644 (file)
@@ -729,8 +729,8 @@ static int debugNSTask = -1;
     char buffer[512];
 
     sprintf(buffer,
-            "<0x%08X<%s> isRunning=%s childHasFinished=%s pid=%d>",
-            (unsigned)self, (char*)object_get_class_name(self),
+            "<0x%p<%s> isRunning=%s childHasFinished=%s pid=%d>",
+            self, (char*)object_get_class_name(self),
             self->isRunning ? "YES" : "NO",
             self->childHasFinished ? "YES" : "NO",
             (unsigned)self->pid);
index 8a10613f3f0555defdf8692119b3bc173b0bc815..0baecd64ee74f2ef4efed6079bec3997a7171d9e 100644 (file)
     return self;
 }
 
-- (BOOL)isEqual:(NSValue*)aValue
+- (BOOL)isEqual:(id)aValue
 {
-    return Strcmp([self objCType], [aValue objCType]) == 0
+    if (aValue == nil)
+       return NO;
+    
+    // Note: we do not check the aValue class, I think this is an intended
+    //       optimization? (we could quickly check using *(Class *)obj?)
+    return Strcmp([self objCType], [(NSValue *)aValue objCType]) == 0
            && [[self nonretainedObjectValue]
-                   isEqual:[aValue nonretainedObjectValue]];
+                  isEqual:[(NSValue *)aValue nonretainedObjectValue]];
 }
 
 // NSCopying
index caa7920a242e9e9a432e5ce6e9d113c166fd1420..e8f6fa704fb882f33922c10d51d4e27a9f0f9402 100644 (file)
@@ -43,7 +43,7 @@
 + (id)allocWithZone:(NSZone*)zone
 {
     return NSAllocateObject(((self == [NSData class]) ? 
-           [NSConcreteData class] : self), 0, zone);
+                            [NSConcreteData class] : (Class)self), 0, zone);
 }
 
 + (id)data
        }
        case _C_ARY_B: {
            int i, count, offset, itemSize;
-           const unsigned char* itemType;
-    
+           const char *itemType;
+           
            count = Atoi(type + 1);
            itemType = type;
-           while(isdigit(*++itemType));
-               itemSize = objc_sizeof_type(itemType);
-
-               for(i = offset = 0; i < count; i++, offset += itemSize)
-                   [self deserializeDataAt:(char*)data + offset
-                                   ofObjCType:itemType
-                                   atCursor:cursor
-                                   context:callback];
+           while (isdigit(*++itemType))
+               ;
+           itemSize = objc_sizeof_type(itemType);
+               
+           for(i = offset = 0; i < count; i++, offset += itemSize) {
+               [self deserializeDataAt:(char*)data + offset
+                     ofObjCType:itemType
+                     atCursor:cursor
+                     context:callback];
+           }
            break;
        }
        case _C_STRUCT_B: {
 + (id)allocWithZone:(NSZone*)zone
 {
     return NSAllocateObject(((self == [NSMutableData class]) ? 
-           [NSConcreteMutableData class] : self), 0, zone);
+                            [NSConcreteMutableData class] : (Class)self), 
+                           0, zone);
 }
 
 + (id)dataWithCapacity:(unsigned int)numBytes
        }
         case _C_ARY_B: {
             int i, offset, itemSize, count = Atoi(type + 1);
-            const unsigned char* itemType = type;
-
-            while(isdigit(*++itemType));
-               itemSize = objc_sizeof_type(itemType);
-
-               for(i = offset = 0; i < count; i++, offset += itemSize)
-                   [self serializeDataAt:(char*)data + offset
-                           ofObjCType:itemType
-                           context:callback];
-
-               break;
+            const char *itemType = type;
+           
+            while (isdigit(*++itemType))
+               ;
+           itemSize = objc_sizeof_type(itemType);
+
+           for (i = offset = 0; i < count; i++, offset += itemSize) {
+               [self serializeDataAt:(char*)data + offset
+                     ofObjCType:itemType
+                     context:callback];
+           }
+           break;
         }
         case _C_STRUCT_B: {
             int offset = 0;
index 5e4b096af818f8e652dd8e60c4742efd0dc3da5f..516348339a0834e2fbc1b68c8ef0274481f84506 100644 (file)
@@ -113,7 +113,7 @@ JD 0.0 = 12 noon on 1 Jan 4713 B.C.E., which is -51909.5L*24*60*60
 
 @class NSTimeZoneDetail;
 
-@interface NSTimeZone: NSObject <NSCoding>
+@interface NSTimeZone : NSObject <NSCoding>
 
 + (void)setDefaultTimeZone:(NSTimeZone*)aTimeZone;
 + (NSTimeZone*)defaultTimeZone;
index 4d2d82cb5b44ba15179e6af2f028fc28dbc6f5e2..368c73d4244f2fe7ff8973d836626a92d46f923c 100644 (file)
@@ -66,31 +66,31 @@ static NSDate *distantFuture = nil, *distantPast = nil;
 + (id)allocWithZone:(NSZone *)zone
 {
     return NSAllocateObject( (self == [NSDate class]) ? 
-           [NSConcreteDate class] : self, 0, zone);
+                            [NSConcreteDate class] : (Class)self, 0, zone);
 }
 
-+ (NSDate *)date
++ (id)date
 {
     return AUTORELEASE([[self alloc] init]);
 }
 
-+ (NSDate *)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs
++ (id)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs
 {
     return AUTORELEASE([[self alloc] initWithTimeIntervalSinceNow:secs]);
 }
 
-+ (NSDate *)dateWithTimeIntervalSinceReferenceDate:(NSTimeInterval)secs
++ (id)dateWithTimeIntervalSinceReferenceDate:(NSTimeInterval)secs
 {
     return AUTORELEASE([[self alloc]
                            initWithTimeIntervalSinceReferenceDate:secs]);
 }
 
-+ (NSDate *)dateWithTimeIntervalSince1970:(NSTimeInterval)seconds
++ (id)dateWithTimeIntervalSince1970:(NSTimeInterval)seconds
 {
     return AUTORELEASE([[self alloc] initWithTimeIntervalSince1970:seconds]);
 }
 
-+ (NSDate *)distantFuture
++ (id)distantFuture
 {
     if (distantFuture == nil) {
         distantFuture = [[self alloc]
@@ -99,7 +99,7 @@ static NSDate *distantFuture = nil, *distantPast = nil;
     return distantFuture;
 }
 
-+ (NSDate *)distantPast
++ (id)distantPast
 {
     if (distantPast == nil) {
         distantPast = [[self alloc] 
@@ -128,14 +128,14 @@ static NSDate *distantFuture = nil, *distantPast = nil;
     return self;
 }
 
-- (NSDate *)initWithTimeInterval:(NSTimeInterval)secsToBeAdded 
-       sinceDate:(NSDate *)anotherDate
+- (id)initWithTimeInterval:(NSTimeInterval)secsToBeAdded 
+  sinceDate:(NSDate *)anotherDate
 {
     return [self initWithTimeIntervalSinceReferenceDate:
            (secsToBeAdded + [anotherDate timeIntervalSinceReferenceDate])];
 }
 
-- (NSDate *)initWithTimeIntervalSinceNow:(NSTimeInterval)secsToBeAddedToNow
+- (id)initWithTimeIntervalSinceNow:(NSTimeInterval)secsToBeAddedToNow
 {
     [self initWithTimeIntervalSinceReferenceDate:
        (secsToBeAddedToNow + [NSDate timeIntervalSinceReferenceDate])];
@@ -303,7 +303,7 @@ static NSDate *distantFuture = nil, *distantPast = nil;
            anotherDate : self;
 }
 
-- (NSComparisonResult)compare:(NSDate *)other
+- (NSComparisonResult)compare:(id)other
 {
     [self subclassResponsibility:_cmd];
     return NSOrderedSame;
@@ -321,8 +321,8 @@ static NSDate *distantFuture = nil, *distantPast = nil;
 }
 
 /* Converting to an NSCalendar Object */
-- (NSCalendarDate *)dateWithCalendarFormat:(NSString *)aFormatString
-       timeZone:(NSTimeZone *)aTimeZone
+- (id)dateWithCalendarFormat:(NSString *)aFormatString
+  timeZone:(NSTimeZone *)aTimeZone
 {
     id new = AUTORELEASE([[NSCalendarDate alloc] 
                              initWithTimeIntervalSinceReferenceDate:
index c014d9e3a098dabe64f67ca0584da8090e7d082c..359c53dab4d7951e814fee5dbc45e8916483dd6e 100644 (file)
@@ -158,7 +158,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
 {
   return [self initWithInt:value ? 1 : 0];
 }
-- (id)initWithChar:(char)value
+- (id)initWithChar:(signed char)value
 {
   return [self initWithInt:value];
 }
@@ -166,7 +166,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
 {
   return [self initWithInt:value];
 }
-- (id)initWithShort:(short)value
+- (id)initWithShort:(signed short)value
 {
   return [self initWithInt:value];
 }
@@ -175,7 +175,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
   return [self initWithInt:value];
 }
 
-- (id)initWithInt:(int)value
+- (id)initWithInt:(signed int)value
 {
   NSDecimal d;
   d.exponent   = 0;
@@ -198,7 +198,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
   return [self initWithDecimal:d];
 }
 
-- (id)initWithLong:(long)value
+- (id)initWithLong:(signed long)value
 {
   NSDecimal d;
   d.exponent   = 0;
@@ -221,7 +221,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
   return [self initWithDecimal:d];
 }
 
-- (id)initWithLongLong:(long long)value
+- (id)initWithLongLong:(signed long long)value
 {
   NSDecimal d;
   d.exponent   = 0;
@@ -308,7 +308,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
 {
   return [self intValue] ? YES : NO;
 }
-- (char)charValue
+- (signed char)charValue
 {
   return [self intValue];
 }
@@ -316,7 +316,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
 {
   return [self intValue];
 }
-- (short)shortValue
+- (signed short)shortValue
 {
   return [self intValue];
 }
@@ -331,7 +331,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
     return self->decimal.mantissa;
   return [self doubleValue];
 }
-- (long)longValue
+- (signed long)longValue
 {
   return [self doubleValue];
 }
@@ -341,7 +341,7 @@ static NSDecimalNumber *nan  = nil; // THREAD
     return self->decimal.mantissa;
   return [self doubleValue];
 }
-- (long long)longLongValue
+- (signed long long)longLongValue
 {
   return [self doubleValue];
 }
index 2d71dca23d0f4ceb992b203ac4b45cb689ff7fc2..0bc17e3ebd5393758ee909af7507f2a5f493b1db 100644 (file)
@@ -100,8 +100,8 @@ static inline void _memoryExhausted(void **p, unsigned size)
 #if DEBUG
     if ((logAlloc != (void*)-1) && (logAlloc != NULL)) {
         fprintf(logAlloc,
-                "zmalloc: 0x%08X size=%d zone=0x%08X\n",
-                (unsigned)p, size, (unsigned)self);
+                "zmalloc: 0x%p size=%d zone=0x%p\n",
+                p, size, self);
     }
 #endif
     
@@ -116,8 +116,7 @@ static inline void _memoryExhausted(void **p, unsigned size)
 #if DEBUG
     if ((logAlloc != (void*)-1) && (logAlloc != NULL)) {
         fprintf(logAlloc,
-                "zmalloc-a: 0x%08X size=%d zone=0x%08X\n",
-                (unsigned)p, size, (unsigned)self);
+                "zmalloc-a: 0x%p size=%d zone=0x%p\n", p, size, self);
     }
 #endif
     
@@ -132,8 +131,8 @@ static inline void _memoryExhausted(void **p, unsigned size)
 #if DEBUG
     if ((logAlloc != (void*)-1) && (logAlloc != NULL)) {
         fprintf(logAlloc,
-                "zcalloc: 0x%08X size=%d (%d * %d) zone=0x%08X\n",
-                (unsigned)p, count*size, count, size, (unsigned)self);
+                "zcalloc: 0x%p size=%d (%d * %d) zone=0x%p\n",
+                p, count*size, count, size, self);
     }
 #endif
     
@@ -148,8 +147,8 @@ static inline void _memoryExhausted(void **p, unsigned size)
 #if DEBUG
     if ((logAlloc != (void*)-1) && (logAlloc != NULL)) {
         fprintf(logAlloc,
-                "zcalloc-a: 0x%08X size=%d (%d * %d) zone=0x%08X\n",
-                (unsigned)p, count*size, count, size, (unsigned)self);
+                "zcalloc-a: 0x%p size=%d (%d * %d) zone=0x%p\n",
+                p, count*size, count, size, self);
     }
 #endif
     
@@ -168,8 +167,8 @@ static inline void _memoryExhausted(void **p, unsigned size)
 #if DEBUG
     if ((logAlloc != (void*)-1) && (logAlloc != NULL)) {
         fprintf(logAlloc,
-                "zrealloc: 0x%08X->0x%08X size=%d zone=0x%08X\n",
-                (unsigned)p, (unsigned)new_p, size, (unsigned)self);
+                "zrealloc: 0x%p->0x%p size=%d zone=0x%p\n",
+                p, new_p, size, self);
     }
 #endif
     
@@ -186,8 +185,7 @@ static inline void _memoryExhausted(void **p, unsigned size)
     if (p) {
 #if DEBUG
         if ((logAlloc != (void*)-1) && (logAlloc != NULL)) {
-            fprintf(logAlloc, "zfree: 0x%08X zone=0x%08X\n",
-                    (unsigned)p, (unsigned)self);
+            fprintf(logAlloc, "zfree: 0x%p zone=0x%p\n", p, self);
         }
 #endif
        objc_free(p);
index 5794abaefb9fb6c4c83584314517183bc13bb78a..71216541a06464cb14d3c145dc8caef9cd557c29 100644 (file)
@@ -71,7 +71,8 @@
 + (id)allocWithZone:(NSZone *)zone
 {
     return NSAllocateObject( (self == [NSDictionary class]) ? 
-           [NSConcreteHashDictionary class] : self, 0, zone);
+                            [NSConcreteHashDictionary class] : (Class)self,
+                            0, zone);
 }
 + (id)allocWithZone:(NSZone *)_zone forCapacity:(unsigned)_capacity {
     if (self == [NSDictionary class]) {
@@ -478,7 +479,7 @@ static NSArray *emptyArray = nil;
        value = [self objectForKey:key];
 
 #if DEBUG
-        NSAssert3(value, @"got no value for key %@ in 0x%08X<%@>",
+        NSAssert3(value, @"got no value for key %@ in 0x%p<%@>",
                   key, self, NSStringFromClass([self class]));
 #endif
         descHolder->keyDescription =
@@ -718,12 +719,14 @@ static NSArray *emptyArray = nil;
 
 + (id)allocWithZone:(NSZone *)zone
 {
-    return NSAllocateObject( (self == [NSMutableDictionary class]) ? 
-           [NSConcreteMutableDictionary class] : self, 0, zone);
+    return NSAllocateObject( (self == [NSMutableDictionary class]) 
+                            ? [NSConcreteMutableDictionary class]
+                            : (Class)self, 0, zone);
 }
 + (id)allocWithZone:(NSZone *)zone forCapacity:(unsigned)_capacity {
-    return NSAllocateObject( (self == [NSMutableDictionary class]) ? 
-           [NSConcreteMutableDictionary class] : self, 0, zone);
+    return NSAllocateObject( (self == [NSMutableDictionary class]) 
+                            ?  [NSConcreteMutableDictionary class] 
+                            : (Class)self, 0, zone);
 }
 
 + (id)dictionaryWithCapacity:(unsigned int)aNumItems
index ca6ad1e81cae3fd5295b396795403790838255e6..55b0466abd13089f968766097e649b70a11dd21e 100644 (file)
@@ -79,17 +79,17 @@ static NSUncaughtExceptionHandler* uncaughtHandler = _default_exception_handler;
 #endif
 
 static NSHandler firstExceptionHandler;
-static NSHandler* lastHandler = NULL;
-static BOOL isMultiThreaded = NO;
+static NSHandler *lastHandler    = NULL;
+static BOOL      isMultiThreaded = NO;
 
-void _init_first_exception_handler(NSHandlerhandler)
+void _init_first_exception_handler(NSHandler *handler)
 {
-static BOOL initialized = NO;
+    static BOOL initialized = NO;
     if (!initialized) {
             handler->previousHandler = NULL;
             memset(&(handler->jmpState), 0, sizeof(jmp_buf));
 #ifndef BROKEN_COMPILER
-            handler->handler = _default_exception_handler;
+            handler->handler = (THandlerFunction)_default_exception_handler;
 #endif
     }
 }
@@ -252,11 +252,13 @@ void _NSRemoveHandler(NSHandler *handler)
 - (NSString *)descriptionWithLocale:(NSDictionary *)locale
 {
     return [NSString stringWithFormat:
-       @"(Exception name:%@ class:%@ reason:%@ info:%@)",
-       name ? name : @"<nil>",
-       NSStringFromClass(isa),
-       reason ? reason : @"<nil>",
-       userInfo ? [userInfo descriptionWithLocale:locale] : @"<nil>"];
+                      @"(Exception name:%@ class:%@ reason:%@ info:%@)",
+                    name ? name : (NSString *)@"<nil>",
+                    NSStringFromClass(isa),
+                    reason ? reason : (NSString *)@"<nil>",
+                    userInfo
+                    ? [userInfo descriptionWithLocale:locale]
+                    : (NSString *)@"<nil>"];
 }
 
 - (NSString *)description
@@ -361,12 +363,13 @@ NSUncaughtExceptionHandler *NSGetUncaughtExceptionHandler(void)
 #ifdef BROKEN_COMPILER
         return uncaughtHandler;
 #else
-        return firstExceptionHandler.handler;
+        return (NSUncaughtExceptionHandler *)firstExceptionHandler.handler;
 #endif
     }
-    else
+    else {
         return [[[NSThread currentThread] _privateThreadData]
-                   uncaughtExceptionHandler];
+                           uncaughtExceptionHandler];
+    }
 }
 
 void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *handler)
@@ -377,7 +380,7 @@ void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *handler)
 #ifdef BROKEN_COMPILER
         uncaughtHandler = handler;
 #else
-        firstExceptionHandler.handler = handler;
+        firstExceptionHandler.handler = (THandlerFunction)handler;
 #endif
     }
     else
index e1c064b085fcf81da622f2d988121bdbb64157d5..0a59ef61b2d38f214088693c3788d81db42dbfc1 100644 (file)
@@ -51,7 +51,7 @@ static NSFileHandle *nullDevice = nil;
 {
     return (self == [NSFileHandle class])
        ? [NSConcreteFileHandle allocWithZone:zone] 
-       : NSAllocateObject(self, 0, zone);
+       : (id)NSAllocateObject(self, 0, zone);
 }
 
 + (id)fileHandleForReadingAtPath:(NSString*)path
index 786e074dffa448c5b050689d8be160ddc76eb089..c971102757ead31987cf8dc664cb6443fb1f72d4 100644 (file)
@@ -572,9 +572,10 @@ extern NSRecursiveLock* libFoundationLock;
                NSDictionary *errorInfo;
                 errorInfo =
                    [NSDictionary dictionaryWithObjectsAndKeys:
-                                    path ? path : @"<nil>", @"Path",
+                                   path ? path : (NSString *)@"<nil>", 
+                                   @"Path",
                                     @"cannot remove file", @"Error",
-                                    nil];
+                                 nil];
                if (![handler fileManager:self
                              shouldProceedAfterError:errorInfo])
                    return NO;
@@ -611,9 +612,10 @@ extern NSRecursiveLock* libFoundationLock;
     
                     errorInfo =
                    [NSDictionary dictionaryWithObjectsAndKeys:
-                                        path ? path : @"<nil>", @"Path",
-                                        @"cannot remove directory", @"Error",
-                                        nil];
+                                   path ? path : (NSString *)@"<nil>", 
+                                   @"Path",
+                                   @"cannot remove directory", @"Error",
+                                 nil];
                if (![handler fileManager:self
                              shouldProceedAfterError:errorInfo])
                    return NO;
index f29ebb4cb97b90988b4dd9ec3384a4b5307b6458..e763d2472e09fad68db81372e8b7ac4b0c2aba95 100644 (file)
@@ -188,7 +188,7 @@ static NSRecursiveLock     *hostsLock = nil;
 
 - (NSString *)description
 {
-    return [NSString stringWithFormat:@"<0x%08X[%@]: names=%@, addresses=%@>",
+    return [NSString stringWithFormat:@"<0x%p[%@]: names=%@, addresses=%@>",
                        self, NSStringFromClass([self class]),
                        [self->names componentsJoinedByString:@","],
                        [self->addresses componentsJoinedByString:@","]];
@@ -270,7 +270,7 @@ static NSRecursiveLock     *hostsLock = nil;
     }
 
     ipAddress.s_addr = inet_addr((char*)[address cString]);
-    if (ipAddress.s_addr == (unsigned long)-1) {
+    if (ipAddress.s_addr == INADDR_NONE) {
         RELEASE(self);
         return nil;
     }
index f8d44ede75b7e955adf7a55c357c7a2f43d3e878..597597d3739d84532ef1f34fd8261d9cb759cdd2 100644 (file)
@@ -81,7 +81,7 @@
     {
        bytes = mmap(0, length, PROT_READ, MAP_SHARED,
                     [file fileDescriptor], 0);
-       if ((int)bytes == -1) {
+       if ((long)bytes == -1L) {
            bytes = NULL;
            (void)AUTORELEASE(self);
            return nil;
index cb3b573f6d61028cfff18a0dd3eea15221e9683a..b56f46ef3a339981206fb0c57906c7317efce13f 100644 (file)
@@ -84,11 +84,11 @@ static NSMapTable *methodSignatureCache = NULL;
 #endif
 }
 
-+ (NSMethodSignature*)signatureWithObjCTypes:(const char*)_types
++ (NSMethodSignature *)signatureWithObjCTypes:(const char *)_types
 {
     extern NSLock       *libFoundationLock;
     NSMethodSignature   *signature;
-    const unsigned char *p;
+    const char *p;
 
     if(_types == NULL) {
        [[[InvalidArgumentException new]
index 532934f6b2146040585064cdde4ff1e46418d9e7..e45f97cf657a7f3bb1743f4a15461df1a4fd102c 100644 (file)
 
 + allocWithZone:(NSZone *)zone
 {
-    return NSAllocateObject( (self == [NSNotification class]) ? 
-           [NSConcreteNotification class] : self, 0, zone);
+    return NSAllocateObject( (self == [NSNotification class])
+                            ? [NSConcreteNotification class] : (Class)self, 
+                            0, zone);
 }
 
 + (NSNotification *)notificationWithName:(NSString *)name object:object
index 9f985bfd7ed43c282d6452621d9dbe7b9ca3e90b..0498aaa62e3294936b7a4b7abfe2b9009410ab9a 100644 (file)
 
 - (NSString *)description
 {
-    return [NSString stringWithFormat:@"<%@ 0x%08X: observer=%@ sel=%@>",
+    return [NSString stringWithFormat:@"<%@ 0x%p: observer=%@ sel=%@>",
                        NSStringFromClass([self class]), self,
                        self->observer, NSStringFromSelector(self->selector)
                      ];
@@ -472,9 +472,7 @@ static BOOL isMultiThreaded = NO;
     if (notificationName == nil)
        reg = nullNameToObjects;
     else {
-       notificationName
-            = AUTORELEASE([notificationName
-                              copyWithZone:[notificationName zone]]);
+       notificationName = AUTORELEASE([notificationName copy]);
        reg = NSMapGet (nameToObjects, notificationName);
        if (!reg) {
            reg = AUTORELEASE([[NSNotificationObjectRegister alloc] init]);
index b849b815d6ddf197a29721038888c80e9289fed6..d2a0fc2ad83e8525dff54fef7289a0fc861f1b6f 100644 (file)
@@ -258,8 +258,8 @@ static NSNotificationQueue *defaultQueue = nil;
 
 /* Inserting and Removing Notifications From a Queue */
 
-- (void)dequeueNotificationsMatching:(NSNotification*)notification
-  coalesceMask:(NSNotificationCoalescing)coalesceMask
+- (void)dequeueNotificationsMatching:(NSNotification *)notification
+  coalesceMask:(unsigned int)coalesceMask /* NSNotificationCoalescing */
 {
     NSNotificationQueueRegistration* item;
     NSNotificationQueueRegistration* next;
@@ -270,34 +270,30 @@ static NSNotificationQueue *defaultQueue = nil;
     for (item = self->asapQueue->tail; item; item=next) {
        next = item->next;
        if ((coalesceMask & NSNotificationCoalescingOnName)
-           && [name isEqual:item->name]) 
-           {
-               remove_from_queue(self->asapQueue, item, self->zone);
-               continue;
-           }
+           && [name isEqual:item->name]) {
+           remove_from_queue(self->asapQueue, item, self->zone);
+           continue;
+       }
        if ((coalesceMask & NSNotificationCoalescingOnSender)
-           && (object == item->object))
-           {
-               remove_from_queue(self->asapQueue, item, self->zone);
-               continue;
-           }
+           && (object == item->object)) {
+           remove_from_queue(self->asapQueue, item, self->zone);
+           continue;
+       }
     }
     
     // find in idle notification in queue
     for (item = self->idleQueue->tail; item; item=next) {
        next = item->next;
        if ((coalesceMask & NSNotificationCoalescingOnName)
-           && [name isEqual:item->name]) 
-           {
-               remove_from_queue(self->asapQueue, item, self->zone);
-               continue;
-           }
+           && [name isEqual:item->name]) {
+           remove_from_queue(self->asapQueue, item, self->zone);
+           continue;
+       }
        if ((coalesceMask & NSNotificationCoalescingOnSender)
-           && (object == item->object))
-           {
-               remove_from_queue(self->asapQueue, item, self->zone);
-               continue;
-           }
+           && (object == item->object)) {
+           remove_from_queue(self->asapQueue, item, self->zone);
+           continue;
+       }
     }
 }
 
@@ -313,11 +309,12 @@ static NSNotificationQueue *defaultQueue = nil;
     else {
        int i;
        
-       for (i = [modes count]-1; i >= 0; i--)
+       for (i = [modes count]-1; i >= 0; i--) {
            if ([mode isEqual:[modes objectAtIndex:i]]) {
                ok = YES;
                break;
            }
+       }
     }
     
     // if mode is valid then post
@@ -337,17 +334,17 @@ static NSNotificationQueue *defaultQueue = nil;
           forModes:nil];
 }
 
-- (void)enqueueNotification:(NSNotification*)notification
+- (void)enqueueNotification:(NSNotification *)notification
   postingStyle:(NSPostingStyle)postingStyle
-  coalesceMask:(NSNotificationCoalescing)coalesceMask
-  forModes:(NSArray*)modes
+  coalesceMask:(unsigned int)coalesceMask /* NSNotificationCoalescing */
+  forModes:(NSArray *)modes
 {
     /* note: this is called in UnixSignalHandler (no malloc allowed) */
     if (coalesceMask != NSNotificationNoCoalescing) {
        [self dequeueNotificationsMatching:notification
               coalesceMask:coalesceMask];
     }
-
+    
     NSAssert(notification, @"missing notification ...");
     
     switch (postingStyle) {
index ceb197fa67f5e8b69491abcf736c3989a8139b4c..dacb27089975cd598d1dfa2a9d34e79cac117025 100644 (file)
@@ -33,38 +33,44 @@ static NSNull *sharedNSNull = nil;
 
 + (void)initialize
 {
-  if (sharedNSNull == nil)
-    sharedNSNull = (NSNull*)NSAllocateObject(self, 0, NSDefaultMallocZone());
+    if (sharedNSNull == nil) {
+       sharedNSNull = (NSNull *)
+           NSAllocateObject(self, 0, NSDefaultMallocZone());
+    }
 }
 
-+ (id)null
++ (NSNull *)null
 {
-  return sharedNSNull;
+    return sharedNSNull;
 }
 
 + (id)allocWithZone:(NSZone *)_zone
 {
-  return sharedNSNull;
+    return sharedNSNull;
 }
 + (id)alloc
 {
-  return sharedNSNull;
+    return sharedNSNull;
 }
 
 - (void)dealloc
 {
-  NSLog(@"WARNING: tried to deallocate NSNull !");
+    NSLog(@"WARNING: tried to deallocate NSNull !");
+    
+    /* this is to please gcc 4.1 which otherwise issues a warning (and we
+       don't know the -W option to disable it, let me know if you do ;-)*/
+    if (0) [super dealloc];
 }
 
 /* NSCoding */
 
 - (id)initWithCoder:(NSCoder *)aDecoder
 {
-  if (self == sharedNSNull)
-    return sharedNSNull;
+    if (self == sharedNSNull)
+       return sharedNSNull;
 
-  RELEASE(self);
-  return sharedNSNull;
+    RELEASE(self);
+    return sharedNSNull;
 }
 
 - (void)encodeWithCoder:(NSCoder *)aCoder
@@ -75,56 +81,63 @@ static NSNull *sharedNSNull = nil;
 
 - (id)copy
 {
-  return RETAIN(self);
+    return RETAIN(self);
 }
 - (id)copyWithZone:(NSZone *)zone
 {
-  return RETAIN(self);
+    return RETAIN(self);
 }
 
 - (id)retain
 {
-  return self;
+    return self;
 }
 - (void)release
 {
 }
 - (id)autorelease
 {
-  return self;
+    return self;
 }
 
 /* comparison */
 
 - (NSComparisonResult)compare:(id)_otherObject
 {
-  return (_otherObject == self)
-    ? NSOrderedSame
-    : NSOrderedDescending;
+    return (_otherObject == self)
+       ? NSOrderedSame
+       : NSOrderedDescending;
 }
 
 - (BOOL)boolValue
 {
-  return NO;
+    return NO;
 }
 
 - (NSString *)description
 {
-  return @"<null>";
+    return @"<null>";
 }
 - (NSString *)stringValue
 {
-  return @"";
+    return @"";
 }
 
 - (NSString *)stringRepresentation
 {
   /* encode as empty string in property lists ! */
 #if DEBUG
-  NSLog(@"WARNING(%s): encoded NSNull in property list !",
-        __PRETTY_FUNCTION__);
+    NSLog(@"WARNING(%s): encoded NSNull in property list !",
+         __PRETTY_FUNCTION__);
 #endif
-  return @"\"\"";
+    return @"\"\"";
 }
 
 @end /* NSNull */
+
+/*
+  Local Variables:
+  c-basic-offset: 4
+  tab-width: 8
+  End:
+*/
index 478b60505cffb220bb2726cdd47d5e54ddb3fd4e..09e0345b60cbcf893fb6695065f74c676445aab3 100644 (file)
@@ -121,7 +121,7 @@ static inline NSIntNumber *makeInt(int i)
     return value ? RETAIN(boolYes) : RETAIN(boolNo);
 }
 
-- (id)initWithChar:(char)value
+- (id)initWithChar:(signed char)value
 {
     (void)AUTORELEASE(self);
     return [[NSCharNumber alloc] initValue:&value withObjCType:NULL];
@@ -204,7 +204,7 @@ static inline NSIntNumber *makeInt(int i)
 + (id)allocWithZone:(NSZone*)zone
 {
     return NSAllocateObject((self == [NSNumber class])
-                            ? [NSTemporaryNumber class] : self,
+                            ? [NSTemporaryNumber class] : (Class)self,
                             0, zone);
 }
 
@@ -251,7 +251,7 @@ static inline NSIntNumber *makeInt(int i)
     return value ? boolYes : boolNo;
 }
 
-+ (NSNumber*)numberWithChar:(char)value
++ (NSNumber*)numberWithChar:(signed char)value
 {
     return AUTORELEASE([[NSCharNumber alloc]
                            initValue:&value withObjCType:NULL]);
@@ -328,7 +328,7 @@ static inline NSIntNumber *makeInt(int i)
     return nil;
 }
 
-- (id)initWithChar:(char)value
+- (id)initWithChar:(signed char)value
 {
     [self shouldNotImplement:_cmd];
     return nil;
@@ -443,7 +443,7 @@ static inline NSIntNumber *makeInt(int i)
     return 0;
 }
 
-- (char)charValue
+- (signed char)charValue
 {
     [self subclassResponsibility:_cmd];
     return 0;
index 400c3a15f64fbfe4134dfce4e108af9f6eb96417..ccf81dfd5f92f52fec4f1dff6ce34a7a3c828a60 100644 (file)
@@ -159,7 +159,8 @@ static inline const char *index(const char *cstr, char c) {
 }
 - (NSString *)negativeFormat
 {
-    return self->negativeFormat ? self->negativeFormat : negDefaultFormat;
+    return self->negativeFormat != nil
+       ? self->negativeFormat : (NSString *)negDefaultFormat;
 }
 
 - (void)setPositiveFormat:(NSString *)_format
@@ -167,13 +168,14 @@ static inline const char *index(const char *cstr, char c) {
     _checkFormat(self, _format);
 
     if (self->positiveFormat != _format) {
-        RELEASE(self->positiveFormat);
+        RELEASE(self->positiveFormat); self->positiveFormat = nil;
         self->positiveFormat = [_format copyWithZone:[self zone]];
     }
 }
 - (NSString *)positiveFormat
 {
-    return self->positiveFormat ? self->positiveFormat : posDefaultFormat;
+    return self->positiveFormat
+       ? self->positiveFormat : (NSString *)posDefaultFormat;
 }
 - (NSString *)zeroFormat
 {
@@ -323,7 +325,7 @@ static inline const char *index(const char *cstr, char c) {
     {
         register const unsigned char *cfmt;
         hasThousandSep = NO;
-        if ((cfmt = [format cString])) {
+        if ((cfmt = (const unsigned char *)[format cString]) != NULL) {
             for ( ; *cfmt != '\0' && !hasThousandSep; cfmt++) {
                 if (*cfmt == self->thousandSeparator)
                     hasThousandSep = YES;
index 568bad48cc7b253717b83a2a5e173b2eccf3551c..0cb99dfab82800ad5cab882c16e1865ca28bc980 100644 (file)
@@ -57,7 +57,7 @@ extern NSRecursiveLock* libFoundationLock;
     SEL selector;
 }
 + holderForTarget:(id)target argument:(id)argument selector:(SEL)action;
-- (BOOL)isEqual:anotherHolder;
+- (BOOL)isEqual:(_NSObjectDelayedExecutionHolder *)anotherHolder;
 - (void)execute;
 @end
 
@@ -79,7 +79,7 @@ extern NSRecursiveLock* libFoundationLock;
   return [(NSObject *)self->target hash];
 }
 
-- (BOOL)isEqual:(_NSObjectDelayedExecutionHolder*)anotherHolder
+- (BOOL)isEqual:(_NSObjectDelayedExecutionHolder *)anotherHolder
 {
     return [(NSObject *)self->target isEqual:anotherHolder->target]
            && [(NSObject *)self->argument isEqual:anotherHolder->argument]
@@ -100,6 +100,13 @@ Class lfNSZoneClass = Nil; /* cache NSZone class */
 static BOOL 
 objc_runtime_exception(id object, int code, const char* fmt, va_list ap)
 {
+#if 0
+#  warning TEST LOG, REMOVE ME!
+    printf("ObjC: object=0x%p code=%i\n", object, code);
+    if (fmt != NULL)
+       vprintf(fmt, ap);
+#endif
+    
     [[[ObjcRuntimeException alloc] initWithFormat:
                    @"Objective-C runtime error: %@",
                    Avsprintf([NSString stringWithCString:fmt], ap)] raise];
@@ -160,7 +167,7 @@ static NSMutableDictionary* delayedExecutions = nil;
 - (void)gcFinalize
 {
 #if 1
-    fprintf(stderr, "finalize 0x%08X<%s>\n",
+    fprintf(stderr, "finalize 0x%p<%s>\n",
             self,
             ((*(Class *)self != NULL) ? (*(Class *)self)->name : "NULL"));
     fflush(stderr);
@@ -350,8 +357,9 @@ static NSMutableDictionary* delayedExecutions = nil;
        return nil;
 
     mth = class_get_instance_method(self, aSelector);
-    return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types]
-               : nil;
+    return mth
+       ? [NSMethodSignature signatureWithObjCTypes:mth->method_types]
+       : (NSMethodSignature *)nil;
 }
 
 - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
@@ -609,7 +617,7 @@ static NSMutableDictionary* delayedExecutions = nil;
 - (id)performSelector:(SEL)aSelector withObject:(id)anObject
 {
     struct objc_method  *mth;
-    const unsigned char *argType;
+    const char *argType;
 
     if (aSelector == NULL) {
        [[[ObjcRuntimeException alloc]
index 2d63a80c7ea1bc9853708ea6ac68f102a74a3276..fee44ca65ff699052267d19dbff1c49f7b77c4ca 100644 (file)
@@ -198,8 +198,8 @@ void _check_object_for_leak(void *memory, void *cd)
     }
 
     if ((rc >= 1) && (rc <= 1000)) {
-        fprintf(stderr, "LEAK(rc=%d): 0x%08X<%s>",
-                rc, (unsigned)object, (class ? class->name : "Nil"));
+        fprintf(stderr, "LEAK(rc=%d): 0x%p<%s>",
+                rc, object, (class ? class->name : "Nil"));
 
         if ([object isKindOfClass:[NSString class]]) {
             unsigned slen = [object cStringLength];
@@ -287,12 +287,12 @@ NSObject *NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone)
             aClass->instance_size + extraBytes;
         if (logAlloc) {
             fprintf(logAlloc,
-                    "alloc-#: 0x%08X<%s> size=%d (%d + %d) zone=0x%08X\n",
-                    (unsigned)p, class_get_class_name(aClass),
+                    "alloc-#: 0x%p<%s> size=%d (%d + %d) zone=0x%p\n",
+                    p, class_get_class_name(aClass),
                     (unsigned)(sizeof(struct HashObjectLayout) + 
                       aClass->instance_size + extraBytes),
                     (unsigned)aClass->instance_size, (unsigned)extraBytes,
-                    (unsigned)zone);
+                    zone);
         }
 #endif
        return (NSObject*)p;
@@ -321,13 +321,13 @@ NSObject *NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone)
                               aClass->instance_size + extraBytes);
             
             fprintf(logAlloc,
-                    "alloc-rc: 0x%08X<%s> size=%d (%d + %d) zone=0x%08X\n",
-                    (unsigned)&(p->class_pointer),
+                    "alloc-rc: 0x%p<%s> size=%d (%d + %d) zone=0x%p\n",
+                    &(p->class_pointer),
                     aClass ? class_get_class_name(aClass) : "Nil",
                     size,
                     (unsigned)aClass->instance_size,
                     (unsigned)extraBytes,
-                    (unsigned)zone);
+                    zone);
         }
 #endif
         return (NSObject*)(&(p->class_pointer));
@@ -379,7 +379,7 @@ void NSDeallocateObject(NSObject *anObject)
 #endif
     
 #if LIB_FOUNDATION_BOEHM_GC
-    fprintf(stderr, "WARNING: explicit free of GC object 0x%08X !\n", anObject);
+    fprintf(stderr, "WARNING: explicit free of GC object 0x%p !\n",anObject);
     abort();
     GC_FREE(anObject); anObject = nil;
     return;
@@ -387,8 +387,8 @@ void NSDeallocateObject(NSObject *anObject)
 
 #if DEBUG
     if (logAlloc) {
-        fprintf(logAlloc, "dealloc: 0x%08X<%s>\n",
-                (unsigned)anObject,
+        fprintf(logAlloc, "dealloc: 0x%p<%s>\n",
+                anObject,
                 class_get_class_name(((id)anObject)->class_pointer));
     }
 #endif
@@ -426,7 +426,7 @@ void NSDeallocateObject(NSObject *anObject)
     NSZoneFree(NSZoneFromPointer(p), p);
 
 #if 0
-    fprintf(stderr, "deallocated: 0x%08X\n", anObject);
+    fprintf(stderr, "deallocated: 0x%p\n", anObject);
 #endif
     anObject = nil; p = nil;
 #endif
index 055e0224653be22bbe9e3b836d9062955faec0d7..347b382cdf136a03c9681baee6bad830498a5c67 100644 (file)
@@ -66,7 +66,8 @@ typedef id   (*mId_Id10)  (id, SEL, id, id, id, id, id, id, id, id, id, id);
 
 + (id)allocForArgumentCount:(int)_count zone:(NSZone *)_zone
 {
-    NSObjectInvocation *i = NSAllocateObject(self, _count * sizeof(id), _zone);
+    NSObjectInvocation *i = (NSObjectInvocation *)
+       NSAllocateObject(self, _count * sizeof(id), _zone);
     i->argumentCount = _count;
     return i;
 }
index 07682d4ab1199cd73df7949827496b2d25bb7636..446b8d42a8ec837e662a575b2dd1f228fac71a48 100644 (file)
@@ -507,7 +507,7 @@ static NSString *rootPath = @"/";
                     ([self length]
                      ? [str stringByAppendingString:aString] 
                      : aString)]
-       : AUTORELEASE([self copyWithZone:[self zone]]);
+       : (NSString *)AUTORELEASE([self copyWithZone:[self zone]]);
 }
 
 - (NSArray *)stringsByAppendingPaths:(NSArray *)paths
@@ -529,7 +529,7 @@ static NSString *rootPath = @"/";
     return [aString length]
         ? [self stringByAppendingString:
                     [extensionSeparator stringByAppendingString:aString]] 
-       : AUTORELEASE([self copyWithZone:[self zone]]);
+       : (NSString *)AUTORELEASE([self copyWithZone:[self zone]]);
 }
 
 - (NSString *)stringByDeletingLastPathComponent
@@ -653,7 +653,7 @@ static NSString *rootPath = @"/";
                __PRETTY_FUNCTION__);
        return nil;
     }
-    if (!resolve_symlinks_in_path(source, resolved)) {
+    if (!resolve_symlinks_in_path(source, (char *)resolved)) {
         /* 
           previously returned 'nil', which is wrong according to MacOSXS
           Spec 
@@ -664,7 +664,7 @@ static NSString *rootPath = @"/";
         return self;
 #endif
     }
-    return [NSString stringWithCString:resolved];
+    return [NSString stringWithCString:(char *)resolved];
 #endif
 }
 
index 66e76364d29639b650f87b05c5ed48efbd9a251d..159f8b19cc7c7e79e7cd56c38520743dbe4d45d4 100644 (file)
@@ -107,9 +107,10 @@ static NSString *_parseOp(const char *_buf, unsigned _bufLen,
   NSMapTable *predicateCache;
 }
 
-- (NSDictionary *)resultForFunction:(NSString *)_fct atPos:(unsigned)_pos;
+- (NSDictionary *)resultForFunction:(NSString *)_fct
+  atPos:(unsigned long)_pos;
 - (void)setResult:(NSDictionary *)_dict forFunction:(NSString *)_fct
-  atPos:(unsigned)_pos;
+  atPos:(unsigned long)_pos;
 - (id)getObjectFromStackFor:(char)_c;
 
 @end
@@ -250,18 +251,25 @@ static NSString *_parseOp(const char *_buf, unsigned _bufLen,
   [super dealloc];
 }
 
-- (NSDictionary *)resultForFunction:(NSString *)_fct atPos:(unsigned)_pos
+- (NSDictionary *)resultForFunction:(NSString *)_fct atPos:(unsigned long)_p
 {
-  return NSMapGet(self->predicateCache,
-                  [StringClass stringWithFormat:@"%@_%d", _fct, _pos]);
+  NSDictionary *r;
+  NSString *k;
+  
+  k = [[StringClass alloc] initWithFormat:@"%@_%ld", _fct, _p];
+  r = NSMapGet(self->predicateCache, k);
+  [k release];
+  return r;
 }
 
 - (void)setResult:(NSDictionary *)_dict forFunction:(NSString *)_fct
-  atPos:(unsigned)_pos
+  atPos:(unsigned long)_pos
 {
-  NSMapInsert(self->predicateCache,
-              [StringClass stringWithFormat:@"%@_%d", _fct, _pos],
-              _dict);
+  NSString *k;
+  
+  k = [[StringClass alloc] initWithFormat:@"%@_%ld", _fct, _pos];
+  NSMapInsert(self->predicateCache, k, _dict);
+  [k release];
 }
 
 - (id)getObjectFromStackFor:(char)_c {
@@ -580,7 +588,8 @@ static NSPredicate *_parseKeyCompPredicate(id _ctx, const char *_buf,
   unsigned     pos        = 0;
   BOOL         valueIsKey = NO;
 
-  dict = [_ctx resultForFunction:@"parseKeyCompPredicate" atPos:(unsigned)_buf];
+  dict = [_ctx resultForFunction:@"parseKeyCompPredicate" 
+              atPos:(unsigned long)_buf];
   if (dict != nil) {
     if (qDebug)
       NSLog(@"_parseKeyCompQual return <%@> [cached] for <%s> ", dict, _buf);
@@ -649,7 +658,7 @@ static NSPredicate *_parseKeyCompPredicate(id _ctx, const char *_buf,
     [_ctx setResult:
             [NSDictionary dictionaryWithObjects:values forKeys:keys count:2]
           forFunction:@"parseKeyCompPredicate"
-          atPos:(unsigned)_buf];
+          atPos:(unsigned long)_buf];
     *_predLen = pos;
   }
   return qual;
@@ -726,10 +735,11 @@ static NSString *_parseKey(id _ctx, const char *_buf, unsigned _bufLen,
   char         c        = 0;
 
   if (_bufLen == 0) {
-    if (qDebug) NSLog(@"%s: _bufLen == 0 --> return nil", __PRETTY_FUNCTION__);
+    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__,
@@ -803,7 +813,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;
@@ -826,7 +836,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(@"_parseKeyCompPredicate return <%@> [cached] for <%s> ",
@@ -1075,7 +1085,7 @@ 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) {
@@ -1086,7 +1096,7 @@ static id _parseValue(id _ctx, const char *_buf, unsigned _bufLen,
     
     [_ctx setResult:
             [NSDictionary dictionaryWithObjects:values forKeys:keys count:2]
-          forFunction:@"parseValue" atPos:(unsigned)_buf];
+          forFunction:@"parseValue" atPos:(unsigned long)_buf];
     *_keyLen = pos;
   }
   return obj;
index 51d506bb13073807885ab8fb7e525e8db70e108d..d99be8c1bac199dfef5b385ea085217ceb9dda01 100644 (file)
@@ -134,13 +134,19 @@ static char *activityDesc[8] = {
 
 - (void)dealloc
 {
-    RELEASE(self->fileObject); self->fileObject = nil;
+    RELEASE(self->fileObject);
     [super dealloc];
 }
 
-- (BOOL)isEqual:(NSRunLoopFileObjectInfo*)otherInfo
+- (BOOL)isEqual:(id)otherInfo
 {
-    return [self->fileObject isEqual:otherInfo->fileObject];
+    if (otherInfo == nil)
+       return NO;
+    if (*(Class *)self != *(Class *)otherInfo) /* check class */
+       return NO;
+    
+    return [self->fileObject isEqual:
+                   ((NSRunLoopFileObjectInfo *)otherInfo)->fileObject];
 }
 
 - (BOOL)isAlive {
@@ -191,7 +197,7 @@ static char *activityDesc[8] = {
 - (NSString *)description
 {
     return [NSString stringWithFormat:
-                       @"<%@[0x%08X]: object=%@ actitivity=%s>",
+                       @"<%@[0x%p]: object=%@ actitivity=%s>",
                        NSStringFromClass([self class]), self,
                        self->fileObject,
                        activityDesc[self->watchedActivities]
@@ -286,8 +292,15 @@ static char *activityDesc[8] = {
   return [(NSObject *)self->target hash];
 }
 
-- (BOOL)isEqual:(NSRunLoopActionHolder*)anotherHolder
+- (BOOL)isEqual:(id)otherObject
 {
+    NSRunLoopActionHolder *anotherHolder;
+    
+    if ((anotherHolder = otherObject) == nil)
+       return NO;
+    if (![anotherHolder isKindOfClass:[NSRunLoopActionHolder class]])
+       return NO;
+    
     return [self->target isEqual:anotherHolder->target]
            && [argument isEqual:anotherHolder->argument]
            && SEL_EQ(self->action, anotherHolder->action);
@@ -575,11 +588,11 @@ static int compare_fire_dates(id timer1, id timer2, void* userData)
     /* Sort the timers based on their fire date */
     [timers sortUsingFunction:compare_fire_dates context:NULL];
 
-    return [timers count] ? [[timers objectAtIndex:0] fireDate] : nil;
+    return [timers count] > 0
+       ? [[timers objectAtIndex:0] fireDate] : (NSDate *)nil;
 }
 
-- (void)addTimer:(NSTimer*)aTimer
-       forMode:(NSString*)aMode
+- (void)addTimer:(NSTimer *)aTimer forMode:(NSString *)aMode
 {
     [_getInputManager(self, aMode) addTimer:aTimer];
 }
@@ -589,7 +602,7 @@ static int compare_fire_dates(id timer1, id timer2, void* userData)
     id      inputManager, fileObjects;
     NSArray *timers;
     NSDate  *date;
-
+    
     /* Retain the limitDate so it doesn't get released by limitDateForMode:
        if it fires a timer that has as fireDate the limitDate.
        (bug report from Benhur Stein <Benhur-de-Oliveira.Stein@imag.fr>)
@@ -848,7 +861,7 @@ static int compare_fire_dates(id timer1, id timer2, void* userData)
 /* Monitoring file objects */
 
 - (void)addFileObject:(id)_fileObject
-  activities:(NSPosixFileActivities)_activities
+  activities:(unsigned int)_activities /* NSPosixFileActivities */
   forMode:(NSString *)_mode
 {
     [_getInputManager(self, _mode) addFileObject:_fileObject
index be3a949ca73b705c4675f7e6dab7a0a0c4d0e5b1..524fc5e2c91aa3fc8afa91962c4af20be7a7bfd5 100644 (file)
@@ -48,7 +48,7 @@
 + (id)allocWithZone:(NSZone*)zone
 {
     return NSAllocateObject( (self == [NSSet class]) ? 
-           [NSConcreteSet class] : self, 0, zone);
+                            [NSConcreteSet class] : (Class)self, 0, zone);
 }
 
 + (id)set
 + (id)allocWithZone:(NSZone*)zone
 {
     return NSAllocateObject( (self == [NSMutableSet class]) ? 
-           [NSConcreteMutableSet class] : self, 0, zone);
+                            [NSConcreteMutableSet class] : (Class)self,
+                            0, zone);
 }
 
 + (id)setWithCapacity:(unsigned)numItems
index a95e4ab772e66724a302af5fa6d7216e14e022b3..4560d712e47aebf25e078d3e8b386d012a5297b0 100644 (file)
@@ -1002,7 +1002,7 @@ id NSInitStringWithData(NSString *self, NSData *data,
     }
     case NSASCIIStringEncoding: 
     case NSISOLatin1StringEncoding: {
-      self = [self initWithCString:buf length:len];
+      self = [self initWithCString:(char *)buf length:len];
       lfFree(buf);
       return self;
     }
index 9420c8895066de5738bdab8bca647b61d02a7702..b27536f7313f98c6fcafffa2ec48f8f87963b47f 100644 (file)
@@ -1376,9 +1376,9 @@ static Class NSStringClass = Nil;
     if (NSTemporaryStringClass == Nil)
         NSTemporaryStringClass = [NSTemporaryString class];
     
-    return (self == NSStringClass) ? 
-       [NSTemporaryStringClass allocWithZone:zone] 
-       : NSAllocateObject(self, 0, zone);
+    return (self == NSStringClass)
+       [NSTemporaryStringClass allocWithZone:zone] 
+       : (id)NSAllocateObject(self, 0, zone);
 }
 
 + (id)localizedStringWithFormat:(NSString*)format,...
@@ -1485,14 +1485,14 @@ static Class NSStringClass = Nil;
 {
     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
@@ -1642,9 +1642,9 @@ static BOOL (*isWhiteSpaceSetMem)(id, SEL, unichar);
 
 + (id)allocWithZone:(NSZone *)zone
 {
-    return (self == [NSMutableString class]) ? 
-       [NSMutableTemporaryString allocWithZone:zone] 
-       : NSAllocateObject(self, 0, zone);
+    return (self == [NSMutableString class])
+       [NSMutableTemporaryString allocWithZone:zone] 
+       : (id)NSAllocateObject(self, 0, zone);
 }
 
 + (id)stringWithCapacity:(unsigned int)capacity
@@ -1976,6 +1976,10 @@ static Class             NSShortInline8BitStringClass = Nil;
     fprintf (stderr, "ERROR: NSTemporaryString %s to be deallocated!\n", 
              isa->name);
     abort ();
+
+    /* this is to please gcc 4.1 which otherwise issues a warning (and we
+       don't know the -W option to disable it, let me know if you do ;-)*/
+    if (0) [super dealloc];
 }
 
 static inline void _collectTemporary(NSTemporaryString *self)
@@ -2612,6 +2616,10 @@ static NSMutableTemporaryString *temporaryMutableStringsPool = nil;
 {
     fprintf(stderr,"NSMutableTemporaryString %s to be deallocated!\n",isa->name);
     abort();
+
+    /* this is to please gcc 4.1 which otherwise issues a warning (and we
+       don't know the -W option to disable it, let me know if you do ;-)*/
+    if (0) [super dealloc];
 }
 
 static inline void _collectMutableTemporary(NSMutableTemporaryString *self)
index 322144322787c5c12ccec0a69865e5dec0390948..a52f7c456e19546d2b6d0fcc2eded4cd1443bac1 100644 (file)
@@ -53,8 +53,10 @@ NSString *NSTaskDidTerminateNotification = @"NSTaskDidTerminateNotification";
 
 + (id)allocWithZone:(NSZone*)zone
 {
-    NSTask *task = NSAllocateObject((self == [NSTask class]) ? 
-                                    [NSConcreteTask class] : self, 0, zone);
+    NSTask *task = (NSTask *)
+       NSAllocateObject((self == [NSTask class])
+                        ? [NSConcreteTask class] : (Class)self,
+                        0, zone);
     return task;
 }
 
index d3b5b544eff4524de48e4f1c6febff42ece537b8..0cc6c8e5a1a9467544b06edf50133a1f134f4415 100644 (file)
     too often.
  */
 
+@interface NSException(UsedPrivates)
++ (void)taskNowMultiThreaded:(NSNotification *)_notification;
+@end
+
+@interface NSNotificationCenter(UsedPrivates)
++ (void)taskNowMultiThreaded:(NSNotification *)_notification;
+@end
+
 /* NSThread notifications */
 
 LF_DECLARE NSString* NSWillBecomeMultiThreadedNotification = 
index 44abb028ddbd577f2c20e5653e260fcd775d68fd..1d348ad1b90cd26e30c8bf318e8a33d61a85e0dc 100644 (file)
@@ -101,7 +101,7 @@ static NSTimeZone          *localTimeZone          = nil;
     didInit = YES;
 
     {
-        id           regionsDictionary;
+        NSDictionary *regionsDictionary;
         id           regionsFile = nil;
         NSString     *offset;
         NSEnumerator *enumerator;
@@ -291,7 +291,7 @@ static NSTimeZone          *localTimeZone          = nil;
     NSTimeZoneDetail* detail;
     NSTimeZone*       timeZone;
     int               i, j, count1, count2;
-    unsigned          char buf[16];
+    char              buf[16];
     
     hours   = abs (seconds) / 3600;
     minutes = (abs (seconds) - hours * 3600) / 60;
index ea341ecb96967aa311a0078e5f1f128693d9e89a..53cfae2f8b612e600dfed36e93206f5241ae6d36 100644 (file)
@@ -977,7 +977,7 @@ static Class _NSRelativeURLClass = Nil;
     
     if ((self = [super initWithScheme:_scheme host:_host path:_path])) {
         self->host = [_host copy];
-        self->path = [_path length] > 0 ? [_path copy] : @"/";
+        self->path = [_path length] > 0 ? [_path copy] : (id)@"/";
     }
     return self;
 }
@@ -999,7 +999,7 @@ static Class _NSRelativeURLClass = Nil;
 {
     return self->port > 0
        ? [NSNumber numberWithUnsignedInt:self->port]
-       : nil;
+       : (NSNumber *)nil;
 }
 
 - (NSString *)fragment
@@ -1233,7 +1233,7 @@ static Class _NSRelativeURLClass = Nil;
     if ((self = [super initWithScheme:_scheme host:_host path:_path])) {
         self->scheme = [_scheme copy];
         self->host   = [_host copy];
-        self->path   = [_path length] > 0 ? [_path copy] : @"/";
+        self->path   = [_path length] > 0 ? [_path copy] : (id)@"/";
     }
     return self;
 }
@@ -1256,7 +1256,7 @@ static Class _NSRelativeURLClass = Nil;
 {
     return self->port > 0
        ? [NSNumber numberWithUnsignedInt:self->port]
-       : nil;
+       : (NSNumber *)nil;
 }
 
 - (NSString *)fragment
index 2f69b69a32d3826f2da1270ac81c24935043ac64..24a2371d8ed1fe21264b50c72bdad778c6fa8d6e 100644 (file)
@@ -256,7 +256,8 @@ LF_DECLARE NSString *NSNegativeCurrencyFormatString = @"NSNegativeCurrencyFormat
 
 - (void)removeObjectForKey:(NSString*)defaultName
 {
-    NSMutableDictionary *domain = [self persistentDomainForName:appDomain];
+    NSMutableDictionary *domain = (NSMutableDictionary *)
+       [self persistentDomainForName:appDomain];
     [domain removeObjectForKey:defaultName];
     [self persistentDomainHasChanged:appDomain];
 }
@@ -599,7 +600,7 @@ static NSString*       sharedDefaultsDir = nil;
     if (sharedDefaults == nil) {
        if (sharedDefaultsDir) {
             sharedDefaults = (id)
-                [[NSSharedUserDefaults alloc]
+                [(NSSharedUserDefaults *)[NSSharedUserDefaults alloc]
                                        initWithPath:sharedDefaultsDir];
        }
        else {
@@ -647,7 +648,8 @@ static NSString*       sharedDefaultsDir = nil;
 #endif            
 
            sharedDefaults = (id)
-                [[NSSharedUserDefaults alloc] initWithPath:defdir];
+                [(NSSharedUserDefaults *)[NSSharedUserDefaults alloc] 
+                                        initWithPath:defdir];
        }
        [sharedDefaults makeStandardDomainSearchList];
     }
index b40211315779fb7e3461a0a344f9dda139ae281b..78463bfd08e3f8c436a6e65029f10afca0d85af1 100644 (file)
@@ -31,7 +31,7 @@
 @class NSString;
 @class NSDictionary;
 
-@interface NSValue : NSObject
+@interface NSValue : NSObject < NSCopying, NSCoding >
 
 // Internal method to determine concrete value class
 
 // Allocating and Initializing
 
 - (id)initWithBool:(BOOL)value;
-- (id)initWithChar:(char)value;
+- (id)initWithChar:(signed char)value;
 - (id)initWithUnsignedChar:(unsigned char)value;
-- (id)initWithShort:(short)value;
+- (id)initWithShort:(signed short)value;
 - (id)initWithUnsignedShort:(unsigned short)value;
-- (id)initWithInt:(int)value;
+- (id)initWithInt:(signed int)value;
 - (id)initWithUnsignedInt:(unsigned int)value;
-- (id)initWithLong:(long)value;
+- (id)initWithLong:(signed long)value;
 - (id)initWithUnsignedLong:(unsigned long)value;
-- (id)initWithLongLong:(long long)value;
+- (id)initWithLongLong:(signed long long)value;
 - (id)initWithUnsignedLongLong:(unsigned long long)value;
 - (id)initWithFloat:(float)value;
 - (id)initWithDouble:(double)value;
 
 + (NSNumber*)numberWithBool:(BOOL)value; 
-+ (NSNumber*)numberWithChar:(char)value;
++ (NSNumber*)numberWithChar:(signed char)value;
 + (NSNumber*)numberWithUnsignedChar:(unsigned char)value;
-+ (NSNumber*)numberWithShort:(short)value;
++ (NSNumber*)numberWithShort:(signed short)value;
 + (NSNumber*)numberWithUnsignedShort:(unsigned short)value;
-+ (NSNumber*)numberWithInt:(int)value;
++ (NSNumber*)numberWithInt:(signed int)value;
 + (NSNumber*)numberWithUnsignedInt:(unsigned int)value;
-+ (NSNumber*)numberWithLong:(long)value;
++ (NSNumber*)numberWithLong:(signed long)value;
 + (NSNumber*)numberWithUnsignedLong:(unsigned long)value;
-+ (NSNumber*)numberWithLongLong:(long long)value;
++ (NSNumber*)numberWithLongLong:(signed long long)value;
 + (NSNumber*)numberWithUnsignedLongLong:(unsigned long long)value;
 + (NSNumber*)numberWithFloat:(float)value;
 + (NSNumber*)numberWithDouble:(double)value;
 // Accessing Data 
 
 - (BOOL)boolValue;
-- (char)charValue;
+- (signed char)charValue;
 - (unsigned char)unsignedCharValue;
-- (short)shortValue;
+- (signed short)shortValue;
 - (unsigned short)unsignedShortValue;
-- (int)intValue;
+- (signed int)intValue;
 - (unsigned int)unsignedIntValue;
-- (long)longValue;
+- (signed long)longValue;
 - (unsigned long)unsignedLongValue;
-- (long long)longLongValue;
+- (signed long long)longLongValue;
 - (unsigned long long)unsignedLongLongValue;
 - (float)floatValue;
 - (double)doubleValue;
 
 // Converting to string
 
-- (NSString*)stringValue;
-- (NSString*)descriptionWithLocale:(NSDictionary*)locale;
-- (NSString*)description;
+- (NSString *)stringValue;
+- (NSString *)descriptionWithLocale:(NSDictionary*)locale;
+- (NSString *)description;
 
 // Comparing Data 
 
index fa1864ff93890d612019ab5be4902c64f13c6be3..a8776ab7b819bd391d1ea129ef88fd9b3bf3cd4b 100644 (file)
@@ -96,7 +96,7 @@ static ZoneListNode* removeZoneFromList (NSZone* aZone)
        }
 
        /* curr should not be NULL, but who knows... */
-       NSCAssert1(curr, @"curr zone node ptr is NULL (prev=0x%08X)", prev);
+       NSCAssert1(curr, @"curr zone node ptr is NULL (prev=0x%p)", prev);
 
        prev->next = curr->next;
        curr->next = NULL;
@@ -301,6 +301,10 @@ static ZoneListNode* removeZoneFromList (NSZone* aZone)
 
     objc_free(node);
     objc_free(self);
+    
+    /* this is to please gcc 4.1 which otherwise issues a warning (and we
+       don't know the -W option to disable it, let me know if you do ;-)*/
+    if (0) [super dealloc];
 }
 
 - (oneway void)release
index ed3f315d4364880cfc6cc606b09c9d3ba004c1d0..78d36223c38478cfde44eb0717d2a18c5bcf53bd 100644 (file)
@@ -83,8 +83,8 @@
 
 - (NSString*)convertString:(va_list*)pString scanner:(FormatScanner*)scanner
 {
-    charstring = va_arg(*pString, char*);
-    return string ? [NSString stringWithCString:string] : @"";
+    char *string = va_arg(*pString, char*);
+    return string ? [NSString stringWithCString:string] : (id)@"";
 }
 
 - (NSString*)convertFloat:(va_list*)pFloat scanner:(FormatScanner*)scanner
index 1f8736e10b78a38c4aa5db11f5746d0758a40700..2050fa92c7219c868a5bd585496acd948d652dd3 100644 (file)
@@ -94,7 +94,7 @@
     exceptionStack = handler;
 }
 
-- (NSUncaughtExceptionHandler*)uncaughtExceptionHandler
+- (NSUncaughtExceptionHandler *)uncaughtExceptionHandler
 {
 #ifdef BROKEN_COMPILER
     return uncaughtExceptionHandler;
 
     while (ex->previousHandler)
         ex = ex->previousHandler;
-    return ex->handler;
+    return (NSUncaughtExceptionHandler *)ex->handler;
 #endif
 }
 
 
     while (ex->previousHandler)
         ex = ex->previousHandler;
-    ex->handler = handler;
+    ex->handler = (THandlerFunction)handler;
 #endif
 }
 
index 0452f33d1863d2c94a47f6d8588fce47ba968741..4901d7b8e3e3ec77faeb84017ddae8d00f6f3e9f 100644 (file)
@@ -634,7 +634,7 @@ static NSException *_makeException(NSException *_exception,
                     forKey:@"lastLine"];
             }
             else {
-                NSLog(@"%s: startPos=0x%08X endPos=0x%08X",
+                NSLog(@"%s: startPos=0x%p endPos=0x%p",
                       __PRETTY_FUNCTION__, startPos, endPos);
             }
         }
index 57a6dc6b7e805bc7284490dd86def8ee26603987..63a3b7b759faf0a54d7eec36c9323301e9477831 100644 (file)
@@ -139,7 +139,7 @@ NSString *NSParseStringFromBuffer(const unsigned char *_buffer, unsigned _len)
        return nil;
     }
     
-    s = [[NSString alloc] initWithCString:_buffer length:_len];
+    s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
     result = NSParseStringFromString(s);
     [s release];
     return result;
@@ -157,7 +157,7 @@ NSArray *NSParseArrayFromBuffer(const unsigned char *_buffer, unsigned _len)
        return nil;
     }
     
-    s = [[NSString alloc] initWithCString:_buffer length:_len];
+    s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
     result = NSParseArrayFromString(s);
     [s release];
     return result;
@@ -176,7 +176,7 @@ NSDictionary *NSParseDictionaryFromBuffer(const unsigned char *_buffer,
        return nil;
     }
     
-    s = [[NSString alloc] initWithCString:_buffer length:_len];
+    s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
     result = NSParseDictionaryFromString(s);
     [s release];
     return result;
@@ -283,7 +283,7 @@ id NSParsePropertyListFromBuffer(const unsigned char *_buffer, unsigned _len)
        return nil;
     }
     
-    s = [[NSString alloc] initWithCString:_buffer length:_len];
+    s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
     result = NSParsePropertyListFromString(s);
     [s release];
     return result;
@@ -344,7 +344,7 @@ id NSParseStringsFromBuffer(const unsigned char *_buffer, unsigned _len)
     NSDictionary *result;
     NSString     *s;
     
-    s = [[NSString alloc] initWithCString:_buffer length:_len];
+    s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
     result = NSParseStringsFromString(s);
     [s release];
     return result;
@@ -558,7 +558,7 @@ static NSException *_makeException(NSException *_exception,
                [s release];
             }
             else {
-                NSLog(@"%s: startPos=0x%08X endPos=0x%08X",
+                NSLog(@"%s: startPos=0x%p endPos=0x%p",
                       __PRETTY_FUNCTION__, startPos, endPos);
             }
         }
index 24333b27aecbcb1051e66f9e6ff4b959aab0a403..2ca4ad82479b8da381ac9a735e86826667a9cc42 100644 (file)
@@ -68,7 +68,7 @@
        previous = previous->previous;
     }
 
-    NSCAssert(nextNode, @"nextNode is NULL (previous=0x%08X)", previous);
+    NSCAssert(nextNode, @"nextNode is NULL (previous=0x%p)", previous);
 
     /* Check if the requested size can be handled */
     if (((char*)nextNode) + size - memory
index 9755370ca475ccbbdd478aee637a5ccfc4b57b86..fae0d74e77a5e17203448ae8becb2ecb66d9aa1c 100644 (file)
@@ -259,7 +259,7 @@ static RETSIGTYPE signalHandlerFunction (int signum)
   
   for (i = 0; i < NSIG; i++) {
       self->signalHandlers[i] = [[UnixSignalHandlerList alloc] init];
-      //NSLog(@"handler 0x%08X %i: %@", self, i, self->signalHandlers[i]);
+      //NSLog(@"handler 0x%p %i: %@", self, i, self->signalHandlers[i]);
   }
   
 #if BSD_SIGNALS
index 688d2f40c4bc798dd3a2064914f82f5db2f11128..5c039b0e4fcfacabee9d2970c11c27dba2746f24 100644 (file)
 ifneq ($(FHS_INSTALL_ROOT),)
 
 FHS_INCLUDE_DIR=$(FHS_INSTALL_ROOT)/include/
+
+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)
index d38369a870d9884b85667794731022927388a9f5..cf02c3d5a5e8532f47caf2aa15d6d8e194734ca9 100644 (file)
@@ -50,7 +50,8 @@ LIBFOUNDATION_HEADER_TARGET_FLAG = \
   -I$(GNUSTEP_SYSTEM_ROOT)/Headers/libFoundation/$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/$(OBJC_RUNTIME)
 endif
 
-AUXILIARY_CPPFLAGS += $(LIBFOUNDATION_HEADER_TARGET_FLAG)
+AUXILIARY_CPPFLAGS  += $(LIBFOUNDATION_HEADER_TARGET_FLAG)
+AUXILIARY_OBJCFLAGS += -fconstant-string-class=NSConstantString
 
 # If gc=yes was passed and libFoundation was compiled with Boehm's
 # GC support, use the appropriate libraries
index 967b2789e236eafc3e519e07de06d0b617d6ccec..4b7b0f126e5f025f75048c567131bc6cdd625ff3 100644 (file)
@@ -26,9 +26,9 @@
 
 -include gsfix.make
 
-ifeq ($(GNUSTEP_SYSTEM_ROOT),)
+ifeq ($(GNUSTEP_MAKEFILES),)
 
-$(warning ERROR: Your $(GNUSTEP_SYSTEM_ROOT) environment variable is empty !)
+$(warning ERROR: Your $(GNUSTEP_MAKEFILES) environment variable is empty !)
 $(error Please try again after running ". $(GNUSTEP_MAKEFILES)/GNUstep.sh")
 
 else
index 85c34eed6807ecbe77adf6d27cee07fec6dc6cd6..031eb9f4ff38df7fe1e663f00ec1bfdcfb941bdf 100644 (file)
 # an action of contract, negligence or other tortious action, arising out of
 # or in connection with the use or performance of this software.
 
+-include ../gsfix.make
+
+ifeq ($(GNUSTEP_MAKEFILES),)
+
+$(warning ERROR: Your $(GNUSTEP_MAKEFILES) environment variable is empty !)
+$(error Please try again after running ". $(GNUSTEP_MAKEFILES)/GNUstep.sh")
+
+else
+
 TOP    = ..
 
 GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
 
--include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
+-include $(GNUSTEP_MAKEFILES)/common.make
 -include $(TOP)/Foundation/$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/$(OBJC_RUNTIME)/config.mak
 -include $(TOP)/config.mak
 
@@ -122,3 +131,4 @@ uninstall:
        rm -rf $(addprefix $(INSTALL_DIR)/, \
                    CharacterSets TimeZoneInfo  Defaults)
 
+endif
index c4e177c54248242b11edc1535bad2e1de1e496e6..f46921f7defe224b988f28b4acc8b750367b63cc 100644 (file)
@@ -1,5 +1,6 @@
 # version file
 
 MAJOR_VERSION:=1
-MINOR_VERSION:=0
-SUBMINOR_VERSION:=75
+MINOR_VERSION:=1
+SUBMINOR_VERSION:=3
+
index 5faef8c1fe95f0e87af6c7a724887e864c2a57c5..6a8312fd147638a6d479d724adbd300fe76dbbe6 100644 (file)
@@ -42,6 +42,7 @@ AC_CACHE_VAL(ac_cv_nested_functions,
 [AC_LANG_SAVE[]dnl
 AC_LANG_OBJECTIVE_C[]
 AC_TRY_RUN([
+#include <stdlib.h>
 f(void (*nested)())
 {
     (*nested)();
@@ -81,6 +82,7 @@ AC_LANG_OBJECTIVE_C[]
 AC_TRY_RUN([
 #include <objc/objc.h>
 #include <objc/Object.h>
+#include <stdlib.h>
 
 void f()
 {
index b11ea89d1e3392a800367c3954930d8967158547..f9d18d48d993070771b55c481599aa383992cead 100755 (executable)
@@ -1,7 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
-#
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-02-12'
+
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Written by Per Bothner <bothner@cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
 # The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c ;
+       for c in cc gcc c89 ; do
+         ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+         if test $? = 0 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       rm -f $dummy.c $dummy.o $dummy.rel ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 8/24/94.)
+# (ghazi@noc.rutgers.edu 1994-08-24)
 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
        PATH=$PATH:/.attbin ; export PATH
 fi
 
 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
-
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    alpha:OSF1:*:*)
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
-       exit 0 ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
+           UNAME_MACHINE_ARCH=unknown
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
        exit 0 ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-cbm-sysv4
-       exit 0;;
-    amiga:NetBSD:*:*)
-      echo m68k-cbm-netbsd${UNAME_RELEASE}
-      exit 0 ;;
     amiga:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
-    arc64:OpenBSD:*:*)
-       echo mips64el-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
     arc:OpenBSD:*:*)
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
-    hkmips:OpenBSD:*:*)
-       echo mips-unknown-openbsd${UNAME_RELEASE}
+    hp300:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mac68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    macppc:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+       echo m88k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     pmax:OpenBSD:*:*)
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     sgi:OpenBSD:*:*)
-       echo mips-unknown-openbsd${UNAME_RELEASE}
+       echo mipseb-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sun3:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     wgrisc:OpenBSD:*:*)
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
+    *:OpenBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    alpha:OSF1:*:*)
+       if test $UNAME_RELEASE = "V4.0"; then
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+       fi
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       cat <<EOF >$dummy.s
+       .data
+\$Lformat:
+       .byte 37,100,45,37,120,10,0     # "%d-%x\n"
+
+       .text
+       .globl main
+       .align 4
+       .ent main
+main:
+       .frame \$30,16,\$26,0
+       ldgp \$29,0(\$27)
+       .prologue 1
+       .long 0x47e03d80 # implver \$0
+       lda \$2,-1
+       .long 0x47e20c21 # amask \$2,\$1
+       lda \$16,\$Lformat
+       mov \$0,\$17
+       not \$1,\$18
+       jsr \$26,printf
+       ldgp \$29,0(\$26)
+       mov 0,\$16
+       jsr \$26,exit
+       .end main
+EOF
+       eval $set_cc_for_build
+       $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+       if test "$?" = 0 ; then
+               case `./$dummy` in
+                       0-0)
+                               UNAME_MACHINE="alpha"
+                               ;;
+                       1-0)
+                               UNAME_MACHINE="alphaev5"
+                               ;;
+                       1-1)
+                               UNAME_MACHINE="alphaev56"
+                               ;;
+                       1-101)
+                               UNAME_MACHINE="alphapca56"
+                               ;;
+                       2-303)
+                               UNAME_MACHINE="alphaev6"
+                               ;;
+                       2-307)
+                               UNAME_MACHINE="alphaev67"
+                               ;;
+                       2-1307)
+                               UNAME_MACHINE="alphaev68"
+                               ;;
+               esac
+       fi
+       rm -f $dummy.s $dummy
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit 0 ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit 0 ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit 0;;
-    SR2?01:HI-UX/MPP:*:*)
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
        echo hppa1.1-hitachi-hiuxmpp
        exit 0;;
-    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
        if test "`(/bin/universe) 2>/dev/null`" = att ; then
                echo pyramid-pyramid-sysv3
@@ -102,9 +309,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                echo pyramid-pyramid-bsd
        fi
        exit 0 ;;
-    NILE:*:*:dcosx)
+    NILE*:*:*:dcosx)
        echo pyramid-pyramid-svr4
        exit 0 ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit 0 ;;
@@ -129,33 +339,47 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun3*:SunOS:*:*)
        echo m68k-sun-sunos${UNAME_RELEASE}
        exit 0 ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit 0 ;;
     aushp:SunOS:*:*)
        echo sparc-auspex-sunos${UNAME_RELEASE}
        exit 0 ;;
-    atari*:NetBSD:*:*)
-       echo m68k-atari-netbsd${UNAME_RELEASE}
-       exit 0 ;;
-    atari*:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    sun3*:NetBSD:*:*)
-       echo m68k-sun-netbsd${UNAME_RELEASE}
-       exit 0 ;;
-    sun3*:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mac68k:NetBSD:*:*)
-       echo m68k-apple-netbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mac68k:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-       echo m88k-unknown-openbsd${UNAME_RELEASE}
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
        exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
     powerpc:machten:*:*)
        echo powerpc-apple-machten${UNAME_RELEASE}
        exit 0 ;;
@@ -168,12 +392,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     VAX*:ULTRIX*:*:*)
        echo vax-dec-ultrix${UNAME_RELEASE}
        exit 0 ;;
-    2020:CLIX:*:*)
+    2020:CLIX:*:* | 2430:CLIX:*:*)
        echo clipper-intergraph-clix${UNAME_RELEASE}
        exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-       sed 's/^        //' << EOF >dummy.c
-       int main (argc, argv) int argc; char **argv; {
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
        #if defined (host_mips) && defined (MIPSEB)
        #if defined (SYSTYPE_SYSV)
          printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@@ -188,12 +418,15 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
          exit (-1);
        }
 EOF
-       ${CC-cc} dummy.c -o dummy \
-         && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-         && rm dummy.c dummy && exit 0
-       rm -f dummy.c dummy
+       $CC_FOR_BUILD $dummy.c -o $dummy \
+         && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+         && rm -f $dummy.c $dummy && exit 0
+       rm -f $dummy.c $dummy
        echo mips-mips-riscos${UNAME_RELEASE}
        exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
        echo powerpc-harris-powerunix
        exit 0 ;;
@@ -209,15 +442,18 @@ EOF
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
-        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
-       if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-            -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
                echo m88k-dg-dgux${UNAME_RELEASE}
-       else
+           else
                echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
        fi
-        else echo i586-dg-dgux${UNAME_RELEASE}
-        fi
        exit 0 ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
@@ -238,12 +474,21 @@ EOF
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i?86:AIX:*:*)
+    i*86:AIX:*:*)
        echo i386-ibm-aix
        exit 0 ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit 0 ;;
     *:AIX:2:3)
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               sed 's/^                //' << EOF >dummy.c
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
                #include <sys/systemcfg.h>
 
                main()
@@ -254,8 +499,8 @@ EOF
                        exit(0);
                        }
 EOF
-               ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-               rm -f dummy.c dummy
+               $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+               rm -f $dummy.c $dummy
                echo rs6000-ibm-aix3.2.5
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
                echo rs6000-ibm-aix3.2.4
@@ -263,8 +508,9 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit 0 ;;
-    *:AIX:*:4)
-       if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+    *:AIX:*:[45])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
        else
                IBM_ARCH=powerpc
@@ -272,7 +518,7 @@ EOF
        if [ -x /usr/bin/oslevel ] ; then
                IBM_REV=`/usr/bin/oslevel`
        else
-               IBM_REV=4.${UNAME_RELEASE}
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
        exit 0 ;;
@@ -282,7 +528,7 @@ EOF
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
        echo romp-ibm-bsd4.4
        exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
        exit 0 ;;                           # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
@@ -297,18 +543,75 @@ EOF
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
        echo m68k-hp-bsd4.4
        exit 0 ;;
-    9000/[3478]??:HP-UX:*:*)
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        case "${UNAME_MACHINE}" in
            9000/31? )            HP_ARCH=m68000 ;;
            9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
-           9000/8?? )            HP_ARCH=hppa1.0 ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+                   if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+                   rm -f $dummy.c $dummy
+               fi ;;
        esac
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
        exit 0 ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit 0 ;;
     3050*:HI-UX:*:*)
-       sed 's/^        //' << EOF >dummy.c
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
        #include <unistd.h>
        int
        main ()
@@ -333,8 +636,8 @@ EOF
          exit (0);
        }
 EOF
-       ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-       rm -f dummy.c dummy
+       $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+       rm -f $dummy.c $dummy
        echo unknown-hitachi-hiuxwe2
        exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -343,13 +646,16 @@ EOF
     9000/8??:4.3bsd:*:*)
        echo hppa1.0-hp-bsd
        exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit 0 ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
        echo hppa1.1-hp-osf
        exit 0 ;;
     hp8??:OSF1:*:*)
        echo hppa1.0-hp-osf
        exit 0 ;;
-    i?86:OSF1:*:*)
+    i*86:OSF1:*:*)
        if [ -x /usr/sbin/sysversion ] ; then
            echo ${UNAME_MACHINE}-unknown-osf1mk
        else
@@ -381,53 +687,70 @@ EOF
        echo xmp-cray-unicos
         exit 0 ;;
     CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE}
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     CRAY*[A-Z]90:*:*:*)
        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE}
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*T3D:*:*:*)
+       echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     CRAY-2:*:*:*)
        echo cray2-cray-unicos
         exit 0 ;;
-    F300:UNIX_System_V:*:*)
-        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
-    F301:UNIX_System_V:*:*)
-       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
-       exit 0 ;;
-    hp3[0-9][05]:NetBSD:*:*)
-       echo m68k-hp-netbsd${UNAME_RELEASE}
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
        exit 0 ;;
-    hp300:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
        exit 0 ;;
-    i?86:BSD/386:*:* | *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit 0 ;;
     *:FreeBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit 0 ;;
-    *:NetBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-       exit 0 ;;
-    *:OpenBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-       exit 0 ;;
     i*:CYGWIN*:*)
-       echo i386-pc-cygwin32
+       echo ${UNAME_MACHINE}-pc-cygwin
        exit 0 ;;
     i*:MINGW*:*)
-       echo i386-pc-mingw32
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit 0 ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit 0 ;;
+    x86:Interix*:3*)
+       echo i386-pc-interix3
+       exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i386-pc-interix
+       exit 0 ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
        exit 0 ;;
     p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin32
+       echo powerpcle-unknown-cygwin
        exit 0 ;;
     prep*:SunOS:5.*:*)
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -435,78 +758,166 @@ EOF
     *:GNU:*:*)
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
-    *:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us.
-       ld_help_string=`ld --help 2>&1`
-       if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
-         echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-         echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-         echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-         echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-         echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-         echo "powerpc-unknown-linux-gnu" ; exit 0
-       elif test "${UNAME_MACHINE}" = "alpha" ; then
-         echo alpha-unknown-linux-gnu ; exit 0
-       elif test "${UNAME_MACHINE}" = "sparc" ; then
-         echo sparc-unknown-linux-gnu ; exit 0
-       elif test "${UNAME_MACHINE}" = "mips" ; then
-         cat >dummy.c <<EOF
-main(argc, argv)
-int argc;
-char *argv[];
-{
-#ifdef __MIPSEB__
-  printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
-  printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
-  return 0;
-}
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit 0 ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux
+       exit 0 ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 
+       CPU=mipsel 
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif 
 EOF
-         ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-         rm -f dummy.c dummy
-       else
-         # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
-         # useful --help.  Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
-         test ! -d /usr/lib/ldscripts/. \
-           && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-         # Determine whether the default compiler is a.out or elf
-         cat >dummy.c <<EOF
-main(argc, argv)
-int argc;
-char *argv[];
-{
-#ifdef __ELF__
-  printf ("%s-pc-linux-gnu\n", argv[1]);
-#else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
-  return 0;
-}
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+       rm -f $dummy.c
+       test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+       ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit 0 ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit 0 ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit 0 ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit 0 ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit 0 ;;               
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit 0 ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit 0 ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #ifdef __INTEL_COMPILER
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
 EOF
-         ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-         rm -f dummy.c dummy
-       fi ;;
-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
-# are messed up and put the nodename in both sysname and nodename.
-    i?86:DYNIX/ptx:4*:*)
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+       rm -f $dummy.c
+       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
        echo i386-sequent-sysv4
        exit 0 ;;
-    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
        else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
        fi
        exit 0 ;;
-    i?86:*:3.2:*)
+    i*86:*:5:[78]*)
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit 0 ;;
+    i*86:*:3.2:*)
        if test -f /usr/options/cb.name; then
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
@@ -515,11 +926,24 @@ EOF
                (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
                        && UNAME_MACHINE=i586
+               (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
        else
                echo ${UNAME_MACHINE}-pc-sysv32
        fi
        exit 0 ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit 0 ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit 0 ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
        exit 0 ;;
@@ -539,7 +963,7 @@ EOF
        exit 0 ;;
     M68*:*:R3V[567]*:*)
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
        OS_REL=''
        test -r /etc/.relid \
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -550,24 +974,30 @@ EOF
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:*)
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     mc68030:UNIX_System_V:4.*:*)
        echo m68k-atari-sysv4
        exit 0 ;;
-    i?86:LynxOS:2.*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     TSUNAMI:LynxOS:2.*:*)
        echo sparc-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
-    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+    rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
     SM[BE]S:UNIX_SV:*:*)
        echo mips-dde-sysv${UNAME_RELEASE}
        exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit 0 ;;
     RM*:SINIX-*:*:*)
        echo mips-sni-sysv4
        exit 0 ;;
@@ -579,8 +1009,8 @@ EOF
                echo ns32k-sni-sysv
        fi
        exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <Richard.M.Bartel@ccMail.Census.GOV>
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
         exit 0 ;;
     *:UNIX_System_V:4*:FTX*)
@@ -592,22 +1022,117 @@ EOF
        # From seanf@swdc.stratus.com.
        echo i860-stratus-sysv4
        exit 0 ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit 0 ;;
     mc68*:A/UX:*:*)
        echo m68k-apple-aux${UNAME_RELEASE}
        exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
                echo mips-nec-sysv${UNAME_RELEASE}
        else
                echo mips-unknown-sysv${UNAME_RELEASE}
        fi
         exit 0 ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit 0 ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit 0 ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit 0 ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit 0 ;;
+    *:Darwin:*:*)
+       echo `uname -p`-apple-darwin${UNAME_RELEASE}
+       exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       if test "${UNAME_MACHINE}" = "x86pc"; then
+               UNAME_MACHINE=pc
+               echo i386-${UNAME_MACHINE}-nto-qnx
+       else
+               echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+       fi
+       exit 0 ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit 0 ;;
+    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit 0 ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit 0 ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit 0 ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit 0 ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit 0 ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit 0 ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit 0 ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit 0 ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit 0 ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit 0 ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
-cat >dummy.c <<EOF
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
 # include <sys/utsname.h>
@@ -645,7 +1170,10 @@ main ()
 #endif
   int version;
   version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
   exit (0);
 #endif
 
@@ -690,11 +1218,24 @@ main ()
 #endif
 
 #if defined (vax)
-#if !defined (ultrix)
-  printf ("vax-dec-bsd\n"); exit (0);
-#else
-  printf ("vax-dec-ultrix\n"); exit (0);
-#endif
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
 #endif
 
 #if defined (alliant) && defined (i860)
@@ -705,8 +1246,8 @@ main ()
 }
 EOF
 
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
 
 # Apollos put the system type in the environment.
 
@@ -738,6 +1279,48 @@ then
     esac
 fi
 
-#echo '(Unable to guess system type)' 1>&2
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
 
 exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
index ea9ed1bf7bb6dc5c95207a67e6781bd931c91128..427d6c92e46cde4f05b90f54d3d0f076fd6f6b43 100755 (executable)
@@ -1,6 +1,10 @@
 #! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-02-12'
+
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 # can handle that machine.  It does not imply ALL GNU software can.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 #      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
-if [ x$1 = x ]
-then
-       echo Configuration name missing. 1>&2
-       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-       echo "or     $0 ALIAS" 1>&2
-       echo where ALIAS is a recognized configuration type. 1>&2
-       exit 1
-fi
+me=`echo "$0" | sed -e 's,.*/,,'`
 
-# First pass through any local machine types.
-case $1 in
-       *local*)
-               echo $1
-               exit 0
-               ;;
-       *)
-       ;;
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
 esac
 
 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  linux-gnu*)
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -94,20 +144,28 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple)
+       -apple | -axis)
                os=
                basic_machine=$1
                ;;
-       -sim | -cisco | -oki | -wec | -winbond )        # EGCS LOCAL
+       -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
                ;;
-       -scout)                                         # EGCS LOCAL
+       -scout)
                ;;
-       -wrs)                                           # EGCS LOCAL
+       -wrs)
                os=-vxworks
                basic_machine=$1
                ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
        -hiux*)
                os=-hiuxwe2
                ;;
@@ -156,49 +214,60 @@ case $os in
        -psos*)
                os=-psos
                ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
 esac
 
 # Decode aliases for certain CPU-COMPANY combinations.
 case $basic_machine in
        # Recognize the basic CPU types without company name.
        # Some are omitted here because they have special meanings below.
-       tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
-               | arme[lb] | pyramid | mn10200 | mn10300 \
-               | tron | a29k | 580 | i960 | h8300 \
-               | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
-               | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
-               | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
-               | 1750a | dsp16xx | pdp11 | s390 \
-               | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
-               | mipstx39 | mipstx39el \
-               | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x)
-               basic_machine=$basic_machine-unknown
-               ;;
-       m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
-               | h8500 | w65) # EGCS LOCAL
-               ;;
-       thumb)
-               basic_machine=$basic_machine-unknown
-               ;;
-       mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
-               basic_machine=$basic_machine-unknown
-               ;;
-       mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
-               basic_machine=$basic_machine-unknown
-               ;;
-       mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+       | c4x | clipper \
+       | d10v | d30v | dsp16xx \
+       | fr30 \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | m32r | m68000 | m68k | m88k | mcore \
+       | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+       | mips64vr4100 | mips64vr4100el | mips64vr4300 \
+       | mips64vr4300el | mips64vr5000 | mips64vr5000el \
+       | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+       | mipsisa32 \
+       | mn10200 | mn10300 \
+       | ns16k | ns32k \
+       | openrisc | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
+       | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+       | strongarm \
+       | tahoe | thumb | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xscale | xstormy16 | xtensa \
+       | z8k)
                basic_machine=$basic_machine-unknown
                ;;
-       mips16)
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
+               os=-none
                ;;
-       d10v)
-               basic_machine=$basic_machine-unknown
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
                ;;
+
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
-       i[34567]86)
+       i*86 | x86_64)
          basic_machine=$basic_machine-pc
          ;;
        # Object if more than one company name word.
@@ -207,44 +276,49 @@ case $basic_machine in
                exit 1
                ;;
        # Recognize the basic CPU types with company name.
-       vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
-             | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
-             | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-             | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
-             | xmp-* | ymp-* \
-             | hppa-* | hppa1.0-* | hppa1.1-* \
-             | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
-             | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
-             | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
-             | xps100-* | clipper-* | orion-* \
-             | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
-             | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \
-             | mips64el-* | mips64orion-* | mips64orionel-*  \
-             | mipstx39-* | mipstx39el-* \
-             | f301-* | arm*-*)
-               ;;
-       m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL
-               ;;
-       thumb-*) # EGCS LOCAL angela/thumb
-               ;;
-       v850-*) # EGCS LOCAL
-               ;;
-       d30v-*) # EGCS LOCAL
-               ;;
-       mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
-               ;;
-       mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
-               ;;
-       mips16-*) # EGCS LOCAL krk/mips16
-               ;;
-       tic30-*) # EGCS LOCAL ian/tic30
-               ;;
-       c30-*) # EGCS LOCAL ian/tic30
-               basic_machine=tic30-unknown
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armv*-* \
+       | avr-* \
+       | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c54x-* \
+       | clipper-* | cray2-* | cydra-* \
+       | d10v-* | d30v-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fr30-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | m32r-* \
+       | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | mcore-* \
+       | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+       | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+       | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
+       | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
+       | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+       | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \
+       | xtensa-* \
+       | ymp-* \
+       | z8k-*)
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
-       386bsd)                                         # EGCS LOCAL
+       386bsd)
                basic_machine=i386-unknown
                os=-bsd
                ;;
@@ -254,11 +328,11 @@ case $basic_machine in
        3b*)
                basic_machine=we32k-att
                ;;
-       a29khif)                                        # EGCS LOCAL
+       a29khif)
                basic_machine=a29k-amd
                os=-udi
                ;;
-       adobe68k)                                       # EGCS LOCAL
+       adobe68k)
                basic_machine=m68010-adobe
                os=-scout
                ;;
@@ -277,21 +351,21 @@ case $basic_machine in
                os=-sysv
                ;;
        amiga | amiga-*)
-               basic_machine=m68k-cbm
+               basic_machine=m68k-unknown
                ;;
        amigaos | amigados)
-               basic_machine=m68k-cbm
+               basic_machine=m68k-unknown
                os=-amigaos
                ;;
        amigaunix | amix)
-               basic_machine=m68k-cbm
+               basic_machine=m68k-unknown
                os=-sysv4
                ;;
        apollo68)
                basic_machine=m68k-apollo
                os=-sysv
                ;;
-       apollo68bsd)                                    # EGCS LOCAL
+       apollo68bsd)
                basic_machine=m68k-apollo
                os=-bsd
                ;;
@@ -331,19 +405,30 @@ case $basic_machine in
                basic_machine=cray2-cray
                os=-unicos
                ;;
-       [ctj]90-cray)
-               basic_machine=c90-cray
+       [cjt]90)
+               basic_machine=${basic_machine}-cray
                os=-unicos
                ;;
        crds | unos)
                basic_machine=m68k-crds
                ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
        da30 | da30-*)
                basic_machine=m68k-da30
                ;;
        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
                basic_machine=mips-dec
                ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
        delta | 3300 | motorola-3300 | motorola-delta \
              | 3300-motorola | delta-motorola)
                basic_machine=m68k-motorola
@@ -371,7 +456,7 @@ case $basic_machine in
        encore | umax | mmax)
                basic_machine=ns32k-encore
                ;;
-       es1800 | OSE68k | ose68k | ose | OSE)           # EGCS LOCAL
+       es1800 | OSE68k | ose68k | ose | OSE)
                basic_machine=m68k-ericsson
                os=-ose
                ;;
@@ -385,6 +470,10 @@ case $basic_machine in
                basic_machine=tron-gmicro
                os=-sysv
                ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
        h3050r* | hiux*)
                basic_machine=hppa1.1-hitachi
                os=-hiuxwe2
@@ -393,11 +482,11 @@ case $basic_machine in
                basic_machine=h8300-hitachi
                os=-hms
                ;;
-       h8300xray)                                      # EGCS LOCAL
+       h8300xray)
                basic_machine=h8300-hitachi
                os=-xray
                ;;
-       h8500hms)                                       # EGCS LOCAL
+       h8500hms)
                basic_machine=h8500-hitachi
                os=-hms
                ;;
@@ -416,22 +505,6 @@ case $basic_machine in
                basic_machine=m68k-hp
                os=-hpux
                ;;
-        w89k-*)                                                # EGCS LOCAL
-                basic_machine=hppa1.1-winbond
-                os=-proelf
-                ;;
-        op50n-*)                                       # EGCS LOCAL
-                basic_machine=hppa1.1-oki
-                os=-proelf
-                ;;
-        op60c-*)                                       # EGCS LOCAL
-                basic_machine=hppa1.1-oki
-                os=-proelf
-                ;;
-        hppro)                                         # EGCS LOCAL
-                basic_machine=hppa1.1-hp
-                os=-proelf
-                ;;
        hp3k9[0-9][0-9] | hp9[0-9][0-9])
                basic_machine=hppa1.0-hp
                ;;
@@ -441,22 +514,21 @@ case $basic_machine in
        hp9k3[2-9][0-9])
                basic_machine=m68k-hp
                ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9] )
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
                basic_machine=hppa1.0-hp
                ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9] )
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
                basic_machine=hppa1.1-hp
                ;;
-       hp9k78[0-9] | hp78[0-9] )
+       hp9k78[0-9] | hp78[0-9])
                # FIXME: really hppa2.0-hp
                basic_machine=hppa1.1-hp
                ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
-       hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
                # FIXME: really hppa2.0-hp
                basic_machine=hppa1.1-hp
                ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679] )
+       hp9k8[0-9][13679] | hp8[0-9][13679])
                basic_machine=hppa1.1-hp
                ;;
        hp9k8[0-9][0-9] | hp8[0-9][0-9])
@@ -465,47 +537,42 @@ case $basic_machine in
        hppa-next)
                os=-nextstep3
                ;;
-       hppaosf)                                        # EGCS LOCAL
+       hppaosf)
                basic_machine=hppa1.1-hp
                os=-osf
                ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
        i370-ibm* | ibm*)
                basic_machine=i370-ibm
-               os=-mvs
                ;;
 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i[34567]86v32)
+       i*86v32)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv32
                ;;
-       i[34567]86v4*)
+       i*86v4*)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv4
                ;;
-       i[34567]86v)
+       i*86v)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv
                ;;
-       i[34567]86sol2)
+       i*86sol2)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-solaris2
                ;;
-       i386mach)                                       # EGCS LOCAL
+       i386mach)
                basic_machine=i386-mach
                os=-mach
                ;;
-       i386-vsta | vsta)                               # EGCS LOCAL
+       i386-vsta | vsta)
                basic_machine=i386-unknown
                os=-vsta
                ;;
-       i386-go32 | go32)                               # EGCS LOCAL
-               basic_machine=i386-unknown
-               os=-go32
-               ;;
-       i386-mingw32 | mingw32)
-               basic_machine=i386-unknown
-               os=-mingw32
-               ;;
        iris | iris4d)
                basic_machine=mips-sgi
                case $os in
@@ -531,9 +598,17 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
        miniframe)
                basic_machine=m68000-convergent
                ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
        mipsel*-linux*)
                basic_machine=mipsel-unknown
                os=-linux-gnu
@@ -548,24 +623,36 @@ case $basic_machine in
        mips3*)
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
                ;;
-       monitor)                                        # EGCS LOCAL
+       mmix*)
+               basic_machine=mmix-knuth
+               os=-mmixware
+               ;;
+       monitor)
                basic_machine=m68k-rom68k
                os=-coff
                ;;
-       msdos)                                          # EGCS LOCAL
-               basic_machine=i386-unknown      
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
                os=-msdos
                ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
        ncr3000)
                basic_machine=i486-ncr
                os=-sysv4
                ;;
        netbsd386)
-               basic_machine=i386-unknown              # EGCS LOCAL
+               basic_machine=i386-unknown
                os=-netbsd
                ;;
        netwinder)
-               basic_machine=armv4l-corel
+               basic_machine=armv4l-rebel
                os=-linux
                ;;
        news | news700 | news800 | news900)
@@ -580,7 +667,7 @@ case $basic_machine in
                basic_machine=mips-sony
                os=-newsos
                ;;
-       necv70)                                         # EGCS LOCAL
+       necv70)
                basic_machine=v70-nec
                os=-sysv
                ;;
@@ -609,18 +696,33 @@ case $basic_machine in
                basic_machine=i960-intel
                os=-nindy
                ;;
-       mon960)                                         # EGCS LOCAL
+       mon960)
                basic_machine=i960-intel
                os=-mon960
                ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
        np1)
                basic_machine=np1-gould
                ;;
-       OSE68000 | ose68000)                            # EGCS LOCAL
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       or32 | or32-*)
+               basic_machine=or32-unknown
+               os=-coff
+               ;;
+       OSE68000 | ose68000)
                basic_machine=m68000-ericsson
                os=-ose
                ;;
-       os68k)                                          # EGCS LOCAL
+       os68k)
                basic_machine=m68k-none
                os=-os68k
                ;;
@@ -641,28 +743,28 @@ case $basic_machine in
         pc532 | pc532-*)
                basic_machine=ns32k-pc532
                ;;
-       pentium | p5 | k5 | k6 | nexen)
+       pentium | p5 | k5 | k6 | nexgen | viac3)
                basic_machine=i586-pc
                ;;
-       pentiumpro | p6 | 6x86)
+       pentiumpro | p6 | 6x86 | athlon)
                basic_machine=i686-pc
                ;;
        pentiumii | pentium2)
-               basic_machine=i786-pc
+               basic_machine=i686-pc
                ;;
-       pentium-* | p5-* | k5-* | k6-* | nexen-*)
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       pentiumpro-* | p6-* | 6x86-*)
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pentiumii-* | pentium2-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pn)
                basic_machine=pn-gould
                ;;
-       power)  basic_machine=rs6000-ibm
+       power)  basic_machine=power-ibm
                ;;
        ppc)    basic_machine=powerpc-unknown
                ;;
@@ -674,10 +776,24 @@ case $basic_machine in
        ppcle-* | powerpclittle-*)
                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        ps2)
                basic_machine=i386-ibm
                ;;
-       rom68k)                                         # EGCS LOCAL
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rom68k)
                basic_machine=m68k-rom68k
                os=-coff
                ;;
@@ -687,11 +803,13 @@ case $basic_machine in
        rtpc | rtpc-*)
                basic_machine=romp-ibm
                ;;
-       s390-ibm*|s390-*)
+       s390 | s390-*)
                basic_machine=s390-ibm
-               os=-linux
                ;;
-       sa29200)                                        # EGCS LOCAL
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
                basic_machine=a29k-amd
                os=-udi
                ;;
@@ -702,7 +820,7 @@ case $basic_machine in
                basic_machine=sh-hitachi
                os=-hms
                ;;
-       sparclite-wrs)                                  # EGCS LOCAL
+       sparclite-wrs | simso-wrs)
                basic_machine=sparclite-wrs
                os=-vxworks
                ;;
@@ -713,10 +831,10 @@ case $basic_machine in
        spur)
                basic_machine=spur-unknown
                ;;
-       st2000)                                         # EGCS LOCAL
+       st2000)
                basic_machine=m68k-tandem
                ;;
-       stratus)                                        # EGCS LOCAL
+       stratus)
                basic_machine=i860-stratus
                os=-sysv4
                ;;
@@ -760,16 +878,32 @@ case $basic_machine in
        sun386 | sun386i | roadrunner)
                basic_machine=i386-sun
                ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
        symmetry)
                basic_machine=i386-sequent
                os=-dynix
                ;;
+       t3e)
+               basic_machine=t3e-cray
+               os=-unicos
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
        tx39)
                basic_machine=mipstx39-unknown
                ;;
        tx39el)
                basic_machine=mipstx39el-unknown
                ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
        tower | tower-32)
                basic_machine=m68k-ncr
                ;;
@@ -781,7 +915,7 @@ case $basic_machine in
                basic_machine=a29k-nyu
                os=-sym1
                ;;
-       v810 | necv810)                                 # EGCS LOCAL
+       v810 | necv810)
                basic_machine=v810-nec
                os=-none
                ;;
@@ -808,9 +942,17 @@ case $basic_machine in
                basic_machine=a29k-wrs
                os=-vxworks
                ;;
-       w65*)                                           # EGCS LOCAL
-               basic_machine=w65-wdc
-               os=-none
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       windows32)
+               basic_machine=i386-pc
+               os=-windows32-msvcrt
                ;;
        xmp)
                basic_machine=xmp-cray
@@ -819,7 +961,7 @@ case $basic_machine in
         xps | xps100)
                basic_machine=xps100-honeywell
                ;;
-       z8k-*-coff)                                     # EGCS LOCAL
+       z8k-*-coff)
                basic_machine=z8k-unknown
                os=-sim
                ;;
@@ -830,13 +972,13 @@ case $basic_machine in
 
 # Here we handle the default manufacturer of certain CPU types.  It is in
 # some cases the only manufacturer, in others, it is the most popular.
-       w89k)                                           # EGCS LOCAL
+       w89k)
                basic_machine=hppa1.1-winbond
                ;;
-       op50n)                                          # EGCS LOCAL
+       op50n)
                basic_machine=hppa1.1-oki
                ;;
-       op60c)                                          # EGCS LOCAL
+       op60c)
                basic_machine=hppa1.1-oki
                ;;
        mips)
@@ -855,13 +997,23 @@ case $basic_machine in
        vax)
                basic_machine=vax-dec
                ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
        pdp11)
                basic_machine=pdp11-dec
                ;;
        we32k)
                basic_machine=we32k-att
                ;;
-       sparc | sparcv9)
+       sh3 | sh4 | sh3eb | sh4eb)
+               basic_machine=sh-unknown
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparc | sparcv9 | sparcv9b)
                basic_machine=sparc-sun
                ;;
         cydra)
@@ -873,16 +1025,19 @@ case $basic_machine in
        orion105)
                basic_machine=clipper-highlevel
                ;;
-       mac | mpw | mac-mpw)                            # EGCS LOCAL
+       mac | mpw | mac-mpw)
                basic_machine=m68k-apple
                ;;
-       pmac | pmac-mpw)                                # EGCS LOCAL
+       pmac | pmac-mpw)
                basic_machine=powerpc-apple
                ;;
-       c4x*)
-               basic_machine=c4x-none
-               os=-coff
-               ;;
+       c4x*)
+               basic_machine=c4x-none
+               os=-coff
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
        *)
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
                exit 1
@@ -939,20 +1094,35 @@ case $os in
              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-             | -interix* | -uwin* )
+             | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
-       # EGCS LOCAL
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto*)
+               os=-nto-qnx
+               ;;
        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
-             | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
                ;;
        -mac*)
                os=`echo $os | sed -e 's|mac|macos|'`
                ;;
-       # END EGCS LOCAL
        -linux*)
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                ;;
@@ -962,6 +1132,12 @@ case $os in
        -sunos6*)
                os=`echo $os | sed -e 's|sunos6|solaris3|'`
                ;;
+       -opened*)
+               os=-openedition
+               ;;
+       -wince*)
+               os=-wince
+               ;;
        -osfrose*)
                os=-osfrose
                ;;
@@ -977,7 +1153,10 @@ case $os in
        -acis*)
                os=-aos
                ;;
-       -386bsd)                                        # EGCS LOCAL
+       -atheos*)
+               os=-atheos
+               ;;
+       -386bsd)
                os=-bsd
                ;;
        -ctix* | -uts*)
@@ -986,6 +1165,9 @@ case $os in
        -ns2 )
                os=-nextstep2
                ;;
+       -nsk*)
+               os=-nsk
+               ;;
        # Preserve the version number of sinix5.
        -sinix5.*)
                os=`echo $os | sed -e 's|sinix|sysv|'`
@@ -1011,15 +1193,18 @@ case $os in
        # This must come after -sysvr4.
        -sysv*)
                ;;
-       -ose*)                                          # EGCS LOCAL
+       -ose*)
                os=-ose
                ;;
-       -es1800*)                                       # EGCS LOCAL
+       -es1800*)
                os=-ose
                ;;
        -xenix)
                os=-xenix
                ;;
+        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
        -none)
                ;;
        *)
@@ -1045,12 +1230,16 @@ case $basic_machine in
        *-acorn)
                os=-riscix1.2
                ;;
-       arm*-corel)
+       arm*-rebel)
                os=-linux
                ;;
        arm*-semi)
                os=-aout
                ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
         pdp11-*)
                os=-none
                ;;
@@ -1069,15 +1258,18 @@ case $basic_machine in
                # default.
                # os=-sunos4
                ;;
-       m68*-cisco)                                     # EGCS LOCAL
+       m68*-cisco)
                os=-aout
                ;;
-       mips*-cisco)                                    # EGCS LOCAL
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
                os=-elf
                ;;
-        mips*-*)                                        # EGCS LOCAL
-                os=-elf
-                ;;
+       or32-*)
+               os=-coff
+               ;;
        *-tti)  # must be before sparc entry or we get the wrong os.
                os=-sysv3
                ;;
@@ -1090,13 +1282,13 @@ case $basic_machine in
        *-ibm)
                os=-aix
                ;;
-       *-wec)                                          # EGCS LOCAL
+       *-wec)
                os=-proelf
                ;;
-       *-winbond)                                      # EGCS LOCAL
+       *-winbond)
                os=-proelf
                ;;
-       *-oki)                                          # EGCS LOCAL
+       *-oki)
                os=-proelf
                ;;
        *-hp)
@@ -1159,18 +1351,21 @@ case $basic_machine in
        *-masscomp)
                os=-rtu
                ;;
-       f301-fujitsu)
+       f30[01]-fujitsu | f700-fujitsu)
                os=-uxpv
                ;;
-       *-rom68k)                                       # EGCS LOCAL
+       *-rom68k)
                os=-coff
                ;;
-       *-*bug)                                         # EGCS LOCAL
+       *-*bug)
                os=-coff
                ;;
-       *-apple)                                        # EGCS LOCAL
+       *-apple)
                os=-macos
                ;;
+       *-atari*)
+               os=-mint
+               ;;
        *)
                os=-none
                ;;
@@ -1216,7 +1411,7 @@ case $basic_machine in
                        -genix*)
                                vendor=ns
                                ;;
-                       -mvs*)
+                       -mvs* | -opened*)
                                vendor=ibm
                                ;;
                        -ptx*)
@@ -1228,15 +1423,29 @@ case $basic_machine in
                        -aux*)
                                vendor=apple
                                ;;
-                       -hms*)                          # EGCS LOCAL
+                       -hms*)
                                vendor=hitachi
                                ;;
-                       -mpw* | -macos*)                # EGCS LOCAL
+                       -mpw* | -macos*)
                                vendor=apple
                                ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
                esac
                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
                ;;
 esac
 
 echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/libFoundation/config/i386/openbsd3.8.h b/libFoundation/config/i386/openbsd3.8.h
new file mode 100644 (file)
index 0000000..b4feb63
--- /dev/null
@@ -0,0 +1,37 @@
+/* 
+   openbsd3.8.h
+
+   Copyright (C) 1995, 1996 Ovidiu Predescu and Mircea Oancea.
+   All rights reserved.
+
+   Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
+
+   This file is part of libFoundation.
+
+   Permission to use, copy, modify, and distribute this software and its
+   documentation for any purpose and without fee is hereby granted, provided
+   that the above copyright notice appear in all copies and that both that
+   copyright notice and this permission notice appear in supporting
+   documentation.
+
+   We disclaim all warranties with regard to this software, including all
+   implied warranties of merchantability and fitness, in no event shall
+   we be liable for any special, indirect or consequential damages or any
+   damages whatsoever resulting from loss of use, data or profits, whether in
+   an action of contract, negligence or other tortious action, arising out of
+   or in connection with the use or performance of this software.
+*/
+
+#ifndef __openbsd3_8_h__
+#define __openbsd3_8_h__
+
+#include "linux.h"
+
+#endif /* __openbsd3_8_h__ */
+
+/*
+  Local Variables:
+  c-basic-offset: 4
+  tab-width: 8
+  End:
+*/
diff --git a/libFoundation/config/i386/openbsd3.9.h b/libFoundation/config/i386/openbsd3.9.h
new file mode 100644 (file)
index 0000000..745eda9
--- /dev/null
@@ -0,0 +1,37 @@
+/* 
+   openbsd3.9.h
+
+   Copyright (C) 1995, 1996 Ovidiu Predescu and Mircea Oancea.
+   All rights reserved.
+
+   Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
+
+   This file is part of libFoundation.
+
+   Permission to use, copy, modify, and distribute this software and its
+   documentation for any purpose and without fee is hereby granted, provided
+   that the above copyright notice appear in all copies and that both that
+   copyright notice and this permission notice appear in supporting
+   documentation.
+
+   We disclaim all warranties with regard to this software, including all
+   implied warranties of merchantability and fitness, in no event shall
+   we be liable for any special, indirect or consequential damages or any
+   damages whatsoever resulting from loss of use, data or profits, whether in
+   an action of contract, negligence or other tortious action, arising out of
+   or in connection with the use or performance of this software.
+*/
+
+#ifndef __openbsd3_9_h__
+#define __openbsd3_9_h__
+
+#include "linux.h"
+
+#endif /* __openbsd3_9_h__ */
+
+/*
+  Local Variables:
+  c-basic-offset: 4
+  tab-width: 8
+  End:
+*/
index de4e0a5d0206aa79503d4c566179f0eb7ec07da1..c3ce2008de16155466bb66a0b247d3120aab640d 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef __linux_h__
 #define __linux_h__
 
-#include "i386.h"
+#include "powerpc64.h"
 
 #undef FUNCTION_VALUE
 #undef FUNCTION_SET_VALUE
diff --git a/libFoundation/config/x86_64/linux-gnu.h b/libFoundation/config/x86_64/linux-gnu.h
new file mode 100644 (file)
index 0000000..ec5a214
--- /dev/null
@@ -0,0 +1,37 @@
+/* 
+   linux_gnu.h
+
+   Copyright (C) 1995, 1996 Ovidiu Predescu and Mircea Oancea.
+   All rights reserved.
+
+   Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
+
+   This file is part of libFoundation.
+
+   Permission to use, copy, modify, and distribute this software and its
+   documentation for any purpose and without fee is hereby granted, provided
+   that the above copyright notice appear in all copies and that both that
+   copyright notice and this permission notice appear in supporting
+   documentation.
+
+   We disclaim all warranties with regard to this software, including all
+   implied warranties of merchantability and fitness, in no event shall
+   we be liable for any special, indirect or consequential damages or any
+   damages whatsoever resulting from loss of use, data or profits, whether in
+   an action of contract, negligence or other tortious action, arising out of
+   or in connection with the use or performance of this software.
+*/
+
+#ifndef __linux_gnu_h__
+#define __linux_gnu_h__
+
+#include "linux.h"
+
+#endif /* __linux_gnu_h__ */
+
+/*
+  Local Variables:
+  c-basic-offset: 4
+  tab-width: 8
+  End:
+*/
diff --git a/libFoundation/config/x86_64/linux.h b/libFoundation/config/x86_64/linux.h
new file mode 100644 (file)
index 0000000..5640134
--- /dev/null
@@ -0,0 +1,147 @@
+/* 
+   linux.h
+
+   Copyright (C) 1995, 1996 Ovidiu Predescu and Mircea Oancea.
+   All rights reserved.
+
+   Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
+
+   This file is part of libFoundation.
+
+   Permission to use, copy, modify, and distribute this software and its
+   documentation for any purpose and without fee is hereby granted, provided
+   that the above copyright notice appear in all copies and that both that
+   copyright notice and this permission notice appear in supporting
+   documentation.
+
+   We disclaim all warranties with regard to this software, including all
+   implied warranties of merchantability and fitness, in no event shall
+   we be liable for any special, indirect or consequential damages or any
+   damages whatsoever resulting from loss of use, data or profits, whether in
+   an action of contract, negligence or other tortious action, arising out of
+   or in connection with the use or performance of this software.
+*/
+
+#ifndef __linux_h__
+#define __linux_h__
+
+#include "x86_64.h"
+
+#undef FUNCTION_VALUE
+#undef FUNCTION_SET_VALUE
+#undef GET_STRUCT_VALUE_ADDRESS
+#undef SET_STRUCT_VALUE_ADDRESS
+
+/* Define how to find the value returned by a function. TYPE is a Objective-C
+   encoding string describing the type of the returned value. ARGS is the
+   arguments frame passed to __builtin_apply. RESULT_FRAME is the address of
+   the block returned by __builtin_apply. RETURN_VALUE is an address where
+   this macro should put the returned value. */
+
+#if 0 && defined(BROKEN_BUILTIN_APPLY)
+
+#define FUNCTION_VALUE(TYPE, ARGS, RESULT_FRAME, RETURN_VALUE) \
+    ({ int type_size = objc_sizeof_type(TYPE); \
+       if(*(TYPE) == _C_FLT) { \
+           float aFloat; \
+           asm("fsts %0" : "=f2" (aFloat) :); \
+           *(float*)(RETURN_VALUE) = aFloat; \
+       } \
+       else if(*(TYPE) == _C_DBL) { \
+           double aDouble; \
+           asm("fstl %0" : "=f2" (aDouble)); \
+           *(double*)(RETURN_VALUE) = aDouble; \
+       } \
+       else if(*(TYPE) == _C_STRUCT_B || *(TYPE) == _C_UNION_B \
+               || *(TYPE) == _C_ARY_B) \
+           memcpy((RETURN_VALUE), *(void**)(RESULT_FRAME), type_size); \
+       else memcpy((RETURN_VALUE), (RESULT_FRAME), type_size); })
+
+#else /* !BROKEN_BUILTIN_APPLY */
+
+#define FUNCTION_VALUE(TYPE, ARGS, RESULT_FRAME, RETURN_VALUE) \
+    ({ int type_size = objc_sizeof_type(TYPE); \
+       if(*(TYPE) == _C_FLT) { \
+           *(float*)(RETURN_VALUE) = \
+               (float)*(long double*)(((char*)(RESULT_FRAME)) + 8); \
+       } \
+       else if(*(TYPE) == _C_DBL) { \
+           *(double*)(RETURN_VALUE) = \
+               (double)*(long double*)(((char*)(RESULT_FRAME)) + 8); \
+       } \
+       else if(*(TYPE) != _C_STRUCT_B && *(TYPE) != _C_UNION_B \
+               && *(TYPE) != _C_ARY_B) \
+           memcpy((RETURN_VALUE), (RESULT_FRAME), type_size); })
+
+#endif /* !BROKEN_BUILTIN_APPLY */
+
+/* Set the value in RETURN_VALUE to be the value returned by a function.
+   Assume that the fucntion was previously called and RESULT_FRAME is the
+   address of the block returned by __builtin_apply. TYPE is the actual
+   type of this value. ARGS is the address of block that was passed
+   to __builtin_apply. */
+
+#if 0 && defined(BROKEN_BUILTIN_APPLY)
+
+#define FUNCTION_SET_VALUE(TYPE, ARGS, RESULT_FRAME, RETURN_VALUE) \
+    ({  int type_size = objc_sizeof_type(TYPE); \
+       if(*(TYPE) == _C_FLT) { \
+           float aFloat = *(float*)(RETURN_VALUE); \
+           asm("fld %0" : : "f" (aFloat)); \
+       } \
+       else if(*(TYPE) == _C_DBL) { \
+           double aDouble = *(double*)(RETURN_VALUE); \
+           asm("fldl %0" : : "f" (aDouble)); \
+       } \
+       else if(*(TYPE) == _C_STRUCT_B || *(TYPE) == _C_UNION_B \
+               || *(TYPE) == _C_ARY_B) \
+           memcpy(*(void**)(ARGS), (RETURN_VALUE), type_size); \
+       else memcpy((RESULT_FRAME), (RETURN_VALUE), type_size); })
+
+#else /* !BROKEN_BUILTIN_APPLY */
+
+#define FUNCTION_SET_VALUE(TYPE, ARGS, RESULT_FRAME, RETURN_VALUE) \
+    ({  int type_size = objc_sizeof_type(TYPE); \
+       if(*(TYPE) == _C_FLT) \
+           *(long double*)(((char*)(RESULT_FRAME)) + 8) = \
+               (long double)*(float*)(RETURN_VALUE); \
+       else if(*(TYPE) == _C_DBL) \
+           *(long double*)(((char*)(RESULT_FRAME)) + 8) = \
+               (long double)*(double*)(RETURN_VALUE); \
+       else if(*(TYPE) == _C_STRUCT_B || *(TYPE) == _C_UNION_B \
+               || *(TYPE) == _C_ARY_B) \
+           memcpy(*(void**)(ARGS), (RETURN_VALUE), type_size); \
+       else memcpy((RESULT_FRAME), (RETURN_VALUE), type_size); })
+
+#endif /* !BROKEN_BUILTIN_APPLY */
+
+/* If the RETTYPE is a structure and the address of the structure value is
+   passed to the called function, then obtain from ARGS its address. In general
+   this address is the second pointer into the arguments frame. However on
+   linux this address is passed as the first argument to the called function.
+   This macro should produce 0 if the RETTYPE doesn't match the conditions
+   above. */
+
+#define GET_STRUCT_VALUE_ADDRESS(ARGS, RETTYPE) \
+    ((*(RETTYPE) == _C_STRUCT_B || *(RETTYPE) == _C_UNION_B \
+           || *(RETTYPE) == _C_ARY_B) ? \
+         **(void***)(ARGS) \
+       : 0)
+
+/* Prepare ARGS for calling the function. If the function returns a struct by
+   value, it's the caller responsability to pass to the called function the
+   address of where to store the structure value. */
+
+#define SET_STRUCT_VALUE_ADDRESS(ARGS, ADDR, RETTYPE) \
+    if(*(RETTYPE) == _C_STRUCT_B || *(RETTYPE) == _C_UNION_B \
+           || *(RETTYPE) == _C_ARY_B) \
+       **(void***)(ARGS) = (ADDR);
+
+#endif /* __linux_h__ */
+
+/*
+  Local Variables:
+  c-basic-offset: 4
+  tab-width: 8
+  End:
+*/
diff --git a/libFoundation/config/x86_64/x86_64.h b/libFoundation/config/x86_64/x86_64.h
new file mode 100644 (file)
index 0000000..d7324b5
--- /dev/null
@@ -0,0 +1,218 @@
+/* 
+   x86_64.h
+
+   Copyright (C) 1995, 1996 Ovidiu Predescu and Mircea Oancea.
+   All rights reserved.
+
+   Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
+
+   This file is part of libFoundation.
+
+   Permission to use, copy, modify, and distribute this software and its
+   documentation for any purpose and without fee is hereby granted, provided
+   that the above copyright notice appear in all copies and that both that
+   copyright notice and this permission notice appear in supporting
+   documentation.
+
+   We disclaim all warranties with regard to this software, including all
+   implied warranties of merchantability and fitness, in no event shall
+   we be liable for any special, indirect or consequential damages or any
+   damages whatsoever resulting from loss of use, data or profits, whether in
+   an action of contract, negligence or other tortious action, arising out of
+   or in connection with the use or performance of this software.
+*/
+
+#ifndef __x86_64_h__
+#define __x86_64_h__
+
+// TODO: fix for x86_64!!!
+//   this file is just a copy of i386.h
+
+#ifndef OBJC_FORWARDING_STACK_OFFSET
+#define OBJC_FORWARDING_STACK_OFFSET   0
+#endif
+
+#ifndef OBJC_FORWARDING_MIN_OFFSET
+#define OBJC_FORWARDING_MIN_OFFSET 0
+#endif
+
+/* Define the size of the block returned by __builtin_apply_args. This value is
+   computed by the function in expr.c. The block contains in order: a pointer
+   to the stack arguments frame, the structure value address unless this is
+   passed as an "invisible" first argument and all registers that may be used
+   in calling a function. */
+
+// TODO: fix for x86_64!!!
+#define APPLY_ARGS_SIZE        8
+
+/* Define the size of the result block returned by the __builtin_apply. This
+   block contains all registers that could be used to return the function
+   value. This value is computed by apply_result_size function in expr.c. There
+   are also machines where this value is predefined in the machine description
+   file, so that machine specific information can be stored. */
+
+// TODO: fix for x86_64!!!
+#define APPLY_RESULT_SIZE      116
+
+/* Define how to find the value returned by a function. TYPE is a Objective-C
+   encoding string describing the type of the returned value. ARGS is the
+   arguments frame passed to __builtin_apply. RESULT_FRAME is the address of
+   the block returned by __builtin_apply. RETURN_VALUE is an address where
+   this macro should put the returned value. */
+
+#ifdef BROKEN_BUILTIN_APPLY
+
+#define FUNCTION_VALUE(TYPE, ARGS, RESULT_FRAME, RETURN_VALUE) \
+    ({ int type_size = objc_sizeof_type(TYPE); \
+       if(*(TYPE) == _C_FLT) { \
+           float aFloat; \
+           asm("fsts %0" : "=f2" (aFloat) :); \
+           *(float*)(RETURN_VALUE) = aFloat; \
+       } \
+       else if(*(TYPE) == _C_DBL) { \
+           double aDouble; \
+           asm("fstl %0" : "=f2" (aDouble)); \
+           *(double*)(RETURN_VALUE) = aDouble; \
+       } \
+       else if(*(TYPE) == _C_STRUCT_B || *(TYPE) == _C_UNION_B \
+               || *(TYPE) == _C_ARY_B) \
+           memcpy((RETURN_VALUE), \
+                  *(void**)(((char*)(ARGS)) + sizeof(void*)), type_size); \
+       else memcpy((RETURN_VALUE), (RESULT_FRAME), type_size); })
+
+#else /* !BROKEN_BUILTIN_APPLY */
+
+#define FUNCTION_VALUE(TYPE, ARGS, RESULT_FRAME, RETURN_VALUE) \
+    ({ int type_size = objc_sizeof_type(TYPE); \
+       if(*(TYPE) == _C_FLT) { \
+           *(float*)(RETURN_VALUE) = \
+               (float)*(long double*)(((char*)(RESULT_FRAME)) + 8); \
+       } \
+       else if(*(TYPE) == _C_DBL) { \
+           *(double*)(RETURN_VALUE) = \
+               (double)*(long double*)(((char*)(RESULT_FRAME)) + 8); \
+       } \
+       else if(*(TYPE) == _C_STRUCT_B || *(TYPE) == _C_UNION_B \
+               || *(TYPE) == _C_ARY_B) \
+           memcpy((RETURN_VALUE), \
+                  *(void**)(((char*)(ARGS)) + sizeof(void*)), type_size); \
+       else memcpy((RETURN_VALUE), (RESULT_FRAME), type_size); })
+
+#endif /* !BROKEN_BUILTIN_APPLY */
+
+/* Set the value in RETURN_VALUE to be the value returned by a function.
+   Assume that the fucntion was previously called and RESULT_FRAME is the
+   address of the block returned by __builtin_apply. TYPE is the actual
+   type of this value. ARGS is the address of block that was passed
+   to __builtin_apply. */
+
+#ifdef BROKEN_BUILTIN_APPLY
+
+#define FUNCTION_SET_VALUE(TYPE, ARGS, RESULT_FRAME, RETURN_VALUE) \
+    ({  int type_size = objc_sizeof_type(TYPE); \
+       if(*(TYPE) == _C_FLT) { \
+           float aFloat = *(float*)(RETURN_VALUE); \
+           asm("fld %0" : : "f" (aFloat)); \
+       } \
+       else if(*(TYPE) == _C_DBL) { \
+           double aDouble = *(double*)(RETURN_VALUE); \
+           asm("fldl %0" : : "f" (aDouble)); \
+       } \
+       else if(*(TYPE) == _C_STRUCT_B || *(TYPE) == _C_UNION_B \
+               || *(TYPE) == _C_ARY_B) \
+           memcpy(*(void**)(((char*)(ARGS)) + sizeof(void*)), \
+                  (RETURN_VALUE), type_size); \
+       else memcpy((RESULT_FRAME), (RETURN_VALUE), type_size); })
+
+#else /* !BROKEN_BUILTIN_APPLY */
+
+#define FUNCTION_SET_VALUE(TYPE, ARGS, RESULT_FRAME, RETURN_VALUE) \
+    ({  int type_size = objc_sizeof_type(TYPE); \
+       if(*(TYPE) == _C_FLT) \
+           *(long double*)(((char*)(RESULT_FRAME)) + 8) = \
+               (long double)*(float*)(RETURN_VALUE); \
+       else if(*(TYPE) == _C_DBL) \
+           *(long double*)(((char*)(RESULT_FRAME)) + 8) = \
+               (long double)*(double*)(RETURN_VALUE); \
+       else if(*(TYPE) == _C_STRUCT_B || *(TYPE) == _C_UNION_B \
+               || *(TYPE) == _C_ARY_B) \
+           memcpy(*(void**)(((char*)(ARGS)) + sizeof(void*)), \
+                  (RETURN_VALUE), type_size); \
+       else memcpy((RESULT_FRAME), (RETURN_VALUE), type_size); })
+
+#endif /* !BROKEN_BUILTIN_APPLY */
+
+/* If the RETTYPE is a structure and the address of the structure value is
+   passed to the called function, then obtain from ARGS its address. In general
+   this address is the second pointer into the arguments frame. This macro
+   should produce 0 if the RETTYPE doesn't match the conditions above. */
+
+#define GET_STRUCT_VALUE_ADDRESS(ARGS, RETTYPE) \
+    ((*(RETTYPE) == _C_STRUCT_B || *(RETTYPE) == _C_UNION_B \
+           || *(RETTYPE) == _C_ARY_B) ? \
+         *(void**)(((char*)(ARGS)) + sizeof(void*)) \
+       : 0)
+
+/* Prepare ARGS for calling the function. If the function returns a struct by
+   value, it's the caller responsability to pass to the called function the
+   address of where to store the structure value. */
+
+#define SET_STRUCT_VALUE_ADDRESS(ARGS, ADDR, RETTYPE) \
+    *(void**)(((char*)(ARGS)) + sizeof(void*)) = (ADDR)
+
+
+/* The following macros are used to determine the encoding of a selector given
+   the types of arguments. This macros follows the similar ones defined in the
+   target machine description from the compiler sources. */
+
+/* Define a data type for recording info about the arguments list of a method.
+   A variable of this type is further used by FUNCTION_ARG_ENCODING to
+   determine the encoding of an argument. This type should record all info
+   about arguments processed so far. */
+
+#define CUMULATIVE_ARGS int
+
+/* Initialize a variable of type CUMULATIVE_ARGS. This macro is called before
+   processing the first argument of a method. */
+
+#define INIT_CUMULATIVE_ARGS(CUM)      ((CUM) = 0)
+
+/* This macro determines the encoding of the next argument of a method. It is
+   called repetitively, starting with the first argument and continuing to the
+   last one. CUM is a variable of type CUMULATIVE_ARGS. TYPE is a NSString
+   which represents the type of the argument processed. This macro must
+   produce a NSString whose value represents the encoding and position of the
+   current argument. STACKSIZE is a variable that counts the number of bytes
+   occupied by the arguments on the stack. */
+
+#ifndef ROUND
+#define ROUND(V, A) \
+  ({ typeof(V) __v=(V); typeof(A) __a=(A); \
+     __a*((__v+__a-1)/__a); })
+#endif
+
+#define FUNCTION_ARG_ENCODING(CUM, TYPE, STACK_ARGSIZE) \
+    ({  id encoding; \
+       const char* type = [(TYPE) cString]; \
+       int align = objc_alignof_type(type); \
+       int type_size = objc_sizeof_type(type); \
+\
+       (CUM) = ROUND((CUM), align); \
+       encoding = [NSString stringWithFormat:@"%@%d", \
+                                   (TYPE), \
+                                   (CUM) + OBJC_FORWARDING_STACK_OFFSET]; \
+       if((*type == _C_STRUCT_B || *type == _C_UNION_B || *type == _C_ARY_B) \
+               && type_size > 2) \
+           (STACK_ARGSIZE) = (CUM) + ROUND(type_size, align); \
+       else (STACK_ARGSIZE) = (CUM) + type_size; \
+       (CUM) += ROUND(type_size, sizeof(void*)); \
+       encoding; })
+
+#endif /* __x86_64_h__ */
+
+/*
+  Local Variables:
+  c-basic-offset: 4
+  tab-width: 8
+  End:
+*/
index 06d1d41a8fca91e37c5d79c1dd2586d13666077d..4a1c1fb53de9d6cb7a7a3b6c10d3b4a27bb6b53c 100755 (executable)
@@ -552,7 +552,7 @@ fi
 
 # ******************** GNUstep env ************************************
 
-if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then
+if test "x${GNUSTEP_MAKEFILES}" = "x"; then
   { echo "configure: error: Your GNUstep.sh is not sourced" 1>&2; exit 1; }
 fi
 
@@ -560,8 +560,8 @@ fi
 
 # todo: read from Version file?
 MAJOR_VERSION=1
-MINOR_VERSION=0
-SUBMINOR_VERSION=73
+MINOR_VERSION=1
+SUBMINOR_VERSION=3
 
 
 
@@ -1646,7 +1646,7 @@ fi
 
 
 RUNTIME=GNU
-transformed_target_cpu=`${GNUSTEP_SYSTEM_ROOT}/Makefiles/clean_cpu.sh ${TARGET_CPU}`
+transformed_target_cpu=`${GNUSTEP_MAKEFILES}/clean_cpu.sh ${TARGET_CPU}`
 ac_cv_file_output_prefix=Foundation/$transformed_target_cpu/${TARGET_OS}/$RUNTIME
 
 
@@ -1676,6 +1676,7 @@ else
 #line 1677 "configure"
 #include "confdefs.h"
 
+#include <stdlib.h>
 f(void (*nested)())
 {
     (*nested)();
@@ -1695,7 +1696,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_nested_functions=yes
 else
@@ -1727,7 +1728,7 @@ EOF
 fi
 
 echo $ac_n "checking if the Objective-C compiler crashes with nested functions""... $ac_c" 1>&6
-echo "configure:1731: checking if the Objective-C compiler crashes with nested functions" >&5
+echo "configure:1732: checking if the Objective-C compiler crashes with nested functions" >&5
 if eval "test \"`echo '$''{'ac_cv_broken_compiler'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1749,11 +1750,12 @@ if test "$cross_compiling" = yes; then
   ac_cv_broken_compiler=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1753 "configure"
+#line 1754 "configure"
 #include "confdefs.h"
 
 #include <objc/objc.h>
 #include <objc/Object.h>
+#include <stdlib.h>
 
 void f()
 {
@@ -1786,7 +1788,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_broken_compiler=no
 else
@@ -1821,7 +1823,7 @@ echo "$ac_t""${ac_cv_broken_compiler}" 1>&6
 
 if test $target_cpu = i386; then
     echo $ac_n "checking whether __builtin_apply and __builtin_return are broken""... $ac_c" 1>&6
-echo "configure:1825: checking whether __builtin_apply and __builtin_return are broken" >&5
+echo "configure:1827: checking whether __builtin_apply and __builtin_return are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_broken_builtin_apply'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1843,7 +1845,7 @@ if test "$cross_compiling" = yes; then
   ac_cv_broken_builtin_apply=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1847 "configure"
+#line 1849 "configure"
 #include "confdefs.h"
 
 #include <objc/Object.h>
@@ -1895,7 +1897,7 @@ int main()
 }
 
 EOF
-if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_broken_builtin_apply=no
 else
@@ -1937,17 +1939,17 @@ for ac_hdr in ${GC_INCLUDE_DIR}gc.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1941: checking for $ac_hdr" >&5
+echo "configure:1943: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1946 "configure"
+#line 1948 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1976,7 +1978,7 @@ done
 
 if test "x$ac_cv_link_gc" = xyes; then
     echo $ac_n "checking for GC_malloc in -l${GC_LIB}""... $ac_c" 1>&6
-echo "configure:1980: checking for GC_malloc in -l${GC_LIB}" >&5
+echo "configure:1982: checking for GC_malloc in -l${GC_LIB}" >&5
 ac_lib_var=`echo ${GC_LIB}'_'GC_malloc | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1984,7 +1986,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l${GC_LIB}  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1988 "configure"
+#line 1990 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1995,7 +1997,7 @@ int main() {
 GC_malloc()
 ; return 0; }
 EOF
-if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2034,14 +2036,14 @@ if test x"$cross_compiling" = xyes; then
     echo "WARNING: cannot check for byte-order during cross compilation."
 else
     echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2038: checking whether byte ordering is bigendian" >&5
+echo "configure:2040: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 2045 "configure"
+#line 2047 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2052,11 +2054,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 2060 "configure"
+#line 2062 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2067,7 +2069,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -2087,7 +2089,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 2091 "configure"
+#line 2093 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -2100,7 +2102,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -2126,13 +2128,13 @@ fi
 fi
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2130: checking size of short" >&5 
+echo "configure:2132: checking size of short" >&5 
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 2136 "configure"
+#line 2138 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -2142,7 +2144,7 @@ int main() {
 switch (0) case 0: case (sizeof (short) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:2146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_short=$ac_size
 else
@@ -2166,13 +2168,13 @@ EOF
  
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2170: checking size of int" >&5 
+echo "configure:2172: checking size of int" >&5 
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 2176 "configure"
+#line 2178 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -2182,7 +2184,7 @@ int main() {
 switch (0) case 0: case (sizeof (int) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:2186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_int=$ac_size
 else
@@ -2206,13 +2208,13 @@ EOF
  
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2210: checking size of long" >&5 
+echo "configure:2212: checking size of long" >&5 
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 2216 "configure"
+#line 2218 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -2222,7 +2224,7 @@ int main() {
 switch (0) case 0: case (sizeof (long) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_long=$ac_size
 else
@@ -2246,13 +2248,13 @@ EOF
  
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:2250: checking size of long long" >&5 
+echo "configure:2252: checking size of long long" >&5 
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 2256 "configure"
+#line 2258 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -2262,7 +2264,7 @@ int main() {
 switch (0) case 0: case (sizeof (long long) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:2266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_long_long=$ac_size
 else
@@ -2286,13 +2288,13 @@ EOF
  
 
 echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:2290: checking size of float" >&5 
+echo "configure:2292: checking size of float" >&5 
 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 2296 "configure"
+#line 2298 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -2302,7 +2304,7 @@ int main() {
 switch (0) case 0: case (sizeof (float) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:2306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_float=$ac_size
 else
@@ -2326,13 +2328,13 @@ EOF
  
 
 echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:2330: checking size of double" >&5 
+echo "configure:2332: checking size of double" >&5 
 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 2336 "configure"
+#line 2338 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -2342,7 +2344,7 @@ int main() {
 switch (0) case 0: case (sizeof (double) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_double=$ac_size
 else
@@ -2366,13 +2368,13 @@ EOF
  
 
 echo $ac_n "checking size of long double""... $ac_c" 1>&6
-echo "configure:2370: checking size of long double" >&5 
+echo "configure:2372: checking size of long double" >&5 
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 2376 "configure"
+#line 2378 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -2382,7 +2384,7 @@ int main() {
 switch (0) case 0: case (sizeof (long double) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_long_double=$ac_size
 else
@@ -2411,12 +2413,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:2415: checking for $ac_hdr that defines DIR" >&5
+echo "configure:2417: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2420 "configure"
+#line 2422 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -2424,7 +2426,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -2449,7 +2451,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2453: checking for opendir in -ldir" >&5
+echo "configure:2455: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2457,7 +2459,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2461 "configure"
+#line 2463 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2468,7 +2470,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2490,7 +2492,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2494: checking for opendir in -lx" >&5
+echo "configure:2496: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2498,7 +2500,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
+#line 2504 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2509,7 +2511,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2535,17 +2537,17 @@ for ac_hdr in dir.h libc.h sys/time.h stdlib.h memory.h string.h                strings.h sys
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2539: checking for $ac_hdr" >&5
+echo "configure:2541: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2544 "configure"
+#line 2546 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2572,12 +2574,12 @@ fi
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2576: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2578: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2581 "configure"
+#line 2583 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2593,7 +2595,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2617,12 +2619,12 @@ fi
 for ac_func in memcpy ualarm getcwd getuid getpwnam getpwuid kill raise               getpagesize statvfs chown symlink readlink opendir fsync                sysconf GetSystemInfo gettimeofday GetLocalTime sigsetmask              sigset sigaction sighold                gethostbyname_r gethostbyaddr_r gethostent_r
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2621: checking for $ac_func" >&5
+echo "configure:2623: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2626 "configure"
+#line 2628 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2645,7 +2647,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2673,17 +2675,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2677: checking for $ac_hdr" >&5
+echo "configure:2679: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2682 "configure"
+#line 2684 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2712,12 +2714,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2716: checking for $ac_func" >&5
+echo "configure:2718: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2721 "configure"
+#line 2723 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2740,7 +2742,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2765,7 +2767,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2769: checking for working mmap" >&5
+echo "configure:2771: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2773,7 +2775,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2777 "configure"
+#line 2779 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2913,7 +2915,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2936,12 +2938,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2940: checking for ANSI C header files" >&5
+echo "configure:2942: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2945 "configure"
+#line 2947 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2949,7 +2951,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2966,7 +2968,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2970 "configure"
+#line 2972 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2984,7 +2986,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2988 "configure"
+#line 2990 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3005,7 +3007,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3009 "configure"
+#line 3011 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3016,7 +3018,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3040,12 +3042,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3044: checking for pid_t" >&5
+echo "configure:3046: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3049 "configure"
+#line 3051 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3074,17 +3076,17 @@ fi
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3078: checking for vfork.h" >&5
+echo "configure:3080: checking for vfork.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3083 "configure"
+#line 3085 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3109,18 +3111,18 @@ else
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3113: checking for working vfork" >&5
+echo "configure:3115: checking for working vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3119: checking for vfork" >&5
+echo "configure:3121: checking for vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3124 "configure"
+#line 3126 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -3143,7 +3145,7 @@ vfork();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -3165,7 +3167,7 @@ fi
 ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 3169 "configure"
+#line 3171 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -3260,7 +3262,7 @@ main() {
   }
 }
 EOF
-if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -3283,12 +3285,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3287: checking return type of signal handlers" >&5
+echo "configure:3289: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3292 "configure"
+#line 3294 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3305,7 +3307,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3325,12 +3327,12 @@ EOF
 
 
 echo $ac_n "checking for sqrt""... $ac_c" 1>&6
-echo "configure:3329: checking for sqrt" >&5
+echo "configure:3331: checking for sqrt" >&5
 if eval "test \"`echo '$''{'ac_cv_func_sqrt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3334 "configure"
+#line 3336 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sqrt(); below.  */
@@ -3353,7 +3355,7 @@ sqrt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_sqrt=yes"
 else
@@ -3373,7 +3375,7 @@ else
 LIBS="$LIBS -lm -lc"
 ac_cv_func_sqrt=no
 cat > conftest.$ac_ext <<EOF
-#line 3377 "configure"
+#line 3379 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3383,7 +3385,7 @@ sqrt(2.0);
 
 ; return 0; }
 EOF
-if { (eval echo configure:3387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_sqrt="-lm -lc"
 else
@@ -3402,7 +3404,7 @@ if test "$cross_compiling" = yes; then
     echo "WARNING: cannot check for restartable system calls during cross compilation."
 else
     echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
-echo "configure:3406: checking for restartable system calls" >&5
+echo "configure:3408: checking for restartable system calls" >&5
 if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3410,7 +3412,7 @@ else
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3414 "configure"
+#line 3416 "configure"
 #include "confdefs.h"
 /* Exit 0 (true) if wait returns something other than -1,
    i.e. the pid of the child, which means that wait was restarted
@@ -3428,7 +3430,7 @@ main () {
 }
 
 EOF
-if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sys_restartable_syscalls=yes
 else
index 7a4a4fbbdbec779f5ce7cd1aa7022265e68c51b9..a81253f9b9b3a7ca454d91273ff6fe857d4fe18d 100644 (file)
@@ -4,7 +4,7 @@ AC_INIT(${srcdir}/Foundation/NSObject.h.in)
 
 # ******************** GNUstep env ************************************
 
-if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then
+if test "x${GNUSTEP_MAKEFILES}" = "x"; then
   AC_MSG_ERROR(Your GNUstep.sh is not sourced, please load GNUstep.sh prior running configure!)
 fi
 
@@ -12,8 +12,8 @@ fi
 
 # todo: read from Version file?
 MAJOR_VERSION=1
-MINOR_VERSION=0
-SUBMINOR_VERSION=73
+MINOR_VERSION=1
+SUBMINOR_VERSION=3
 
 AC_SUBST(MAJOR_VERSION)
 AC_SUBST(MINOR_VERSION)
@@ -213,7 +213,7 @@ AC_CHECK_LIB(nsl,    chown)
 AC_CHECK_LIB(socket, accept)
 
 RUNTIME=GNU
-transformed_target_cpu=`${GNUSTEP_SYSTEM_ROOT}/Makefiles/clean_cpu.sh ${TARGET_CPU}`
+transformed_target_cpu=`${GNUSTEP_MAKEFILES}/clean_cpu.sh ${TARGET_CPU}`
 ac_cv_file_output_prefix=Foundation/$transformed_target_cpu/${TARGET_OS}/$RUNTIME
 
 
index 04edda4313108b03daaa8e40aa177f8564dc5d79..774037fd2b5b636e4a2fa20e8b1908e67d58c77d 100644 (file)
@@ -1,3 +1,23 @@
+libfoundation1.1 (1.1.2-1) unstable; urgency=low
+
+  * New upstream release
+  * doesn't require libobjc-lf2 anymore
+
+ -- Frank Reppin <frank@opengroupware.org>  Thu, 13 Jul 2006 13:03:00 +0200
+
+libfoundation1.0 (1.0.76-1) unstable; urgency=low
+
+  * New upstream release
+  * Declare an existing alternative dependency to virtual package libobjc-lf-dev
+
+ -- Sebastian Ley <ley@debian.org>  Thu, 11 Aug 2005 11:48:39 +0200
+
+libfoundation1.0 (1.0.72-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Sebastian Ley <ley@debian.org>  Sun,  7 Aug 2005 23:19:43 +0200
+
 libfoundation1.0 (1.0r24-1) experimental; urgency=low
 
   * Initial Release.
index 2964f19d028ec9685b7eda08bebfe195ff2774ce..7d4fd4e9eb1d0d8741295b55e337d48fc52cf8b6 100644 (file)
@@ -1,15 +1,15 @@
-Source: libfoundation1.0
+Source: libfoundation1.1
 Priority: extra
 Maintainer: Sebastian Ley <ley@debian.org>
-Build-Depends: debhelper (>= 4.0.0), dpatch, gnustep-make-ogo, gobjc | objc-compiler, libobjc-lf-dev
+Build-Depends: debhelper (>= 4.0.0), dpatch, gnustep-make-ogo, gobjc | objc-compiler, libobjc1
 Standards-Version: 3.6.1
 
-Package: libfoundation1.0-dev
+Package: libfoundation1.1-dev
 Section: libdevel
 Architecture: any
 Provides: libfoundation-dev
-Conflicts: libfoundation-dev
-Depends: libfoundation1.0 (= ${Source-Version})
+Conflicts: libfoundation-dev, libfoundation1.0-dev
+Depends: libfoundation1.1 (= ${Source-Version})
 Description: Development files for libfoundation
  LibFoundation is a library that provides an almost complete
  implementation of the OpenStep specification plus many other extensions
@@ -17,10 +17,11 @@ Description: Development files for libfoundation
  .
  This package contains the development files of libFoundation.
 
-Package: libfoundation1.0
+Package: libfoundation1.1
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, libfoundation-data
+Conflicts: libfoundation-ogo1.0, libfoundation1.0
 Description: Implementation of the OpenStep specification
  LibFoundation is a library that provides an almost complete
  implementation of the OpenStep specification plus many other extensions
diff --git a/libFoundation/debian/libfoundation1.1-dev.install b/libFoundation/debian/libfoundation1.1-dev.install
new file mode 100644 (file)
index 0000000..bc830ce
--- /dev/null
@@ -0,0 +1,3 @@
+usr/lib/*.so
+usr/include
+usr/lib/opengroupware.org/System/Library/Makefiles
diff --git a/libFoundation/debian/libfoundation1.1.install b/libFoundation/debian/libfoundation1.1.install
new file mode 100644 (file)
index 0000000..093956b
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/*.so.*
index 4283b0ade4686576c640ea59d0cea52d5e801b25..e78cdcd284408603e363711b84523211681afa58 100755 (executable)
@@ -106,7 +106,7 @@ binary-arch: build install
 #      dh_python
        dh_makeshlibs -V
        dh_installdeb
-       dh_shlibdeps  -L libfoundation1.0 -l debian/libfoundation1.0/usr/lib
+       dh_shlibdeps  -L libfoundation1.1 -l debian/libfoundation1.1/usr/lib
        dh_gencontrol
        dh_md5sums
        dh_builddeb
index 8a7b02c8ec7ea43e533ed26a629e47b9e3e377d1..a95e43c9649132d18fa228a220c74b9d7d45851f 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <Foundation/Foundation.h>
 
-volatile void usage (void)
+static void usage (void)
 {
     puts ("Tool to manipulate the defaults database of a generic implementation of");
     puts ("OpenStep Foundation.\n");
@@ -59,40 +59,47 @@ volatile void usage (void)
     exit (0);
 }
 
-void read_command (NSArrayarguments)
+void read_command (NSArray *arguments)
 {
-    NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
-    id result = [NSMutableDictionary dictionary];
-    int argumentsCount = [arguments count];
+    NSUserDefaults      *defaults;
+    NSMutableDictionary *result;
+    unsigned            argumentsCount;
+
+    defaults       = [NSUserDefaults standardUserDefaults];
+    result         = [NSMutableDictionary dictionaryWithCapacity:4];
+    argumentsCount = [arguments count];
 
     if (argumentsCount == 2) { /* Defaults read */
        /* Show the defaults for all the persistent domains */
-       NSArray* persistentDomainNames = [defaults persistentDomainNames];
-       int i, count = [persistentDomainNames count];
-       NSStringkey;
+       NSArray  *persistentDomainNames;
+       unsigned i, count;
+       NSString *key;
 
-       for (i = 0; i < count; i++) {
+       persistentDomainNames = [defaults persistentDomainNames];
+       
+       for (i = 0, count = [persistentDomainNames count]; i < count; i++) {
            key = [persistentDomainNames objectAtIndex:i];
            [result setObject:[defaults persistentDomainForName:key]
                    forKey:key];
        }
     }
-    else if (argumentsCount == 3
-            || argumentsCount == 4) {  /* Defaults read "domain name" [key] */
+    else if (argumentsCount == 3 || argumentsCount == 4) {
+       /* Defaults read "domain name" [key] */
        /* Show the defaults for a given domain */
-       NSStringdomainName = [arguments objectAtIndex:2];
+       NSString *domainName = [arguments objectAtIndex:2];
 
-       result = [defaults persistentDomainForName:domainName];
-       if (!result) {
+       result = (NSMutableDictionary *)
+           [defaults persistentDomainForName:domainName];
+       if (result == nil) {
            NSLog(@"Domain '%@' does not exist!", domainName);
            exit (1);
        }
 
        if (argumentsCount == 4) {
-           NSString* key = [arguments objectAtIndex:3];
-           id value = [result objectForKey:key];
-
-           if (!value) {
+           NSString *key  = [arguments objectAtIndex:3];
+           id       value = [result objectForKey:key];
+           
+           if (value == nil) {
                NSLog(@"There is no key '%@' under the '%@' domain!",
                       key, domainName);
                exit (1);
@@ -103,10 +110,12 @@ void read_command (NSArray* arguments)
     }
     else if (argumentsCount == 4) {    /* Defaults read "domain name" key */
        /* Show the defaults for a given key in a domain */
-       NSString* domainName = [arguments objectAtIndex:2];
+       NSString *domainName;
 
-       result = [defaults persistentDomainForName:domainName];
-       if (!result) {
+       domainName = [arguments objectAtIndex:2];
+       result = (NSMutableDictionary *)
+           [defaults persistentDomainForName:domainName];
+       if (result == nil) {
            NSLog (@"Domain '%@' does not exist!", domainName);
            exit (1);
        }
index 2702aa37d3d524cfadcebf035c67ce9d64b4c51e..7eeaf15eaf2124332aeedf78a44c8a3109634efd 100644 (file)
@@ -24,9 +24,9 @@
 
 -include ../gsfix.make
 
-ifeq ($(GNUSTEP_SYSTEM_ROOT),)
+ifeq ($(GNUSTEP_MAKEFILES),)
 
-$(warning ERROR: Your $(GNUSTEP_SYSTEM_ROOT) environment variable is empty !)
+$(warning ERROR: Your $(GNUSTEP_MAKEFILES) environment variable is empty !)
 $(error Please try again after running ". $(GNUSTEP_MAKEFILES)/GNUstep.sh")
 
 else
@@ -37,6 +37,7 @@ OBJC_RUNTIME=GNU
 GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
 
 include $(GNUSTEP_MAKEFILES)/common.make
+-include ../Foundation/libFoundation.make
 
 ifeq ($(gc), yes)
 ifeq ($(LIBFOUNDATION_WITH_GC), yes)
@@ -54,8 +55,14 @@ endif
 ADDITIONAL_LIB_DIRS = \
        -L../Foundation/$(GNUSTEP_OBJ_DIR) \
 
+ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
 SYSTEM_LIB_DIR += \
-       -L/usr/local/lib -L/usr/lib
+       -L$(FHS_INSTALL_ROOT)/lib64     \
+       -L/usr/local/lib64              \
+       -L/usr/lib64
+else
+SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
+endif
 
 ADDITIONAL_INCLUDE_DIRS = \
        -I..    \
index 7f224ad64757f2cc1a016c1beeacb43fe047f3de..ad2ce8f22a1555d2e204014a7ab9ea2561b09dcc 100755 (executable)
@@ -10,7 +10,7 @@ Group:        Development/Libraries
 AutoReqProv:  off
 Source:       %{libf_source}
 Prefix:       %{libf_prefix}
-Requires:     libobjc-lf2
+#Requires:     libobjc-lf2
 Conflicts:    libfoundation
 BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root