diff options
author | Elliott Hughes <enh@google.com> | 2016-01-05 09:26:54 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2016-01-05 09:32:42 -0800 |
commit | 636c1c4a44261ac05b2bcdf035df412b6773eabb (patch) | |
tree | 53d3018ef6a618a0e64850990dac15574f590d85 | |
parent | b11bf3f70cfefd170fb4d668b9b8fabadd8959e1 (diff) | |
download | build-636c1c4a44261ac05b2bcdf035df412b6773eabb.tar.gz |
Clean up Mac OS hacks in acp slightly.
Change-Id: I7cba3a345cd8907ae050961cc4f173003ac90f39
-rw-r--r-- | libs/host/Android.mk | 2 | ||||
-rw-r--r-- | libs/host/CopyFile.c | 7 | ||||
-rw-r--r-- | tools/acp/Android.mk | 9 | ||||
-rw-r--r-- | tools/atree/Android.mk | 1 |
4 files changed, 6 insertions, 13 deletions
diff --git a/libs/host/Android.mk b/libs/host/Android.mk index 8a28457d35..bc25e4b763 100644 --- a/libs/host/Android.mk +++ b/libs/host/Android.mk @@ -5,11 +5,11 @@ LOCAL_SRC_FILES:= \ CopyFile.c LOCAL_CFLAGS := -Werror -Wall -LOCAL_CFLAGS_darwin += -DMACOSX_RSRC LOCAL_MODULE:= libhost LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include LOCAL_CXX_STL := none # acp uses libhost, so we can't use diff --git a/libs/host/CopyFile.c b/libs/host/CopyFile.c index 1b5572364d..5be012cf3d 100644 --- a/libs/host/CopyFile.c +++ b/libs/host/CopyFile.c @@ -68,8 +68,8 @@ static bool isSourceNewer(const struct stat* pSrcStat, const struct stat* pDstSt static bool isHiresMtime(const struct stat* pSrcStat) { #if defined(_WIN32) - return 0; -#elif defined(MACOSX_RSRC) + return 0; +#elif defined(__APPLE__) return pSrcStat->st_mtimespec.tv_nsec > 0; #else return pSrcStat->st_mtim.tv_nsec > 0; @@ -295,7 +295,8 @@ static int copyRegular(const char* src, const char* dst, const struct stat* pSrc if (copyResult != 0) return -1; -#ifdef MACOSX_RSRC +#if defined(__APPLE__) + // Copy Mac OS X resource forks too. { char* srcRsrcName = NULL; char* dstRsrcName = NULL; diff --git a/tools/acp/Android.mk b/tools/acp/Android.mk index e31ad3afbb..eec9c9db32 100644 --- a/tools/acp/Android.mk +++ b/tools/acp/Android.mk @@ -3,20 +3,13 @@ # Custom version of cp. LOCAL_PATH:= $(call my-dir) + include $(CLEAR_VARS) -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_SRC_FILES := \ acp.c -ifeq ($(HOST_OS),darwin) -LOCAL_CFLAGS += -DMACOSX_RSRC -endif -ifeq ($(HOST_OS),linux) -endif - LOCAL_STATIC_LIBRARIES := libhost -LOCAL_C_INCLUDES := build/libs/host/include LOCAL_MODULE := acp LOCAL_ACP_UNAVAILABLE := true LOCAL_CXX_STL := none diff --git a/tools/atree/Android.mk b/tools/atree/Android.mk index d895810f3b..f598db588c 100644 --- a/tools/atree/Android.mk +++ b/tools/atree/Android.mk @@ -12,7 +12,6 @@ LOCAL_SRC_FILES := \ LOCAL_STATIC_LIBRARIES := \ libhost -LOCAL_C_INCLUDES := build/libs/host/include LOCAL_MODULE := atree |