bug-gnulib
[Top][All Lists]
Advanced

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

Re: gl_YEAR2038_EARLY is called too late


From: Daiki Ueno
Subject: Re: gl_YEAR2038_EARLY is called too late
Date: Mon, 26 Sep 2022 15:25:13 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Paul Eggert <eggert@cs.ucla.edu> writes:

> On 9/25/22 21:56, Daiki Ueno wrote:
>> I guess a simple solution would be to swap the order of
>> gl_YEAR2038_EARLY and AC_SYS_LARGEFILE in modules/largefile, as with the
>> attached patch.
>
> Thanks, I installed that.
>
>> This doesn't fully resolve the issue with DTLS tests as mentioned, and I
>> suspect there might be some other confusions.  Any suggestions would be
>> appreciated.
>
> What are the symptoms of these other failures? The URL you sent
> doesn't make that obvious to me (I don't know MinGW).

The symptoms are the same for all other failures: the DTLS stack always
reports timeout at this condition:
https://gitlab.com/gnutls/gnutls/-/blob/cde0061c33d56258281a4d6033eba1d85e75e32d/lib/handshake.h#L124
even if timeout has not reached.

I suspect this might not be an issue in Gnulib, as I see the following
standalone program behaves differently depending on
__MINGW_USE_VC2005_COMPAT:

$ cat > test.c
#include <time.h>
#include <stdio.h>

int
main (void)
{
  struct timespec start, end, now;
  clock_gettime (CLOCK_REALTIME, &start);
  end.tv_sec = start.tv_sec + 10;
  end.tv_nsec = start.tv_nsec;
  clock_gettime (CLOCK_REALTIME, &now);
  printf ("%zd\n", start.tv_sec);
  printf ("%zd\n", now.tv_sec);
  printf ("%zd\n", end.tv_sec);
  printf ("%d\n", start.tv_sec < now.tv_sec);
  printf ("%d\n", now.tv_sec < end.tv_sec);
  return 0;
}
^D

$ i686-w64-mingw32-gcc -o test test.c
$ wine ./test.exe
1664173364
1664173364
1664173374
0
1

$ i686-w64-mingw32-gcc -D__MINGW_USE_VC2005_COMPAT=1 -o test test.c
$ wine ./test.exe
1664173389
1664173389
1664173399
1
0

Regards,
-- 
Daiki Ueno



reply via email to

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