RE : isatty() and errno

2011-11-07 Thread Bastien ROUCARIES
isatty should be pached under windows. Try isatty(/dev/null) Bastien Le 8 nov. 2011 00:53, "Eric Blake" a écrit : Our assumption in ptsname.c is that isatty() will set errno on invalid fds. But this is not required by POSIX, and indeed not enforced by Solaris 10; that is, our ptsname.c impleme

[PATCH 1/4] ptsname_r: new module

2011-11-07 Thread Eric Blake
For now, this replacement focuses solely on compilation compatibility, and assumes that isatty() and ttyname_r() work on a master side pty; if this assumption fails, or if thread-safety is also required, then a later patch can follow the lead of strerror_r.c in wrapping the system ptsname() with a

[PATCH 3/4] ptsname_r: port to Solaris

2011-11-07 Thread Eric Blake
Blindly implementing ptsname_r from scratch using the glibc algorithm fails on Solaris 10, where isatty() doesn't set errno when returning 0. While not thread-safe, wrapping ptsname() instead of implementing things ourselves has better results. * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Also check fo

[PATCH 4/4] ptsname_r: work around FreeBSD issue

2011-11-07 Thread Eric Blake
POSIX does not require ptsname() to set errno on failure, and FreeBSD 8.2 leaves it unchanged. * lib/ptsname_r.c (ptsname_r): Guarantee errno on ptsname failure. * doc/posix-functions/ptsname.texi (ptsname): Document the issue. Signed-off-by: Eric Blake --- ChangeLog|

[PATCH 2/4] ptsname_r-tests: new test module

2011-11-07 Thread Eric Blake
For now, this tests glibc behavior of both returning an errno value as well as setting errno; we may need to relax that. * modules/ptsname_r-tests: New module. * tests/test-ptsname_r.c: New file. Signed-off-by: Eric Blake --- ChangeLog |4 + modules/ptsname_r-tests | 14 +++

[PATCH 0/4] add ptsname_r

