Skip to content

Commit

Permalink
DEPLOYMENT_TARGET_ANDROID -> TARGET_OS_ANDROID
Browse files Browse the repository at this point in the history
  • Loading branch information
compnerd committed May 10, 2019
1 parent eb4a328 commit 4a47507
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/CFInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ extern void __CFGenericValidateType_(CFTypeRef cf, CFTypeID type, const char *fu
#define __CFBitfield64GetValue(V, N1, N2) (((V) & __CFBitfield64Mask(N1, N2)) >> (N2))
#define __CFBitfield64SetValue(V, N1, N2, X) ((V) = ((V) & ~__CFBitfield64Mask(N1, N2)) | ((((uint64_t)X) << (N2)) & __CFBitfield64Mask(N1, N2)))

#if TARGET_RT_64_BIT || DEPLOYMENT_TARGET_ANDROID
#if TARGET_RT_64_BIT || TARGET_OS_ANDROID
typedef uint64_t __CFInfoType;
#define __CFInfoMask(N1, N2) __CFBitfield64Mask(N1, N2)
#else
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/CFKnownLocations.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CFURLRef _Nullable _CFKnownLocationCreatePreferencesURLForUser(CFKnownLocationUs
}

}
#elif !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
#elif !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID

/*
Building for an OS that uses the FHS, BSD's hier(7), and/or the XDG specification for paths:
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/CFPlatform.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ CF_EXPORT CFStringRef CFCopyUserName(void) {
return result;
}

#if DEPLOYMENT_TARGET_ANDROID
#if TARGET_OS_ANDROID
#define pw_gecos pw_name
#endif

Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ CF_CROSS_PLATFORM_EXPORT int _CFOpenFile(const char *path, int opts);
static inline int _direntNameLength(struct dirent *entry) {
#ifdef _D_EXACT_NAMLEN // defined on Linux
return _D_EXACT_NAMLEN(entry);
#elif DEPLOYMENT_TARGET_ANDROID
#elif TARGET_OS_ANDROID
return strlen(entry->d_name);
#else
return entry->d_namlen;
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/PlugIn.subproj/CFBundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static Boolean _CFBundleURLIsForFHSInstalledBundle(CFURLRef bundleURL) {
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID

CF_CROSS_PLATFORM_EXPORT Boolean _CFBundleSupportsFHSBundles() {
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
return true;
#else
return false;
Expand Down
12 changes: 6 additions & 6 deletions CoreFoundation/PlugIn.subproj/CFBundle_Executable.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <dlfcn.h>
#endif

#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID

#if TARGET_OS_LINUX
#if TARGET_RT_64_BIT
Expand Down Expand Up @@ -49,7 +49,7 @@
_kCFBundleFHSDirectory_lib
#endif // TARGET_OS_LINUX

#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID

// This is here because on iPhoneOS with the dyld shared cache, we remove binaries from their
// original locations on disk, so checking whether a binary's path exists is no longer sufficient.
Expand Down Expand Up @@ -200,7 +200,7 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL
Boolean doExecSearch = true;
#endif

#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
if (lookupMainExe && bundle && bundle->_isFHSInstalledBundle) {
// For a FHS installed bundle, the URL points to share/Bundle.resources, and the binary is in:

Expand All @@ -224,13 +224,13 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL

CFRelease(prefixPath);
}
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID

// Now, look for the executable inside the bundle.
if (!foundIt && doExecSearch && 0 != version) {
CFURLRef exeDirURL = NULL;

#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
if (bundle && bundle->_isFHSInstalledBundle) {
CFURLRef withoutExtension = CFURLCreateCopyDeletingPathExtension(kCFAllocatorSystemDefault, url);
CFStringRef lastPathComponent = CFURLCopyLastPathComponent(withoutExtension);
Expand All @@ -245,7 +245,7 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL
CFRelease(libexec);
CFRelease(exeDirName);
} else
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
if (1 == version) {
exeDirURL = CFURLCreateWithString(kCFAllocatorSystemDefault, _CFBundleExecutablesURLFromBase1, url);
} else if (2 == version) {
Expand Down
4 changes: 2 additions & 2 deletions build-android
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ if [ ! -f libFoundation.so ]; then
BUILD_DIR="$SWIFT_ANDROID_BUILD_PATH/foundation-linux-x86_64" \
DSTROOT="/" \
PREFIX="/usr" \
CFLAGS="-DDEPLOYMENT_TARGET_ANDROID -DDEPLOYMENT_ENABLE_LIBDISPATCH --sysroot=$ANDROID_NDK_PATH/platforms/android-21/arch-arm -I$ANDROID_ICU_PATH/armeabi-v7a/include -I${SDKROOT}/lib/swift -I$ANDROID_NDK_PATH/sources/android/support/include -I$ANDROID_STANDALONE_SYSROOT/usr/include -I$SWIFT_PATH/swift-corelibs-foundation/closure" \
SWIFTCFLAGS="-DDEPLOYMENT_TARGET_ANDROID -DDEPLOYMENT_ENABLE_LIBDISPATCH -I$ANDROID_NDK_PATH/platforms/android-21/arch-arm/usr/include" \
CFLAGS="-DDEPLOYMENT_ENABLE_LIBDISPATCH --sysroot=$ANDROID_NDK_PATH/platforms/android-21/arch-arm -I$ANDROID_ICU_PATH/armeabi-v7a/include -I${SDKROOT}/lib/swift -I$ANDROID_NDK_PATH/sources/android/support/include -I$ANDROID_STANDALONE_SYSROOT/usr/include -I$SWIFT_PATH/swift-corelibs-foundation/closure" \
SWIFTCFLAGS="-DDEPLOYMENT_ENABLE_LIBDISPATCH -I$ANDROID_NDK_PATH/platforms/android-21/arch-arm/usr/include" \
LDFLAGS="-fuse-ld=gold --sysroot=$ANDROID_NDK_PATH/platforms/android-21/arch-arm -L$ANDROID_NDK_PATH/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x -L$ANDROID_ICU_PATH/armeabi-v7a -L$ANDROID_STANDALONE_SYSROOT/usr/lib -ldispatch " \
./configure \
Release \
Expand Down

0 comments on commit 4a47507

Please sign in to comment.