1 utime(...,NULL) in some cases may cause truncation of sub-second portions of
2 timestamps. If utimes(...,NULL) is available, use it instead to avoid this
5 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
7 diff -Nuar --exclude autom4te.cache --exclude '*~' ccache-2.4.orig/ccache.c ccache-2.4/ccache.c
8 --- ccache-2.4.orig/ccache.c 2004-09-13 03:38:30.000000000 -0700
9 +++ ccache-2.4/ccache.c 2006-06-09 16:29:16.695117780 -0700
15 + utimes(stderr_file, NULL);
17 utime(stderr_file, NULL);
20 if (strcmp(output_file, "/dev/null") == 0) {
25 /* update the mtime on the file so that make doesn't get confused */
27 + utimes(output_file, NULL);
29 utime(output_file, NULL);
33 /* get rid of the intermediate preprocessor file */
34 diff -Nuar --exclude autom4te.cache --exclude '*~' ccache-2.4.orig/ccache.h ccache-2.4/ccache.h
35 --- ccache-2.4.orig/ccache.h 2004-09-13 03:38:30.000000000 -0700
36 +++ ccache-2.4/ccache.h 2006-06-09 16:28:16.601658626 -0700
41 +#ifdef HAVE_SYS_TIME_H
42 +#include <sys/time.h>
45 #define STATUS_NOTFOUND 3
46 #define STATUS_FATAL 4
47 diff -Nuar --exclude autom4te.cache --exclude '*~' ccache-2.4.orig/config.h.in ccache-2.4/config.h.in
48 --- ccache-2.4.orig/config.h.in 2003-09-27 21:48:17.000000000 -0700
49 +++ ccache-2.4/config.h.in 2006-06-09 16:25:43.000000000 -0700
51 /* Define to 1 if you have the `gethostname' function. */
52 #undef HAVE_GETHOSTNAME
54 +/* Define to 1 if you have the `getpwuid' function. */
57 /* Define to 1 if you have the <inttypes.h> header file. */
58 #undef HAVE_INTTYPES_H
61 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
64 +/* Define to 1 if you have the <pwd.h> header file. */
67 /* Define to 1 if you have the `realpath' function. */
71 /* Define to 1 if you have the <sys/stat.h> header file. */
72 #undef HAVE_SYS_STAT_H
74 +/* Define to 1 if you have the <sys/time.h> header file. */
75 +#undef HAVE_SYS_TIME_H
77 /* Define to 1 if you have the <sys/types.h> header file. */
78 #undef HAVE_SYS_TYPES_H
81 /* Define to 1 if you have the <unistd.h> header file. */
84 +/* Define to 1 if you have the `utimes' function. */
87 /* Define to 1 if you have the `vasprintf' function. */
90 diff -Nuar --exclude autom4te.cache --exclude '*~' ccache-2.4.orig/configure.in ccache-2.4/configure.in
91 --- ccache-2.4.orig/configure.in 2004-09-13 03:38:30.000000000 -0700
92 +++ ccache-2.4/configure.in 2006-06-09 16:25:15.541288184 -0700
97 -AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h pwd.h)
98 +AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h pwd.h sys/time.h)
100 AC_CHECK_FUNCS(realpath snprintf vsnprintf vasprintf asprintf mkstemp)
101 AC_CHECK_FUNCS(gethostname getpwuid)
102 +AC_CHECK_FUNCS(utimes)
104 AC_CACHE_CHECK([for compar_fn_t in stdlib.h],ccache_cv_COMPAR_FN_T, [