aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Anisimkov <anisimko@adacore.com>2019-08-20 09:50:09 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-20 09:50:09 +0000
commit8d3e80186744f894702d2f618a78eae0a2c1d33c (patch)
tree8665782e4ae1936599b65305e9eec726164b8986
parentb08f42aecfe0d2c70c2fa81601f2ec86d3ffea30 (diff)
downloadgcc-8d3e80186744f894702d2f618a78eae0a2c1d33c.zip
gcc-8d3e80186744f894702d2f618a78eae0a2c1d33c.tar.gz
gcc-8d3e80186744f894702d2f618a78eae0a2c1d33c.tar.bz2
[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. 2019-08-20 Dmitriy Anisimkov <anisimko@adacore.com> gcc/ada/ * adaint.c (__gnat_to_gm_time): On _WIN32, don't round time up to even second. From-SVN: r274736
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/adaint.c9
2 files changed, 6 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index eeb9911..0a92182 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-20 Dmitriy Anisimkov <anisimko@adacore.com>
+
+ * adaint.c (__gnat_to_gm_time): On _WIN32, don't round time up
+ to even second.
+
2019-08-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): If actual type is
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index fe8d955..7290f7a 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -344,7 +344,7 @@ int __gnat_use_acl = 1;
system provides the routine readdir_r.
... but we never define it anywhere??? */
#undef HAVE_READDIR_R
-
+
#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;
-#ifdef _WIN32
- /* 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)
- time++;
-#endif
-
res = gmtime (&time);
if (res)
{