diff --git a/Source/GSArray.m b/Source/GSArray.m index 25f0c1c74..013595844 100644 --- a/Source/GSArray.m +++ b/Source/GSArray.m @@ -191,7 +191,7 @@ static Class GSInlineArrayClass; { /* For performace we encode directly ... must exactly match the * superclass implemenation. */ - [aCoder encodeValueOfObjCType: @encode(NSUInteger) + [aCoder encodeValueOfObjCType: @encode(unsigned) at: &_count]; if (_count > 0) { @@ -212,7 +212,7 @@ static Class GSInlineArrayClass; { /* for performance, we decode directly into memory rather than * using the superclass method. Must exactly match superclass. */ - [aCoder decodeValueOfObjCType: @encode(NSUInteger) + [aCoder decodeValueOfObjCType: @encode(unsigned) at: &_count]; if (_count > 0) { @@ -542,9 +542,9 @@ static Class GSInlineArrayClass; } else { - NSUInteger count; + unsigned count; - [aCoder decodeValueOfObjCType: @encode(NSUInteger) + [aCoder decodeValueOfObjCType: @encode(unsigned) at: &count]; if ((self = [self initWithCapacity: count]) == nil) { @@ -1135,17 +1135,17 @@ static Class GSInlineArrayClass; } else { - NSUInteger c; + unsigned c; #if GS_WITH_GC GSArray *a; - [aCoder decodeValueOfObjCType: @encode(NSUInteger) at: &c]; + [aCoder decodeValueOfObjCType: @encode(unsigned) at: &c]; a = (id)NSAllocateObject(GSArrayClass, 0, [self zone]); a->_contents_array = NSAllocateCollectable(sizeof(id)*c, NSScannedOption); #else GSInlineArray *a; - [aCoder decodeValueOfObjCType: @encode(NSUInteger) at: &c]; + [aCoder decodeValueOfObjCType: @encode(unsigned) at: &c]; a = (id)NSAllocateObject(GSInlineArrayClass, sizeof(id)*c, [self zone]); a->_contents_array diff --git a/Source/GSCountedSet.m b/Source/GSCountedSet.m index a42db4262..4aabe26f8 100644 --- a/Source/GSCountedSet.m +++ b/Source/GSCountedSet.m @@ -167,12 +167,12 @@ static GC_descr nodeDesc; // Type descriptor for map node. - (void) encodeWithCoder: (NSCoder*)aCoder { - NSUInteger count = map.nodeCount; + unsigned count = map.nodeCount; SEL sel1 = @selector(encodeObject:); IMP imp1 = [aCoder methodForSelector: sel1]; SEL sel2 = @selector(encodeValueOfObjCType:at:); IMP imp2 = [aCoder methodForSelector: sel2]; - const char *type = @encode(NSUInteger); + const char *type = @encode(unsigned); GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map); GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator); @@ -206,12 +206,12 @@ static GC_descr nodeDesc; // Type descriptor for map node. - (id) initWithCoder: (NSCoder*)aCoder { - NSUInteger count; + unsigned count; id value; NSUInteger valcnt; SEL sel = @selector(decodeValueOfObjCType:at:); IMP imp = [aCoder methodForSelector: sel]; - const char *utype = @encode(NSUInteger); + const char *utype = @encode(unsigned); const char *otype = @encode(id); (*imp)(aCoder, sel, utype, &count); diff --git a/Source/GSDictionary.m b/Source/GSDictionary.m index 377334397..04d636535 100644 --- a/Source/GSDictionary.m +++ b/Source/GSDictionary.m @@ -126,13 +126,13 @@ static SEL objSel; } else { - NSUInteger count = map.nodeCount; + unsigned count = map.nodeCount; SEL sel = @selector(encodeObject:); IMP imp = [aCoder methodForSelector: sel]; GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map); GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator); - [aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &count]; + [aCoder encodeValueOfObjCType: @encode(unsigned) at: &count]; while (node != 0) { (*imp)(aCoder, sel, node->key.obj); @@ -161,14 +161,14 @@ static SEL objSel; } else { - NSUInteger count; + unsigned count; id key; id value; SEL sel = @selector(decodeValueOfObjCType:at:); IMP imp = [aCoder methodForSelector: sel]; const char *type = @encode(id); - [aCoder decodeValueOfObjCType: @encode(NSUInteger) + [aCoder decodeValueOfObjCType: @encode(unsigned) at: &count]; GSIMapInitWithZoneAndCapacity(&map, [self zone], count); diff --git a/Source/GSSet.m b/Source/GSSet.m index 556785cc8..f3ef49a94 100644 --- a/Source/GSSet.m +++ b/Source/GSSet.m @@ -199,13 +199,13 @@ static Class mutableSetClass; } else { - NSUInteger count = map.nodeCount; + unsigned count = map.nodeCount; SEL sel = @selector(encodeObject:); IMP imp = [aCoder methodForSelector: sel]; GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map); GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator); - [aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &count]; + [aCoder encodeValueOfObjCType: @encode(unsigned) at: &count]; while (node != 0) { (*imp)(aCoder, sel, node->key.obj); @@ -233,13 +233,13 @@ static Class mutableSetClass; } else { - NSUInteger count; + unsigned count; id value; SEL sel = @selector(decodeValueOfObjCType:at:); IMP imp = [aCoder methodForSelector: sel]; const char *type = @encode(id); - (*imp)(aCoder, sel, @encode(NSUInteger), &count); + (*imp)(aCoder, sel, @encode(unsigned), &count); GSIMapInitWithZoneAndCapacity(&map, [self zone], count); while (count-- > 0) diff --git a/Source/Makefile.preamble b/Source/Makefile.preamble index 52cff99d6..aa10fbd92 100644 --- a/Source/Makefile.preamble +++ b/Source/Makefile.preamble @@ -57,10 +57,10 @@ ADDITIONAL_CPPFLAGS = $(DEFS) $(CONFIG_SYSTEM_DEFS) -Wall \ # Additional flags to pass to the Objective-C compiler -ADDITIONAL_OBJCFLAGS = +#ŁADDITIONAL_OBJCFLAGS+= # Additional flags to pass to the C compiler -ADDITIONAL_CFLAGS = +#ADDITIONAL_CFLAGS+= # Additional include directories the compiler should search ADDITIONAL_INCLUDE_DIRS = \ @@ -69,7 +69,7 @@ ADDITIONAL_INCLUDE_DIRS = \ -I./$(GNUSTEP_TARGET_DIR) # Additional LDFLAGS to pass to the linker -ADDITIONAL_LDFLAGS = +#ADDITIONAL_LDFLAGS+= # Additional library directories the linker should search ADDITIONAL_LIB_DIRS = -L$(GNUSTEP_OBJ_DIR) diff --git a/Source/NSException.m b/Source/NSException.m index c2b066b1c..8037d0886 100644 --- a/Source/NSException.m +++ b/Source/NSException.m @@ -897,20 +897,19 @@ callUncaughtHandler(id value) - (void) raise { -#ifndef _NATIVE_OBJC_EXCEPTIONS - NSThread *thread; - NSHandler *handler; -#endif - if (_reserved == 0) { _reserved = NSZoneCalloc([self zone], 2, sizeof(id)); } _e_stack = [GSStackTrace new]; -#ifdef _NATIVE_OBJC_EXCEPTIONS +#if defined(_NATIVE_OBJC_EXCEPTIONS) @throw self; #else +{ + NSThread *thread; + NSHandler *handler; + thread = GSCurrentThread(); handler = thread->_exception_handler; if (handler == NULL) @@ -940,6 +939,7 @@ callUncaughtHandler(id value) thread->_exception_handler = handler->next; handler->exception = self; longjmp(handler->jumpState, 1); +} #endif }