stdio: Fix compilation error in C++ mode on Linux/riscv64 with musl

2024-08-21 Thread Bruno Haible
articular circumstance is that HAVE_FPURGE is 1 and REPLACE_FPURGE is 1 as well (because fpurge exists in libc but is not declared). This patch fixes it. 2024-08-21 Bruno Haible stdio: Fix compilation error in C++ mode on Linux/riscv64 with musl. * lib/stdio.in.h (fpurge): Disable

stdio: Fix the value of _PRINTF_NAN_LEN_MAX on OpenBSD

2023-04-07 Thread Bruno Haible
On OpenBSD 6.5, I see a test failure of 'test-stdio'. The _PRINTF_NAN_LEN_MAX check fails because the printed representation of NaN, here, is "-nan"; however, gnulib's stdio.h had defined _PRINTF_NAN_LEN_MAX to 3. This patch fixes the value. 2023-04-07 Bruno Haible

stdio: Fix compilation error in C++ mode on macOS

2023-04-07 Thread Bruno Haible
wo functions in /usr/include/stdio.h are dependent on the value of _POSIX_C_SOURCE. Apparently this macro has different value in a C++ compilation unit than in C. This patch fixes the errors. 2023-04-07 Bruno Haible stdio: Fix compilation error in C++ mode on macOS. * lib/stdio.i

stdio: Fix errors in C++ mode on Android, due to getw and putw

2023-01-03 Thread Bruno Haible
ILE *restrict stream)); ~~^~~ ../gllib/stdio.h:1700:19: error: no member named 'putw' in the global namespace _GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); ~~^~ These two patches fix them. 2023-01-03 Brun

stdio: Fix compilation error on DragonFly BSD

2021-05-22 Thread Bruno Haible
rsion from 'void (*)()' to 'gnulib::_gl_fcloseall_wrapper::type' {aka 'int (*)()'} [-fpermissive] _GL_CXXALIAS_SYS (fcloseall, int, (void)); ^~~~ This patch fixes it. 2021-05-22 Bruno Haible stdio: Fix compilation error on DragonFly BSD.

Re: patch: stdio fix for UnixWare

2020-09-24 Thread Tim Rice
On Thu, 24 Sep 2020, Tim Rice wrote: > > Hi Bruno, > > On Fri, 25 Sep 2020, Bruno Haible wrote: > > > Tim Rice wrote: > > > I've attached a patch to address the fact that UnixWare does not have > > > stdio_ext.h but has some __X() stdio helper functions. > > > > In which header file are they d

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Eric Blake
On 05/26/2015 04:09 PM, Assaf Gordon wrote: > Hello Eric, > > Thanks for your quick reply and fix. > > I've found one more issue which I'm not sure how to solve - interplay > between gcc/mingw/inttypes/gnulib: The format string to "error()". > > In theory (if I understand correctly), printf() an

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Assaf Gordon
Hello Eric, Thanks for your quick reply and fix. I've found one more issue which I'm not sure how to solve - interplay between gcc/mingw/inttypes/gnulib: The format string to "error()". In theory (if I understand correctly), printf() and error() should accept the same format specifiers, thus

