summaryrefslogtreecommitdiff
path: root/gcc/ggc-page.c
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-19 16:02:30 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-19 16:02:30 +0000
commitf4245e06307672302a636632c76fe34aa89cbd73 (patch)
treeff885ca14bd208f4f68df8f5bac6ccd4ad83387b /gcc/ggc-page.c
parent72fdb379ede0df8e0da4c3a33a7a31957d1089c7 (diff)
downloadgcc-f4245e06307672302a636632c76fe34aa89cbd73.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180195 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r--gcc/ggc-page.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index 2da99db9cf8..617a49348d7 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