From f64f9b69ce576dd194aab7eaf02a6468d2f11c53 Mon Sep 17 00:00:00 2001 From: Apple Date: Tue, 24 Nov 2009 17:49:13 +0000 Subject: [PATCH] CF-550.13.tar.gz --- BuildCFLite | 4 +- CFApplicationPreferences.c | 1 + CFArray.c | 1 + CFArray.h | 1 + CFBag.c | 1 + CFBag.h | 1 + CFBase.c | 3 +- CFBase.h | 1 + CFBasicHash.h | 1 + CFBasicHash.m | 1 + CFBinaryHeap.c | 1 + CFBinaryHeap.h | 1 + CFBinaryPList.c | 1 + CFBitVector.c | 1 + CFBitVector.h | 1 + CFBuiltinConverters.c | 1 + CFBundle.c | 1 + CFBundle.h | 1 + CFBundlePriv.h | 1 + CFBundle_BinaryTypes.h | 1 + CFBundle_Internal.h | 1 + CFBundle_Resources.c | 1 + CFByteOrder.h | 1 + CFCalendar.c | 1 + CFCalendar.h | 1 + CFCharacterSet.c | 1 + CFCharacterSet.h | 1 + CFCharacterSetPriv.h | 1 + CFConcreteStreams.c | 1 + CFData.c | 1 + CFData.h | 1 + CFDate.c | 1 + CFDate.h | 1 + CFDateFormatter.c | 1 + CFDateFormatter.h | 1 + CFDictionary.c | 1 + CFDictionary.h | 1 + CFError.c | 1 + CFError.h | 1 + CFError_Private.h | 1 + CFFileUtilities.c | 1 + CFICUConverters.c | 1 + CFICUConverters.h | 1 + CFInternal.h | 5 +- CFLocale.c | 1 + CFLocale.h | 1 + CFLocaleIdentifier.c | 1 + CFLocaleInternal.h | 1 + CFLocaleKeys.m | 1 + CFLogUtilities.h | 1 + CFMachPort.c | 1 + CFMachPort.h | 1 + CFMessagePort.c | 180 ++++++++++++++++++-------------- CFMessagePort.h | 1 + CFNumber.c | 1 + CFNumber.h | 1 + CFNumberFormatter.c | 1 + CFNumberFormatter.h | 1 + CFPlatform.c | 1 + CFPlatformConverters.c | 1 + CFPlugIn.c | 1 + CFPlugIn.h | 1 + CFPlugInCOM.h | 1 + CFPlugIn_Factory.c | 1 + CFPlugIn_Factory.h | 1 + CFPlugIn_Instance.c | 1 + CFPlugIn_PlugIn.c | 1 + CFPreferences.c | 1 + CFPreferences.h | 1 + CFPriv.h | 1 + CFPropertyList.c | 3 +- CFPropertyList.h | 1 + CFRunLoop.c | 28 +++++ CFRunLoop.h | 1 + CFRuntime.c | 54 ++++++---- CFRuntime.h | 1 + CFSet.c | 1 + CFSet.h | 1 + CFSocket.c | 1 + CFSocket.h | 1 + CFSocketStream.c | 1 + CFSortFunctions.c | 1 + CFStorage.c | 1 + CFStorage.h | 1 + CFStream.c | 1 + CFStream.h | 1 + CFStreamAbstract.h | 1 + CFStreamInternal.h | 1 + CFStreamPriv.h | 1 + CFString.c | 1 + CFString.h | 1 + CFStringDefaultEncoding.h | 1 + CFStringEncodingConverter.c | 1 + CFStringEncodingConverter.h | 1 + CFStringEncodingConverterExt.h | 1 + CFStringEncodingConverterPriv.h | 1 + CFStringEncodingDatabase.c | 1 + CFStringEncodingDatabase.h | 1 + CFStringEncodingExt.h | 1 + CFStringEncodings.c | 1 + CFStringScanner.c | 1 + CFStringUtilities.c | 1 + CFSystemDirectories.c | 1 + CFTimeZone.c | 1 + CFTimeZone.h | 1 + CFTree.c | 1 + CFTree.h | 1 + CFURL.c | 8 ++ CFURL.h | 1 + CFURLAccess.c | 1 + CFURLAccess.h | 1 + CFUUID.c | 1 + CFUUID.h | 1 + CFUniChar.c | 1 + CFUniChar.h | 1 + CFUniCharPriv.h | 1 + CFUnicodeDecomposition.c | 1 + CFUnicodeDecomposition.h | 1 + CFUnicodePrecomposition.c | 1 + CFUnicodePrecomposition.h | 1 + CFUserNotification.c | 1 + CFUserNotification.h | 1 + CFUtilities.c | 1 + CFVersion.c | 9 +- CFXMLInputStream.c | 1 + CFXMLInputStream.h | 1 + CFXMLNode.c | 1 + CFXMLNode.h | 1 + CFXMLParser.c | 1 + CFXMLParser.h | 1 + CFXMLPreferencesDomain.c | 1 + CFXMLTree.c | 1 + CoreFoundation.h | 2 + CoreFoundation_Prefix.h | 1 + ForFoundationOnly.h | 1 + Info.plist | 4 +- 136 files changed, 313 insertions(+), 112 deletions(-) diff --git a/BuildCFLite b/BuildCFLite index c368273..7bc3eea 100755 --- a/BuildCFLite +++ b/BuildCFLite @@ -26,8 +26,8 @@ PRIVATE_HEADERS="CFBundlePriv.h CFCharacterSetPriv.h CFError_Private.h CFLogUtil OBJBASE=./CF-Objects ARCHFLAGS="-arch i386 -arch x86_64" -CFLAGS="-c -x objective-c -pipe -std=gnu99 -g -Wmost -Wno-trigraphs -mmacosx-version-min=10.6 -fconstant-cfstrings -fexceptions -DCF_BUILDING_CF=1 -DDEPLOYMENT_TARGET_MACOSX=1 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_6 -DU_SHOW_DRAFT_API=1 -I$OBJBASE -DVERSION=535 -include CoreFoundation_Prefix.h" -LFLAGS="-dynamiclib -mmacosx-version-min=10.6 -twolevel_namespace -init ___CFInitialize -compatibility_version 150 -current_version 535 -sectcreate __UNICODE __csbitmaps CFCharacterSetBitmaps.bitmap -Wl,-alias_list,SymbolAliases -sectcreate __UNICODE __properties CFUniCharPropertyDatabase.data -sectcreate __UNICODE __data $UNICODE_DATA_FILE -segprot __UNICODE r r" +CFLAGS="-c -x objective-c -pipe -std=gnu99 -g -Wmost -Wno-trigraphs -mmacosx-version-min=10.6 -fconstant-cfstrings -fexceptions -DCF_BUILDING_CF=1 -DDEPLOYMENT_TARGET_MACOSX=1 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_6 -DU_SHOW_DRAFT_API=1 -I$OBJBASE -DVERSION=550.13 -include CoreFoundation_Prefix.h" +LFLAGS="-dynamiclib -mmacosx-version-min=10.6 -twolevel_namespace -init ___CFInitialize -compatibility_version 150 -current_version 550.13 -sectcreate __UNICODE __csbitmaps CFCharacterSetBitmaps.bitmap -Wl,-alias_list,SymbolAliases -sectcreate __UNICODE __properties CFUniCharPropertyDatabase.data -sectcreate __UNICODE __data $UNICODE_DATA_FILE -segprot __UNICODE r r" /bin/rm -rf $OBJBASE /bin/mkdir -p $OBJBASE diff --git a/CFApplicationPreferences.c b/CFApplicationPreferences.c index 7133c23..985e7e4 100644 --- a/CFApplicationPreferences.c +++ b/CFApplicationPreferences.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFApplicationPreferences.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Chris Parker diff --git a/CFArray.c b/CFArray.c index bbb2ad3..f09f90c 100644 --- a/CFArray.c +++ b/CFArray.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFArray.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFArray.h b/CFArray.h index 7118d04..96281d1 100644 --- a/CFArray.h +++ b/CFArray.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFArray.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFBag.c b/CFBag.c index 4c4019e..d708844 100644 --- a/CFBag.c +++ b/CFBag.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBag.c Copyright 1998-2008, Apple, Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFBag.h b/CFBag.h index 54cfeb1..21460ca 100644 --- a/CFBag.h +++ b/CFBag.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBag.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFBase.c b/CFBase.c index 068826a..daeb790 100644 --- a/CFBase.c +++ b/CFBase.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBase.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane @@ -424,7 +425,7 @@ static const CFRuntimeClass __CFAllocatorClass = { "CFAllocator", NULL, // init NULL, // copy - __CFAllocatorDeallocate, + NULL, NULL, // equal NULL, // hash NULL, // diff --git a/CFBase.h b/CFBase.h index c21f1e7..9cb933c 100644 --- a/CFBase.h +++ b/CFBase.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBase.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFBasicHash.h b/CFBasicHash.h index e592b69..856a2cf 100644 --- a/CFBasicHash.h +++ b/CFBasicHash.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBasicHash.h Copyright (c) 2008-2009, Apple Inc. All rights reserved. */ diff --git a/CFBasicHash.m b/CFBasicHash.m index 929d8bf..b101220 100644 --- a/CFBasicHash.m +++ b/CFBasicHash.m @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBasicHash.m Copyright (c) 2008-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFBinaryHeap.c b/CFBinaryHeap.c index bd16c75..f7ad579 100644 --- a/CFBinaryHeap.c +++ b/CFBinaryHeap.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBinaryHeap.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFBinaryHeap.h b/CFBinaryHeap.h index 9195ded..d71a839 100644 --- a/CFBinaryHeap.h +++ b/CFBinaryHeap.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBinaryHeap.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFBinaryPList.c b/CFBinaryPList.c index a07d155..9a29a14 100644 --- a/CFBinaryPList.c +++ b/CFBinaryPList.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBinaryPList.c Copyright (c) 2000-2009, Apple Inc. All rights reserved. Responsibility: Tony Parker diff --git a/CFBitVector.c b/CFBitVector.c index 1ff33e4..4a11fba 100644 --- a/CFBitVector.c +++ b/CFBitVector.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBitVector.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFBitVector.h b/CFBitVector.h index ad9defc..2802cf0 100644 --- a/CFBitVector.h +++ b/CFBitVector.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBitVector.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFBuiltinConverters.c b/CFBuiltinConverters.c index af6fb88..f60f727 100644 --- a/CFBuiltinConverters.c +++ b/CFBuiltinConverters.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBuiltinConverters.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFBundle.c b/CFBundle.c index 2560072..6921cbd 100644 --- a/CFBundle.c +++ b/CFBundle.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBundle.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Doug Davidson diff --git a/CFBundle.h b/CFBundle.h index c834739..592c066 100644 --- a/CFBundle.h +++ b/CFBundle.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBundle.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFBundlePriv.h b/CFBundlePriv.h index 7f076b2..7d427e9 100644 --- a/CFBundlePriv.h +++ b/CFBundlePriv.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBundlePriv.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFBundle_BinaryTypes.h b/CFBundle_BinaryTypes.h index 54db815..a0fa7fc 100644 --- a/CFBundle_BinaryTypes.h +++ b/CFBundle_BinaryTypes.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBundle_BinaryTypes.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFBundle_Internal.h b/CFBundle_Internal.h index 668ed61..472c529 100644 --- a/CFBundle_Internal.h +++ b/CFBundle_Internal.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBundle_Internal.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFBundle_Resources.c b/CFBundle_Resources.c index ef084a6..c4b7675 100644 --- a/CFBundle_Resources.c +++ b/CFBundle_Resources.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFBundle_Resources.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Doug Davidson diff --git a/CFByteOrder.h b/CFByteOrder.h index 89045b3..e8f088a 100644 --- a/CFByteOrder.h +++ b/CFByteOrder.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFByteOrder.h Copyright (c) 1995-2009, Apple Inc. All rights reserved. */ diff --git a/CFCalendar.c b/CFCalendar.c index 33b58b6..6d3e8d4 100644 --- a/CFCalendar.c +++ b/CFCalendar.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFCalendar.c Copyright 2004-2004, Apple Computer, Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFCalendar.h b/CFCalendar.h index c6179fb..6fe4b89 100644 --- a/CFCalendar.h +++ b/CFCalendar.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFCalendar.h Copyright (c) 2004-2009, Apple Inc. All rights reserved. */ diff --git a/CFCharacterSet.c b/CFCharacterSet.c index 0daf28a..cc8598d 100644 --- a/CFCharacterSet.c +++ b/CFCharacterSet.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFCharacterSet.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFCharacterSet.h b/CFCharacterSet.h index fe4adbe..af7285d 100644 --- a/CFCharacterSet.h +++ b/CFCharacterSet.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFCharacterSet.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFCharacterSetPriv.h b/CFCharacterSetPriv.h index ea4a796..158f423 100644 --- a/CFCharacterSetPriv.h +++ b/CFCharacterSetPriv.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFCharacterSetPriv.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFConcreteStreams.c b/CFConcreteStreams.c index 50a1e4b..abbd5a4 100644 --- a/CFConcreteStreams.c +++ b/CFConcreteStreams.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFConcreteStreams.c Copyright (c) 2000-2009, Apple Inc. All rights reserved. Responsibility: Becky Willrich diff --git a/CFData.c b/CFData.c index fc370e5..62db767 100644 --- a/CFData.c +++ b/CFData.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFData.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Kevin Perry diff --git a/CFData.h b/CFData.h index 7176ca8..2d7f173 100644 --- a/CFData.h +++ b/CFData.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFData.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFDate.c b/CFDate.c index 8c817db..252f4d4 100644 --- a/CFDate.c +++ b/CFDate.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFDate.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFDate.h b/CFDate.h index b5c0de2..b2df7a9 100644 --- a/CFDate.h +++ b/CFDate.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFDate.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFDateFormatter.c b/CFDateFormatter.c index f07f66b..ee6696b 100644 --- a/CFDateFormatter.c +++ b/CFDateFormatter.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFDateFormatter.c Copyright (c) 2002-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFDateFormatter.h b/CFDateFormatter.h index 4c9d1f7..c592255 100644 --- a/CFDateFormatter.h +++ b/CFDateFormatter.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFDateFormatter.h Copyright (c) 2003-2009, Apple Inc. All rights reserved. */ diff --git a/CFDictionary.c b/CFDictionary.c index f86b491..c12ff50 100644 --- a/CFDictionary.c +++ b/CFDictionary.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFDictionary.c Copyright 1998-2008, Apple, Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFDictionary.h b/CFDictionary.h index 26611ac..778802f 100644 --- a/CFDictionary.h +++ b/CFDictionary.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFDictionary.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFError.c b/CFError.c index ab8895d..3a19acb 100644 --- a/CFError.c +++ b/CFError.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFError.c Copyright 2006-2009, Apple Inc. All rights reserved. Responsibility: Ali Ozer diff --git a/CFError.h b/CFError.h index ca4aa92..629e113 100644 --- a/CFError.h +++ b/CFError.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFError.h Copyright (c) 2006-2009, Apple Inc. All rights reserved. */ diff --git a/CFError_Private.h b/CFError_Private.h index 2f8b75e..5114d36 100644 --- a/CFError_Private.h +++ b/CFError_Private.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFError_Private.h Copyright (c) 2006-2009, Apple Inc. All rights reserved. diff --git a/CFFileUtilities.c b/CFFileUtilities.c index ea8fce4..85993d7 100644 --- a/CFFileUtilities.c +++ b/CFFileUtilities.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFFileUtilities.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFICUConverters.c b/CFICUConverters.c index 2698c3b..bb19247 100644 --- a/CFICUConverters.c +++ b/CFICUConverters.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* * CFICUConverters.c * CoreFoundation diff --git a/CFICUConverters.h b/CFICUConverters.h index 2798c6c..b2c7232 100644 --- a/CFICUConverters.h +++ b/CFICUConverters.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* * CFICUConverters.h * CoreFoundation diff --git a/CFInternal.h b/CFInternal.h index 12505f1..d85772e 100644 --- a/CFInternal.h +++ b/CFInternal.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFInternal.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ @@ -74,7 +75,6 @@ CF_EXTERN_C_BEGIN #define __CF_BIG_ENDIAN__ 0 #endif - #include CF_EXPORT const char *_CFProcessName(void); @@ -548,7 +548,7 @@ CF_INLINE Boolean CF_IS_OBJC(CFTypeID typeID, const void *obj) { return (typeID >= __CFRuntimeClassTableSize) || (((CFRuntimeBase *)obj)->_cfisa != __CFISAForTypeID(typeID) && ((CFRuntimeBase *)obj)->_cfisa > (uintptr_t)0xFFF); } -#endif + #define CF_IS_OBJC(typeID, obj) (false) #define CF_OBJC_VOIDCALL0(obj, sel) @@ -566,6 +566,7 @@ CF_INLINE Boolean CF_IS_OBJC(CFTypeID typeID, const void *obj) { #define CF_OBJC_FUNCDISPATCH4(typeID, rettype, obj, sel, a1, a2, a3, a4) #define CF_OBJC_FUNCDISPATCH5(typeID, rettype, obj, sel, a1, a2, a3, a4, a5) +#endif /* See comments in CFBase.c */ diff --git a/CFLocale.c b/CFLocale.c index 0da7132..ba125fa 100644 --- a/CFLocale.c +++ b/CFLocale.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFLocale.c Copyright (c) 2002-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFLocale.h b/CFLocale.h index cc7b5ce..28b7dd5 100644 --- a/CFLocale.h +++ b/CFLocale.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFLocale.h Copyright (c) 2002-2009, Apple Inc. All rights reserved. */ diff --git a/CFLocaleIdentifier.c b/CFLocaleIdentifier.c index 1c4d595..b8bad79 100644 --- a/CFLocaleIdentifier.c +++ b/CFLocaleIdentifier.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFLocaleIdentifier.c Copyright (c) 2002-2009, Apple Inc. All rights reserved. diff --git a/CFLocaleInternal.h b/CFLocaleInternal.h index ec9ba42..509d93b 100644 --- a/CFLocaleInternal.h +++ b/CFLocaleInternal.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFLocaleInternal.h Copyright (c) 2008-2009, Apple Inc. All rights reserved. diff --git a/CFLocaleKeys.m b/CFLocaleKeys.m index 7d6c8a3..0873fd6 100644 --- a/CFLocaleKeys.m +++ b/CFLocaleKeys.m @@ -21,6 +21,7 @@ * @APPLE_LICENSE_HEADER_END@ */ + @class NSString; NSString * const kCFLocaleAlternateQuotationBeginDelimiterKey = @"kCFLocaleAlternateQuotationBeginDelimiterKey"; diff --git a/CFLogUtilities.h b/CFLogUtilities.h index a9537f2..18cae3c 100644 --- a/CFLogUtilities.h +++ b/CFLogUtilities.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFLogUtilities.h Copyright (c) 2004-2009, Apple Inc. All rights reserved. */ diff --git a/CFMachPort.c b/CFMachPort.c index c16a764..4547805 100644 --- a/CFMachPort.c +++ b/CFMachPort.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFMachPort.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFMachPort.h b/CFMachPort.h index 4b4193d..b3e034c 100644 --- a/CFMachPort.h +++ b/CFMachPort.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFMachPort.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFMessagePort.c b/CFMessagePort.c index f9c0964..b8a92a9 100644 --- a/CFMessagePort.c +++ b/CFMessagePort.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFMessagePort.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane @@ -144,54 +145,74 @@ CF_INLINE void __CFMessagePortUnlock(CFMessagePortRef ms) { // Just a heuristic #define __CFMessagePortMaxInlineBytes 4096*10 -struct __CFMessagePortMachMessage { - mach_msg_header_t head; - mach_msg_body_t body; - union { - mach_msg_ool_descriptor32_t _0; - mach_msg_ool_descriptor64_t _1; - mach_msg_ool_descriptor_t out_of_line; - } desc; // ignored for inline bytes messages +struct __CFMessagePortMachMessage0 { + mach_msg_base_t base; + int32_t magic; int32_t msgid; int32_t byteslen; uint8_t bytes[0]; }; -static struct __CFMessagePortMachMessage *__CFMessagePortCreateMessage(bool reply, mach_port_t port, mach_port_t replyPort, int32_t convid, int32_t msgid, const uint8_t *bytes, int32_t byteslen) { +struct __CFMessagePortMachMessage1 { + mach_msg_base_t base; + mach_msg_ool_descriptor_t ool; + int32_t magic; + int32_t msgid; + int32_t byteslen; +}; + +#define MAGIC 0xF1F2F3F4 + +#define MSGP0_FIELD(msgp, ident) ((struct __CFMessagePortMachMessage0 *)msgp)->ident +#define MSGP1_FIELD(msgp, ident) ((struct __CFMessagePortMachMessage1 *)msgp)->ident +#define MSGP_GET(msgp, ident) \ + ((((mach_msg_base_t *)msgp)->body.msgh_descriptor_count) ? MSGP1_FIELD(msgp, ident) : MSGP0_FIELD(msgp, ident)) + +static mach_msg_base_t *__CFMessagePortCreateMessage(bool reply, mach_port_t port, mach_port_t replyPort, int32_t convid, int32_t msgid, const uint8_t *bytes, int32_t byteslen) { if (__CFMessagePortMaxDataSize < byteslen) return NULL; - struct __CFMessagePortMachMessage *msg; - int32_t size = sizeof(struct __CFMessagePortMachMessage); int32_t rounded_byteslen = ((byteslen + 3) & ~0x3); if (rounded_byteslen <= __CFMessagePortMaxInlineBytes) { - size += rounded_byteslen; - } - msg = CFAllocatorAllocate(kCFAllocatorSystemDefault, size, 0); + int32_t size = sizeof(struct __CFMessagePortMachMessage0) + rounded_byteslen; + struct __CFMessagePortMachMessage0 *msg = CFAllocatorAllocate(kCFAllocatorSystemDefault, size, 0); if (!msg) return NULL; memset(msg, 0, size); - msg->head.msgh_id = convid; - msg->head.msgh_size = size; - msg->head.msgh_remote_port = port; - msg->head.msgh_local_port = replyPort; - msg->head.msgh_reserved = 0; -// msg->head.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, (replyPort ? MACH_MSG_TYPE_MAKE_SEND : 0)); - msg->head.msgh_bits = MACH_MSGH_BITS((reply ? MACH_MSG_TYPE_MOVE_SEND_ONCE : MACH_MSG_TYPE_COPY_SEND), (MACH_PORT_NULL != replyPort ? MACH_MSG_TYPE_MAKE_SEND_ONCE : 0)); + msg->base.header.msgh_id = convid; + msg->base.header.msgh_size = size; + msg->base.header.msgh_remote_port = port; + msg->base.header.msgh_local_port = replyPort; + msg->base.header.msgh_reserved = 0; + msg->base.header.msgh_bits = MACH_MSGH_BITS((reply ? MACH_MSG_TYPE_MOVE_SEND_ONCE : MACH_MSG_TYPE_COPY_SEND), (MACH_PORT_NULL != replyPort ? MACH_MSG_TYPE_MAKE_SEND_ONCE : 0)); + msg->base.body.msgh_descriptor_count = 0; + msg->magic = MAGIC; msg->msgid = CFSwapInt32HostToLittle(msgid); msg->byteslen = CFSwapInt32HostToLittle(byteslen); - if (rounded_byteslen <= __CFMessagePortMaxInlineBytes) { - msg->body.msgh_descriptor_count = 0; if (NULL != bytes && 0 < byteslen) { memmove(msg->bytes, bytes, byteslen); } + return (mach_msg_base_t *)msg; } else { - msg->head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; - msg->body.msgh_descriptor_count = 1; - msg->desc.out_of_line.deallocate = false; - msg->desc.out_of_line.copy = MACH_MSG_VIRTUAL_COPY; - msg->desc.out_of_line.address = (void *)bytes; - msg->desc.out_of_line.size = byteslen; - msg->desc.out_of_line.type = MACH_MSG_OOL_DESCRIPTOR; - } - return msg; + int32_t size = sizeof(struct __CFMessagePortMachMessage1); + struct __CFMessagePortMachMessage1 *msg = CFAllocatorAllocate(kCFAllocatorSystemDefault, size, 0); + if (!msg) return NULL; + memset(msg, 0, size); + msg->base.header.msgh_id = convid; + msg->base.header.msgh_size = size; + msg->base.header.msgh_remote_port = port; + msg->base.header.msgh_local_port = replyPort; + msg->base.header.msgh_reserved = 0; + msg->base.header.msgh_bits = MACH_MSGH_BITS((reply ? MACH_MSG_TYPE_MOVE_SEND_ONCE : MACH_MSG_TYPE_COPY_SEND), (MACH_PORT_NULL != replyPort ? MACH_MSG_TYPE_MAKE_SEND_ONCE : 0)); + msg->base.header.msgh_bits |= MACH_MSGH_BITS_COMPLEX; + msg->base.body.msgh_descriptor_count = 1; + msg->magic = MAGIC; + msg->msgid = CFSwapInt32HostToLittle(msgid); + msg->byteslen = CFSwapInt32HostToLittle(byteslen); + msg->ool.deallocate = false; + msg->ool.copy = MACH_MSG_VIRTUAL_COPY; + msg->ool.address = (void *)bytes; + msg->ool.size = byteslen; + msg->ool.type = MACH_MSG_OOL_DESCRIPTOR; + return (mach_msg_base_t *)msg; + } } static CFStringRef __CFMessagePortCopyDescription(CFTypeRef cf) { @@ -766,8 +787,8 @@ void CFMessagePortSetInvalidationCallBack(CFMessagePortRef ms, CFMessagePortInva static void __CFMessagePortReplyCallBack(CFMachPortRef port, void *msg, CFIndex size, void *info) { CFMessagePortRef ms = info; - struct __CFMessagePortMachMessage *msgp = msg; - struct __CFMessagePortMachMessage *replymsg; + mach_msg_base_t *msgp = msg; + mach_msg_base_t *replymsg; __CFMessagePortLock(ms); if (!__CFMessagePortIsValid(ms)) { __CFMessagePortUnlock(ms); @@ -776,55 +797,56 @@ static void __CFMessagePortReplyCallBack(CFMachPortRef port, void *msg, CFIndex int32_t byteslen = 0; - Boolean invalidComplex = (0 != msgp->body.msgh_descriptor_count) && !(msgp->head.msgh_bits & MACH_MSGH_BITS_COMPLEX); - invalidComplex = invalidComplex || ((msgp->head.msgh_bits & MACH_MSGH_BITS_COMPLEX) && (0 == msgp->body.msgh_descriptor_count)); - Boolean wayTooBig = sizeof(struct __CFMessagePortMachMessage) + __CFMessagePortMaxInlineBytes < msgp->head.msgh_size; - Boolean wayTooSmall = msgp->head.msgh_size < sizeof(struct __CFMessagePortMachMessage); + Boolean invalidMagic = (MSGP_GET(msgp, magic) != MAGIC) && (CFSwapInt32(MSGP_GET(msgp, magic)) != MAGIC); + Boolean invalidComplex = (0 != msgp->body.msgh_descriptor_count) && !(msgp->header.msgh_bits & MACH_MSGH_BITS_COMPLEX); + invalidComplex = invalidComplex || ((msgp->header.msgh_bits & MACH_MSGH_BITS_COMPLEX) && (0 == msgp->body.msgh_descriptor_count)); + Boolean wayTooBig = ((msgp->body.msgh_descriptor_count) ? sizeof(struct __CFMessagePortMachMessage1) : sizeof(struct __CFMessagePortMachMessage0) + __CFMessagePortMaxInlineBytes) < msgp->header.msgh_size; + Boolean wayTooSmall = msgp->header.msgh_size < sizeof(struct __CFMessagePortMachMessage0); Boolean wrongSize = false; if (!(invalidComplex || wayTooBig || wayTooSmall)) { - byteslen = CFSwapInt32LittleToHost(msgp->byteslen); + byteslen = CFSwapInt32LittleToHost(MSGP_GET(msgp, byteslen)); wrongSize = (byteslen < 0) || (__CFMessagePortMaxDataSize < byteslen); - if (msgp->head.msgh_bits & MACH_MSGH_BITS_COMPLEX) { - wrongSize = wrongSize || (msgp->desc.out_of_line.size != byteslen); + if (0 != msgp->body.msgh_descriptor_count) { + wrongSize = wrongSize || (MSGP1_FIELD(msgp, ool).size != byteslen); } else { - wrongSize = wrongSize || (msgp->head.msgh_size - sizeof(struct __CFMessagePortMachMessage) < byteslen); + wrongSize = wrongSize || (msgp->header.msgh_size - sizeof(struct __CFMessagePortMachMessage0) < byteslen); } } - Boolean invalidMsgID = (0 <= msgp->head.msgh_id) && (msgp->head.msgh_id <= INT32_MAX); // conversation id - if (invalidComplex || wayTooBig || wayTooSmall || wrongSize || invalidMsgID) { - CFLog(kCFLogLevelWarning, CFSTR("*** CFMessagePort: dropping corrupt reply Mach message (0b%d%d%d%d%d)"), invalidComplex, wayTooBig, wayTooSmall, wrongSize, invalidMsgID); + Boolean invalidMsgID = (0 <= msgp->header.msgh_id) && (msgp->header.msgh_id <= INT32_MAX); // conversation id + if (invalidMagic || invalidComplex || wayTooBig || wayTooSmall || wrongSize || invalidMsgID) { + CFLog(kCFLogLevelWarning, CFSTR("*** CFMessagePort: dropping corrupt reply Mach message (0b%d%d%d%d%d%d)"), invalidMagic, invalidComplex, wayTooBig, wayTooSmall, wrongSize, invalidMsgID); mach_msg_destroy((mach_msg_header_t *)msgp); __CFMessagePortUnlock(ms); return; } - if (CFDictionaryContainsKey(ms->_replies, (void *)(uintptr_t)msgp->head.msgh_id)) { + if (CFDictionaryContainsKey(ms->_replies, (void *)(uintptr_t)msgp->header.msgh_id)) { CFDataRef reply = NULL; - replymsg = (struct __CFMessagePortMachMessage *)msg; + replymsg = (mach_msg_base_t *)msg; if (0 == replymsg->body.msgh_descriptor_count) { - uintptr_t msgp_extent = (uintptr_t)((uint8_t *)msgp + msgp->head.msgh_size); - uintptr_t data_extent = (uintptr_t)((uint8_t *)&(replymsg->bytes) + byteslen); + uintptr_t msgp_extent = (uintptr_t)((uint8_t *)msgp + msgp->header.msgh_size); + uintptr_t data_extent = (uintptr_t)((uint8_t *)&(MSGP0_FIELD(replymsg, bytes)) + byteslen); if (0 <= byteslen && data_extent <= msgp_extent) { - reply = CFDataCreate(kCFAllocatorSystemDefault, replymsg->bytes, byteslen); + reply = CFDataCreate(kCFAllocatorSystemDefault, MSGP0_FIELD(replymsg, bytes), byteslen); } else { reply = (void *)~0; // means NULL data } } else { //#warning CF: should create a no-copy data here that has a custom VM-freeing allocator, and not vm_dealloc here - reply = CFDataCreate(kCFAllocatorSystemDefault, replymsg->desc.out_of_line.address, replymsg->desc.out_of_line.size); - vm_deallocate(mach_task_self(), (vm_address_t)replymsg->desc.out_of_line.address, replymsg->desc.out_of_line.size); + reply = CFDataCreate(kCFAllocatorSystemDefault, MSGP1_FIELD(replymsg, ool).address, MSGP1_FIELD(replymsg, ool).size); + vm_deallocate(mach_task_self(), (vm_address_t)MSGP1_FIELD(replymsg, ool).address, MSGP1_FIELD(replymsg, ool).size); } - CFDictionarySetValue(ms->_replies, (void *)(uintptr_t)msgp->head.msgh_id, (void *)reply); + CFDictionarySetValue(ms->_replies, (void *)(uintptr_t)msgp->header.msgh_id, (void *)reply); } else { /* discard message */ if (1 == msgp->body.msgh_descriptor_count) { - vm_deallocate(mach_task_self(), (vm_address_t)msgp->desc.out_of_line.address, msgp->desc.out_of_line.size); + vm_deallocate(mach_task_self(), (vm_address_t)MSGP1_FIELD(msgp, ool).address, MSGP1_FIELD(msgp, ool).size); } } __CFMessagePortUnlock(ms); } SInt32 CFMessagePortSendRequest(CFMessagePortRef remote, SInt32 msgid, CFDataRef data, CFTimeInterval sendTimeout, CFTimeInterval rcvTimeout, CFStringRef replyMode, CFDataRef *returnDatap) { - struct __CFMessagePortMachMessage *sendmsg; + mach_msg_base_t *sendmsg; CFRunLoopRef currentRL = CFRunLoopGetCurrent(); CFRunLoopSourceRef source = NULL; CFDataRef reply = NULL; @@ -878,7 +900,7 @@ SInt32 CFMessagePortSendRequest(CFMessagePortRef remote, SInt32 msgid, CFDataRef if (sendTimeout < 1.0) sendTimeout = 0.0; sendTimeOut = floor(sendTimeout); } - ret = mach_msg((mach_msg_header_t *)sendmsg, MACH_SEND_MSG|sendOpts, sendmsg->head.msgh_size, 0, MACH_PORT_NULL, sendTimeOut, MACH_PORT_NULL); + ret = mach_msg((mach_msg_header_t *)sendmsg, MACH_SEND_MSG|sendOpts, sendmsg->header.msgh_size, 0, MACH_PORT_NULL, sendTimeOut, MACH_PORT_NULL); if (KERN_SUCCESS != ret) { // need to deallocate the send-once right that might have been created if (replyMode != NULL) mach_port_deallocate(mach_task_self(), ((mach_msg_header_t *)sendmsg)->msgh_local_port); @@ -939,8 +961,8 @@ static mach_port_t __CFMessagePortGetPort(void *info) { static void *__CFMessagePortPerform(void *msg, CFIndex size, CFAllocatorRef allocator, void *info) { CFMessagePortRef ms = info; - struct __CFMessagePortMachMessage *msgp = msg; - struct __CFMessagePortMachMessage *replymsg; + mach_msg_base_t *msgp = msg; + mach_msg_base_t *replymsg; void *context_info; void (*context_release)(const void *); CFDataRef returnData, data = NULL; @@ -964,39 +986,39 @@ static void *__CFMessagePortPerform(void *msg, CFIndex size, CFAllocatorRef allo int32_t byteslen = 0; - Boolean invalidComplex = (0 != msgp->body.msgh_descriptor_count) && !(msgp->head.msgh_bits & MACH_MSGH_BITS_COMPLEX); - invalidComplex = invalidComplex || ((msgp->head.msgh_bits & MACH_MSGH_BITS_COMPLEX) && (0 == msgp->body.msgh_descriptor_count)); - Boolean wayTooBig = sizeof(struct __CFMessagePortMachMessage) + __CFMessagePortMaxInlineBytes < msgp->head.msgh_size; - Boolean wayTooSmall = msgp->head.msgh_size < sizeof(struct __CFMessagePortMachMessage); + Boolean invalidMagic = (MSGP_GET(msgp, magic) != MAGIC) && (CFSwapInt32(MSGP_GET(msgp, magic)) != MAGIC); + Boolean invalidComplex = (0 != msgp->body.msgh_descriptor_count) && !(msgp->header.msgh_bits & MACH_MSGH_BITS_COMPLEX); + invalidComplex = invalidComplex || ((msgp->header.msgh_bits & MACH_MSGH_BITS_COMPLEX) && (0 == msgp->body.msgh_descriptor_count)); + Boolean wayTooBig = ((msgp->body.msgh_descriptor_count) ? sizeof(struct __CFMessagePortMachMessage1) : sizeof(struct __CFMessagePortMachMessage0) + __CFMessagePortMaxInlineBytes) < msgp->header.msgh_size; + Boolean wayTooSmall = msgp->header.msgh_size < sizeof(struct __CFMessagePortMachMessage0); Boolean wrongSize = false; if (!(invalidComplex || wayTooBig || wayTooSmall)) { - byteslen = CFSwapInt32LittleToHost(msgp->byteslen); + byteslen = CFSwapInt32LittleToHost(MSGP_GET(msgp, byteslen)); wrongSize = (byteslen < 0) || (__CFMessagePortMaxDataSize < byteslen); - if (msgp->head.msgh_bits & MACH_MSGH_BITS_COMPLEX) { - wrongSize = wrongSize || (msgp->desc.out_of_line.size != byteslen); + if (0 != msgp->body.msgh_descriptor_count) { + wrongSize = wrongSize || (MSGP1_FIELD(msgp, ool).size != byteslen); } else { - wrongSize = wrongSize || (msgp->head.msgh_size - sizeof(struct __CFMessagePortMachMessage) < byteslen); + wrongSize = wrongSize || (msgp->header.msgh_size - sizeof(struct __CFMessagePortMachMessage0) < byteslen); } } - Boolean invalidMsgID = (msgp->head.msgh_id <= 0) || (INT32_MAX < msgp->head.msgh_id); // conversation id - if (invalidComplex || wayTooBig || wayTooSmall || wrongSize || invalidMsgID) { - mach_msg_security_trailer_t *trailer = (void *)msgp + msgp->head.msgh_size; - CFLog(kCFLogLevelWarning, CFSTR("*** CFMessagePort: dropping corrupt request Mach message (0b%d%d%d%d%d)"), invalidComplex, wayTooBig, wayTooSmall, wrongSize, invalidMsgID); + Boolean invalidMsgID = (msgp->header.msgh_id <= 0) || (INT32_MAX < msgp->header.msgh_id); // conversation id + if (invalidMagic || invalidComplex || wayTooBig || wayTooSmall || wrongSize || invalidMsgID) { + CFLog(kCFLogLevelWarning, CFSTR("*** CFMessagePort: dropping corrupt request Mach message (0b%d%d%d%d%d%d)"), invalidMagic, invalidComplex, wayTooBig, wayTooSmall, wrongSize, invalidMsgID); mach_msg_destroy((mach_msg_header_t *)msgp); return NULL; } /* Create no-copy, no-free-bytes wrapper CFData */ if (0 == msgp->body.msgh_descriptor_count) { - uintptr_t msgp_extent = (uintptr_t)((uint8_t *)msgp + msgp->head.msgh_size); - uintptr_t data_extent = (uintptr_t)((uint8_t *)&(msgp->bytes) + byteslen); - msgid = CFSwapInt32LittleToHost(msgp->msgid); + uintptr_t msgp_extent = (uintptr_t)((uint8_t *)msgp + msgp->header.msgh_size); + uintptr_t data_extent = (uintptr_t)((uint8_t *)&(MSGP0_FIELD(msgp, bytes)) + byteslen); + msgid = CFSwapInt32LittleToHost(MSGP_GET(msgp, msgid)); if (0 <= byteslen && data_extent <= msgp_extent) { - data = CFDataCreateWithBytesNoCopy(allocator, msgp->bytes, byteslen, kCFAllocatorNull); + data = CFDataCreateWithBytesNoCopy(allocator, MSGP0_FIELD(msgp, bytes), byteslen, kCFAllocatorNull); } } else { - msgid = CFSwapInt32LittleToHost(msgp->msgid); - data = CFDataCreateWithBytesNoCopy(allocator, msgp->desc.out_of_line.address, msgp->desc.out_of_line.size, kCFAllocatorNull); + msgid = CFSwapInt32LittleToHost(MSGP_GET(msgp, msgid)); + data = CFDataCreateWithBytesNoCopy(allocator, MSGP1_FIELD(msgp, ool).address, MSGP1_FIELD(msgp, ool).size, kCFAllocatorNull); } returnData = ms->_callout(ms, msgid, data, context_info); /* Now, returnData could be (1) NULL, (2) an ordinary data < MAX_INLINE, @@ -1028,13 +1050,13 @@ static void *__CFMessagePortPerform(void *msg, CFIndex size, CFAllocatorRef allo memmove(return_bytes, CFDataGetBytePtr(returnData), return_len); } } - replymsg = __CFMessagePortCreateMessage(true, msgp->head.msgh_remote_port, MACH_PORT_NULL, -1 * (int32_t)msgp->head.msgh_id, msgid, return_bytes, return_len); + replymsg = __CFMessagePortCreateMessage(true, msgp->header.msgh_remote_port, MACH_PORT_NULL, -1 * (int32_t)msgp->header.msgh_id, msgid, return_bytes, return_len); if (1 == replymsg->body.msgh_descriptor_count) { - replymsg->desc.out_of_line.deallocate = true; + MSGP1_FIELD(replymsg, ool).deallocate = true; } if (data) CFRelease(data); if (1 == msgp->body.msgh_descriptor_count) { - vm_deallocate(mach_task_self(), (vm_address_t)msgp->desc.out_of_line.address, msgp->desc.out_of_line.size); + vm_deallocate(mach_task_self(), (vm_address_t)MSGP1_FIELD(msgp, ool).address, MSGP1_FIELD(msgp, ool).size); } if (returnData) CFRelease(returnData); if (context_release) { diff --git a/CFMessagePort.h b/CFMessagePort.h index c2974f6..5a6bb4a 100644 --- a/CFMessagePort.h +++ b/CFMessagePort.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFMessagePort.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFNumber.c b/CFNumber.c index 46a6194..245192e 100644 --- a/CFNumber.c +++ b/CFNumber.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFNumber.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Ali Ozer diff --git a/CFNumber.h b/CFNumber.h index 4352b05..5173bb2 100644 --- a/CFNumber.h +++ b/CFNumber.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFNumber.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFNumberFormatter.c b/CFNumberFormatter.c index cde8c2b..83ec597 100644 --- a/CFNumberFormatter.c +++ b/CFNumberFormatter.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFNumberFormatter.c Copyright (c) 2002-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFNumberFormatter.h b/CFNumberFormatter.h index ace9c75..3fde5a8 100644 --- a/CFNumberFormatter.h +++ b/CFNumberFormatter.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFNumberFormatter.h Copyright (c) 2003-2009, Apple Inc. All rights reserved. */ diff --git a/CFPlatform.c b/CFPlatform.c index 22ec9c0..a840ae4 100644 --- a/CFPlatform.c +++ b/CFPlatform.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlatform.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFPlatformConverters.c b/CFPlatformConverters.c index 440372e..b235a9f 100644 --- a/CFPlatformConverters.c +++ b/CFPlatformConverters.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlatformConverters.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFPlugIn.c b/CFPlugIn.c index 7ed4cdd..8b48bad 100644 --- a/CFPlugIn.c +++ b/CFPlugIn.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlugIn.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Doug Davidson diff --git a/CFPlugIn.h b/CFPlugIn.h index ff4ef32..c044be3 100644 --- a/CFPlugIn.h +++ b/CFPlugIn.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlugIn.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFPlugInCOM.h b/CFPlugInCOM.h index 3367826..a31c9dd 100644 --- a/CFPlugInCOM.h +++ b/CFPlugInCOM.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlugInCOM.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFPlugIn_Factory.c b/CFPlugIn_Factory.c index c30e7f9..70eee0b 100644 --- a/CFPlugIn_Factory.c +++ b/CFPlugIn_Factory.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlugIn_Factory.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Doug Davidson diff --git a/CFPlugIn_Factory.h b/CFPlugIn_Factory.h index 9b51b29..e606087 100644 --- a/CFPlugIn_Factory.h +++ b/CFPlugIn_Factory.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlugIn_Factory.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFPlugIn_Instance.c b/CFPlugIn_Instance.c index 6f900c2..7ec2dc8 100644 --- a/CFPlugIn_Instance.c +++ b/CFPlugIn_Instance.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlugIn_Instance.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Doug Davidson diff --git a/CFPlugIn_PlugIn.c b/CFPlugIn_PlugIn.c index 879188c..50cc9ca 100644 --- a/CFPlugIn_PlugIn.c +++ b/CFPlugIn_PlugIn.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPlugIn_PlugIn.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Doug Davidson diff --git a/CFPreferences.c b/CFPreferences.c index fe25404..f9d5665 100644 --- a/CFPreferences.c +++ b/CFPreferences.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPreferences.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Chris Parker diff --git a/CFPreferences.h b/CFPreferences.h index a026cd6..3a4a5bb 100644 --- a/CFPreferences.h +++ b/CFPreferences.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPreferences.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFPriv.h b/CFPriv.h index 56e28a0..0d34c2d 100644 --- a/CFPriv.h +++ b/CFPriv.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPriv.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFPropertyList.c b/CFPropertyList.c index f7f437e..9650ed0 100644 --- a/CFPropertyList.c +++ b/CFPropertyList.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPropertyList.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Tony Parker @@ -1162,7 +1163,7 @@ static CFStringRef _uniqueStringForString(_CFXMLPlistParseInfo *pInfo, CFStringR if (!uniqued) { uniqued = (CFStringRef)__CFStringCollectionCopy(pInfo->allocator, stringToUnique); CFSetAddValue(pInfo->stringSet, uniqued); - CFRelease(uniqued); + __CFTypeCollectionRelease(pInfo->allocator, uniqued); } return uniqued; } diff --git a/CFPropertyList.h b/CFPropertyList.h index f61a87a..8052fa9 100644 --- a/CFPropertyList.h +++ b/CFPropertyList.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFPropertyList.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFRunLoop.c b/CFRunLoop.c index 4527d19..d58bc34 100644 --- a/CFRunLoop.c +++ b/CFRunLoop.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFRunLoop.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane @@ -2071,6 +2072,33 @@ static int32_t __CFRunLoopRun(CFRunLoopRef rl, CFRunLoopModeRef rlm, CFTimeInter sourceHandledThisLoop = __CFRunLoopDoSources0(rl, rlm, stopAfterHandle) || sourceHandledThisLoop; +#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED + if (MACH_PORT_NULL != dispatchPort) { + msg = (mach_msg_header_t *)buffer; + msg->msgh_size = sizeof(buffer); + msg->msgh_bits = 0; + msg->msgh_local_port = dispatchPort; + msg->msgh_remote_port = MACH_PORT_NULL; + msg->msgh_id = 0; + ret = mach_msg(msg, MACH_RCV_MSG|MACH_RCV_LARGE|MACH_RCV_TIMEOUT|MACH_RCV_TRAILER_TYPE(MACH_MSG_TRAILER_FORMAT_0)|MACH_RCV_TRAILER_ELEMENTS(MACH_RCV_TRAILER_AV), 0, msg->msgh_size, dispatchPort, 0, MACH_PORT_NULL); + + if (MACH_MSG_SUCCESS == ret) { + __CFRunLoopModeUnlock(rlm); + pthread_setspecific(__CFTSDKeyIsInGCDMainQ, (void *)3); + _dispatch_main_queue_callback_4CF(msg); + sourceHandledThisLoop = true; + pthread_setspecific(__CFTSDKeyIsInGCDMainQ, (void *)0); + __CFRunLoopLock(rl); + __CFRunLoopModeLock(rlm); + __CFRunLoopUnlock(rl); + } else if (MACH_RCV_TIMED_OUT == ret) { + msg = NULL; + } else { + HALT; + } + } +#endif + if (sourceHandledThisLoop) { poll = true; if (rl->_blocks_head) { diff --git a/CFRunLoop.h b/CFRunLoop.h index e47aa72..14088b8 100644 --- a/CFRunLoop.h +++ b/CFRunLoop.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFRunLoop.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFRuntime.c b/CFRuntime.c index f2544ef..b596782 100644 --- a/CFRuntime.c +++ b/CFRuntime.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFRuntime.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane @@ -282,6 +283,10 @@ __private_extern__ uint8_t __CFDeallocateZombies = 0; static void *_original_objc_dealloc = 0; #endif +void _CFEnableZombies(void) { + __CFZombieEnabled = 0xFF; +} + #endif /* DEBUG */ // XXX_PCB: use the class version field as a bitmask, to allow classes to opt-in for GC scanning. @@ -822,6 +827,8 @@ extern void __CFUUIDInitialize(void); extern void __CFBinaryHeapInitialize(void); extern void __CFBitVectorInitialize(void); #if DEPLOYMENT_TARGET_WINDOWS +extern void __CFWindowsMessageQueueInitialize(void); +extern void __CFWindowsNamedPipeInitialize(void); extern void __CFBaseCleanup(void); #endif extern void __CFStreamInitialize(void); @@ -1255,23 +1262,25 @@ CF_EXPORT CFTypeRef _CFRetain(CFTypeRef cf) { } while (__builtin_expect(!success, 0)); #endif if (!didAuto && __builtin_expect(__CFOASafe, 0)) { - __CFRecordAllocationEvent(__kCFRetainEvent, (void *)cf, 0, CFGetRetainCount(cf), NULL); + __CFRecordAllocationEvent(__kCFRetainEvent, (void *)cf, 0, 0, NULL); } return cf; } CF_EXPORT void _CFRelease(CFTypeRef cf) { - Boolean isAllocator = false; + CFTypeID typeID = __CFGenericTypeID_inline(cf); + Boolean isAllocator = (__kCFAllocatorTypeID_CONST == typeID); Boolean didAuto = false; #if __LP64__ uint32_t lowBits; do { lowBits = ((CFRuntimeBase *)cf)->_rc; - if (0 == lowBits) return; // Constant CFTypeRef + if (0 == lowBits) { + if (CF_IS_COLLECTABLE(cf)) auto_zone_release(auto_zone(), (void*)cf); + return; // Constant CFTypeRef + } if (1 == lowBits) { // CANNOT WRITE ANY NEW VALUE INTO [CF_RC_BITS] UNTIL AFTER FINALIZATION - CFTypeID typeID = __CFGenericTypeID_inline(cf); - isAllocator = (__kCFAllocatorTypeID_CONST == typeID); CFRuntimeClass *cfClass = __CFRuntimeClassTable[typeID]; if (cfClass->version & _kCFRuntimeResourcefulObject && cfClass->reclaim != NULL) { cfClass->reclaim(cf); @@ -1301,7 +1310,10 @@ CF_EXPORT void _CFRelease(CFTypeRef cf) { #else volatile UInt32 *infoLocation = (UInt32 *)&(((CFRuntimeBase *)cf)->_cfinfo); CFIndex rcLowBits = __CFBitfieldGetValue(*infoLocation, RC_END, RC_START); - if (__builtin_expect(0 == rcLowBits, 0)) return; // Constant CFTypeRef + if (__builtin_expect(0 == rcLowBits, 0)) { + if (CF_IS_COLLECTABLE(cf)) auto_zone_release(auto_zone(), (void*)cf); + return; // Constant CFTypeRef + } bool success = 0; do { UInt32 initialCheckInfo = *infoLocation; @@ -1309,7 +1321,6 @@ CF_EXPORT void _CFRelease(CFTypeRef cf) { if (__builtin_expect(1 == rcLowBits, 0)) { // we think cf should be deallocated // CANNOT WRITE ANY NEW VALUE INTO [CF_RC_BITS] UNTIL AFTER FINALIZATION - CFTypeID typeID = __CFGenericTypeID_inline(cf); CFRuntimeClass *cfClass = __CFRuntimeClassTable[typeID]; if (cfClass->version & _kCFRuntimeResourcefulObject && cfClass->reclaim != NULL) { cfClass->reclaim(cf); @@ -1323,15 +1334,12 @@ CF_EXPORT void _CFRelease(CFTypeRef cf) { didAuto = true; } } else { - if (__builtin_expect(__kCFAllocatorTypeID_CONST == typeID, 0)) { - if (!didAuto && __builtin_expect(__CFOASafe, 0)) { - __CFRecordAllocationEvent(__kCFReleaseEvent, (void *)cf, 0, 0, NULL); - } - __CFAllocatorDeallocate((void *)cf); - success = 1; + if (isAllocator) { + goto really_free; } else { - if (NULL != __CFRuntimeClassTable[typeID]->finalize) { - __CFRuntimeClassTable[typeID]->finalize(cf); + void (*func)(CFTypeRef) = __CFRuntimeClassTable[typeID]->finalize; + if (NULL != func) { + func(cf); } // We recheck rcLowBits to see if the object has been retained again during // the finalization process. This allows for the finalizer to resurrect, @@ -1372,7 +1380,7 @@ CF_EXPORT void _CFRelease(CFTypeRef cf) { #endif if (!didAuto && __builtin_expect(__CFOASafe, 0)) { - __CFRecordAllocationEvent(__kCFReleaseEvent, (void *)cf, 0, CFGetRetainCount(cf), NULL); + __CFRecordAllocationEvent(__kCFReleaseEvent, (void *)cf, 0, 0, NULL); } return; @@ -1382,16 +1390,16 @@ CF_EXPORT void _CFRelease(CFTypeRef cf) { __CFRecordAllocationEvent(__kCFReleaseEvent, (void *)cf, 0, 0, NULL); } // cannot zombify allocators, which get deallocated by __CFAllocatorDeallocate (finalize) - if (!isAllocator) { - CFAllocatorRef allocator; - Boolean usesSystemDefaultAllocator; - - if (__CFBitfieldGetValue(((const CFRuntimeBase *)cf)->_cfinfo[CF_INFO_BITS], 7, 7)) { - allocator = kCFAllocatorSystemDefault; + if (isAllocator) { + __CFAllocatorDeallocate((void *)cf); } else { + CFAllocatorRef allocator = kCFAllocatorSystemDefault; + Boolean usesSystemDefaultAllocator = true; + + if (!__CFBitfieldGetValue(((const CFRuntimeBase *)cf)->_cfinfo[CF_INFO_BITS], 7, 7)) { allocator = CFGetAllocator(cf); - } usesSystemDefaultAllocator = (allocator == kCFAllocatorSystemDefault); + } if (__CFZombieEnabled && !kCFUseCollectableAllocator) { Class cls = object_getClass((id)cf); diff --git a/CFRuntime.h b/CFRuntime.h index c385637..e634efc 100644 --- a/CFRuntime.h +++ b/CFRuntime.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFRuntime.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFSet.c b/CFSet.c index 6c84711..4881a64 100644 --- a/CFSet.c +++ b/CFSet.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFSet.c Copyright 1998-2008, Apple, Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFSet.h b/CFSet.h index e9c11e7..4833765 100644 --- a/CFSet.h +++ b/CFSet.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFSet.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFSocket.c b/CFSocket.c index 8f7e68d..357d2e3 100644 --- a/CFSocket.c +++ b/CFSocket.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFSocket.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFSocket.h b/CFSocket.h index 7e6f71c..94656cd 100644 --- a/CFSocket.h +++ b/CFSocket.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFSocket.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFSocketStream.c b/CFSocketStream.c index 69d449f..d8a14b5 100644 --- a/CFSocketStream.c +++ b/CFSocketStream.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFSocketStream.c Copyright (c) 2000-2009, Apple Inc. All rights reserved. Responsibility: Jeremy Wyld diff --git a/CFSortFunctions.c b/CFSortFunctions.c index 9275059..b8e9bf2 100644 --- a/CFSortFunctions.c +++ b/CFSortFunctions.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFSortFunctions.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFStorage.c b/CFStorage.c index 9257059..8500024 100644 --- a/CFStorage.c +++ b/CFStorage.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStorage.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Ali Ozer diff --git a/CFStorage.h b/CFStorage.h index 0828614..c81ac96 100644 --- a/CFStorage.h +++ b/CFStorage.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStorage.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFStream.c b/CFStream.c index 75e8d1f..d28ae16 100644 --- a/CFStream.c +++ b/CFStream.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStream.c Copyright (c) 2000-2009, Apple Inc. All rights reserved. Responsibility: Becky Willrich diff --git a/CFStream.h b/CFStream.h index 092ca21..885c9bb 100644 --- a/CFStream.h +++ b/CFStream.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStream.h Copyright (c) 2000-2009, Apple Inc. All rights reserved. */ diff --git a/CFStreamAbstract.h b/CFStreamAbstract.h index 20ff34e..0b00af2 100644 --- a/CFStreamAbstract.h +++ b/CFStreamAbstract.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStreamAbstract.h Copyright (c) 2000-2009, Apple Inc. All rights reserved. */ diff --git a/CFStreamInternal.h b/CFStreamInternal.h index 279bf3d..01949e5 100644 --- a/CFStreamInternal.h +++ b/CFStreamInternal.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + #if !defined(__COREFOUNDATION_CFSTREAMINTERNAL__) #define __COREFOUNDATION_CFSTREAMINTERNAL__ 1 diff --git a/CFStreamPriv.h b/CFStreamPriv.h index 4a8ccf1..37e29f1 100644 --- a/CFStreamPriv.h +++ b/CFStreamPriv.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStreamPriv.h Copyright (c) 2000-2009, Apple Inc. All rights reserved. */ diff --git a/CFString.c b/CFString.c index ce1f36f..57e0563 100644 --- a/CFString.c +++ b/CFString.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFString.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Ali Ozer diff --git a/CFString.h b/CFString.h index 89abd36..ba0364f 100644 --- a/CFString.h +++ b/CFString.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFString.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFStringDefaultEncoding.h b/CFStringDefaultEncoding.h index 0adfe26..4a49285 100644 --- a/CFStringDefaultEncoding.h +++ b/CFStringDefaultEncoding.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringDefaultEncoding.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFStringEncodingConverter.c b/CFStringEncodingConverter.c index 52b2476..1f2ef4e 100644 --- a/CFStringEncodingConverter.c +++ b/CFStringEncodingConverter.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringEncodingConverter.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFStringEncodingConverter.h b/CFStringEncodingConverter.h index 2334029..31d09ef 100644 --- a/CFStringEncodingConverter.h +++ b/CFStringEncodingConverter.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringEncodingConverter.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFStringEncodingConverterExt.h b/CFStringEncodingConverterExt.h index c394cee..60111b3 100644 --- a/CFStringEncodingConverterExt.h +++ b/CFStringEncodingConverterExt.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringEncodingConverterExt.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFStringEncodingConverterPriv.h b/CFStringEncodingConverterPriv.h index a8a6ccb..7f36fee 100644 --- a/CFStringEncodingConverterPriv.h +++ b/CFStringEncodingConverterPriv.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringEncodingConverterPriv.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFStringEncodingDatabase.c b/CFStringEncodingDatabase.c index 715edd5..ce578ba 100644 --- a/CFStringEncodingDatabase.c +++ b/CFStringEncodingDatabase.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* * CFStringEncodingDatabase.c * CoreFoundation diff --git a/CFStringEncodingDatabase.h b/CFStringEncodingDatabase.h index 69dc960..195aa95 100644 --- a/CFStringEncodingDatabase.h +++ b/CFStringEncodingDatabase.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* * CFStringEncodingDatabase.h * CoreFoundation diff --git a/CFStringEncodingExt.h b/CFStringEncodingExt.h index 4a00e00..06155fb 100644 --- a/CFStringEncodingExt.h +++ b/CFStringEncodingExt.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringEncodingExt.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFStringEncodings.c b/CFStringEncodings.c index 47fb7cf..4f41603 100644 --- a/CFStringEncodings.c +++ b/CFStringEncodings.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringEncodings.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFStringScanner.c b/CFStringScanner.c index e90a55d..de2191c 100644 --- a/CFStringScanner.c +++ b/CFStringScanner.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringScanner.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Ali Ozer diff --git a/CFStringUtilities.c b/CFStringUtilities.c index f13146d..4300f67 100644 --- a/CFStringUtilities.c +++ b/CFStringUtilities.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFStringUtilities.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFSystemDirectories.c b/CFSystemDirectories.c index 9801c8b..415f1bc 100644 --- a/CFSystemDirectories.c +++ b/CFSystemDirectories.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFSystemDirectories.c Copyright (c) 1997-2009, Apple Inc. All rights reserved. Responsibility: Ali Ozer diff --git a/CFTimeZone.c b/CFTimeZone.c index 3af1cc9..fae899c 100644 --- a/CFTimeZone.c +++ b/CFTimeZone.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFTimeZone.c Copyright 1998-2002, Apple, Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFTimeZone.h b/CFTimeZone.h index 91fe02a..8d34b51 100644 --- a/CFTimeZone.h +++ b/CFTimeZone.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFTimeZone.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFTree.c b/CFTree.c index 4d6ff8f..2074ddb 100644 --- a/CFTree.c +++ b/CFTree.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFTree.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFTree.h b/CFTree.h index 5e549be..ad649ad 100644 --- a/CFTree.h +++ b/CFTree.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFTree.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFURL.c b/CFURL.c index dfeae68..1a87757 100644 --- a/CFURL.c +++ b/CFURL.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFURL.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Becky Willrich @@ -139,6 +140,13 @@ static UInt32 numNonUTF8EncodedURLs = 0; #define ASSERT_CHECK_PATHSTYLE(x) 0 +#if DEPLOYMENT_TARGET_WINDOWS +#define PATH_SEP '\\' +#define PATH_MAX MAX_PATH +#else +#define PATH_SEP '/' +#endif + // In order to reduce the sizeof ( __CFURL ), move these items into a seperate structure which is // only allocated when necessary. In my tests, it's almost never needed -- very rarely does a CFURL have // either a sanitized string or a reserved pointer for URLHandle. diff --git a/CFURL.h b/CFURL.h index 31ecc44..80bbc27 100644 --- a/CFURL.h +++ b/CFURL.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFURL.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFURLAccess.c b/CFURLAccess.c index 2e0cae4..16af3b4 100644 --- a/CFURLAccess.c +++ b/CFURLAccess.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFURLAccess.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Chris Linn diff --git a/CFURLAccess.h b/CFURLAccess.h index 32100c6..96e2353 100644 --- a/CFURLAccess.h +++ b/CFURLAccess.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFURLAccess.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFUUID.c b/CFUUID.c index 31ea3e2..be21b79 100644 --- a/CFUUID.c +++ b/CFUUID.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUUID.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Doug Davidson diff --git a/CFUUID.h b/CFUUID.h index acf726b..823082a 100644 --- a/CFUUID.h +++ b/CFUUID.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUUID.h Copyright (c) 1999-2009, Apple Inc. All rights reserved. */ diff --git a/CFUniChar.c b/CFUniChar.c index e76b309..31bb5fe 100644 --- a/CFUniChar.c +++ b/CFUniChar.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUniChar.c Copyright (c) 2001-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFUniChar.h b/CFUniChar.h index 382d842..e3df963 100644 --- a/CFUniChar.h +++ b/CFUniChar.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUniChar.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFUniCharPriv.h b/CFUniCharPriv.h index c9ca7f6..6563aef 100644 --- a/CFUniCharPriv.h +++ b/CFUniCharPriv.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUniCharPriv.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFUnicodeDecomposition.c b/CFUnicodeDecomposition.c index 46bcc4c..3a293ca 100644 --- a/CFUnicodeDecomposition.c +++ b/CFUnicodeDecomposition.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUnicodeDecomposition.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFUnicodeDecomposition.h b/CFUnicodeDecomposition.h index 67166fb..a134877 100644 --- a/CFUnicodeDecomposition.h +++ b/CFUnicodeDecomposition.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* * CFUnicodeDecomposition.h * CoreFoundation diff --git a/CFUnicodePrecomposition.c b/CFUnicodePrecomposition.c index 8a02e81..4b18ef4 100644 --- a/CFUnicodePrecomposition.c +++ b/CFUnicodePrecomposition.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUnicodePrecomposition.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Aki Inoue diff --git a/CFUnicodePrecomposition.h b/CFUnicodePrecomposition.h index 65d4e36..ef41758 100644 --- a/CFUnicodePrecomposition.h +++ b/CFUnicodePrecomposition.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* * CFUnicodePrecomposition.h * CoreFoundation diff --git a/CFUserNotification.c b/CFUserNotification.c index ee63e85..e9b6c31 100644 --- a/CFUserNotification.c +++ b/CFUserNotification.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUserNotification.c Copyright (c) 2000-2009, Apple Inc. All rights reserved. Responsibility: Doug Davidson diff --git a/CFUserNotification.h b/CFUserNotification.h index aac876c..82d9774 100644 --- a/CFUserNotification.h +++ b/CFUserNotification.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUserNotification.h Copyright (c) 2000-2009, Apple Inc. All rights reserved. */ diff --git a/CFUtilities.c b/CFUtilities.c index 3c6a7f5..c053613 100644 --- a/CFUtilities.c +++ b/CFUtilities.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFUtilities.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Christopher Kane diff --git a/CFVersion.c b/CFVersion.c index 7ebe03f..e470448 100644 --- a/CFVersion.c +++ b/CFVersion.c @@ -20,5 +20,10 @@ * * @APPLE_LICENSE_HEADER_END@ */ -const unsigned char kCFCoreFoundationVersionString[] = "@(#)PROGRAM:CoreFoundation PROJECT:CoreFoundation-550 SYSTEM:Darwin DEVELOPER:unknown BUILT:" __DATE__ " " __TIME__ "\n"; -double kCFCoreFoundationVersionNumber = (double)550; + +/* CFVersion.c + Copyright 2009, Apple Inc. All rights reserved. + Responsibility: CFLite Team +*/ +const unsigned char kCFCoreFoundationVersionString[] = "@(#)PROGRAM:CoreFoundation PROJECT:CoreFoundation-550.13 SYSTEM:Darwin DEVELOPER:unknown BUILT:" __DATE__ " " __TIME__ "\n"; +double kCFCoreFoundationVersionNumber = (double)550.13; diff --git a/CFXMLInputStream.c b/CFXMLInputStream.c index 88e1240..5ce7e72 100644 --- a/CFXMLInputStream.c +++ b/CFXMLInputStream.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFXMLInputStream.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Chris Parker diff --git a/CFXMLInputStream.h b/CFXMLInputStream.h index b0d6da7..187b76a 100644 --- a/CFXMLInputStream.h +++ b/CFXMLInputStream.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFXMLInputStream.h Copyright (c) 2000-2009, Apple Inc. All rights reserved. */ diff --git a/CFXMLNode.c b/CFXMLNode.c index 85d7a96..9665929 100644 --- a/CFXMLNode.c +++ b/CFXMLNode.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFXMLNode.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Chris Parker diff --git a/CFXMLNode.h b/CFXMLNode.h index 0e8717c..8ff2ad0 100644 --- a/CFXMLNode.h +++ b/CFXMLNode.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFXMLNode.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFXMLParser.c b/CFXMLParser.c index 2920da7..f7b44b5 100644 --- a/CFXMLParser.c +++ b/CFXMLParser.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFXMLParser.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Chris Parker diff --git a/CFXMLParser.h b/CFXMLParser.h index ea55ff7..73d655e 100644 --- a/CFXMLParser.h +++ b/CFXMLParser.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFXMLParser.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/CFXMLPreferencesDomain.c b/CFXMLPreferencesDomain.c index 43b5249..a3c1a01 100644 --- a/CFXMLPreferencesDomain.c +++ b/CFXMLPreferencesDomain.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFXMLPreferencesDomain.c Copyright (c) 1998-2009, Apple Inc. All rights reserved. Responsibility: Chris Parker diff --git a/CFXMLTree.c b/CFXMLTree.c index 36666c9..deb74fb 100644 --- a/CFXMLTree.c +++ b/CFXMLTree.c @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CFXMLTree.c Copyright (c) 1999-2009, Apple Inc. All rights reserved. Responsibility: Chris Parker diff --git a/CoreFoundation.h b/CoreFoundation.h index 3421db0..0449f0f 100644 --- a/CoreFoundation.h +++ b/CoreFoundation.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CoreFoundation.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ @@ -94,6 +95,7 @@ #if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE) #include #endif + #if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) #include #include diff --git a/CoreFoundation_Prefix.h b/CoreFoundation_Prefix.h index b879ff3..9018049 100644 --- a/CoreFoundation_Prefix.h +++ b/CoreFoundation_Prefix.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* CoreFoundation_Prefix.h Copyright (c) 2005-2009, Apple Inc. All rights reserved. */ diff --git a/ForFoundationOnly.h b/ForFoundationOnly.h index 201c9fc..028cca1 100644 --- a/ForFoundationOnly.h +++ b/ForFoundationOnly.h @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + /* ForFoundationOnly.h Copyright (c) 1998-2009, Apple Inc. All rights reserved. */ diff --git a/Info.plist b/Info.plist index fe8b36a..ab02c73 100644 --- a/Info.plist +++ b/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 6.6 + 6.6.1 CFBundleSignature ???? CFBundleVersion - 550.1 + 550.13 CarbonLazyValues CodeFragmentManager -- 2.45.2