2011-11-07 Thread Eric Blake
I propose adding ptsname_r; I'll push this in 72 hours if I don't get any feedback. [Among other things, I would expect feedback to include whether ptsname_r should drag in locking, like our strerror_r module, or just assume that no one else uses ptsname, like our gmtime_r replacement in our time_

isatty() and errno

2011-11-07 Thread Eric Blake
Our assumption in ptsname.c is that isatty() will set errno on invalid fds. But this is not required by POSIX, and indeed not enforced by Solaris 10; that is, our ptsname.c implementation was copied from glibc, and was making an assumption only guaranteed by glibc's implementation choice for i

Re: isatty() and errno

2011-11-07 Thread Eric Blake
On 11/07/2011 04:18 PM, Eric Blake wrote: Our assumption in ptsname.c is that isatty() will set errno on invalid fds. But this is not required by POSIX, and indeed not enforced by Solaris 10; that is, our ptsname.c implementation was copied from glibc, and was making an assumption only guaranteed

Re: gnutls missing largefile support

2011-11-07 Thread Bruno Haible
Nikos Mavrogiannopoulos wrote: > We only use file > support to open configuration files, or files containing certificates, > files that if they exceed 2GB then something is wrong. Indeed, after taking a look at gnutls-3.0.6/lib/opencdk/keydb.[hc] I can even tell you what will be wrong: If someone

[PATCH] grantpt: fix typo

2011-11-07 Thread Eric Blake
* lib/stdlib.in.h (grantpt): Check correct function. Signed-off-by: Eric Blake --- ChangeLog |3 +++ lib/stdlib.in.h |2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 820decf..1761f56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,

Re: math error reporting

2011-11-07 Thread Bruno Haible
Bastien ROUCARIES wrote: > msvc is compliant but a the microsoft taste > https://www.securecoding.cert.org/confluence/display/seccode/FLP03-C.+Detect+and+handle+floating+point+errors Thanks, this was helpful. I wasn't aware of this _controlfp_s function. Bruno -- In memoriam Hannah Szenes

Re: gnulib largefile support

2011-11-07 Thread Eric Blake
On 11/07/2011 03:02 PM, Nikos Mavrogiannopoulos wrote: On 11/07/2011 10:52 PM, Bruno Haible wrote: [CCing Ludovic. The thread starts at ] Nikos Mavrogiannopoulos wrote: Wouldn't it be better to add an option to enable it only

Re: gnulib largefile support

2011-11-07 Thread Ludovic Courtès
Hi Bruno, Bruno Haible skribis: > You are confusing trigger and cause. While a gnulib update *triggered* > a malfunction [1], the *cause* was a guile bug [2], and it was fixed in > guile 2.0 already two years ago [3]. I agree about the cause being a Guile bug. That said, if the change to _FILE

Re: gnulib largefile support

2011-11-07 Thread Nikos Mavrogiannopoulos
On 11/07/2011 10:52 PM, Bruno Haible wrote: > [CCing Ludovic. The thread starts at > ] > Nikos Mavrogiannopoulos wrote: >> Wouldn't it be better to add an option to enable >> it only in systems where it is desirable? > Like Eric s

Re: gnulib largefile support

2011-11-07 Thread Bruno Haible
[CCing Ludovic. The thread starts at ] Nikos Mavrogiannopoulos wrote: > Wouldn't it be better to add an option to enable > it only in systems where it is desirable? Like Eric said, large file support *is* desirable on all platfo

Re: gnulib largefile support

2011-11-07 Thread Bruno Haible
Paul Eggert wrote: > Well, I can imagine a small embedded system where files and > streams cannot possibly be larger than 2 GiB. Yes, such as my router here: prompt> df Filesystem 1k-blocks Used Available Use% Mounted on /dev/ram0 4475 3487 988 78% / /de

Re: gnulib largefile support

2011-11-07 Thread Paul Eggert
On 11/07/11 12:38, Eric Blake wrote: > Large file support IS desirable on all platforms. Well, I can imagine a small embedded system where files and streams cannot possibly be larger than 2 GiB. On such a system it might be reasonable to use gnulib modules in small-file mode. If this is a real i

Re: gnulib largefile support

2011-11-07 Thread Eric Blake
On 11/07/2011 01:30 PM, Nikos Mavrogiannopoulos wrote: Hello, After adding few modules to gnulib the gnutls-guile library had few failures in testsuite in some arm and mips systems. After some investigation[0] it seems that the issue was that the new gnulib modules were depending on largefile m

gnulib largefile support

2011-11-07 Thread Nikos Mavrogiannopoulos
Hello, After adding few modules to gnulib the gnutls-guile library had few failures in testsuite in some arm and mips systems. After some investigation[0] it seems that the issue was that the new gnulib modules were depending on largefile module which defines a 64-bit off_t even on 32-bit systems.

[PATCH] maint: silence new syntax check

2011-11-07 Thread Eric Blake
* top/maint.mk (sc_prohibit_dirent_without_use): Add missing @. Signed-off-by: Eric Blake --- I noticed that the latest gnulib was rather noisy at syntax check. ChangeLog|5 + top/maint.mk |2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeL

Re: math error reporting

2011-11-07 Thread Bastien ROUCARIES
On Sun, Nov 6, 2011 at 8:36 PM, Bruno Haible wrote: > Hi, > > Considering how gnulib-implemented functions should do their > error reporting, I ran a test program to see how the various systems > implement math errors. > > ==

Re: math error reporting

2011-11-07 Thread Bruno Haible
>OSF/1 5.1:0, errno ( incomplete) With the module 'fpieee', this becomes OSF/1 5.1:NaN, errno ( incomplete) So, we are able to support IEEE NaN on all platforms. Bruno -- In memoriam Hannah Szenes