2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 Copyright (c) 1998-2003, Apple, Inc. All rights reserved.
29 #if !defined(__COREFOUNDATION_CFUTILITIES__)
30 #define __COREFOUNDATION_CFUTILITIES__ 1
32 #include <CoreFoundation/CFBase.h>
34 #if defined(__cplusplus)
38 CF_EXPORT
uint32_t CFLog2(uint64_t x
);
40 CF_EXPORT
void CFMergeSortArray(void *list
, CFIndex count
, CFIndex elementSize
, CFComparatorFunction comparator
, void *context
);
41 CF_EXPORT
void CFQSortArray(void *list
, CFIndex count
, CFIndex elementSize
, CFComparatorFunction comparator
, void *context
);
45 uint16_t primaryVersion
;
46 uint8_t secondaryVersion
;
47 uint8_t tertiaryVersion
;
50 CF_EXPORT CFLibraryVersion
CFGetExecutableLinkedLibraryVersion(CFStringRef libraryName
);
51 CF_EXPORT CFLibraryVersion
CFGetExecutingLibraryVersion(CFStringRef libraryName
);
53 /* _CFExecutableLinkedOnOrAfter(releaseVersionName) will return YES if the current executable seems to be linked on or after the specified release. Example: If you specify CFSystemVersionPuma (10.1), you will get back true for executables linked on Puma or Jaguar(10.2), but false for those linked on Cheetah (10.0) or any of its software updates (10.0.x). You will also get back false for any app whose version info could not be figured out.
54 This function caches its results, so no need to cache at call sites.
57 CFSystemVersionCheetah
= 0, /* 10.0 */
58 CFSystemVersionPuma
= 1, /* 10.1 */
59 CFSystemVersionJaguar
= 2, /* 10.2? TBD */
60 CFSystemVersionPanther
= 3, /* Post-Jaguar */
61 CFSystemVersionPinot
= 3, /* Deprecated name for Panther */
62 CFSystemVersionMerlot
= 4, /* Post-Panther */
63 CFSystemVersionMax
/* This should bump up when new entries are added */
66 CF_EXPORT Boolean
_CFExecutableLinkedOnOrAfter(CFSystemVersion version
);
71 #if defined(__cplusplus)
75 #endif /* ! __COREFOUNDATION_CFUTILITIES__ */