Merge "Clean up Mac OS hacks in acp slightly."

This commit is contained in:
Elliott Hughes
2016-01-05 17:36:09 +00:00
committed by Gerrit Code Review
4 changed files with 6 additions and 13 deletions

View File

@@ -5,11 +5,11 @@ LOCAL_SRC_FILES:= \
CopyFile.c CopyFile.c
LOCAL_CFLAGS := -Werror -Wall LOCAL_CFLAGS := -Werror -Wall
LOCAL_CFLAGS_darwin += -DMACOSX_RSRC
LOCAL_MODULE:= libhost LOCAL_MODULE:= libhost
LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_MODULE_HOST_OS := darwin linux windows
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_CXX_STL := none LOCAL_CXX_STL := none
# acp uses libhost, so we can't use # acp uses libhost, so we can't use

View File

@@ -68,8 +68,8 @@ static bool isSourceNewer(const struct stat* pSrcStat, const struct stat* pDstSt
static bool isHiresMtime(const struct stat* pSrcStat) static bool isHiresMtime(const struct stat* pSrcStat)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; return 0;
#elif defined(MACOSX_RSRC) #elif defined(__APPLE__)
return pSrcStat->st_mtimespec.tv_nsec > 0; return pSrcStat->st_mtimespec.tv_nsec > 0;
#else #else
return pSrcStat->st_mtim.tv_nsec > 0; 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) if (copyResult != 0)
return -1; return -1;
#ifdef MACOSX_RSRC #if defined(__APPLE__)
// Copy Mac OS X resource forks too.
{ {
char* srcRsrcName = NULL; char* srcRsrcName = NULL;
char* dstRsrcName = NULL; char* dstRsrcName = NULL;

View File

@@ -3,20 +3,13 @@
# Custom version of cp. # Custom version of cp.
LOCAL_PATH:= $(call my-dir) LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := \
acp.c acp.c
ifeq ($(HOST_OS),darwin)
LOCAL_CFLAGS += -DMACOSX_RSRC
endif
ifeq ($(HOST_OS),linux)
endif
LOCAL_STATIC_LIBRARIES := libhost LOCAL_STATIC_LIBRARIES := libhost
LOCAL_C_INCLUDES := build/libs/host/include
LOCAL_MODULE := acp LOCAL_MODULE := acp
LOCAL_ACP_UNAVAILABLE := true LOCAL_ACP_UNAVAILABLE := true
LOCAL_CXX_STL := none LOCAL_CXX_STL := none

View File

@@ -12,7 +12,6 @@ LOCAL_SRC_FILES := \
LOCAL_STATIC_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := \
libhost libhost
LOCAL_C_INCLUDES := build/libs/host/include
LOCAL_MODULE := atree LOCAL_MODULE := atree