On Tue, Aug 06, 2013 at 02:18:38PM -0400, Evan Huus wrote:
> Or not quite. The question is why the feature test macro is for glibc
> 2.12 and 2008, when the function existed long before that...
I've used _XOPEN_SOURCE to avoid problems :)
But most likely because it's guarder with _POSIX_C_SOURCE >= 200809L (read: POSIX-1.2008).
So we need some glibc after POSIX-1.2008 was standarized.
According to feature_test_macros _POSIX_C_SOURCE >= 200809L should work with
glibc-2.10 (released 2009-05-09), but most likely for pread() it's not :)
man page about pread() being POSIX-1.2001 is little confusing, cause
it was XSI extension, and since Issue 7 of pread() [1] was moved to base,
and _POSIX_C_SOURCE >= 200112L don't accept XSI extensions.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html#tag_16_474_14