Allow for glibc-2.4.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4063 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/Makefile.am b/Makefile.am
index 7b583d3..9820d97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
DIST_SUBDIRS = $(SUBDIRS) addrcheck
SUPP_FILES = \
- glibc-2.1.supp glibc-2.2.supp glibc-2.3.supp \
+ glibc-2.1.supp glibc-2.2.supp glibc-2.3.supp glibc-2.4.supp \
xfree-3.supp xfree-4.supp
dist_val_DATA = $(SUPP_FILES) default.supp
diff --git a/configure.in b/configure.in
index b68c536..1238197 100644
--- a/configure.in
+++ b/configure.in
@@ -265,6 +265,16 @@
],
glibc="2.3")
+AC_EGREP_CPP([GLIBC_24], [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 4)
+ GLIBC_24
+ #endif
+#endif
+],
+glibc="2.4")
+
AC_MSG_CHECKING([the glibc version])
case "${glibc}" in
@@ -286,9 +296,15 @@
DEFAULT_SUPP="${DEFAULT_SUPP} glibc-2.3.supp"
;;
+ 2.4)
+ AC_MSG_RESULT(2.4 family)
+ AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x])
+ DEFAULT_SUPP="${DEFAULT_SUPP} glibc-2.4.supp"
+ ;;
+
*)
AC_MSG_RESULT(unsupported version)
- AC_MSG_ERROR([Valgrind requires the glibc version 2.1, 2.2 or 2.3])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.1, 2.2, 2.3 or 2.4])
;;
esac
diff --git a/glibc-2.4.supp b/glibc-2.4.supp
new file mode 100644
index 0000000..cfba921
--- /dev/null
+++ b/glibc-2.4.supp
@@ -0,0 +1,27 @@
+
+##----------------------------------------------------------------------##
+
+# Errors to suppress by default with glibc 2.4.x
+
+# Format of this file is:
+# {
+# name_of_suppression
+# tool_name:supp_kind
+# (optional extra info for some suppression types)
+# caller0 name, or /name/of/so/file.so
+# caller1 name, or ditto
+# (optionally: caller2 name)
+# (optionally: caller3 name)
+# }
+#
+# For Memcheck, the supp_kinds are:
+#
+# Param Value1 Value2 Value4 Value8 Value16
+# Free Addr1 Addr2 Addr4 Addr8 Addr16
+# Cond (previously known as Value0)
+#
+# and the optional extra info is:
+# if Param: name of system call param
+# if Free: name of free-ing fn)
+
+# ... insert suppressions here ...
diff --git a/memcheck/tests/x86/scalar.c b/memcheck/tests/x86/scalar.c
index c874ee1..02bd2a8 100644
--- a/memcheck/tests/x86/scalar.c
+++ b/memcheck/tests/x86/scalar.c
@@ -14,7 +14,7 @@
// PRE_MEM_READ/PRE_MEM_WRITE calls. (Note that Memcheck and Addrcheck will
// always issue an error message immediately before these seg faults occur).
-#include <asm/ipc.h>
+//#include <asm/ipc.h>
#include <sched.h>
#include <signal.h>