bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what does regex depend on sys_wait?


From: Eric Blake
Subject: Re: what does regex depend on sys_wait?
Date: Tue, 28 Sep 2010 10:51:42 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4

On 09/28/2010 10:42 AM, Paul Eggert wrote:
On 09/28/10 09:34, Eric Blake wrote:

However, in thinking about it a bit more, a compromise would be to also
modify tests/test-stdlib.c to check for the presence of whether the
gnulib sys_wait module is in use, and skip validation of the
status-related macros if it is not.  Then, stdlib can drop the sys_wait
dependency, and if you care about the macros, it's not that much harder
to additionally request the sys_wait module.

That would be fine, yes.  The point is that we shouldn't be letting
the tail (mingw and sys/wait) wag the dog.  Another possibility
would be this patch -- would you prefer that?

Hmm - this would be the first time that one of our replacement headers #includes a non-replacement header - if someone installs /usr/include/libposix/stdlib.h as the gnulib replacement (given the recent work on trying to get the libposix usage of gnulib up and running), then they also have to install sys_waitdefs.h in the same directory. But that's not a show-stopper for me.

  /* MirBSD 10 defines WEXITSTATUS in<sys/wait.h>, not in<stdlib.h>.  */
  #ifndef WEXITSTATUS
-# include<sys/wait.h>
+# include "sys_waitdefs.h"
  #endif

I think we _still_ need to include the system <sys/wait.h> prior to "sys_waitdefs.h". That is, sys_waitdefs.h won't define replacements on MirBSD where the system <sys/wait.h> is adequate. And "sys_waitdefs.h" can't include <sys/wait.h>, otherwise we have a circular loop with our replacement <sys/wait.h> using "sys_waitdefs.h".

But other than that, this looks like it will do the trick.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]