[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ensuring posix-ness
From: |
Reuben Thomas |
Subject: |
Ensuring posix-ness |
Date: |
Wed, 7 Sep 2011 21:32:21 +0100 |
Trying to build some code (Lua bindings for POSIX APIs) with a
gnulib-ized build system, I find that some APIs on GNU systems need
extra treatment (i.e. GNU is not POSIX-1.2001 by default). For
example, for crypt(3) I need to define _XOPEN_SOURCE, and for some
realtime functions such as clock_getres, I need to define
XOPEN_REALTIME.
I can't find any gnulib extensions that bear on this: extensions is
already running because of something else, and
AC_USE_SYSTEM_EXTENSIONS similarly is already active. Similarly, I
can't find anything in the autoconf manual.
The crypt example is particularly annoying, as without _XOPEN_SOURCE
defined it's not defined, even though POSIX_VERSION is >= 200112L, and
it's in that version of POSIX (of course, that's a glibc bug, not a
problem with gnulib, but it would be nice to fix it in gnulib).
Have I missed anything, or is this a gap in gnulib's coverage?
In particular, I note that the latest version of standards coverage
(including outside POSIX) supported by glibc requires _XOPEN_SOURCE to
be defined to 700, and nothing in gnulib seems to do that.
--
http://rrt.sc3d.org