[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: timespec_get: port to Ubuntu 23.04
|
From: |
Paul Eggert |
|
Subject: |
Re: timespec_get: port to Ubuntu 23.04 |
|
Date: |
Fri, 28 Jul 2023 10:40:35 -0700 |
|
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 2023-07-28 08:06, Bruno Haible wrote:
Do you remember how the user was supposed to determine
which modules from time.in.h he needs to import?
How did the GNULIB_PORTCHECK
macro help doing that (or was supposed to help doing that)?
This is all old history and I had to look into the archives to refresh
my memory. It dates back to around when mbscasecmp (of all things...)
was introduced in 2007. In February 2007 I reported an issue with an
older way of doing these checks:
https://lists.gnu.org/r/bug-gnulib/2007-02/msg00004.html
and in commit 9f62a12a18eacd2e289aa1acbc5d7280f332f5a8 you installed
some "#ifdef GNULIB_POSIXCHECK" code for the first time:
https://lists.gnu.org/r/bug-gnulib/2007-02/msg00039.html
We had some back-and-forth about it. A few days later, when I responded
to Simon's suggestion to dump time_r.h and just have code include
time.h, I implemented something along those lines in commit
3ac9552429c5a500717e1d3d129c32f7d0ea37a3, using GNULIB_PORTCHECK instead
of GNULIB_POSIXCHECK:
https://lists.gnu.org/r/bug-gnulib/2007-02/msg00132.html
As I vaguely recall, I used the name GNULIB_PORTCHECK not
GNULIB_POSIXCHECK because I thought some of the time.h portability
issues were related to the GNU API rather than merely to the POSIX API.
If the procedure turns out to be simpler than what we have documented at
https://www.gnu.org/software/gnulib/manual/html_node/Finding-POSIX-substitutes.html
then we have room for improvement on these 44 *.in.h file.
If not, then I would suggest to align time.in.h with the other 44 *.in.h files.
The GNULIB_PORTCHECK mechanism, such as it was, long predates the
current GNULIB_POSIXCHECK mechanism. To be honest I don't fully
understand the latter mechanism (I imagine you're the only person in the
world who does) and so don't know whether GNULIB_PORTCHECK is
equivalent. If adopting GNULIB_POSIXCHECK for time-h would regularize
things please feel free to do that.