autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mmap test failing on cygwin


From: Bob Friesenhahn
Subject: Re: mmap test failing on cygwin
Date: Sun, 20 Mar 2005 23:53:58 -0600 (CST)

On Sun, 20 Mar 2005, Noah Misch wrote:

On Sun, Mar 20, 2005 at 10:59:13PM +0100, a.rburgers wrote:
the autoconf test for mmap is failing for cygwin,
although there is a functional mmap available
on that platform..

This message gives a patch:

http://lists.gnu.org/archive/html/autoconf-patches/2000-10/msg00241.html

Summary: AC_FUNC_MMAP rejects the Cygwin mmap because MAP_FIXED on a malloc'ed
region fails; rejecting it is bad because many programs that use mmap do not
need that to work.  Nonetheless, changing AC_FUNC_MMAP to help that majority,
perhaps marginally, breaks programs relying on the check as it stands.

AC_FUNC_MMAP is working as designed. Mmap can be used for a great many things. Changing AC_FUNC_MMAP now would surely break programs which intend to test for its documented behavior.

I have attached a macro for a somewhat different mmap test which verifies that the system supports coherent mmap file I/O. This means that it is safe to update a file via both file descriptor and memory mapping without the content of the file getting confused. One of the systems rejected by this test is HP-UX (Cygwin passes). The test for a fixed mapping is not included in this macro.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

Attachment: mmap-fileio.m4
Description: mmap test for coherent I/O


reply via email to

[Prev in Thread] Current Thread [Next in Thread]