Problem with: Re: [PATCH] Allow usage of union wait for wait() functions and macros

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Wed Dec 7 22:36:00 GMT 2011


On Thu, Oct 06, 2011 at 01:17:49PM -0400, Christopher Faylor wrote:
>On Thu, Oct 06, 2011 at 06:12:35PM +0200, Christian Franke wrote:
>>Christopher Faylor wrote:
>>> On Thu, Oct 06, 2011 at 01:03:41PM +0200, Christian Franke wrote:
>>>> ...
>>>> OK, __INSIDE_CYGWIN__ is not needed here in practice (but possibly in
>>>> theory :-)
>>> I would rather see as little __INSIDE_CYGWIN__ as possible
>>> in external headers.
>>
>>OK, removed and Cygwin compilation tested.
>>
>>>> Would the patch with __INSIDE_CYGWIN__ removed be GTG?
>>> Yes.
>>
>>Thanks - patch committed.
>
>Thanks a lot for the patch.

I guess this is why there was a __INSIDE_CYGWIN__ test.

Christian, could you submit a new patch to rectify this problem?

cgf

----- Forwarded message from Christian Joensson <christian.joensson> -----

From: Christian Joensson
To: cygwin, GCC Development
Subject: Failure to bootstrap current gcc trunk on cygwin (20111207 snapshot): conflicting declarations in cygwin's /usr/include/sys/wait.h
Date: Wed, 7 Dec 2011 20:14:36 +0100

I am trying to build gcc trunk on cygwin (with the snapshot of
20111207) and get this:

/usr/local/src/trunk/objdir.withada/./prev-gcc/g++
-B/usr/local/src/trunk/objdir.withada/./prev-gcc/
-B/usr/i686-pc-cygwin/bin/ -nostdinc++
-B/usr/local/src/trunk/objdir.withada/prev-i686-pc-cygwin/libstdc++-v3/src/.libs
 -B/usr/local/src/trunk/objdir.withada/prev-i686-pc-cygwin/libstdc++-v3/libsupc++/.libs
 -I/usr/local/src/trunk/objdir.withada/prev-i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin
 -I/usr/local/src/trunk/objdir.withada/prev-i686-pc-cygwin/libstdc++-v3/include
 -I/usr/local/src/trunk/gcc/libstdc++-v3/libsupc++
-L/usr/local/src/trunk/objdir.withada/prev-i686-pc-cygwin/libstdc++-v3/src/.libs
 -L/usr/local/src/trunk/objdir.withada/prev-i686-pc-cygwin/libstdc++-v3/libsupc++/.libs
-c   -g -O2 -gtoggle -DIN_GCC    -fno-exceptions -fno-rtti -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual  -Wmissing-format-attribute
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-fno-common -Wno-error -DHAVE_CONFIG_H -I. -Iada
-I/usr/local/src/trunk/gcc/gcc -I/usr/local/src/trunk/gcc/gcc/ada
-I/usr/local/src/trunk/gcc/gcc/../include
-I/usr/local/src/trunk/gcc/gcc/../libcpp/include -I/usr/include
-I/usr/include  -I/usr/local/src/trunk/gcc/gcc/../libdecnumber
-I/usr/local/src/trunk/gcc/gcc/../libdecnumber/bid -I../libdecnumber
  /usr/local/src/trunk/gcc/gcc/ada/adaint.c -o ada/adaint.o
In file included from /usr/local/src/trunk/gcc/gcc/system.h:346:0,
                 from /usr/local/src/trunk/gcc/gcc/ada/adaint.c:107:
/usr/include/sys/wait.h: In function 'int __wait_status_to_int(const wait&)':
/usr/include/sys/wait.h:77:61: error: declaration of C function 'int
__wait_status_to_int(const wait&)' conflicts with
/usr/include/sys/wait.h:75:12: error: previous declaration 'int
__wait_status_to_int(int)' here
/usr/include/sys/wait.h: In function 'pid_t wait(wait*)':
/usr/include/sys/wait.h:81:40: error: declaration of C function 'pid_t
wait(wait*)' conflicts with
/usr/include/sys/wait.h:37:7: error: previous declaration 'pid_t
wait(__wait_status_ptr_t)' here
/usr/include/sys/wait.h: In function 'pid_t waitpid(pid_t, wait*, int)':
/usr/include/sys/wait.h:83:71: error: declaration of C function 'pid_t
waitpid(pid_t, wait*, int)' conflicts with
/usr/include/sys/wait.h:38:7: error: previous declaration 'pid_t
waitpid(pid_t, __wait_status_ptr_t, int)' here
/usr/include/sys/wait.h: In function 'pid_t wait3(wait*, int, rusage*)':
/usr/include/sys/wait.h:85:81: error: declaration of C function 'pid_t
wait3(wait*, int, rusage*)' conflicts with
/usr/include/sys/wait.h:39:7: error: previous declaration 'pid_t
wait3(__wait_status_ptr_t, int, rusage*)' here
/usr/include/sys/wait.h: In function 'pid_t wait4(pid_t, wait*, int, rusage*)':
/usr/include/sys/wait.h:87:94: error: declaration of C function 'pid_t
wait4(pid_t, wait*, int, rusage*)' conflicts with
/usr/include/sys/wait.h:40:7: error: previous declaration 'pid_t
wait4(pid_t, __wait_status_ptr_t, int, rusage*)' here
Makefile:1054: recipe for target `ada/adaint.o' failed
make[3]: *** [ada/adaint.o] Error 1
make[3]: Leaving directory `/usr/local/src/trunk/objdir.withada/gcc'
Makefile:4140: recipe for target `all-stage2-gcc' failed
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/usr/local/src/trunk/objdir.withada'
Makefile:18046: recipe for target `stage2-bubble' failed
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/usr/local/src/trunk/objdir.withada'
Makefile:898: recipe for target `all' failed
make: *** [all] Error 2

$ /usr/local/src/trunk/objdir.withada/prev-gcc/xgcc.exe -v
Using built-in specs.
COLLECT_GCC=/usr/local/src/trunk/objdir.withada/prev-gcc/xgcc
Target: i686-pc-cygwin
Configured with: /usr/local/src/trunk/gcc/configure --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share
--docdir=/usr/share/doc/gcc4 -C --datadir=/usr/share
--infodir=/usr/share/info --mandir=/usr/share/man -v --with-gmp=/usr
--with-mpfr=/usr --enable-bootstrap
--enable-version-specific-runtime-libs --libexecdir=/usr/lib
--enable-static --enable-shared --enable-shared-libgcc
--disable-__cxa_atexit --with-gnu-ld --with-gnu-as --with-dwarf2
--disable-sjlj-exceptions --enable-graphite --enable-lto
--disable-symvers --program-suffix=-4 --enable-libgomp --enable-libssp
--enable-threads=posix --with-arch=i686 --with-tune=generic
--enable-libada CC=gcc-4 CXX=g++-4 CC_FOR_TARGET=gcc-4
CXX_FOR_TARGET=g++-4 GNATMAKE_FOR_TARGET=gnatmake
GNATBIND_FOR_TARGET=gnatbind
--enablelanguages=c,ada,c++,fortran,lto,objc,objc++
Thread model: posix
gcc version 4.7.0 20111207 (experimental) [trunk revision 182082] (GCC)

$ uname -a
CYGWIN_NT-6.1-WOW64 LI004043 1.7.10s(0.255/5/3) 20111207 03:08:14 i686 Cygwin

Does this symptom ring a bell for anyone?

-- 
Cheers,

/ChJ

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



----- End forwarded message -----



More information about the Cygwin-patches mailing list