[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: handling of closed file descriptors
From: |
Bruno Haible |
Subject: |
Re: handling of closed file descriptors |
Date: |
Sun, 06 Jan 2019 09:38:37 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; ) |
Paul Eggert wrote:
> I resurrected and refreshed that old Coreutils code and put it into a new
> Gnulib
> module stdopen
I would like to use this modules in GNU gettext and GNU libiconv. But I'm
encountering two issues:
1) A compilation failure with IRIX cc:
cc -n32 -DHAVE_CONFIG_H -I. -I../../gllib -I.. -DGNULIB_STRICT_CHECKING=1
-I/u/guest/bruno/prefix-n32-cc/include -g -c -o stdopen.o ../../gllib/stdopen.c
cc-1029 cc: ERROR File = ../../gllib/stdopen.c, Line = 39
An expression is expected at this point.
for (int fd = STDIN_FILENO; fd <= STDERR_FILENO; fd++)
^
cc-1020 cc: ERROR File = ../../gllib/stdopen.c, Line = 39
The identifier "fd" is undefined.
for (int fd = STDIN_FILENO; fd <= STDERR_FILENO; fd++)
^
2 errors detected in the compilation of "../../gllib/stdopen.c".
2) I don't want to repeat the error message code in each and every
program. So, I put that into a new module 'xstdopen'.
Done through the attached commits.
0001-stdopen-Fix-compilation-error-with-IRIX-cc.patch
Description: Text Data
0002-xstdopen-New-module.patch
Description: Text Data
0003-xstdopen-Add-tests.patch
Description: Text Data