Index: Source/objc_interface.h =================================================================== --- Source/objc_interface.h (revision 33795) +++ Source/objc_interface.h (working copy) @@ -28,7 +28,7 @@ #define __OBJC_INTERFACE_H__ 1 #include "CoreFoundation/CFRuntime.h" -#include +#include @@ -54,7 +54,7 @@ CF_IS_OBJC (CFTypeID typeID, const void *obj) { return (typeID >= __CFRuntimeClassTableCount - || object_getClass(obj) != __CFISAForTypeID (typeID)); + || object_getClass((id)obj) != __CFISAForTypeID (typeID)); } #define CF_OBJC_FUNCDISPATCH0(typeID, rettype, obj, sel) do { \ Index: Source/CFRuntime.m =================================================================== --- Source/CFRuntime.m (revision 33795) +++ Source/CFRuntime.m (working copy) @@ -375,7 +375,6 @@ extern void CFBundleInitialize (void); extern void CFNullInitialize (void); extern void CFNumberFormatterInitialize (void); -extern void CFStringInitialize (void); extern void CFTimeZoneInitialize (void); extern void CFUUIDInitialize (void); @@ -398,7 +397,6 @@ CFBundleInitialize(); CFNullInitialize (); CFNumberFormatterInitialize (); - CFStringInitialize (); CFTimeZoneInitialize (); CFUUIDInitialize (); } Index: Source/CFUUID.c =================================================================== --- Source/CFUUID.c (revision 33795) +++ Source/CFUUID.c (working copy) @@ -56,7 +56,7 @@ int fd; unsigned int seed = 0; size_t len = sizeof(seed); - BOOL hasSeed = NO; + Boolean hasSeed = false; fd = open("/dev/random", O_RDONLY | O_NONBLOCK, 0); if (fd >= 0) @@ -64,12 +64,12 @@ if (errno != EWOULDBLOCK) { if (read(fd, &seed, len) == (ssize_t)len) - hasSeed = YES; + hasSeed = true; } close(fd); } - if (hasSeed == NO) + if (hasSeed == false) { struct timeval tv; unsigned long junk; Index: Source/NSCFString.m =================================================================== --- Source/NSCFString.m (revision 33795) +++ Source/NSCFString.m (working copy) @@ -35,7 +35,14 @@ @interface NSCFString : NSMutableString @end +extern void CFStringInitialize (void); @implementation NSCFString + ++ (void) load +{ + CFStringInitialize(); +} + - (id) initWithBytes: (const void*) bytes length: (NSUInteger) length encoding: (NSStringEncoding) encoding Index: Source/CFBase.m =================================================================== --- Source/CFBase.m (revision 33795) +++ Source/CFBase.m (working copy) @@ -250,7 +250,8 @@ void CFNullInitialize (void) { _kCFNullTypeID = _CFRuntimeRegisterClass (&CFNullClass); - ((CFRuntimeBase*)kCFNull)->_isa = [NSNull class]; + /* don't use [NSNull class] before autorelease pool setup. */ + ((CFRuntimeBase*)kCFNull)->_isa = objc_getClass("NSNull"); } CFTypeID Index: ChangeLog =================================================================== --- ChangeLog (revision 33795) +++ ChangeLog (working copy) @@ -1,3 +1,13 @@ +2011-08-28 Matt Rice + + * Source/objc_interface.h: Remove reference to preface.h + add runtime.h. + (CF_IS_OBJC): Add cast to avoid warning. + * Source/CFRuntime.m: Remove call to CFStringInitialize. + * Source/CFString.m (+load): Move above call here. + * Source/CFUUID.m: Replace BOOL/YES/NO with Boolean/true/false. + * Source/CFBase (CFNullInitialize): Avoid +initialize. + 2011-07-20 Stefan Bidigaray * Source/CFDate.c: