summaryrefslogtreecommitdiffstats
path: root/gl/m4/mmap-anon.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/mmap-anon.m4')
-rw-r--r--gl/m4/mmap-anon.m418
1 files changed, 7 insertions, 11 deletions
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index a6b7b9ac..9b60ddfa 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
1# mmap-anon.m4 serial 8 1# mmap-anon.m4 serial 10
2dnl Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -9,16 +9,12 @@ dnl with or without modifications, as long as this notice is preserved.
9# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS 9# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
10# and MAP_ANON exist and have the same value. 10# and MAP_ANON exist and have the same value.
11# - On HP-UX, only MAP_ANONYMOUS exists. 11# - On HP-UX, only MAP_ANONYMOUS exists.
12# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. 12# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
13# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be 13# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
14# used. 14# used.
15 15
16AC_DEFUN([gl_FUNC_MMAP_ANON], 16AC_DEFUN([gl_FUNC_MMAP_ANON],
17[ 17[
18 dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
19 AC_REQUIRE([AC_PROG_CPP])
20 AC_REQUIRE([AC_PROG_EGREP])
21
22 dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS. 18 dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
23 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 19 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
24 20
@@ -31,18 +27,18 @@ AC_DEFUN([gl_FUNC_MMAP_ANON],
31 gl_have_mmap_anonymous=no 27 gl_have_mmap_anonymous=no
32 if test $gl_have_mmap = yes; then 28 if test $gl_have_mmap = yes; then
33 AC_MSG_CHECKING([for MAP_ANONYMOUS]) 29 AC_MSG_CHECKING([for MAP_ANONYMOUS])
34 AC_EGREP_CPP([I cant identify this map.], [ 30 AC_EGREP_CPP([I cannot identify this map], [
35#include <sys/mman.h> 31#include <sys/mman.h>
36#ifdef MAP_ANONYMOUS 32#ifdef MAP_ANONYMOUS
37 I cant identify this map. 33 I cannot identify this map
38#endif 34#endif
39], 35],
40 [gl_have_mmap_anonymous=yes]) 36 [gl_have_mmap_anonymous=yes])
41 if test $gl_have_mmap_anonymous != yes; then 37 if test $gl_have_mmap_anonymous != yes; then
42 AC_EGREP_CPP([I cant identify this map.], [ 38 AC_EGREP_CPP([I cannot identify this map], [
43#include <sys/mman.h> 39#include <sys/mman.h>
44#ifdef MAP_ANON 40#ifdef MAP_ANON
45 I cant identify this map. 41 I cannot identify this map
46#endif 42#endif
47], 43],
48 [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], 44 [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON],