This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/RFC] Actually undefine ARG_MAX from <linux/limits.h>


Hi,

Ian Zimmerman wrote:

> /* The kernel headers defines ARG_MAX.  The value is wrong, though.  */
> #ifndef __undef_ARG_MAX
> # undef ARG_MAX
> # undef __undef_ARG_MAX
> #endif
>
>
> The line just below the comment should be #ifdef and not #ifndef.  See also
> /usr/include/bits/local_lim.h where the same mechanism is used (correctly).

Looking at cvs/glibc-2_8~60 (Undefined ARG_MAX if ..., 2008-03-27)
confirms that an #ifdef was the intent.  How about this patch?

2011-03-05  Jonathan Nieder  <jrnieder@gmail.com>

	* sysdeps/unix/sysv/linux/sys/param.h: Fix an #ifndef __undef_ARG_MAX
	where #ifdef was intended.  The intent is to prevent ARG_MAX from
	being defined by the kernel headers.

diff --git a/sysdeps/unix/sysv/linux/sys/param.h b/sysdeps/unix/sysv/linux/sys/param.h
index 19c119a..ffb2d05 100644
--- a/sysdeps/unix/sysv/linux/sys/param.h
+++ b/sysdeps/unix/sysv/linux/sys/param.h
@@ -28,7 +28,7 @@
 #include <linux/param.h>
 
 /* The kernel headers defines ARG_MAX.  The value is wrong, though.  */
-#ifndef __undef_ARG_MAX
+#ifdef __undef_ARG_MAX
 # undef ARG_MAX
 # undef __undef_ARG_MAX
 #endif
-- 
1.7.4.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]