From 87fb500b9377df6eddfc8efd0b5aa186e075951e Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Wed, 19 Oct 2011 16:02:30 +0000 Subject: Properly test for madvise on Solaris 10 (PR bootstrap/50777) PR bootstrap/50777 * configure.ac: Save and restore CXXFLAGS around gcc_AC_CHECK_DECLS uses. Check for madvise() declaration with g++ if --enable-build-with-cxx. * configure: Regenerate. * config.in: Regenerate. * ggc-page.c (USING_MADVISE): Also check HAVE_DECL_MADVISE. From-SVN: r180195 --- gcc/ggc-page.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/ggc-page.c') diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 2da99db..617a493 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -1,6 +1,6 @@ /* "Bag-of-pages" garbage collector for the GNU compiler. Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, - 2010 Free Software Foundation, Inc. + 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -50,7 +50,8 @@ along with GCC; see the file COPYING3. If not see #define USING_MALLOC_PAGE_GROUPS #endif -#if defined(HAVE_MADVISE) && defined(MADV_DONTNEED) && defined(USING_MMAP) +#if defined(HAVE_MADVISE) && HAVE_DECL_MADVISE && defined(MADV_DONTNEED) \ + && defined(USING_MMAP) # define USING_MADVISE #endif -- cgit v1.1