This is the mail archive of the
mailing list for the GCC project.
[Ada] Set GNAT.OS_Lib.GM_Split's granularity back to 1 second
- From: Pierre-Marie de Rodat <derodat at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Dmitriy Anisimkov <anisimko at adacore dot com>
- Date: Tue, 20 Aug 2019 05:51:28 -0400
- Subject: [Ada] Set GNAT.OS_Lib.GM_Split's granularity back to 1 second
The modification to round time up to even second was added decades ago.
It was done to avoid unneeded recompilations when the project was built
on non-FAT filesystems and then moved to FAT filesystems. Such a
situation is now very rare and does not deserve time distortion.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Dmitriy Anisimkov <email@example.com>
* adaint.c (__gnat_to_gm_time): On _WIN32, don't round time up
to even second.
@@ -344,7 +344,7 @@ int __gnat_use_acl = 1;
system provides the routine readdir_r.
... but we never define it anywhere??? */
#define MAYBE_TO_PTR32(argv) argv
static const char ATTR_UNSET = 127;
@@ -411,13 +411,6 @@ __gnat_to_gm_time (OS_Time *p_time, int *p_year, int *p_month, int *p_day,
struct tm *res;
time_t time = (time_t) *p_time;
- /* On Windows systems, the time is sometimes rounded up to the nearest
- even second, so if the number of seconds is odd, increment it. */
- if (time & 1)
res = gmtime (&time);