From f348a7b160d3c55a2c42294149a4d1138c1c8df3 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 1 Jan 2002 01:03:22 +0000 Subject: [PATCH] merge from gcc --- libiberty/ChangeLog | 5 +++++ libiberty/aclocal.m4 | 3 +++ libiberty/configure | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 3537caeb165..c0c5f489fd5 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2001-12-31 Ira Ruben + + * aclocal.m4 (libiberty_AC_FUNC_STRNCMP): Use anon mmap as 2nd try. + * configure: Regenerated. + 2001-12-12 Craig Rodrigues PR other/2719 diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 index 7b1b677645e..103e246de7e 100644 --- a/libiberty/aclocal.m4 +++ b/libiberty/aclocal.m4 @@ -47,6 +47,9 @@ main () p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, dev_zero, 0); + if (p == (char *)-1) + p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, + MAP_ANON|MAP_PRIVATE, -1, 0); if (p == (char *)-1) exit (2); else diff --git a/libiberty/configure b/libiberty/configure index 9291f5238c7..8ddd98d07e3 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -3150,6 +3150,9 @@ main () p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, dev_zero, 0); + if (p == (char *)-1) + p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, + MAP_ANON|MAP_PRIVATE, -1, 0); if (p == (char *)-1) exit (2); else @@ -3167,7 +3170,7 @@ main () } EOF -if { (eval echo configure:3171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strncmp_works=yes else -- 2.30.2