From ac1b517350c7a03ea7ac0e624a03087fa5c07b5b Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 3 Nov 2008 14:07:51 +0000 Subject: [PATCH] apply debian/patches/11_utimes.diff git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10912 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CCache/ccache.c | 5 +++++ CCache/ccache.h | 3 +++ CCache/config.h.in | 12 ++++++++++++ CCache/configure.in | 3 ++- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CCache/ccache.c b/CCache/ccache.c index 55fbed16d..4e3049d6c 100644 --- a/CCache/ccache.c +++ b/CCache/ccache.c @@ -500,8 +500,13 @@ static void from_cache(int first) /* update timestamps for LRU cleanup also gives output_file a sensible mtime when hard-linking (for make) */ +#ifdef HAVE_UTIMES + utimes(hashname, NULL); + utimes(stderr_file, NULL); +#else utime(hashname, NULL); utime(stderr_file, NULL); +#endif if (strcmp(output_file, "/dev/null") == 0) { ret = 0; diff --git a/CCache/ccache.h b/CCache/ccache.h index 71b03ffe9..8d3c93c34 100644 --- a/CCache/ccache.h +++ b/CCache/ccache.h @@ -22,6 +22,9 @@ #ifdef HAVE_PWD_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #ifdef ENABLE_ZLIB #include diff --git a/CCache/config.h.in b/CCache/config.h.in index 306884521..49ccd8325 100644 --- a/CCache/config.h.in +++ b/CCache/config.h.in @@ -19,6 +19,9 @@ /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME +/* Define to 1 if you have the `getpwuid' function. */ +#undef HAVE_GETPWUID + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -31,6 +34,9 @@ /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H +/* Define to 1 if you have the header file. */ +#undef HAVE_PWD_H + /* Define to 1 if you have the `realpath' function. */ #undef HAVE_REALPATH @@ -60,6 +66,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H @@ -69,6 +78,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the `utimes' function. */ +#undef HAVE_UTIMES + /* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF diff --git a/CCache/configure.in b/CCache/configure.in index be77bbf6a..1ac94d3fd 100644 --- a/CCache/configure.in +++ b/CCache/configure.in @@ -27,10 +27,11 @@ AC_HEADER_DIRENT AC_HEADER_TIME AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h pwd.h) +AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h pwd.h sys/time.h) AC_CHECK_FUNCS(realpath snprintf vsnprintf vasprintf asprintf mkstemp) AC_CHECK_FUNCS(gethostname getpwuid) +AC_CHECK_FUNCS(utimes) AC_CACHE_CHECK([for compar_fn_t in stdlib.h],ccache_cv_COMPAR_FN_T, [ AC_TRY_COMPILE(