summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sysconf.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-03-28 14:06:00 +0000
committerJakub Jelinek <jakub@redhat.com>2008-03-28 14:06:00 +0000
commit09b731ac2b1b5e79050991f6a9dab964f9a7a60f (patch)
tree99351ad426806ba7e533c6824625709f60fb0965 /sysdeps/unix/sysv/linux/sysconf.c
parentf23e5ee26d14b7931c65e5df0bf46ff356c6177b (diff)
Updated to fedora-glibc-20080328T1347cvs/fedora-glibc-2_7_90-13
Diffstat (limited to 'sysdeps/unix/sysv/linux/sysconf.c')
-rw-r--r--sysdeps/unix/sysv/linux/sysconf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/sysconf.c b/sysdeps/unix/sysv/linux/sysconf.c
index ab9cddc306..f4e36e0c6f 100644
--- a/sysdeps/unix/sysv/linux/sysconf.c
+++ b/sysdeps/unix/sysv/linux/sysconf.c
@@ -27,6 +27,11 @@
#include <not-cancel.h>
#include <ldsodefs.h>
+/* Legacy value of ARG_MAX. The macro is now not defined since the
+ actual value varies based on the stack size. */
+#define legacy_ARG_MAX 131072
+
+
static long int posix_sysconf (int name);
@@ -83,10 +88,10 @@ __sysconf (int name)
/* Use getrlimit to get the stack limit. */
struct rlimit rlimit;
if (__getrlimit (RLIMIT_STACK, &rlimit) == 0)
- return MAX (ARG_MAX, rlimit.rlim_cur / 4);
+ return MAX (legacy_ARG_MAX, rlimit.rlim_cur / 4);
}
- return ARG_MAX;
+ return legacy_ARG_MAX;
case _SC_NGROUPS_MAX:
/* Try to read the information from the /proc/sys/kernel/ngroups_max