summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-05-13 02:37:05 +0200
committerBruno Haible <bruno@clisp.org>2009-05-13 02:37:05 +0200
commitc584de0f2be558c8a5b696bdd5cb2f9428c4a85d (patch)
treea0a8601d33f327b63600ddd57b3536691f7d56d2 /m4
parent35684203ea9951bc0634065e7ae2120fc8372591 (diff)
downloadgnulib-c584de0f2be558c8a5b696bdd5cb2f9428c4a85d.tar.gz
Make the MAP_ANONYMOUS detection work on HP-UX 11.
Diffstat (limited to 'm4')
-rw-r--r--m4/mmap-anon.m410
1 files changed, 6 insertions, 4 deletions
diff --git a/m4/mmap-anon.m4 b/m4/mmap-anon.m4
index 91cd95b232..fe624a2c02 100644
--- a/m4/mmap-anon.m4
+++ b/m4/mmap-anon.m4
@@ -1,4 +1,4 @@
-# mmap-anon.m4 serial 6
+# mmap-anon.m4 serial 7
dnl Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -22,12 +22,14 @@ AC_DEFUN([gl_FUNC_MMAP_ANON],
dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- # Check for mmap()
- AC_FUNC_MMAP
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no])
# Try to allow MAP_ANONYMOUS.
gl_have_mmap_anonymous=no
- if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ if test $gl_have_mmap = yes; then
AC_MSG_CHECKING([for MAP_ANONYMOUS])
AC_EGREP_CPP([I cant identify this map.], [
#include <sys/mman.h>