]> git.saurik.com Git - apple/cf.git/commitdiff
CF-635.21.tar.gz mac-os-x-1074 mac-os-x-1075 v635.21
authorApple <opensource@apple.com>
Thu, 10 May 2012 16:29:00 +0000 (16:29 +0000)
committerApple <opensource@apple.com>
Thu, 10 May 2012 16:29:00 +0000 (16:29 +0000)
CFBundle.c
CFNumber.c
CFVersion.c
Info.plist
MakefileVersion

index 3fe70be15a08686c645979b875948f309115333e..5ea739cad9d525db627408312ac4a3f7951a94ca 100644 (file)
@@ -526,26 +526,7 @@ static CFBundleRef _CFBundlePrimitiveGetBundleWithIdentifierAlreadyLocked(CFStri
 
 #endif /* AVOID_WEAK_COLLECTIONS */
 
-#if 0 && DEPLOYMENT_TARGET_WINDOWS
-static CFStringRef _CFBundleCopyWrapperInBinaryDirectory(CFStringRef strippedExeName) {
-    char buff[CFMaxPathSize];
-    CFIndex buffLen;
-    int i;
-
-    CFArrayRef binaryDirs = _CFGetWindowsBinaryDirectories();
-    int count = CFArrayGetCount(binaryDirs);
-    CFStringRef str;
-    struct stat garbage;
-    for (i = 0; i < count; i++) {
-        str = CFStringCreateWithFormat(kCFAllocatorSystemDefault, NULL, CFSTR("%@\\%@.app"), CFArrayGetValueAtIndex(binaryDirs,i), strippedExeName);
-        buffLen = CFStringGetLength(str);
-        CFStringGetFileSystemRepresentation(str, buff, CFMaxPathSize);
-        if (stat(buff, &garbage) == 0) return str;
-        CFRelease(str);
-    }
-    return NULL;
-}
-#elif DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_WINDOWS
+#if   DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_WINDOWS
 #else
 #error Unknown or unspecified DEPLOYMENT_TARGET
 #endif
@@ -561,24 +542,7 @@ static CFURLRef _CFBundleCopyBundleURLForExecutablePath(CFStringRef str) {
     if (buffLen > CFMaxPathSize) buffLen = CFMaxPathSize;
     CFStringGetCharacters(str, CFRangeMake(0, buffLen), buff);
 
-#if 0 && DEPLOYMENT_TARGET_WINDOWS
-    CFIndex startOfBinaryName = _CFLengthAfterDeletingLastPathComponent(buff, buffLen) + 1;  // Remove exe name
-    CFIndex endOfBinaryName = _CFLengthAfterDeletingPathExtension(buff, buffLen);
-    if (startOfBinaryName > 0 && startOfBinaryName < buffLen && endOfBinaryName > 0 && endOfBinaryName <= buffLen) {
-        CFStringRef strippedExeName = CFStringCreateWithCharacters(kCFAllocatorSystemDefault, &(buff[startOfBinaryName]), endOfBinaryName - startOfBinaryName);
-        CFStringRef wrapperInBinaryDirectory = _CFBundleCopyWrapperInBinaryDirectory(strippedExeName);
-        if (wrapperInBinaryDirectory) {
-            buffLen = CFStringGetLength(wrapperInBinaryDirectory);
-            if (buffLen > CFMaxPathSize) buffLen = CFMaxPathSize;
-            CFStringGetCharacters(wrapperInBinaryDirectory, CFRangeMake(0, buffLen), buff);
-            CFRelease(wrapperInBinaryDirectory);
-            outstr = CFStringCreateWithCharactersNoCopy(kCFAllocatorSystemDefault, buff, buffLen, kCFAllocatorNull);
-            url = CFURLCreateWithFileSystemPath(kCFAllocatorSystemDefault, outstr, PLATFORM_PATH_STYLE, true);
-            CFRelease(outstr);
-            return url;
-        }
-    }
-#elif DEPLOYMENT_TARGET_WINDOWS
+#if   DEPLOYMENT_TARGET_WINDOWS
     // Is this a .dll or .exe?
     if (buffLen >= 5 && (_wcsnicmp((wchar_t *)&(buff[buffLen-4]), L".dll", 4) == 0 || _wcsnicmp((wchar_t *)&(buff[buffLen-4]), L".exe", 4) == 0)) {
         CFIndex extensionLength = CFStringGetLength(_CFBundleWindowsResourceDirectoryExtension);
@@ -629,26 +593,6 @@ static CFURLRef _CFBundleCopyBundleURLForExecutablePath(CFStringRef str) {
                     if (buffLen > 0) {
                         // Remove support files folder
                         buffLen = _CFLengthAfterDeletingLastPathComponent(buff, buffLen);
-#elif 0 && DEPLOYMENT_TARGET_WINDOWS
-    if (buffLen > 0) {
-        // See if this is a new bundle.  If it is, we have to remove more path components.
-        CFIndex startOfLastDir = _CFStartOfLastPathComponent(buff, buffLen);
-        if (startOfLastDir > 0 && startOfLastDir < buffLen) {
-            CFStringRef lastDirName = CFStringCreateWithCharacters(kCFAllocatorSystemDefault, &(buff[startOfLastDir]), buffLen - startOfLastDir);
-
-            if (CFEqual(lastDirName, _CFBundleGetPlatformExecutablesSubdirectoryName()) || CFEqual(lastDirName, _CFBundleGetAlternatePlatformExecutablesSubdirectoryName()) || CFEqual(lastDirName, _CFBundleGetOtherPlatformExecutablesSubdirectoryName()) || CFEqual(lastDirName, _CFBundleGetOtherAlternatePlatformExecutablesSubdirectoryName())) {
-                // This is a new bundle.  Back off a few more levels
-                if (buffLen > 0) {
-                    // Remove platform folder
-                    buffLen = _CFLengthAfterDeletingLastPathComponent(buff, buffLen);
-                }
-                if (buffLen > 0) {
-                    // Remove executables folder (if present)
-                    CFIndex startOfNextDir = _CFStartOfLastPathComponent(buff, buffLen);
-                    if (startOfNextDir > 0 && startOfNextDir < buffLen) {
-                        CFStringRef nextDirName = CFStringCreateWithCharacters(kCFAllocatorSystemDefault, &(buff[startOfNextDir]), buffLen - startOfNextDir);
-                        if (CFEqual(nextDirName, _CFBundleExecutablesDirectoryName)) buffLen = _CFLengthAfterDeletingLastPathComponent(buff, buffLen);
-                        CFRelease(nextDirName);
 #else
 #error Unknown or unspecified DEPLOYMENT_TARGET
 #endif
@@ -658,15 +602,6 @@ static CFURLRef _CFBundleCopyBundleURLForExecutablePath(CFStringRef str) {
                 CFRelease(lastDirName);
             }
         }
-#elif 0 && DEPLOYMENT_TARGET_WINDOWS
-                if (buffLen > 0) {
-                    // Remove support files folder
-                    buffLen = _CFLengthAfterDeletingLastPathComponent(buff, buffLen);
-                }
-            }
-            CFRelease(lastDirName);
-        }
-    }
 #else
 #error Unknown or unspecified DEPLOYMENT_TARGET
 #endif
@@ -3726,12 +3661,6 @@ __private_extern__ Boolean _CFBundleCouldBeBundle(CFURLRef url) {
 static CFURLRef __CFBundleCopyFrameworkURLForExecutablePath(CFStringRef executablePath, Boolean permissive) {
     // MF:!!! Implement me.  We need to be able to find the bundle from the exe, dealing with old vs. new as well as the Executables dir business on Windows.
 #if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED
-#elif 0 && DEPLOYMENT_TARGET_WINDOWS
-    UniChar executablesToFrameworksPathBuff[] = {'.', '.', '\\', 'F', 'r', 'a', 'm', 'e', 'w', 'o', 'r', 'k', 's'};
-    UniChar executablesToPrivateFrameworksPathBuff[] = {'.', '.', '\\', 'P', 'r', 'i', 'v', 'a', 't', 'e', 'F', 'r', 'a', 'm', 'e', 'w', 'o', 'r', 'k', 's'};
-    UniChar executablesToSystemFrameworksPathBuff[MAX_PATH+1] = { 0 };
-    SHGetFolderPathAndSubDirW(NULL, CSIDL_PROGRAM_FILES_COMMON, NULL, 0 /* SHGFP_TYPE_CURRENT */, L"Apple\\Mobile Device Support\\Frameworks", executablesToSystemFrameworksPathBuff);
-    UniChar frameworksExtension[] = {'f', 'r', 'a', 'm', 'e', 'w', 'o', 'r', 'k'};
 #elif DEPLOYMENT_TARGET_WINDOWS
     UniChar executablesToFrameworksPathBuff[] = {'.', '.', '\\', 'F', 'r', 'a', 'm', 'e', 'w', 'o', 'r', 'k', 's'};
     UniChar executablesToPrivateFrameworksPathBuff[] = {'.', '.', '\\', 'P', 'r', 'i', 'v', 'a', 't', 'e', 'F', 'r', 'a', 'm', 'e', 'w', 'o', 'r', 'k', 's'};
@@ -3782,40 +3711,6 @@ static CFURLRef __CFBundleCopyFrameworkURLForExecutablePath(CFStringRef executab
         }
     }
             
-#elif 0 && DEPLOYMENT_TARGET_WINDOWS
-    // * (Windows-only) First check the "Executables" directory parallel to the "Frameworks" directory case.
-    if (_CFAppendPathComponent(pathBuff, &length, CFMaxPathSize, executablesToFrameworksPathBuff, LENGTH_OF(executablesToFrameworksPathBuff)) && _CFAppendPathComponent(pathBuff, &length, CFMaxPathSize, nameBuff, nameLength) && _CFAppendPathExtension(pathBuff, &length, CFMaxPathSize, frameworksExtension, LENGTH_OF(frameworksExtension))) {
-        CFStringSetExternalCharactersNoCopy(cheapStr, pathBuff, length, CFMaxPathSize);
-        bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorSystemDefault, cheapStr, PLATFORM_PATH_STYLE, true);
-        if (!_CFBundleCouldBeBundle(bundleURL)) {
-            CFRelease(bundleURL);
-            bundleURL = NULL;
-        }
-    }
-    // * (Windows-only) Next check the "Executables" directory parallel to the "PrivateFrameworks" directory case.
-    if (!bundleURL) {
-        length = savedLength;
-        if (_CFAppendPathComponent(pathBuff, &length, CFMaxPathSize, executablesToPrivateFrameworksPathBuff, LENGTH_OF(executablesToPrivateFrameworksPathBuff)) && _CFAppendPathComponent(pathBuff, &length, CFMaxPathSize, nameBuff, nameLength) && _CFAppendPathExtension(pathBuff, &length, CFMaxPathSize, frameworksExtension, LENGTH_OF(frameworksExtension))) {
-            CFStringSetExternalCharactersNoCopy(cheapStr, pathBuff, length, CFMaxPathSize);
-            bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorSystemDefault, cheapStr, PLATFORM_PATH_STYLE, true);
-            if (!_CFBundleCouldBeBundle(bundleURL)) {
-                CFRelease(bundleURL);
-                bundleURL = NULL;
-            }
-        }
-    }
-    // * (Windows-only) Next check the \Program Files\Apple\Mobile Device Support\Frameworks directory
-    if (!bundleURL) {
-        length = 0;
-        if (_CFAppendPathComponent(pathBuff, &length, CFMaxPathSize, executablesToSystemFrameworksPathBuff, wcslen(executablesToSystemFrameworksPathBuff)) && _CFAppendPathComponent(pathBuff, &length, CFMaxPathSize, nameBuff, nameLength) && _CFAppendPathExtension(pathBuff, &length, CFMaxPathSize, frameworksExtension, LENGTH_OF(frameworksExtension))) {
-            CFStringSetExternalCharactersNoCopy(cheapStr, pathBuff, length, CFMaxPathSize);
-            bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorSystemDefault, cheapStr, PLATFORM_PATH_STYLE, true);
-            if (!_CFBundleCouldBeBundle(bundleURL)) {
-                CFRelease(bundleURL);
-                bundleURL = NULL;
-            }
-        }
-    }
 #elif DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED
 #else
 #error Unknown or unspecified DEPLOYMENT_TARGET
index 4d9fa54a900b000fc887c91332a6e909da5816b7..2c6a70afc6fa659eebce5fb672ff343510c58786 100644 (file)
@@ -1280,16 +1280,6 @@ Boolean CFNumberGetValue(CFNumberRef number, CFNumberType type, void *valuePtr)
             *(int16_t *)valuePtr = (int16_t)taggedInteger;
             return true;
         case kCFNumberSInt32Type:
-#if 0 && __LP64__
-            if (taggedInteger < INT32_MIN) {
-                *(int32_t *)valuePtr = INT32_MIN;
-                return false;
-            }
-            if (INT32_MAX < taggedInteger) {
-                *(int32_t *)valuePtr = INT32_MAX;
-                return false;
-            }
-#endif
             *(int32_t *)valuePtr = (int32_t)taggedInteger;
             return true;
 #if __LP64__
index fafe75ab2bbc28c6e1c37d680ab4e91c7fe7acdf..224ae9f9d5667dd7964d5c05f20cabbece027e0b 100644 (file)
@@ -25,5 +25,5 @@
     Copyright 2009-2011, Apple Inc. All rights reserved.
     Responsibility: CFLite Team
 */
-const unsigned char kCFCoreFoundationVersionString[] = "@(#)PROGRAM:CoreFoundation  PROJECT:CoreFoundation-635.19  SYSTEM:Darwin  DEVELOPER:unknown  BUILT:" __DATE__ " " __TIME__ "\n";
-double kCFCoreFoundationVersionNumber = (double)635.19;
+const unsigned char kCFCoreFoundationVersionString[] = "@(#)PROGRAM:CoreFoundation  PROJECT:CoreFoundation-635.21  SYSTEM:Darwin  DEVELOPER:unknown  BUILT:" __DATE__ " " __TIME__ "\n";
+double kCFCoreFoundationVersionNumber = (double)635.21;
index c16df1af766b177321d8a8382e3619171c50976c..65a3bc9ea6826fcb5912208325174b9611fa714f 100644 (file)
@@ -15,7 +15,7 @@
        <key>CFBundlePackageType</key>
        <string>FMWK</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.7.1</string>
+       <string>6.7.2</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
index 631c859b513f8b9116273890944bddf4beef18ed..3b0484288ffa6321e7a811c1f09c2cfaed8ff51a 100644 (file)
@@ -1 +1 @@
-VERSION=635.19
+VERSION=635.21