Skip to contentSkip to conversation

resources.h patch / RLIM_INFINITY __KERNEL__ depend ?

PATCH Florian Lohoff 2 participants 4 messages Mar 30, 2000 – Mar 31, 2000 MIPS

lore
Share & tools
lore
#0 lore raw

Hi,
again - short patch - RLIM_INFINITY - This is also defined in both glibc 2.0 and glibc 2.1 headers so it should be __KERNEL__ dependend - Shouldnt it ?

Index: resource.h
===================================================================
RCS file: /cvs/linux/include/asm-mips/resource.h,v retrieving revision 1.5

resource.h +2 -2
diff -u -r1.5 resource.h
@@ -25,13 +25,13 @@
 
 #define RLIM_NLIMITS 10			/* Number of limit flavors.  */
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY	0x7fffffffUL
-
-#ifdef __KERNEL__
 
 #define INIT_RLIMITS					\
 {							\

Flo

Signature · 3 lines
Florian Lohoff		[email protected]		      	+49-5241-470566
"Technology is a constant battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots."
#1 lore raw
Quoted 3 lines · Florian Lohoff

again - short patch - RLIM_INFINITY - This is also defined in both glibc 2.0 and glibc 2.1 headers so it should be __KERNEL__ dependend - Shouldnt it ?

Glibc 2.1 doesn't include <asm/resource.h>, and 2.0 shouldn't do as well as per convention. So the fix is to copy the necessary definitions from kernel headers into glibc headers.

Thanks for reporting this. I'm just cooking a new glibc release ...

Ralf

#2 lore raw
Quoted 11 lines · Ralf Baechle
Quoted 3 lines · Florian Lohoff

again - short patch - RLIM_INFINITY - This is also defined in both glibc 2.0 and glibc 2.1 headers so it should be __KERNEL__ dependend - Shouldnt it ?

Glibc 2.1 doesn't include <asm/resource.h>, and 2.0 shouldn't do as well as per convention. So the fix is to copy the necessary definitions from kernel headers into glibc headers.

Thanks for reporting this. I'm just cooking a new glibc release ...

My glibc does include asm/resource.h - This is default hardhat (little endian)

resourcebits.h:#include <asm/resource.h>

This is what caused a lot of userspace builts to fail.

Flo

Signature · 3 lines
Florian Lohoff		[email protected]		      	+49-5241-470566
"Technology is a constant battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots."
#3 lore raw
Quoted 8 lines · Florian Lohoff
Quoted 8 lines
Quoted 3 lines

again - short patch - RLIM_INFINITY - This is also defined in both glibc 2.0 and glibc 2.1 headers so it should be __KERNEL__ dependend - Shouldnt it ?

Glibc 2.1 doesn't include <asm/resource.h>, and 2.0 shouldn't do as well as per convention. So the fix is to copy the necessary definitions from kernel headers into glibc headers.

Quoted 7 lines
Quoted 1 line

Thanks for reporting this. I'm just cooking a new glibc release ...

My glibc does include asm/resource.h - This is default hardhat (little endian)

resourcebits.h:#include <asm/resource.h>

This is what caused a lot of userspace builts to fail.

I know. It's something that used to work with kernel 2.2 but breaks with 2.3. There are a few more problems of this kind with glibc 2.0 and I'm cooking up a patch that will make glibc usable and compilable with 2.3 as well.

Ralf