diff options
author | Paul Smith <psmith@gnu.org> | 2000-07-30 18:26:42 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2000-07-30 18:26:42 +0000 |
commit | 1a82956eaeb7ba5fde121755d0042c42c2043069 (patch) | |
tree | 428a6561e292db9ab7285023d9e9727eaeac2be1 /file.c | |
parent | 3c132f10f39f1675607d50f5c75669ec64e13bb5 (diff) | |
download | gunmake-1a82956eaeb7ba5fde121755d0042c42c2043069.tar.gz |
* Various fixes; see the ChangeLog.
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 48 |
1 files changed, 26 insertions, 22 deletions
@@ -467,6 +467,11 @@ snap_deps () for (f2 = d->file; f2 != 0; f2 = f2->prev) f2->precious = 1; + for (f = lookup_file (".LOW_RESOLUTION_TIME"); f != 0; f = f->prev) + for (d = f->deps; d != 0; d = d->next) + for (f2 = d->file; f2 != 0; f2 = f2->prev) + f2->low_resolution_time = 1; + for (f = lookup_file (".PHONY"); f != 0; f = f->prev) for (d = f->deps; d != 0; d = d->next) for (f2 = d->file; f2 != 0; f2 = f2->prev) @@ -592,33 +597,32 @@ file_timestamp_now (int *resolution) /* Don't bother with high-resolution clocks if file timestamps have only one-second resolution. The code below should work, but it's not worth the hassle of debugging it on hosts where it fails. */ - if (FILE_TIMESTAMP_HI_RES) - { -#if HAVE_CLOCK_GETTIME && defined CLOCK_REALTIME +#if FILE_TIMESTAMP_HI_RES +# if HAVE_CLOCK_GETTIME && defined CLOCK_REALTIME + { + struct timespec timespec; + if (clock_gettime (CLOCK_REALTIME, ×pec) == 0) { - struct timespec timespec; - if (clock_gettime (CLOCK_REALTIME, ×pec) == 0) - { - r = 1; - s = timespec.tv_sec; - ns = timespec.tv_nsec; - goto got_time; - } + r = 1; + s = timespec.tv_sec; + ns = timespec.tv_nsec; + goto got_time; } -#endif -#if HAVE_GETTIMEOFDAY + } +# endif +# if HAVE_GETTIMEOFDAY + { + struct timeval timeval; + if (gettimeofday (&timeval, 0) == 0) { - struct timeval timeval; - if (gettimeofday (&timeval, 0) == 0) - { - r = 1000; - s = timeval.tv_sec; - ns = timeval.tv_usec * 1000; - goto got_time; - } + r = 1000; + s = timeval.tv_sec; + ns = timeval.tv_usec * 1000; + goto got_time; } + } +# endif #endif - } r = 1000000000; s = time ((time_t *) 0); |