On Thu, Jul 24, 2025 at 03:25:03PM -0700, Collin Funk wrote:
> Bruno Haible via Bug reports for the GNU Texinfo documentation system
> <bug-texinfo@gnu.org> writes:
> 
> > The CI now reports a compilation error on Solaris 11.4, during "make check",
> > that was not present 3 days ago:
> >
> > Making check in info
> > make  check-am
> > make  pseudotty
> > gcc -m64 -DHAVE_CONFIG_H -I. -I../../info -I..  -I../..                     
> >            -I../../gnulib/lib                     -I../gnulib/lib           
> >         -DLOCALEDIR=\"/usr/local/share/locale\"              
> > -DINFODIR=\"/usr/local/share/info\"                       
> > -DINFODIR2=\"/usr/local/share/info\"                 
> > -DSYSCONFDIR=\"/usr/local/etc\"  -Wall -Wno-unused-function -D_REENTRANT  
> > -g -O2 -MT pseudotty.o -MD -MP -MF .deps/pseudotty.Tpo -c -o pseudotty.o 
> > ../../info/pseudotty.c
> > In file included from /usr/include/sys/types.h:667,
> >                  from ../gnulib/lib/sys/types.h:46,
> >                  from ../gnulib/lib/stdio.h:83,
> >                  from ../gnulib/lib/error.h:47,
> >                  from ../../info/pseudotty.c:27:
> > ../../info/pseudotty.c: In function ‘main’:
> > ../../info/pseudotty.c:130:3: error: implicit declaration of function 
> > ‘memset’ [-Wimplicit-function-declaration]
> >   130 |   FD_ZERO (&read_set);
> >       |   ^~~~~~~
> > ../../info/pseudotty.c:41:1: note: include ‘<string.h>’ or provide a 
> > declaration of ‘memset’
> >    40 | #include "termdep.h"
> >   +++ |+#include <string.h>
> >    41 | 
> > *** Error code 1
> 
> This will occur on AIX 7.1 as well based on the Gnulib manual [1]:
> 
>     This header file is not self-contained—it requires <string.h> before
>     FD_ZERO can be used—on some platforms: AIX 7.1, Solaris 11.4.
> 
> The 'sys_select-h' module fixes it. But I think Texinfo tries to avoid
> the header modules because of them not working well with libperl, IIRC.
> 
> Collin
> 
> [1] 
> https://www.gnu.org/software/gnulib/manual/html_node/sys_002fselect_002eh.html
> 

Thank you both.  It should be fixed in commit 6e582db42d.

I had removed the include directive in commit 10dc89bc305c (2025-07-22
00:56:07 +0100) after an attempt to remove unneeded includes.  I had
missed why <string.h> might have been needed.

On the subject of sys/select.h, the libc Texinfo manual appears
to be out of date:

"A better solution is to use the select function. This blocks the program
until input or output is ready on a specified set of file descriptors,
or until a timer expires, whichever comes first. This facility is declared
in the header file sys/types.h."

https://www.gnu.org/software/libc/manual/html_node/Waiting-for-I_002fO.html

There's no mention of sys/select.h there.  I couldn't find why this might
have been in the time I spent researching it, although it seemed that the
needed header file could have changed over time.  That's confirmed by the
gnulib documentation that says the header doesn't exist on a small number
of systems.

  • pseu... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Collin Funk
      • ... Gavin Smith
        • ... Collin Funk
        • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system

Reply via email to