This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH/RFC] Actually undefine ARG_MAX from <linux/limits.h>
- From: Jonathan Nieder <jrnieder at gmail dot com>
- To: libc-alpha at sourceware dot org
- Cc: Ian Zimmerman <itz at buug dot org>
- Date: Sat, 5 Mar 2011 22:00:43 -0600
- Subject: [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