X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org X-Mail-Handler: MailHop Outbound by DynDNS X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/vSQ+srARQEWtN9rta/DLV Date: Wed, 8 Feb 2012 01:10:36 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Bug in sys/wait.h with C++ Message-ID: <20120208061036.GD7184@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1328668786 DOT 8060 DOT 7 DOT camel AT YAAKOV04> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1328668786.8060.7.camel@YAAKOV04> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Tue, Feb 07, 2012 at 08:39:46PM -0600, Yaakov (Cygwin/X) wrote: >Just came across an issue with in C++. STC: > >$ cat test.c >#include >#include >int main(void) { wait(NULL); return 0; } > >$ gcc -Wall test.c > >$ gcc -x c++ -Wall test.c >test.c: In function ???int main()???: >test.c:2:27: error: call of overloaded ???wait(NULL)??? is ambiguous >/usr/include/sys/wait.h:37:7: note: candidates are: pid_t wait(int*) >/usr/include/sys/wait.h:82:14: note: pid_t wait(wait*) > >This code compiles cleanly on Linux. I guess we have to incorporate Linux's head-standing in /usr/include/sys/wait.h to allow both the use of union wait * and int as arguments to wait(). Anyone want to send a patch to cygwin-patches? cgf -- 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