This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
_POSIX_MEMLOCK etc. set to 1 instead of 200112L?
- From: Britton <fsblk at aurora dot uaf dot edu>
- To: <libc-alpha at sources dot redhat dot com>
- Date: Thu, 28 Nov 2002 16:10:53 -0900 (AKST)
- Subject: _POSIX_MEMLOCK etc. set to 1 instead of 200112L?
I have a bug report against my application stating that checking for
_POSIX_MEMLOCK being defined is not enough to ensure mlockall() is
available, since it can be defined to -1 (meaning never available) or 0
(check at run time). It seems to me that this section from mlockall(2):
On POSIX systems on which mlockall and munlockall are available,
_POSIX_MEMLOCK is defined in <unistd.h>.
is wrong, or at least incomplete enough to be misleading.
Also, the value that _POSIS_MEMLOCK endup up getting (I think from
posix_opt.h) is 1, which according to this page:
http://people.redhat.com/drepper/posix-option-groups.html
does not seem to be allowed (value should be 200112L).
Thanks,
Britton Kerin
__
GNU GPL: "The Source will be with you... always."