aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2012-02-20 08:38:54 -0800
committerRichard Henderson <rth@twiddle.net>2012-02-20 08:38:54 -0800
commit3287d4162fd765d905f19a8fc4847a455e71e3ff (patch)
tree4aa88f9820578a5fafeb9d5e1af610794a394063
parentb98de9639c5d161f9408cd88e654e0725fc54c1d (diff)
downloadglibc-3287d4162fd765d905f19a8fc4847a455e71e3ff.tar.xz
glibc-3287d4162fd765d905f19a8fc4847a455e71e3ff.zip
alpha: Fix _SC_LEVEL*CACHE*
-rw-r--r--ChangeLog.alpha4
-rw-r--r--sysdeps/unix/sysv/linux/alpha/sysconf.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index b48d421078..e629a44cfe 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,3 +1,7 @@
+2012-02-20 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/sysv/linux/alpha/sysconf.c: Fix cache sysconf switch.
+
2012-02-16 Richard Henderson <rth@twiddle.net>
* sysdeps/alpha/fpu/fenv_libc.h (__ieee_set_fp_control,
diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c
index 51a2a47986..5623328c90 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2012 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
@@ -135,7 +135,7 @@ __sysconf (int name)
if (shape <= 0)
return shape;
- switch (name % 3)
+ switch ((name - _SC_LEVEL1_ICACHE_SIZE) % 3)
{
case 0: /* total size */
return shape & -0x100;