Re: AC_FUNC_MMAP not testing what the comments say
Paul Eggert <[email protected]> Fri, 15 Dec 2023 18:24:05 -0800
| Newsgroups | gmane.comp.sysutils.autoconf.general |
|---|---|
| Organization | UCLA Computer Science Department |
| Message-ID | <[email protected]> |
Thanks for the diagnosis. Proposed patch attached. I haven't installed it on Savannah, as Autoconf is currently in a prerelease freeze and Zack wants a look-see at all patches before they go in.
0001-Fix-AC_FUNC_MMAP-on-CheriBSD.patch
(text/x-patch, 1.1 KB)
From 0845c59400378f3441686cbcde48b49fce638f97 Mon Sep 17 00:00:00 2001 From: Paul Eggert <[email protected]> Date: Fri, 15 Dec 2023 18:21:39 -0800 Subject: [PATCH] Fix AC_FUNC_MMAP on CheriBSD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Brooks Davis in: https://lists.gnu.org/r/autoconf/2023-12/msg00022.html * lib/autoconf/functions.m4: Don’t unmap, since we want to test remapping something already mapped, and unmapping breaks on CheriBSD. --- lib/autoconf/functions.m4 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 4cfb5142..9b3f3c02 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -1385,8 +1385,7 @@ main (void) if (*(data2 + i)) return 7; close (fd2); - if (munmap (data2, pagesize)) - return 8; + /* 'return 8;' not currently used. */ /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that -- 2.43.0