+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)
- (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);
- (NSEnumerator *)keyEnumerator
{
- return AUTORELEASE([[_GCDictionaryKeyEnumerator alloc]
+ return AUTORELEASE([(_GCDictionaryKeyEnumerator *)
+ [_GCDictionaryKeyEnumerator alloc]
initWithDictionary:self]);
}
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 */
- (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);
}
}
@end /* GCMutableDictionary */
+
/*
Local Variables:
c-basic-offset: 4
tab-width: 8
End:
*/
-
-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
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
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
# 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
@end
@implementation __DummyGCObject
+
+ allocWithZone:(NSZone*)zone
{
return NSAllocateObject(self, 0, zone);
- (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
{
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++;
}
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 !");
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));
}
*/
_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;
- (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;
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 {
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];
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
}
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);
}
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);
}
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]));
}
NSConcreteArrayClass = [NSConcreteArray class];
return NSAllocateObject( (self == NSArrayClass) ?
- NSConcreteArrayClass : self, 0, zone);
+ NSConcreteArrayClass : (Class)self, 0, zone);
}
+ (id)array
NSConcreteMutableArrayClass = [NSConcreteMutableArray class];
return NSAllocateObject( (self == NSMutableArrayClass) ?
- NSConcreteMutableArrayClass : self, 0, zone);
+ NSConcreteMutableArrayClass : (Class)self,
+ 0, zone);
}
+ (id)arrayWithCapacity:(unsigned int)aNumItems
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;
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) {
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);
}
}
isFlattened = [NSBundle isFlattenedDirLayout];
environment = useGNUstepEnv
? [[NSProcessInfo processInfo] environment]
- : nil;
+ : (NSDictionary *)nil;
fm = [NSFileManager defaultManager];
return (unsigned)self->timeSinceRef;
}
-- (NSComparisonResult)compare:(NSDate *)other
+- (NSComparisonResult)compare:(id)other
{
if ([other isKindOfClass:[NSDate class]]) {
NSTimeInterval diff
+ (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
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]);
}
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
+ (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
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]);
#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
@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 */
/*
- (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
@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]
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]
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];
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) {
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);
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];
#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);\
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
return data;
}
-- (char)charValue
+- (signed char)charValue
{
return data;
}
/* 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
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];
}
raise];
}
- bytes = [self __compact8BitBytes];
+ bytes = (unsigned char *)[self __compact8BitBytes];
for (i = 0; i < aRange.length; i++)
buffer[i] = bytes[i];
}
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]
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);
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
// 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];
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 *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];
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 char* bytes = (unsigned char *)[self __compact8BitBytes];
unsigned int toMove = MIN(maxLength, aRange.length);
unsigned int cLength = [self cStringLength];
- (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];
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
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 @"\"\"";
/* 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;
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];
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++)
+ (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;
}
- (const char *)cString
{
- return self->cString;
+ return (const char *)self->cString;
}
- (unsigned int)cStringLength
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
+ (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;
}
- (const char *)cString
{
- return self->cString;
+ return (const char *)self->cString;
}
- (unsigned int)cStringLength
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
}
mbytes = self->cString + aRange.location;
- abytes = [(id)aString __compact8BitBytes];
+ abytes = (unsigned char *)[(id)aString __compact8BitBytes];
a = [aString cStringLength];
n = MIN(a, aRange.length);
/* 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;
- (const char *)cString
{
- return &(self->c[0]);
+ return (const char *)&(self->c[0]);
}
- (unsigned int)cStringLength
- (char *)__compact8BitBytes
{
- return &(self->c[0]);
+ return (char *)&(self->c[0]);
}
- (unsigned)hash
raise];
}
self->cLength = 0;
- self->cString = "";
+ self->cString = (unsigned char *)"";
return self;
}
sel_get_name(_cmd), NSStringFromClass([self class])] raise];
}
cLength = length;
- cString = byteString;
+ cString = (unsigned char *)byteString;
return self;
}
- (const char *)cString
{
- return self->cString;
+ return (const char *)self->cString;
}
- (unsigned int)cStringLength
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 */
self->cString[self->cLength] = 0;
}
else
- self->cString = byteString;
+ self->cString = (unsigned char *)byteString;
return self;
}
@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
- (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
{
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;
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);
}
}
}
#endif
-- (const char*)cString
+- (const char *)cString
{
unsigned char *str;
#if !LIB_FOUNDATION_BOEHM_GC
[NSAutoreleasedPointer autoreleasePointer:str];
#endif
- return str;
+ return (const char *)str;
}
@end /* NSNonOwnedOpen8BitString */
}
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();
}
cString[length] = 0;
}
else
- self->cString = byteString;
+ self->cString = (unsigned char *)byteString;
return self;
}
#if !LIB_FOUNDATION_BOEHM_GC
[NSAutoreleasedPointer autoreleasePointer:str];
#endif
- return str;
+ return (const char *)str;
}
@end /* NSOwnedOpen8BitString */
+
@implementation NSRange8BitString /* final */
- (id)initWithString:(NSString *)aParent
raise];
}
- self->cString = bytes;
+ self->cString = (unsigned char *)bytes;
self->cLength = length;
self->parent = RETAIN(aParent);
return self;
return AUTORELEASE([[NSRange8BitString alloc]
initWithString:parent
- bytes:cString+aRange.location
+ bytes:((char *)cString + aRange.location)
length:aRange.length]);
}
return self;
}
-- (id)detailForDate:(NSDate *)date
+- (id)detailForDate:(NSCalendarDate *)date
{
return self->detail;
}
}
}
-- (NSDate *)startDate
+- (NSCalendarDate *)startDate
{
return self->startDate;
}
-- (NSDate *)endDate
+- (NSCalendarDate *)endDate
{
return self->endDate;
}
[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;
}
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];
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);
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
+ (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;
@class NSTimeZoneDetail;
-@interface NSTimeZone: NSObject <NSCoding>
+@interface NSTimeZone : NSObject <NSCoding>
+ (void)setDefaultTimeZone:(NSTimeZone*)aTimeZone;
+ (NSTimeZone*)defaultTimeZone;
+ (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]
return distantFuture;
}
-+ (NSDate *)distantPast
++ (id)distantPast
{
if (distantPast == nil) {
distantPast = [[self alloc]
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])];
anotherDate : self;
}
-- (NSComparisonResult)compare:(NSDate *)other
+- (NSComparisonResult)compare:(id)other
{
[self subclassResponsibility:_cmd];
return NSOrderedSame;
}
/* 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:
{
return [self initWithInt:value ? 1 : 0];
}
-- (id)initWithChar:(char)value
+- (id)initWithChar:(signed char)value
{
return [self initWithInt:value];
}
{
return [self initWithInt:value];
}
-- (id)initWithShort:(short)value
+- (id)initWithShort:(signed short)value
{
return [self initWithInt:value];
}
return [self initWithInt:value];
}
-- (id)initWithInt:(int)value
+- (id)initWithInt:(signed int)value
{
NSDecimal d;
d.exponent = 0;
return [self initWithDecimal:d];
}
-- (id)initWithLong:(long)value
+- (id)initWithLong:(signed long)value
{
NSDecimal d;
d.exponent = 0;
return [self initWithDecimal:d];
}
-- (id)initWithLongLong:(long long)value
+- (id)initWithLongLong:(signed long long)value
{
NSDecimal d;
d.exponent = 0;
{
return [self intValue] ? YES : NO;
}
-- (char)charValue
+- (signed char)charValue
{
return [self intValue];
}
{
return [self intValue];
}
-- (short)shortValue
+- (signed short)shortValue
{
return [self intValue];
}
return self->decimal.mantissa;
return [self doubleValue];
}
-- (long)longValue
+- (signed long)longValue
{
return [self doubleValue];
}
return self->decimal.mantissa;
return [self doubleValue];
}
-- (long long)longLongValue
+- (signed long long)longLongValue
{
return [self doubleValue];
}
#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
#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
#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
#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
#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
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);
+ (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]) {
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 =
+ (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
#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(NSHandler* handler)
+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
}
}
- (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
#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)
#ifdef BROKEN_COMPILER
uncaughtHandler = handler;
#else
- firstExceptionHandler.handler = handler;
+ firstExceptionHandler.handler = (THandlerFunction)handler;
#endif
}
else
{
return (self == [NSFileHandle class])
? [NSConcreteFileHandle allocWithZone:zone]
- : NSAllocateObject(self, 0, zone);
+ : (id)NSAllocateObject(self, 0, zone);
}
+ (id)fileHandleForReadingAtPath:(NSString*)path
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;
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;
- (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:@","]];
}
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;
}
{
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;
#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]
+ 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
- (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)
];
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]);
/* 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;
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;
+ }
}
}
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
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) {
+ (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
- (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:
+*/
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];
+ (id)allocWithZone:(NSZone*)zone
{
return NSAllocateObject((self == [NSNumber class])
- ? [NSTemporaryNumber class] : self,
+ ? [NSTemporaryNumber class] : (Class)self,
0, zone);
}
return value ? boolYes : boolNo;
}
-+ (NSNumber*)numberWithChar:(char)value
++ (NSNumber*)numberWithChar:(signed char)value
{
return AUTORELEASE([[NSCharNumber alloc]
initValue:&value withObjCType:NULL]);
return nil;
}
-- (id)initWithChar:(char)value
+- (id)initWithChar:(signed char)value
{
[self shouldNotImplement:_cmd];
return nil;
return 0;
}
-- (char)charValue
+- (signed char)charValue
{
[self subclassResponsibility:_cmd];
return 0;
}
- (NSString *)negativeFormat
{
- return self->negativeFormat ? self->negativeFormat : negDefaultFormat;
+ return self->negativeFormat != nil
+ ? self->negativeFormat : (NSString *)negDefaultFormat;
}
- (void)setPositiveFormat:(NSString *)_format
_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
{
{
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;
SEL selector;
}
+ holderForTarget:(id)target argument:(id)argument selector:(SEL)action;
-- (BOOL)isEqual:anotherHolder;
+- (BOOL)isEqual:(_NSObjectDelayedExecutionHolder *)anotherHolder;
- (void)execute;
@end
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]
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];
- (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);
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
- (id)performSelector:(SEL)aSelector withObject:(id)anObject
{
struct objc_method *mth;
- const unsigned char *argType;
+ const char *argType;
if (aSelector == NULL) {
[[[ObjcRuntimeException alloc]
}
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];
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;
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));
#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;
#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
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
+ (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;
}
([self length]
? [str stringByAppendingString:aString]
: aString)]
- : AUTORELEASE([self copyWithZone:[self zone]]);
+ : (NSString *)AUTORELEASE([self copyWithZone:[self zone]]);
}
- (NSArray *)stringsByAppendingPaths:(NSArray *)paths
return [aString length]
? [self stringByAppendingString:
[extensionSeparator stringByAppendingString:aString]]
- : AUTORELEASE([self copyWithZone:[self zone]]);
+ : (NSString *)AUTORELEASE([self copyWithZone:[self zone]]);
}
- (NSString *)stringByDeletingLastPathComponent
__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
return self;
#endif
}
- return [NSString stringWithCString:resolved];
+ return [NSString stringWithCString:(char *)resolved];
#endif
}
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
[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 {
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);
[_ctx setResult:
[NSDictionary dictionaryWithObjects:values forKeys:keys count:2]
forFunction:@"parseKeyCompPredicate"
- atPos:(unsigned)_buf];
+ atPos:(unsigned long)_buf];
*_predLen = pos;
}
return qual;
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__,
[_ctx setResult:
[NSDictionary dictionaryWithObjects:values forKeys:keys count:2]
forFunction:@"parseKey"
- atPos:(unsigned)_buf];
+ atPos:(unsigned long)_buf];
*_keyLen = pos;
}
return result;
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> ",
if (qDebug) {
NSLog(@"%s: return <%@> for <%s> ", __PRETTY_FUNCTION__,
- obj?obj:@"<nil>", _buf);
+ obj != nil ? obj : (id)@"<nil>", _buf);
}
if (obj != nil) {
[_ctx setResult:
[NSDictionary dictionaryWithObjects:values forKeys:keys count:2]
- forFunction:@"parseValue" atPos:(unsigned)_buf];
+ forFunction:@"parseValue" atPos:(unsigned long)_buf];
*_keyLen = pos;
}
return obj;
- (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 {
- (NSString *)description
{
return [NSString stringWithFormat:
- @"<%@[0x%08X]: object=%@ actitivity=%s>",
+ @"<%@[0x%p]: object=%@ actitivity=%s>",
NSStringFromClass([self class]), self,
self->fileObject,
activityDesc[self->watchedActivities]
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);
/* 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];
}
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>)
/* Monitoring file objects */
- (void)addFileObject:(id)_fileObject
- activities:(NSPosixFileActivities)_activities
+ activities:(unsigned int)_activities /* NSPosixFileActivities */
forMode:(NSString *)_mode
{
[_getInputManager(self, _mode) addFileObject:_fileObject
+ (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
}
case NSASCIIStringEncoding:
case NSISOLatin1StringEncoding: {
- self = [self initWithCString:buf length:len];
+ self = [self initWithCString:(char *)buf length:len];
lfFree(buf);
return self;
}
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,...
{
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
+ (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
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)
{
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)
+ (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;
}
too often.
*/
+@interface NSException(UsedPrivates)
++ (void)taskNowMultiThreaded:(NSNotification *)_notification;
+@end
+
+@interface NSNotificationCenter(UsedPrivates)
++ (void)taskNowMultiThreaded:(NSNotification *)_notification;
+@end
+
/* NSThread notifications */
LF_DECLARE NSString* NSWillBecomeMultiThreadedNotification =
didInit = YES;
{
- id regionsDictionary;
+ NSDictionary *regionsDictionary;
id regionsFile = nil;
NSString *offset;
NSEnumerator *enumerator;
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;
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;
}
{
return self->port > 0
? [NSNumber numberWithUnsignedInt:self->port]
- : nil;
+ : (NSNumber *)nil;
}
- (NSString *)fragment
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;
}
{
return self->port > 0
? [NSNumber numberWithUnsignedInt:self->port]
- : nil;
+ : (NSNumber *)nil;
}
- (NSString *)fragment
- (void)removeObjectForKey:(NSString*)defaultName
{
- NSMutableDictionary *domain = [self persistentDomainForName:appDomain];
+ NSMutableDictionary *domain = (NSMutableDictionary *)
+ [self persistentDomainForName:appDomain];
[domain removeObjectForKey:defaultName];
[self persistentDomainHasChanged:appDomain];
}
if (sharedDefaults == nil) {
if (sharedDefaultsDir) {
sharedDefaults = (id)
- [[NSSharedUserDefaults alloc]
+ [(NSSharedUserDefaults *)[NSSharedUserDefaults alloc]
initWithPath:sharedDefaultsDir];
}
else {
#endif
sharedDefaults = (id)
- [[NSSharedUserDefaults alloc] initWithPath:defdir];
+ [(NSSharedUserDefaults *)[NSSharedUserDefaults alloc]
+ initWithPath:defdir];
}
[sharedDefaults makeStandardDomainSearchList];
}
@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
}
/* 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;
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
- (NSString*)convertString:(va_list*)pString scanner:(FormatScanner*)scanner
{
- char* string = 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
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
}
forKey:@"lastLine"];
}
else {
- NSLog(@"%s: startPos=0x%08X endPos=0x%08X",
+ NSLog(@"%s: startPos=0x%p endPos=0x%p",
__PRETTY_FUNCTION__, startPos, endPos);
}
}
return nil;
}
- s = [[NSString alloc] initWithCString:_buffer length:_len];
+ s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
result = NSParseStringFromString(s);
[s release];
return result;
return nil;
}
- s = [[NSString alloc] initWithCString:_buffer length:_len];
+ s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
result = NSParseArrayFromString(s);
[s release];
return result;
return nil;
}
- s = [[NSString alloc] initWithCString:_buffer length:_len];
+ s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
result = NSParseDictionaryFromString(s);
[s release];
return result;
return nil;
}
- s = [[NSString alloc] initWithCString:_buffer length:_len];
+ s = [[NSString alloc] initWithCString:(char *)_buffer length:_len];
result = NSParsePropertyListFromString(s);
[s release];
return result;
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;
[s release];
}
else {
- NSLog(@"%s: startPos=0x%08X endPos=0x%08X",
+ NSLog(@"%s: startPos=0x%p endPos=0x%p",
__PRETTY_FUNCTION__, startPos, endPos);
}
}
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
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
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)
-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
-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
# 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
rm -rf $(addprefix $(INSTALL_DIR)/, \
CharacterSets TimeZoneInfo Defaults)
+endif
# version file
MAJOR_VERSION:=1
-MINOR_VERSION:=0
-SUBMINOR_VERSION:=75
+MINOR_VERSION:=1
+SUBMINOR_VERSION:=3
+
[AC_LANG_SAVE[]dnl
AC_LANG_OBJECTIVE_C[]
AC_TRY_RUN([
+#include <stdlib.h>
f(void (*nested)())
{
(*nested)();
AC_TRY_RUN([
#include <objc/objc.h>
#include <objc/Object.h>
+#include <stdlib.h>
void f()
{
#! /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
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 ;;
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 ;;
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);
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 ;;
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
????????: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()
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
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
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 ;;
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:*:*)
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 ()
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:*:* )
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
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/[^.]*//'`
*: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
(/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 ;;
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`
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 ;;
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*)
# 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>
#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
#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)
}
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.
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:
#! /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/'`
;;
-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
;;
-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.
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
;;
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
;;
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
;;
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
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
;;
basic_machine=tron-gmicro
os=-sysv
;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
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
;;
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
;;
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])
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
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
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)
basic_machine=mips-sony
os=-newsos
;;
- necv70) # EGCS LOCAL
+ necv70)
basic_machine=v70-nec
os=-sysv
;;
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
;;
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
;;
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
;;
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
;;
basic_machine=sh-hitachi
os=-hms
;;
- sparclite-wrs) # EGCS LOCAL
+ sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
spur)
basic_machine=spur-unknown
;;
- st2000) # EGCS LOCAL
+ st2000)
basic_machine=m68k-tandem
;;
- stratus) # EGCS LOCAL
+ stratus)
basic_machine=i860-stratus
os=-sysv4
;;
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
;;
basic_machine=a29k-nyu
os=-sym1
;;
- v810 | necv810) # EGCS LOCAL
+ v810 | necv810)
basic_machine=v810-nec
os=-none
;;
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
xps | xps100)
basic_machine=xps100-honeywell
;;
- z8k-*-coff) # EGCS LOCAL
+ z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
# 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)
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)
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
| -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|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
+ -opened*)
+ os=-openedition
+ ;;
+ -wince*)
+ os=-wince
+ ;;
-osfrose*)
os=-osfrose
;;
-acis*)
os=-aos
;;
- -386bsd) # EGCS LOCAL
+ -atheos*)
+ os=-atheos
+ ;;
+ -386bsd)
os=-bsd
;;
-ctix* | -uts*)
-ns2 )
os=-nextstep2
;;
+ -nsk*)
+ os=-nsk
+ ;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
# 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)
;;
*)
*-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
;;
# 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
;;
*-ibm)
os=-aix
;;
- *-wec) # EGCS LOCAL
+ *-wec)
os=-proelf
;;
- *-winbond) # EGCS LOCAL
+ *-winbond)
os=-proelf
;;
- *-oki) # EGCS LOCAL
+ *-oki)
os=-proelf
;;
*-hp)
*-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
;;
-genix*)
vendor=ns
;;
- -mvs*)
+ -mvs* | -opened*)
vendor=ibm
;;
-ptx*)
-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:
--- /dev/null
+/*
+ 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:
+*/
--- /dev/null
+/*
+ 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:
+*/
#ifndef __linux_h__
#define __linux_h__
-#include "i386.h"
+#include "powerpc64.h"
#undef FUNCTION_VALUE
#undef FUNCTION_SET_VALUE
--- /dev/null
+/*
+ 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:
+*/
--- /dev/null
+/*
+ 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:
+*/
--- /dev/null
+/*
+ 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:
+*/
# ******************** 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
# todo: read from Version file?
MAJOR_VERSION=1
-MINOR_VERSION=0
-SUBMINOR_VERSION=73
+MINOR_VERSION=1
+SUBMINOR_VERSION=3
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
#line 1677 "configure"
#include "confdefs.h"
+#include <stdlib.h>
f(void (*nested)())
{
(*nested)();
}
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
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
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()
{
}
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
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
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>
}
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
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*
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
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
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
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>
#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>
#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
{ 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. */
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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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
# 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
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
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
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
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
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
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*
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>
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
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. */
; 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
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*
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. */
; 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
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
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.
}
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
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>
#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*
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
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
:
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')
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
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
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*
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. */
; 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
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>
}
}
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
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>
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
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. */
; 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
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() {
; 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
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
{ 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
}
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
# ******************** 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
# 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)
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
+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.
-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
.
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
--- /dev/null
+usr/lib/*.so
+usr/include
+usr/lib/opengroupware.org/System/Library/Makefiles
--- /dev/null
+usr/lib/*.so.*
# 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
#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");
exit (0);
}
-void read_command (NSArray* arguments)
+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];
- NSString* key;
+ 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 */
- NSString* domainName = [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);
}
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);
}
-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
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_MAKEFILES)/common.make
+-include ../Foundation/libFoundation.make
ifeq ($(gc), yes)
ifeq ($(LIBFOUNDATION_WITH_GC), yes)
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.. \
AutoReqProv: off
Source: %{libf_source}
Prefix: %{libf_prefix}
-Requires: libobjc-lf2
+#Requires: libobjc-lf2
Conflicts: libfoundation
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root