about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sys
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-03-27 15:20:38 +0000
committerUlrich Drepper <drepper@redhat.com>2008-03-27 15:20:38 +0000
commitf96853beafc26d4f030961b0b67a79b5bfad5733 (patch)
treea8480225d97a7eeeccee963ce5a7bae53d296dba /sysdeps/unix/sysv/linux/sys
parentfde15fdc5bea3d66be8fa967031ab89707b08a39 (diff)
downloadglibc-f96853beafc26d4f030961b0b67a79b5bfad5733.tar.gz
glibc-f96853beafc26d4f030961b0b67a79b5bfad5733.tar.xz
glibc-f96853beafc26d4f030961b0b67a79b5bfad5733.zip
* sysdeps/unix/sysv/linux/bits/local_lim.h: Undefined ARG_MAX if
	<linux/limits.h> has defined it.
	* sysdeps/unix/sysv/linux/sys/param.h: Define NCARGS to the legacy
	ARG_MAX value and prevent ARG_MAX from being defined by the kernel
	headers.
	* sysdeps/unix/sysv/linux/sysconf.c: Define legacy_ARG_MAX and use
	it instead of ARG_MAX.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys')
-rw-r--r--sysdeps/unix/sysv/linux/sys/param.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/param.h b/sysdeps/unix/sysv/linux/sys/param.h
index 0b0424eb90..19c119a2c8 100644
--- a/sysdeps/unix/sysv/linux/sys/param.h
+++ b/sysdeps/unix/sysv/linux/sys/param.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2001,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1997,2000,2001,2003,2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,10 +19,20 @@
 #ifndef _SYS_PARAM_H
 #define _SYS_PARAM_H	1
 
+#ifndef ARG_MAX
+# define __undef_ARG_MAX
+#endif
+
 #include <limits.h>
 #include <linux/limits.h>
 #include <linux/param.h>
 
+/* The kernel headers defines ARG_MAX.  The value is wrong, though.  */
+#ifndef __undef_ARG_MAX
+# undef ARG_MAX
+# undef __undef_ARG_MAX
+#endif
+
 /* BSD names for some <limits.h> values.  */
 
 #define	NBBY		CHAR_BIT
@@ -31,12 +41,12 @@
 #endif
 #define	MAXSYMLINKS	20
 #define	CANBSIZ		MAX_CANON
-#define	NCARGS		ARG_MAX
 #define MAXPATHLEN	PATH_MAX
-/* The following is not really correct but it is a value we used for a
+/* The following are not really correct but it is a value we used for a
    long time and which seems to be usable.  People should not use NOFILE
-   anyway.  */
+   and NCARGS anyway.  */
 #define NOFILE		256
+#define	NCARGS		131072
 
 
 #include <sys/types.h>