[PATCH v2 1/2] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Eric Blake
ned-off-by: Eric Blake --- ChangeLog | 6 ++ m4/stdio_h.m4 | 19 --- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 960eec3..a204cac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-05-26 Eric Blake + + stdio: fi

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Eric Blake
On 05/26/2015 02:21 PM, Eric Blake wrote: > On 05/26/2015 01:49 PM, Assaf Gordon wrote: >> Hello, >> >> I'm encountering a similar/related issue with PRIdMAX on mingw32-gcc 4.8.2. >> > > Okay, so that's a version of mingw new enough to honor > __USE_MINGW_ANSI_STDIO, and a version of gcc old enou

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Eric Blake
On 05/26/2015 01:49 PM, Assaf Gordon wrote: > Hello, > > I'm encountering a similar/related issue with PRIdMAX on mingw32-gcc 4.8.2. > > In short, when using gnulib in my project and cross-compiling with > mingw32-gcc 4.8.2 > somehow the PRIdMAX becomes "lld" instead of "I64d". That somehow is t

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Assaf Gordon
Hello, I'm encountering a similar/related issue with PRIdMAX on mingw32-gcc 4.8.2. In short, when using gnulib in my project and cross-compiling with mingw32-gcc 4.8.2 somehow the PRIdMAX becomes "lld" instead of "I64d". I was able to reproduce it with GNU Hello (long details below). perhaps

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-22 Thread Eric Blake
On 05/20/2015 11:01 PM, Paul Eggert wrote: > Eric Blake wrote: >> I'm still open to any cleaner test, easy enough to maintain. > > All we care about is (1) is it MingW and (2) has it defined PRIdMAX to > be "lld" or to be "I64d". Is that right? If so, the first we can tell > via inspecting a pre

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-20 Thread Paul Eggert
Eric Blake wrote: I'm still open to any cleaner test, easy enough to maintain. All we care about is (1) is it MingW and (2) has it defined PRIdMAX to be "lld" or to be "I64d". Is that right? If so, the first we can tell via inspecting a predefined preprocessor macro, and the second we can t

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-20 Thread Eric Blake
On 05/20/2015 09:40 PM, Paul Eggert wrote: > $EGREP has undefined behavior on binary data, so this isn't portable. Bummer. It will work on mingw (which only uses GNU grep), which is the affected platform, but you're right that we have to make it not break other platforms. And 'strings' is not po

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-20 Thread Paul Eggert
$EGREP has undefined behavior on binary data, so this isn't portable. I long ago gave up on AC_EGREP_CPP, since it's too flaky nowadays. Why can't we test directly for what we're worried about? I'm afraid I am not following why the value of PRIdMAX is related to whether printf should use the

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-20 Thread Pádraig Brady
es changed, 19 insertions(+), 6 deletions(-) > > diff --git a/ChangeLog b/ChangeLog > index 293b863..1b67561 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,9 @@ > +2015-05-20 Eric Blake > + > + stdio: fix probe on mingw under gcc 5.1 > + * m4/s

[PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-20 Thread Eric Blake
ss-compilation of libvirt. ChangeLog | 6 ++ m4/stdio_h.m4 | 19 +-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 293b863..1b67561 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-05-20 Eric Blake + + stdio:

Re: [PATCH] stdio: fix use of PRIdMAX on modern mingw

2015-05-20 Thread Eric Blake
On 01/05/2015 04:03 PM, Eric Blake wrote: > Commit cf88e56ab broke the use of PRIdMAX and friends on modern > mingw64 installations. Basically, when requesting > _USE_MINGW_ANSI_STDIO, not only does mingw turn on support for %lld, > it also rewrites to provide PRIdMAX as "lld" instead of > "I64d"

Re: [PATCH] stdio: fix use of PRIdMAX on modern mingw

2015-01-05 Thread Pádraig Brady
On 05/01/15 23:03, Eric Blake wrote: > Commit cf88e56ab broke the use of PRIdMAX and friends on modern > mingw64 installations. Basically, when requesting > _USE_MINGW_ANSI_STDIO, not only does mingw turn on support for %lld, > it also rewrites to provide PRIdMAX as "lld" instead of > "I64d" (but

[PATCH] stdio: fix use of PRIdMAX on modern mingw

2015-01-05 Thread Eric Blake
nition of a macro. ChangeLog | 7 +++ lib/stdio.in.h | 7 ++- m4/stdio_h.m4 | 20 +++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f5611d..6f49589 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-01-05 Eri

stdio fix

2007-03-08 Thread Bruno Haible
This is needed at least on glibc-2.3.6 systems, to avoid weird compilation errors. 2007-03-08 Bruno Haible <[EMAIL PROTECTED]> * lib/stdio_.h: Treat __need___FILE like __need_FILE. *** lib/stdio_.h7 Mar 2007 03:47:50 - 1.6 --- lib/stdio_.h9 Mar 2007 02:25:51 -

an stdio fix

2007-03-05 Thread Bruno Haible
The substitute is not self-contained if the 'snprintf' or 'vsnprintf' module is used: it is lacking a definition of size_t. 2007-03-05 Bruno Haible <[EMAIL PROTECTED]> * lib/stdio_.h: Include . *** lib/stdio_.h21 Feb 2007 02:18:10 - 1.1 --- lib/stdio_.h6 Mar 2