This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] Allow usage of union wait for wait() functions and macros
- From: Eric Blake <eblake at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 05 Oct 2011 07:54:42 -0600
- Subject: Re: [PATCH] Allow usage of union wait for wait() functions and macros
- References: <4E8C3828.4010009@t-online.de>
On 10/05/2011 04:57 AM, Christian Franke wrote:
The file include/sys/wait.h provides union wait but neither the wait()
functions nor the W*() macros allow to actually use it. Compilation of
cdrkit 1.1.11 fails because the configure check assumes that union wait
is the status parameter type if its declaration exists.
The attached patch fixes this. It uses GCC extensions for C and
overloading for C++. Works also with the old Cygwin gcc-3.
+/* Will be redefined in sys/wait.h. */
+#define __wait_status_to_int(w) (w)
+
/* A status looks like:
<2 bytes info> <2 bytes code>
As long as you're touching this code, fix this incorrect comment.
A status is 16 bits, and looks like:
<1 byte info> <1 byte code>
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org