Skip to content

Commit a742bac

Browse files
committed
CoreFoundation: handle LLP64 as LP64
Adjust the various sites that consider LP64 to also consider LLP64 environments. This is needed to support Windows x86_64. Normalize the checks across the code base to use `TARGET_RT_64_BIT` which is defined in TargetConditionals.h.
1 parent c7d1cd6 commit a742bac

File tree

24 files changed

+89
-81
lines changed

24 files changed

+89
-81
lines changed

Diff for: CoreFoundation/Base.subproj/CFInternal.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ extern void __CFGenericValidateType_(CFTypeRef cf, CFTypeID type, const char *fu
229229
#define __CFBitfield64GetValue(V, N1, N2) (((V) & __CFBitfield64Mask(N1, N2)) >> (N2))
230230
#define __CFBitfield64SetValue(V, N1, N2, X) ((V) = ((V) & ~__CFBitfield64Mask(N1, N2)) | ((((uint64_t)X) << (N2)) & __CFBitfield64Mask(N1, N2)))
231231

232-
#if __LP64__ || DEPLOYMENT_TARGET_ANDROID
232+
#if TARGET_RT_64_BIT || DEPLOYMENT_TARGET_ANDROID
233233
typedef uint64_t __CFInfoType;
234234
#define __CFInfoMask(N1, N2) __CFBitfield64Mask(N1, N2)
235235
#else
@@ -291,13 +291,13 @@ CF_PRIVATE void __CFRuntimeSetRC(CFTypeRef cf, uint32_t rc);
291291
// On systems where we have ObjC support (DEPLOYMENT_RUNTIME_OBJC), STATIC_CLASS_REF(…) can statically produce a reference to the ObjC class symbol that ties into this particular type.
292292
// When compiling for Swift Foundation, STATIC_CLASS_REF returns a Swift class. There's a mapping of ObjC name classes to Swift symbols in the header that defines it that should be kept up to date if more constant objects are defined.
293293
// On all other platforms, it returns NULL, which is okay; we only need the type ID if CF is to be used by itself.
294-
#if __LP64__
294+
#if TARGET_RT_64_BIT
295295
#define INIT_CFRUNTIME_BASE_WITH_CLASS(CLASS, TYPEID) { ._cfisa = (uintptr_t)STATIC_CLASS_REF(CLASS) , ._cfinfoa = 0x0000000000000080ULL | ((TYPEID) << 8), _CFRUNTIME_BASE_INIT_SWIFT_RETAIN_COUNT }
296296
#define INIT_CFRUNTIME_BASE_WITH_CLASS_AND_FLAGS(CLASS, TYPEID, FLAGS) { ._cfisa = (uintptr_t)STATIC_CLASS_REF(CLASS) , ._cfinfoa = 0x0000000000000080ULL | ((TYPEID) << 8) | (FLAGS), _CFRUNTIME_BASE_INIT_SWIFT_RETAIN_COUNT }
297-
#else // if !__LP64__
297+
#else // if !TARGET_RT_64_BIT
298298
#define INIT_CFRUNTIME_BASE_WITH_CLASS(CLASS, TYPEID) { ._cfisa = (uintptr_t)STATIC_CLASS_REF(CLASS) , ._cfinfoa = 0x00000080UL | ((TYPEID) << 8), _CFRUNTIME_BASE_INIT_SWIFT_RETAIN_COUNT }
299299
#define INIT_CFRUNTIME_BASE_WITH_CLASS_AND_FLAGS(CLASS, TYPEID, FLAGS) { ._cfisa = (uintptr_t)STATIC_CLASS_REF(CLASS), ._cfinfoa = 0x0000000000000080ULL | ((TYPEID) << 8) | (FLAGS), _CFRUNTIME_BASE_INIT_SWIFT_RETAIN_COUNT }
300-
#endif // __LP64__
300+
#endif // TARGET_RT_64_BIT
301301

302302
#define __CFBitIsSet(V, N) (((V) & (1UL << (N))) != 0)
303303
#define __CFBitSet(V, N) ((V) |= (1UL << (N)))

Diff for: CoreFoundation/Base.subproj/CFOverflow.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef CFOverflow_h
1111
#define CFOverflow_h
1212

13+
#include <CoreFoundation/CFBase.h>
14+
1315
#if __has_include(<os/overflow.h>)
1416
#include <os/overflow.h>
1517
#else
@@ -55,7 +57,7 @@ CF_INLINE _CFOverflowResult _CFPositiveIntegerProductWouldOverflow(CFIndex si_a,
5557

5658
CF_INLINE _CFOverflowResult _CFPointerSumWouldOverflow(void const *p, size_t n, void * /*_Nullable*/ * /*_Nullable*/ outSum) {
5759
_CFOverflowResult result = _CFOverflowResultOK;
58-
#if __LP64__
60+
#if TARGET_RT_64_BIT
5961
uint64_t sum = 0;
6062
uint64_t const lhs = (uint64_t)p;
6163
uint64_t const rhs = (uint64_t)n;

Diff for: CoreFoundation/Base.subproj/CFPriv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ CF_EXPORT void CFPreferencesFlushCaches(void);
9090
CF_EXPORT Boolean _CFURLGetWideFileSystemRepresentation(CFURLRef url, Boolean resolveAgainstBase, wchar_t *buffer, CFIndex bufferLength);
9191
#endif
9292

93-
#if !__LP64__
93+
#if !TARGET_RT_64_BIT
9494
#if TARGET_OS_OSX
9595
struct FSSpec;
9696
CF_EXPORT

Diff for: CoreFoundation/Base.subproj/CFRuntime.c

+19-18
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#define ENABLE_ZOMBIES 1
1212

13+
#include <CoreFoundation/CFBase.h>
1314
#include <CoreFoundation/CFRuntime.h>
1415
#include "CFRuntime_Internal.h"
1516
#include "CFInternal.h"
@@ -268,14 +269,14 @@ void *__CFConstantStringClassReferencePtr = &_CF_CONSTANT_STRING_SWIFT_CLASS;
268269
#else
269270
#if !__CONSTANT_CFSTRINGS__ || DEPLOYMENT_TARGET_EMBEDDED_MINI
270271
// Compiler uses this symbol name; must match compiler built-in decl, so we use 'int'
271-
#if __LP64__
272+
#if TARGET_RT_64_BIT
272273
int __CFConstantStringClassReference[24] = {0};
273274
#else
274275
int __CFConstantStringClassReference[12] = {0};
275276
#endif
276277
#endif
277278

278-
#if __LP64__
279+
#if TARGET_RT_64_BIT
279280
int __CFConstantStringClassReference[24] = {0};
280281
#else
281282
int __CFConstantStringClassReference[12] = {0};
@@ -372,7 +373,7 @@ void _CFEnableZombies(void) {
372373
#define RC_DEALLOCATED_BIT (0x200000ULL)
373374
#endif
374375

375-
#if __LP64__
376+
#if TARGET_RT_64_BIT
376377
#define HIGH_RC_START 32
377378
#define HIGH_RC_END 63
378379
#endif
@@ -392,7 +393,7 @@ CF_INLINE uint16_t __CFLowRCFromInfo(__CFInfoType info) {
392393
return __CFBitfieldGetValue(info, LOW_RC_END, LOW_RC_START);
393394
}
394395

395-
#if __LP64__
396+
#if TARGET_RT_64_BIT
396397
/// Get the retain count from the high 32-bit field (only present in 64 bit)
397398
CF_INLINE uint32_t __CFHighRCFromInfo(__CFInfoType info) {
398399
return __CFBitfield64GetValue(info, HIGH_RC_END, HIGH_RC_START);
@@ -499,7 +500,7 @@ CFTypeRef _CFRuntimeCreateInstance(CFAllocatorRef allocator, CFTypeID typeID, CF
499500
// No need for atomic operations here - memory is currently private to this thread
500501
uint32_t typeIDMasked = (uint32_t)typeID << 8;
501502
uint32_t usesDefaultAllocatorMasked = usesSystemDefaultAllocator ? 0x80 : 0x00;
502-
#if __LP64__
503+
#if TARGET_RT_64_BIT
503504
if (customRC) {
504505
// The top 32 bits of the word are all FF
505506
// The rc bits in the lower 32 are 0xFF
@@ -541,7 +542,7 @@ void _CFRuntimeInitStaticInstance(void *ptr, CFTypeID typeID) {
541542
// No need for atomic operations here - memory is currently private to this thread
542543
uint32_t typeIDMasked = (uint32_t)typeID << 8;
543544
uint32_t usesDefaultAllocatorMasked = 0x80;
544-
#if __LP64__
545+
#if TARGET_RT_64_BIT
545546
if (customRC) {
546547
// The top 32 bits of the word are the retain count
547548
memory->_cfinfoa = (uint64_t)((0xFFFFFFFFULL << 32) | (uint32_t)((0xFF << 24) | RC_CUSTOM_RC_BIT | typeIDMasked | usesDefaultAllocatorMasked));
@@ -593,7 +594,7 @@ CF_PRIVATE void _CFRuntimeSetInstanceTypeIDAndIsa(CFTypeRef cf, CFTypeID newType
593594
}
594595

595596

596-
#ifndef __LP64__
597+
#if !TARGET_RT_64_BIT
597598
enum {
598599
__kCFObjectRetainedEvent = 12,
599600
__kCFObjectReleasedEvent = 13
@@ -776,7 +777,7 @@ CF_PRIVATE void __CFTypeCollectionRelease(CFAllocatorRef allocator, const void *
776777
CFRelease(cf);
777778
}
778779

779-
#if !__LP64__
780+
#if !TARGET_RT_64_BIT
780781
static CFLock_t __CFRuntimeExternRefCountTableLock = CFLockInit;
781782
#endif
782783

@@ -785,7 +786,7 @@ static CFLock_t __CFRuntimeExternRefCountTableLock = CFLockInit;
785786
#else
786787
static uint64_t __CFGetFullRetainCount(CFTypeRef cf) {
787788
if (NULL == cf) { CRSetCrashLogMessage("*** __CFGetFullRetainCount() called with NULL ***"); HALT; }
788-
#if __LP64__
789+
#if TARGET_RT64_BIT
789790
__CFInfoType info = atomic_load(&(((CFRuntimeBase *)cf)->_cfinfoa));
790791
uint32_t rc = __CFHighRCFromInfo(info);
791792
if (0 == rc) {
@@ -810,7 +811,7 @@ static uint64_t __CFGetFullRetainCount(CFTypeRef cf) {
810811
CF_PRIVATE Boolean __CFRuntimeIsConstant(CFTypeRef cf) {
811812
__CFInfoType info = atomic_load(&(((CFRuntimeBase *)cf)->_cfinfoa));
812813
uint32_t rc;
813-
#if __LP64__
814+
#if TARGET_RT_64_BIT
814815
rc = __CFHighRCFromInfo(info);
815816
#else
816817
rc = __CFLowRCFromInfo(info);
@@ -822,7 +823,7 @@ CF_PRIVATE Boolean __CFRuntimeIsConstant(CFTypeRef cf) {
822823
CF_PRIVATE void __CFRuntimeSetRC(CFTypeRef cf, uint32_t rc) {
823824
// No real need for atomics or CAS here, memory is private to thread so far
824825
__CFInfoType info = ((CFRuntimeBase *)cf)->_cfinfoa;
825-
#if __LP64__
826+
#if TARGET_RT_64_BIT
826827
__CFBitfield64SetValue(info, HIGH_RC_END, HIGH_RC_START, rc);
827828
#else
828829
__CFBitfieldSetValue(info, LOW_RC_END, LOW_RC_START, rc);
@@ -840,14 +841,14 @@ CFIndex CFGetRetainCount(CFTypeRef cf) {
840841
if (!refcount || !(cfClass->version & _kCFRuntimeCustomRefCount) || __CFLowRCFromInfo(info) != 0xFF) {
841842
HALT; // bogus object
842843
}
843-
#if __LP64__
844+
#if TARGET_RT_64_BIT
844845
if (__CFHighRCFromInfo(info) != 0xFFFFFFFFU) {
845846
CRSetCrashLogMessage("Detected bogus CFTypeRef");
846847
HALT; // bogus object
847848
}
848849
#endif
849850
uint32_t rc = refcount(0, cf);
850-
#if __LP64__
851+
#if TARGET_RT_64_BIT
851852
return (CFIndex)rc;
852853
#else
853854
return (rc < LONG_MAX) ? (CFIndex)rc : (CFIndex)LONG_MAX;
@@ -1178,7 +1179,7 @@ void __CFInitialize(void) {
11781179
#endif
11791180

11801181

1181-
#ifndef __LP64__
1182+
#if !TARGET_RT_64_BIT
11821183
for (CFIndex idx = 0; idx < NUM_EXTERN_TABLES; idx++) {
11831184
CFBasicHashCallbacks callbacks = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
11841185
__NSRetainCounters[idx].table = CFBasicHashCreate(kCFAllocatorSystemDefault, kCFBasicHashHasCounts | kCFBasicHashLinearHashing | kCFBasicHashAggressiveGrowth, &callbacks);
@@ -1371,7 +1372,7 @@ static CFTypeRef _CFRetain(CFTypeRef cf, Boolean tryR) {
13711372
CRSetCrashLogMessage("Detected bogus CFTypeRef");
13721373
HALT; // bogus object
13731374
}
1374-
#if __LP64__
1375+
#if TARGET_RT_64_BIT
13751376
// Custom RC always has high bits all set
13761377
if (__CFHighRCFromInfo(info) != 0xFFFFFFFFU) {
13771378
CRSetCrashLogMessage("Detected bogus CFTypeRef");
@@ -1380,7 +1381,7 @@ static CFTypeRef _CFRetain(CFTypeRef cf, Boolean tryR) {
13801381
#endif
13811382
refcount(+1, cf);
13821383
} else {
1383-
#if __LP64__
1384+
#if TARGET_RT_64_BIT
13841385
__CFInfoType newInfo;
13851386
do {
13861387
if (__builtin_expect(tryR && (info & (RC_DEALLOCATING_BIT | RC_DEALLOCATED_BIT)), false)) {
@@ -1493,15 +1494,15 @@ static void _CFRelease(CFTypeRef CF_RELEASES_ARGUMENT cf) {
14931494
CRSetCrashLogMessage("Detected bogus CFTypeRef");
14941495
HALT; // bogus object
14951496
}
1496-
#if __LP64__
1497+
#if TARGET_RT_64_BIT
14971498
if (__CFHighRCFromInfo(info) != 0xFFFFFFFFU) {
14981499
CRSetCrashLogMessage("Detected bogus CFTypeRef");
14991500
HALT; // bogus object
15001501
}
15011502
#endif
15021503
refcount(-1, cf);
15031504
} else {
1504-
#if __LP64__
1505+
#if TARGET_RT_64_BIT
15051506
uint32_t rc;
15061507
__CFInfoType newInfo;
15071508
again:;

Diff for: CoreFoundation/Base.subproj/CFRuntime.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ typedef struct __CFRuntimeBase {
204204

205205
typedef struct __CFRuntimeBase {
206206
uintptr_t _cfisa;
207-
#if defined(__LP64__) || defined(__LLP64__)
207+
#if TARGET_RT_64_BIT
208208
_Atomic(uint64_t) _cfinfoa;
209209
#else
210210
_Atomic(uint32_t) _cfinfoa;
211211
#endif
212212
} CFRuntimeBase;
213213

214-
#if defined(__LP64__) || defined(__LLP64__)
214+
#if TARGET_RT_64_BIT
215215
#define INIT_CFRUNTIME_BASE(...) {0, 0x0000000000000080ULL}
216216
#else
217217
#define INIT_CFRUNTIME_BASE(...) {0, 0x00000080UL}

Diff for: CoreFoundation/Base.subproj/CFSortFunctions.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ CF_INLINE _CFOverflowResult _CFIntegerProductWouldOverflow(CFIndex si_a, CFIndex
333333
result = _CFOverflowResultNegativeParameters;
334334
} else {
335335
int32_t err = CHECKINT_NO_ERROR;
336-
#if __LP64__
336+
#if TARGET_RT_64_BIT
337337
__checkint_int64_mul(si_a, si_b, &err);
338338
#else
339339
__checkint_int32_mul(si_a, si_b, &err);
@@ -347,7 +347,7 @@ CF_INLINE _CFOverflowResult _CFIntegerProductWouldOverflow(CFIndex si_a, CFIndex
347347
CF_INLINE _CFOverflowResult _CFPointerSumWouldOverflow(void *p, size_t n) {
348348
_CFOverflowResult result = _CFOverflowResultOK;
349349
int32_t err = CHECKINT_NO_ERROR;
350-
#if __LP64__
350+
#if TARGET_RT_64_BIT
351351
__checkint_uint64_add((uint64_t)p, (uint64_t)n, &err);
352352
#else
353353
__checkint_uint32_add((uint32_t)p, (uint32_t)n, &err);

Diff for: CoreFoundation/Base.subproj/CFUtilities.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Responsibility: Tony Parker
99
*/
1010

11+
#include <CoreFoundation/CFBase.h>
1112
#include <CoreFoundation/CFPriv.h>
1213
#include "CFInternal.h"
1314
#include "CFLocaleInternal.h"
@@ -1213,7 +1214,7 @@ CF_PRIVATE Boolean _CFReadMappedFromFile(CFStringRef path, Boolean map, Boolean
12131214
if (errorPtr) *errorPtr = _CFErrorWithFilePathCodeDomain(kCFErrorDomainPOSIX, ENOMEM, path);
12141215
return false;
12151216
}
1216-
#if __LP64__
1217+
#if TARGET_RT_64_BIT
12171218
#else
12181219
if (statBuf.st_size > (1ull << 31)) { // refuse to do more than 2GB
12191220
close(fd);

Diff for: CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
#error unknown endian
225225
#endif
226226

227-
#if __LP64__
227+
#if __LP64__ || __LLP64__ || __POINTER_WIDTH__-0 == 64
228228
#define TARGET_RT_64_BIT 1
229229
#else
230230
#define TARGET_RT_64_BIT 0

Diff for: CoreFoundation/Collections.subproj/CFBasicHash.c

+4-7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include "CFBasicHash.h"
12+
#include <CoreFoundation/CFBase.h>
1213
#include <CoreFoundation/CFRuntime.h>
1314
#include "CFRuntime_Internal.h"
1415
#include <CoreFoundation/CFSet.h>
@@ -199,10 +200,6 @@ extern int __dtrace_isenabled$Cocoa_HashTable$test_equal$v1(void);
199200
#endif
200201

201202

202-
#if !defined(__LP64__)
203-
#define __LP64__ 0
204-
#endif
205-
206203
// Prime numbers. Values above 100 have been adjusted up so that the
207204
// malloced block size will be just below a multiple of 512; values
208205
// above 1200 have been adjusted up to just below a multiple of 4096.
@@ -212,7 +209,7 @@ static const uintptr_t __CFBasicHashTableSizes[64] = {
212209
214519, 346607, 561109, 907759, 1468927, 2376191, 3845119,
213210
6221311, 10066421, 16287743, 26354171, 42641881, 68996069,
214211
111638519, 180634607, 292272623, 472907251,
215-
#if __LP64__
212+
#if TARGET_RT_64_BIT
216213
765180413UL, 1238087663UL, 2003267557UL, 3241355263UL, 5244622819UL,
217214
#if 0
218215
8485977589UL, 13730600407UL, 22216578047UL, 35947178479UL,
@@ -230,7 +227,7 @@ static const uintptr_t __CFBasicHashTableCapacities[64] = {
230227
132580, 214215, 346784, 561026, 907847, 1468567, 2376414,
231228
3844982, 6221390, 10066379, 16287773, 26354132, 42641916,
232229
68996399, 111638327, 180634415, 292272755,
233-
#if __LP64__
230+
#if TARGET_RT_64_BIT
234231
472907503UL, 765180257UL, 1238087439UL, 2003267722UL, 3241355160UL,
235232
#if 0
236233
5244622578UL, 8485977737UL, 13730600347UL, 22216578100UL,
@@ -249,7 +246,7 @@ static const uintptr_t __CFBasicHashPrimitiveRoots[64] = {
249246
3, 5, 10, 3, 3, 22, 3,
250247
3, 3, 5, 2, 22, 2,
251248
11, 5, 5, 2,
252-
#if __LP64__
249+
#if TARGET_RT_64_BIT
253250
3, 10, 2, 3, 10,
254251
2, 3, 5, 3,
255252
3, 2, 7, 2,

Diff for: CoreFoundation/Collections.subproj/CFData.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Responsibility: Kevin Perry
99
*/
1010

11+
#include <CoreFoundation/CFBase.h>
1112
#include <CoreFoundation/CFData.h>
1213
#include <CoreFoundation/CFPriv.h>
1314
#include "CFInternal.h"
@@ -17,7 +18,7 @@
1718

1819

1920

20-
#if __LP64__
21+
#if TARGET_RT_64_BIT
2122
#define CFDATA_MAX_SIZE ((1ULL << 42) - 1)
2223
#else
2324
#define CFDATA_MAX_SIZE ((1ULL << 31) - 1)
@@ -161,7 +162,7 @@ CF_INLINE void __CFDataSetNumBytes(CFMutableDataRef data, CFIndex v) {
161162
data->_capacity = v;
162163
}
163164

164-
#if __LP64__
165+
#if TARGET_RT_64_BIT
165166
#define CHUNK_SIZE (1ULL << 29)
166167
#define LOW_THRESHOLD (1ULL << 20)
167168
#define HIGH_THRESHOLD (1ULL << 32)
@@ -183,7 +184,7 @@ CF_INLINE CFIndex __CFDataRoundUpCapacity(CFIndex capacity) {
183184
return (1L << (long)flsl(capacity));
184185
} else {
185186
/* Round up to next multiple of CHUNK_SIZE */
186-
unsigned long newCapacity = CHUNK_SIZE * (1+(capacity >> ((long)flsl(CHUNK_SIZE)-1)));
187+
unsigned long long newCapacity = CHUNK_SIZE * (1+(capacity >> ((long)flsl(CHUNK_SIZE)-1)));
187188
return __CFMin(newCapacity, CFDATA_MAX_SIZE);
188189
}
189190
}

Diff for: CoreFoundation/Locale.subproj/CFNumberFormatter.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Responsibility: David Smith
99
*/
1010

11+
#include <CoreFoundation/CFBase.h>
1112
#include <CoreFoundation/CFNumberFormatter.h>
1213
#include <CoreFoundation/ForFoundationOnly.h>
1314
#include <CoreFoundation/CFBigNumber.h>
@@ -488,7 +489,7 @@ CFStringRef CFNumberFormatterCreateStringWithValue(CFAllocatorRef allocator, CFN
488489
} else if (numberType == kCFNumberSInt64Type || numberType == kCFNumberLongLongType) {
489490
FORMAT_INT(int64_t, _CFBigNumInitWithInt64)
490491
} else if (numberType == kCFNumberLongType || numberType == kCFNumberCFIndexType) {
491-
#if __LP64__
492+
#if TARGET_RT_64_BIT
492493
FORMAT_INT(int64_t, _CFBigNumInitWithInt64)
493494
#else
494495
FORMAT_INT(int32_t, _CFBigNumInitWithInt32)
@@ -733,7 +734,7 @@ Boolean CFNumberFormatterGetValueFromString(CFNumberFormatterRef formatter, CFSt
733734
}
734735
break;
735736
case kCFNumberSInt32Type: case kCFNumberIntType:
736-
#if !__LP64__
737+
#if !TARGET_RT_64_BIT
737738
case kCFNumberLongType: case kCFNumberCFIndexType:
738739
#endif
739740
if (INT32_MIN <= dreti && dreti <= INT32_MAX) {
@@ -742,7 +743,7 @@ Boolean CFNumberFormatterGetValueFromString(CFNumberFormatterRef formatter, CFSt
742743
}
743744
break;
744745
case kCFNumberSInt64Type: case kCFNumberLongLongType:
745-
#if __LP64__
746+
#if TARGET_RT_64_BIT
746747
case kCFNumberLongType: case kCFNumberCFIndexType:
747748
#endif
748749
if (INT64_MIN <= dreti && dreti <= INT64_MAX) {

0 commit comments

Comments
 (0)