bug-gnulib
[Top][All Lists]
Advanced

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

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


From: Bruno Haible
Subject: Re: mktime.m4 - working mktime fails if TIME_T_IS_SIGNED us undefined.
Date: Fri, 22 Sep 2017 11:42:43 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-93-generic; KDE/5.18.0; x86_64; ; )

John E. Malmberg wrote:
> 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.

Given that the bug was introduced on 2016-05-01, and that a web search for
"checking whether time_t is signed... no" reveals hardly any results,
it looks like OpenVMS is the only platform with an unsigned time_t type.

This leads to a testing problem: When we make changes to time_t related
code, how to verify that it works with an unsigned time_t type?

Maybe just use a hacked glibc system: Edit
/usr/include/x86_64-linux-gnu/bits/typesizes.h
changing the line
  #define __TIME_T_TYPE           __SYSCALL_SLONG_TYPE
to
  #define __TIME_T_TYPE           __SYSCALL_ULONG_TYPE
?

Bruno




reply via email to

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