First of all, your RLIM_INFINITY definition should match the system call you
use. At this moment, there are two versions of getrlimit syscall, one of
them assumes that RLIM_INFINITY == MAX_LONG,
the other that RLIM_INFINITY == MAX_ULONG.
I would prefer the newer syscall with RLIM_INFINITY definition from kernel
(MAX_ULONG).
> Only the libc definitions and never the kernel definitions. With a few
> exceptions applications shouldn't include any definitions from <linux/...>
> or <asm/...>.
Ralf, it may be a surprise for you :-), but glibc-2.0 includes
<asm/resource.h> from its <resourcebits.h>.
Yes, glibc headers conflit with kernel ones very often.
There is a solution other than mentioned by Ralf. Do not include libc
headers.
Best regards
Andrey V.
Savochkin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/