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

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Thu Dec 8 02:34:00 GMT 2011


On Thu, Dec 08, 2011 at 12:17:11AM +0100, Christian Franke wrote:
>Christopher Faylor wrote:
>>
>> I guess this is why there was a __INSIDE_CYGWIN__ test.
>>
>> Christian, could you submit a new patch to rectify this problem?
>
>OK, will try soon.
>
>
>> ...
>> /usr/local/src/trunk/objdir.withada/./prev-gcc/g++
>> -B/usr/local/src/trunk/objdir.withada/./prev-gcc/
>> ...
>> -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
>
>This suggests that sys/wait.h is included within an extern "C" { ... } 
>block.
>If this is the case then an extern "C++" {...} block around the C++ 
>inline functions of sys/wait.h should fix this.
>See:
>http://cygwin.com/ml/cygwin-patches/2011-q4/msg00005.html

Yes, I'm responding to this very thread.

But, I don't see how extern "c++" fixes anything.  #ifdef __cplusplus maybe...

cgf



More information about the Cygwin-patches mailing list