[PATCH] Rename pwait for LynxOS

Adam Nemet anemet@lnxw.com
Tue Aug 17 20:28:00 GMT 2004


OK so your point is that from a potential link error we regress to a
crash.  That is a good point.

So how about this then?  In libiberty we provide both pwait and
libiberty_pwait in separate modules if we detect pwait to be already
taken.  Then we let the packages choose internally which one they
want.  Clearly "ignorant" packages will have the current behavior link
error/pure luck whereas those wanting to address this issue will have
a way to internally rename their pwait references.


On Tue, 17 Aug 2004 15:34:26 -0400, DJ Delorie <dj@redhat.com> said:
> The problem exists as per this example:
> * Libiberty detects pwait in libc and sets HAVE_PWAIT.  It thus
>   provides libiberty_pwait().
> * gdb (or some other package) does not have any test, or otherwise
>   fails to detect libc's pwait().  It calls pwait() and expects
>   libiberty to provide it, but gets libc's pwait() instead, and
>   crashes.
> The problem with your solution is that you have to coordinate among
> any package that might use libiberty's pwait(), including packages we
> may not be aware of.
> In short, you cannot use HAVE_* macros in include/* at all.

More information about the Gcc-patches mailing list