bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mktime.m4 - working mktime fails if TIME_T_IS_SIGNED us undefined.


From: John E. Malmberg
Subject: mktime.m4 - working mktime fails if TIME_T_IS_SIGNED us undefined.
Date: Thu, 21 Sep 2017 19:27:20 -0500
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

The TIME_T_IS_SIGNED macro not defined if time_t is unsigned.

This causes the test for working mtime to fail to compile on such systems such as OpenVMS.

configure:33308: cc -o conftest -g   conftest.c  >&5

  time_t_max = (! TIME_T_IS_SIGNED
..................^
%CC-E-UNDECLARED, In this statement, "TIME_T_IS_SIGNED" is not declared.
at line number 452 in file LCL_ROOT:[gnulib]conftest.c;1


A simple hack gets the test to run.

--- /trunk_root/gnulib/m4/mktime.m4     2017-07-15 15:24:28 -0500
+++ /vms_root/gnulib/m4/mktime.m4       2017-09-21 19:20:43 -0500
@@ -195,6 +195,10 @@
   alarm (60);
 #endif

+#ifndef TIME_T_IS_SIGNED
+# define TIME_T_IS_SIGNED 0
+#endif
+
   time_t_max = (! TIME_T_IS_SIGNED
                 ? (time_t) -1
                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)

Unfortunately after the test actually runs it shows that the OpenVMS supplied mktime() fails on the spring_forward_gap() test.

Regards,
-John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]