Re: Problematic redefinition of 'stat' and 'fstat'

2019-12-24 Thread Eli Zaretskii
> From: Bruno Haible > Cc: Eli Zaretskii > Date: Tue, 24 Dec 2019 22:42:06 +0100 > > > Which is exactly what happened to me > > while building the latest versions of GDB, which uses Gnulib, but > > links against the BFD library, which doesn't. > > The BFD library should move to using 'large fil

Re: hard-locale: make multithread-safe

2019-12-24 Thread Bruno Haible
> 2019-12-18 Bruno Haible > * modules/hard-locale (Depends-on): Remove strdup. Add setlocale-null. This change has an effect on gettext's libgettextpo: Through this new dependency chain hard-locale -> setlocale-null -> locale there now is a gnulib-generated locale.h file in libgettextp

Re: Problematic redefinition of 'stat' and 'fstat'

2019-12-24 Thread Bruno Haible
Hi Eli, > largefile.m4 does: > > AC_CACHE_CHECK([for 64-bit st_size], [gl_cv_member_st_size_64], > [AC_COMPILE_IFELSE( >[AC_LANG_PROGRAM( > [[#include > struct stat buf; > int verify_st_size_size[sizeof (buf.st_size) >= 8 ?

Re: fix dependencies among thread modules

2019-12-24 Thread Bruno Haible
> 2019-12-21 Bruno Haible > > sched_yield: Don't depend on threadlib and yield. This patch in particular had the effect of correcting the value of YIELD_LIB on HP-UX. Namely, on HP-UX, librt exists but is not needed for sched_yield, because sched_yield already exists in libc. Previously,

Re: Problematic redefinition of 'stat' and 'fstat'

2019-12-24 Thread Eli Zaretskii
> Cc: bug-gnulib@gnu.org > From: Paul Eggert > Date: Tue, 24 Dec 2019 10:51:54 -0800 > > On 12/24/19 10:29 AM, Eli Zaretskii wrote: > > > I'm not talking about file offsets, > > I'm talking about st_size only. > > Why distinguish between the two? Because one is a member of a struct, the other

Re: Problematic redefinition of 'stat' and 'fstat'

2019-12-24 Thread Paul Eggert
On 12/24/19 10:29 AM, Eli Zaretskii wrote: > I'm not talking about file offsets, > I'm talking about st_size only. Why distinguish between the two? st_size is of type off_t in the standard POSIX model, and that's what Gnulib-using programs expect. > whatever BFD does > or doesn't do, programs th

Re: bug in xtime.h

2019-12-24 Thread Paul Eggert
On 12/24/19 1:34 AM, Bruno Haible wrote: >> - (corr_quad + (corr_quad < 0)) / 25 - (corr_quad < 0) > Shouldn't that be parenthesized differently? > >- ((corr_quad + (corr_quad < 0)) / 25 - (corr_quad < 0)) Right you are. Thanks, I fixed that. I very much doubt whether

Re: Problematic redefinition of 'stat' and 'fstat'

2019-12-24 Thread Eli Zaretskii
> From: Paul Eggert > Cc: bug-gnulib@gnu.org > Date: Tue, 24 Dec 2019 10:08:51 -0800 > > On 12/24/19 9:25 AM, Eli Zaretskii wrote: > > if the default definition > > of 'struct stat' uses 32-bit st_size field, then linking a program > > against a library which was compiled with that default (i.e.

Re: Problematic redefinition of 'stat' and 'fstat'

2019-12-24 Thread Paul Eggert
On 12/24/19 9:25 AM, Eli Zaretskii wrote: > if the default definition > of 'struct stat' uses 32-bit st_size field, then linking a program > against a library which was compiled with that default (i.e. without > using the Gnulib overrides) will produce a buggy program, if it passes > 'struct stat'

Problematic redefinition of 'stat' and 'fstat'

2019-12-24 Thread Eli Zaretskii
The current sys_stat.in.h in Gnulib does this on MinGW: /* Large File Support on native Windows. */ #if @WINDOWS_64_BIT_ST_SIZE@ # define stat _stati64 #endif [...] #elif @WINDOWS_64_BIT_ST_SIZE@ /* Above, we define stat to _stati64. */ # define fstat _fstati64 [...] # elif

Re: new module 'setlocale-null'

2019-12-24 Thread Bruno Haible
Another tweak of this module: Add the ability to rely on the lock defined in another library. This makes it possible to avoid a link error regarding libgettextpo and libintl on Windows. 2019-12-24 Bruno Haible setlocale-null: Make it easy to rely on the lock in another library.

grep-3.3.42-088f testing on Hurd and IRIX

2019-12-24 Thread Bruno Haible
Testing of grep-3.3.42-088f on GNU/Hurd 2019 and IRIX 6.5: The grep tests succeeded, but some of the gnulib tests failed. On Hurd 2019: FAIL: test-pthread_sigmask1 === ../../gnulib-tests/test-pthread_sigmask1.c:78: assertion 'sigint_occurred == 1' failed Aborted FAIL te

Re: bug in xtime.h

2019-12-24 Thread Bruno Haible
Paul Eggert wrote: > the remaining patches are for other instances of this idiom in Gnulib. These other instances use 'int', not 'long long'. The machine code is similar: === int sec1 (int t) { return (t < 0 ? (t + 1) / 1