"BAW" == Barry A Warsaw writes:
BAW> So why isn't sys/resource.h getting included?
BAW> ...because configure isn't finding it:
BAW> checking for sys/resource.h... no
Closer...
/usr/include/sys/resource.h #include's /usr/include/bits/resource.h
which in turn #include's /usr/include/asm/resource.h.
asm/resource.h has this:
/*
* SuS says limits have to be unsigned.
* Which makes a ton more sense anyway.
*/
#define RLIM_INFINITY (~0UL)
which is not protected by #defines. bits/resource.h has this:
/* Value to indicate that there is no limit. */
#ifndef __USE_FILE_OFFSET64
# define RLIM_INFINITY ((long int)(~0UL >> 1))
#else
# define RLIM_INFINITY 0x7fffffffffffffffLL
#endif
which itself doesn't #undef RLIM_INFINITY or otherwise protect
itself. So when configure runs we get a bunch of redefined warnings.
Compiling just this simple file:
-------------------- snip snip --------------------
#include
int main()
{
return 0;
}
-------------------- snip snip --------------------
Gives us:
-------------------- snip snip --------------------
In file included from /usr/include/sys/resource.h:25,
from main.c:1:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:26: warning: this is the location of the previous definition
-------------------- snip snip --------------------
which must configure configure into thinking resource.h isn't
available. Looks like a glibc update might be in order <shudder>:
http://sources.redhat.com/ml/bug-glibc/2000-02/msg00026.html
http://sources.redhat.com/ml/bug-glibc/2000-02/msg00027.html
http://sources.redhat.com/ml/bug-glibc/2000-10/msg00078.html
http://sources.redhat.com/ml/bug-glibc/2000-10/msg00084.html
The odd bit is that I'm still running the 2.2.18 kernel, although
glibc is fairly old.
% rpm -q glibc
glibc-2.1.2-11
Wonder if I can find glibc-2.1.3 somewhere.
then-again-i've-been-looking-for-a-good-excuse-to-install-mandrake-8.0-ly y'rs,
-Barry