bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build errors on Solaris 2.6 & 7


From: Tom G. Christensen
Subject: Re: Build errors on Solaris 2.6 & 7
Date: Sun, 20 Jan 2013 14:12:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 01/20/2013 04:14 AM, Paul Eggert wrote:
How about the following patch instead?  It relies on<sys/types.h>
including<sys/select.h>  if and only if
!defined __XOPEN_OR_POSIX || defined __EXTENSIONS__.
This last expression is something I picked up on Solaris 10,
and I'm hoping it's also good for Solaris 2.6.

It is close though on Solaris < 10 it looks like this in <sys/types.h>:
#if defined(__EXTENSIONS__) || \
        (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE))


Unfortunately this patch causes a different problem.
While it actually allowed dtotimespec.c to build on Solaris 2.6 most everything else now fails with this error:

depbase=`echo accept4.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING= 1 -I../intl -I/usr/tgcware/include -D_REENTRANT -g -O2 -MT accept4.o -MD -MP -MF $depbase.Tpo -c -o accept4.o accept4.c &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from /usr/include/sys/time.h:405,
                 from ./sys/time.h:38,
                 from /usr/include/sys/select.h:16,
                 from ./sys/select.h:33,
from /usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/sys/types.h:431,
                 from ./sys/types.h:27,
                 from ./sys/socket.h:51,
                 from accept4.c:20:
./sys/select.h:551: error: expected declaration specifiers or '...' before 'fd_set' ./sys/select.h:551: error: expected declaration specifiers or '...' before 'fd_set' ./sys/select.h:551: error: expected declaration specifiers or '...' before 'fd_set'

The same happens on Solaris 7 and 9 (8 not tested).

The problem now is that struct fd_set is not defined since gnulib <sys/select.h> is parsed before system <sys/select.h>.

Preprocessed copies of accept4.c here:
http://jupiterrise.com/tmp/sol26-accept4.i
http://jupiterrise.com/tmp/sol9-accept4.i

-tgc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]