Quote:>I have been working on installing libc 5.3.9. After writing a small test
>program I discovered that POSIX_VERSION returns 199309 which means that this
>library is POSIX.4 complient.
Yes. In <unistd.h> you'll find
/* POSIX Standard approved as IEEE Std 1003.1b as of September 15, 1993. */
#define _POSIX_VERSION 199309L
Quote:>So I wrote another test program to check the kernel,
You can't check the kernel with sysconf()!
Quote:>this program uses the sysconf call to tell about the operation systems
>options. It (as expected) returned 199009 meaning the the kernel only speaks
>POSIX.1.
This is strange. From the libc-5.3.9 source in
libc/sysdeps/linux/__sysconf.c:
case _SC_VERSION:
return _POSIX_VERSION;
So sysconf(_SC_VERSION) is supposed to return exactly the same Posix
version code as _POSIX_VERSION: September 1993. May be you have
compiled libc BEFORE installing the new include files such that
__sysconf.c was compiled using an old <unistd.h>???
Quote:>I recompiled the kernel with the new libraries and it still returns
>POSIX.1 complience.
The kernel never uses libc. If you compile the kernel, it is
irrelevant, which libc version you have installed.
If you want to know in an application, which kernel system calls are
already available, you should check whether the system call returns
ENOSYS in errno. This is the most reliable test. The _POSIX and _SC
facilities only tell you about the capabilities of libc.
It would theoretically be possible to install a huge table in the
sysconf() libc implementation that knows for each kernel version,
which features are supported and which are not. But this is ugly and
requires permanent updates. Just make sure you have always installed a
recent kernel if you use a recent libc, then things will fit together
nicely.
Markus
--
Markus Kuhn, Computer Science student -- University of Erlangen,
WWW Home: <http://wwwcip.informatik.uni-erlangen.de/user/mskuhn>