-#define checkLibrary(LIBNAME, VERSIONFIELD) { \
- uint16_t vers = (NSVersionOfLinkTimeLibrary(LIBNAME) >> 16); \
- if ((vers != 0xFFFF) && (versionInfo[version].VERSIONFIELD != 0xFFFF) && \
- ((version == 0) || (versionInfo[version-1].VERSIONFIELD < versionInfo[version].VERSIONFIELD))) \
- return (results[resultIndex(version)] = ((vers < versionInfo[version].VERSIONFIELD) ? false : true)); \
-}
-
-
-CF_EXPORT Boolean _CFExecutableLinkedOnOrAfter(CFSystemVersion version) {
- // The numbers in the below tables should be the numbers for any version of the framework in the release.
- // When adding new entries to these tables for a new build train, it's simplest to use the versions of the
- // first new versions of projects submitted to the new train. These can later be updated. One thing to watch for is that software updates
- // for the previous release do not increase numbers beyond the number used for the next release!
- // For a given train, don't ever use the last versions submitted to the previous train! (This to assure room for software updates.)
- // If versions are the same as previous release, use 0xFFFF; this will assure the answer is a conservative NO.
- // NOTE: Also update the CFM check below, perhaps to the previous release... (???)
- static const struct {
- uint16_t libSystemVersion;
- uint16_t cocoaVersion;
- uint16_t appkitVersion;
- uint16_t fouVersion;
- uint16_t cfVersion;
- uint16_t carbonVersion;
- uint16_t applicationServicesVersion;
- uint16_t coreServicesVersion;
- uint16_t iokitVersion;
- } versionInfo[] = {
- {50, 5, 577, 397, 196, 113, 16, 9, 52}, /* CFSystemVersionCheetah (used the last versions) */
- {55, 7, 620, 425, 226, 122, 16, 10, 67}, /* CFSystemVersionPuma (used the last versions) */
- {56, 8, 631, 431, 232, 122, 17, 11, 73}, /* CFSystemVersionJaguar */
- {67, 9, 704, 481, 281, 126, 19, 16, 159}, /* CFSystemVersionPanther */
- {73, 10, 750, 505, 305, 128, 22, 18, 271}, /* CFSystemVersionTiger */
- {89, 12, 840, 575, 375, 136, 34, 32, 0xFFFF}, /* CFSystemVersionLeopard */
- {112, 13, 960, 680, 480, 0xFFFF, 0xFFFF, 33, 0xFFFF}, /* CFSystemVersionSnowLeopard */
- };
-
-
- // !!! When a new release is added to the array, don't forget to bump the size of this array!
- static char results[CFSystemVersionMax] = {-2, -2, -2, -2, -2, -2}; /* We cache the results per-release; there are only a few of these... */
- if (version >= CFSystemVersionMax) return false; /* Actually, we don't know the answer, and something scary is going on */
-
- int versionIndex = resultIndex(version);
- if (results[versionIndex] != -2) return results[versionIndex];