On Fri, Feb 06, 2004, Graham Nash wrote:

> I was having problems with _XOPEN_SOURCE being defined by pth.h (v 2.0.0)
> with the subsequent disaster of various structures in netdb.h on one of my
> platforms being masked out. The following patch switches off the flag if it
> was not previously set.
>
> Not very critical though there may be other variables that should be
> similarly treated. I was too lazy to check. Sorry.
>
> --g
>
> *** pth.h.in.orig    Fri Jan 30 16:56:09 2004
> --- pth.h.in    Fri Jan 30 16:56:21 2004
> ***************
> *** 338,345 ****
> --- 338,351 ----
>  #define PTH_FAKE_POLL @PTH_FAKE_POLL@
>  #if !(PTH_FAKE_POLL)
>  /* use vendor poll(2) environment */
> + #ifndef _XOPEN_SOURCE
>  #define _XOPEN_SOURCE 500
> + #define _XOPEN_SOURCE_set
> + #endif
>  #include <poll.h>
> + #ifdef _XOPEN_SOURCE_set
> + #undef _XOPEN_SOURCE
> + #endif
>  #ifndef POLLRDNORM
>  #define POLLRDNORM POLLIN
>  #endif

Very good idea. Thanks. Now taken over for GNU Pth 2.0.2.
See http://cvs.ossp.org/chngview?cn=4702 for details.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
Development Site                      http://www.ossp.org/pkg/lib/pth/
Distribution Files                          ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots                 ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to