what is _XOPEN_SOURCE=500 needed for?

Matthieu Herrb matthieu.herrb at laas.fr
Sat May 28 07:52:55 PDT 2005


Josh Triplett wrote:

> The optimal solution to this problem would probably be to rewrite the
> macros in Xpoll.h to use the portable macros FD_SET, FD_CLEAR, FD_ISSET,
> and FD_ZERO.  Attempting to look at the insides of struct fd_set, and in
> particular assuming that it has a member fds_bits, is non-portable;
> defining _*_SOURCE just lets it use this non-portable behavior on some
> additional platforms.


More generally, Xos.h, Xpoll.h, Xalloca.h and probably a couple of other 
files need to be rewritten using autoconf-style feature based tests 
rather than hard-coding some obsolete knowledge about OSs.

For the monolitic tree the specific OS dependend configuration file 
(Linux.cf, OpenBSD.cf, etc...) can then provide the knowledge.
-- 
Matthieu Herrb



More information about the xorg mailing list