This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] Remove uses of <cstddef> as an implementation detail
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 04 Jun 2010 23:45:15 -0400
- Subject: Re: [v3] Remove uses of <cstddef> as an implementation detail
- References: <4C080053.9010907@oracle.com>
After this patch testsuite_abi.cc no longer builds on glibc 2.8 and
earlier systems (such as gcc14), because of
http://sources.redhat.com/bugzilla/show_bug.cgi?id=9694
causing ptrdiff_t to never get defined. This patch (to include stddef
early rather than wait until cxxabi.h brings it in) works around the
glibc bug. What do you think?
Jason
commit e59560c63dff5b5c713e30e92b6afd355f77cfee
Author: Jason Merrill <jason@redhat.com>
Date: Fri Jun 4 23:37:51 2010 -0400
* testsuite/util/testsuite_abi.h: Work around glibc BZ 9694.
diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.h b/libstdc++-v3/testsuite/util/testsuite_abi.h
index ff413fd..cad40b6 100644
--- a/libstdc++-v3/testsuite/util/testsuite_abi.h
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.h
@@ -19,6 +19,8 @@
// Benjamin Kosnik <bkoz@redhat.com>
+// Include stddef now to work around glibc BZ 9694
+#include <stddef.h>
#include <string>
#include <stdexcept>
#include <vector>