From 4120e835fb43ee059e83e3f34833bf15a7d6d7a3 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Mon, 10 Nov 2014 10:37:14 -0800 Subject: [PATCH] kill HAVE_STAT_ST_MTIM Bug: 18300671 Change-Id: I92b5691924b995d9c883fc0f777c566ac4c35d1d --- core/combo/include/arch/darwin-x86/AndroidConfig.h | 5 ----- core/combo/include/arch/linux-arm/AndroidConfig.h | 5 ----- core/combo/include/arch/linux-arm64/AndroidConfig.h | 5 ----- core/combo/include/arch/linux-mips/AndroidConfig.h | 5 ----- core/combo/include/arch/linux-mips64/AndroidConfig.h | 5 ----- core/combo/include/arch/linux-x86/AndroidConfig.h | 5 ----- core/combo/include/arch/target_linux-x86/AndroidConfig.h | 5 ----- libs/host/CopyFile.c | 8 +++----- 8 files changed, 3 insertions(+), 40 deletions(-) diff --git a/core/combo/include/arch/darwin-x86/AndroidConfig.h b/core/combo/include/arch/darwin-x86/AndroidConfig.h index 9546f7a80..96d393688 100644 --- a/core/combo/include/arch/darwin-x86/AndroidConfig.h +++ b/core/combo/include/arch/darwin-x86/AndroidConfig.h @@ -190,11 +190,6 @@ */ #define HAVE_PREAD 1 -/* - * Define if we have st_mtim in struct stat - */ -#define HAVE_STAT_ST_MTIM 1 - /* * Define if printf() supports %zd for size_t arguments */ diff --git a/core/combo/include/arch/linux-arm/AndroidConfig.h b/core/combo/include/arch/linux-arm/AndroidConfig.h index ce2bbd4d5..5227bbfbe 100644 --- a/core/combo/include/arch/linux-arm/AndroidConfig.h +++ b/core/combo/include/arch/linux-arm/AndroidConfig.h @@ -200,11 +200,6 @@ */ #define HAVE_PREAD 1 -/* - * Define if we have st_mtim in struct stat - */ -#define HAVE_STAT_ST_MTIM 1 - /* * Define if printf() supports %zd for size_t arguments */ diff --git a/core/combo/include/arch/linux-arm64/AndroidConfig.h b/core/combo/include/arch/linux-arm64/AndroidConfig.h index e5c225cd4..961a6c2f7 100644 --- a/core/combo/include/arch/linux-arm64/AndroidConfig.h +++ b/core/combo/include/arch/linux-arm64/AndroidConfig.h @@ -198,11 +198,6 @@ */ #define HAVE_PREAD 1 -/* - * Define if we have st_mtim in struct stat - */ -#define HAVE_STAT_ST_MTIM 1 - /* * Define if printf() supports %zd for size_t arguments */ diff --git a/core/combo/include/arch/linux-mips/AndroidConfig.h b/core/combo/include/arch/linux-mips/AndroidConfig.h index 3d8f8e85e..48e1613c7 100644 --- a/core/combo/include/arch/linux-mips/AndroidConfig.h +++ b/core/combo/include/arch/linux-mips/AndroidConfig.h @@ -251,11 +251,6 @@ */ #define HAVE_PREAD 1 -/* - * Define if we have st_mtim in struct stat - */ -#define HAVE_STAT_ST_MTIM 1 - /* * Define if printf() supports %zd for size_t arguments */ diff --git a/core/combo/include/arch/linux-mips64/AndroidConfig.h b/core/combo/include/arch/linux-mips64/AndroidConfig.h index 6a465a536..0ea45c45f 100644 --- a/core/combo/include/arch/linux-mips64/AndroidConfig.h +++ b/core/combo/include/arch/linux-mips64/AndroidConfig.h @@ -241,11 +241,6 @@ */ #define HAVE_PREAD 1 -/* - * Define if we have st_mtim in struct stat - */ -#define HAVE_STAT_ST_MTIM 1 - /* * Define if printf() supports %zd for size_t arguments */ diff --git a/core/combo/include/arch/linux-x86/AndroidConfig.h b/core/combo/include/arch/linux-x86/AndroidConfig.h index 2fc768d3a..24008340c 100644 --- a/core/combo/include/arch/linux-x86/AndroidConfig.h +++ b/core/combo/include/arch/linux-x86/AndroidConfig.h @@ -187,11 +187,6 @@ */ #define HAVE_PREAD 1 -/* - * Define if we have st_mtim in struct stat - */ -#define HAVE_STAT_ST_MTIM 1 - /* * Define if printf() supports %zd for size_t arguments */ diff --git a/core/combo/include/arch/target_linux-x86/AndroidConfig.h b/core/combo/include/arch/target_linux-x86/AndroidConfig.h index 253b204e4..32df38350 100644 --- a/core/combo/include/arch/target_linux-x86/AndroidConfig.h +++ b/core/combo/include/arch/target_linux-x86/AndroidConfig.h @@ -192,11 +192,6 @@ */ #define HAVE_PREAD 1 -/* - * Define if we have st_mtim in struct stat - */ -#define HAVE_STAT_ST_MTIM 1 - /* * Define if printf() supports %zd for size_t arguments */ diff --git a/libs/host/CopyFile.c b/libs/host/CopyFile.c index ca5256555..f0c8fe5b5 100644 --- a/libs/host/CopyFile.c +++ b/libs/host/CopyFile.c @@ -68,15 +68,13 @@ static bool isSourceNewer(const struct stat* pSrcStat, const struct stat* pDstSt */ static bool isHiresMtime(const struct stat* pSrcStat) { -#if HAVE_STAT_ST_MTIM -#if defined(MACOSX_RSRC) +#if defined(__CYGWIN__) || defined(__MINGW32__) + return 0; +#elif defined(MACOSX_RSRC) return pSrcStat->st_mtimespec.tv_nsec > 0; #else return pSrcStat->st_mtim.tv_nsec > 0; #endif -#else - return 0; -#endif } /*