This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]