diff options
author | Paul Smith <psmith@gnu.org> | 2000-11-17 06:59:08 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2000-11-17 06:59:08 +0000 |
commit | e5324a8c6a6380b544be8d64773827e976bea35a (patch) | |
tree | 942f37674ec8174831592e7b25745dd3041eada6 /remake.c | |
parent | d5a04ee9849e300f0e4b751ca7c1d1fd96f312a1 (diff) | |
download | gunmake-e5324a8c6a6380b544be8d64773827e976bea35a.tar.gz |
* Fix FAT handling on Windows to match the DJGPP port's FAT handling.
* Fix a potential hole in readline if lines end in ^M (CRLF).
Diffstat (limited to 'remake.c')
-rw-r--r-- | remake.c | 21 |
1 files changed, 6 insertions, 15 deletions
@@ -1170,21 +1170,12 @@ f_mtime (file, search) FILE_TIMESTAMP adjusted_mtime = mtime; #if defined(WINDOWS32) || defined(__MSDOS__) - FILE_TIMESTAMP adjustment; -#ifdef WINDOWS32 - /* FAT filesystems round time to the nearest even second! - Allow for any file (NTFS or FAT) to perhaps suffer from this - brain damage. */ - adjustment = (((FILE_TIMESTAMP_S (adjusted_mtime) & 1) == 0 - && FILE_TIMESTAMP_NS (adjusted_mtime) == 0) - ? (FILE_TIMESTAMP) 1 << FILE_TIMESTAMP_LO_BITS - : 0); -#else - /* On DJGPP under Windows 98 and Windows NT, FAT filesystems can - set file times up to 3 seconds into the future! The bug doesn't - occur in plain DOS or in Windows 95, but we play it safe. */ - adjustment = (FILE_TIMESTAMP) 3 << FILE_TIMESTAMP_LO_BITS; -#endif + /* Experimentation has shown that FAT filesystems can set file times + up to 3 seconds into the future! Play it safe. */ + +#define FAT_ADJ_OFFSET (FILE_TIMESTAMP) 3 + + FILE_TIMESTAMP adjustment = FAT_ADJ_OFFSET << FILE_TIMESTAMP_LO_BITS; if (ORDINARY_MTIME_MIN + adjustment <= adjusted_mtime) adjusted_mtime -= adjustment; #endif |