git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/4] autoconf: Check for working mmap

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 4, 2006, 15:55 UTC
Message-ID
<11547069592652-git-send-email-jnareb@gmail.com>
In-Reply-To
<7v7j1on71n.fsf@assigned-by-dhcp.cox.net>

Use AC_FUNC_MMAP check to check if the `mmap' function exists and works correctly. (It only checks private fixed mapping of already-mapped memory.)

Attention: uses implementation detail of AC_FUNC_MMAP!
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 configure.ac |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0a54b44..178220f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,6 +208,10 @@ AC_CHECK_FUNC(setenv,[],
 [GIT_CONF_APPEND_LINE(NO_SETENV=YesPlease)])
 #
 # Define NO_MMAP if you want to avoid mmap.
+AC_FUNC_MMAP
+if test $ac_cv_func_mmap_fixed_mapped != yes; then
+	GIT_CONF_APPEND_LINE(NO_MMAP=YesPlease)
+fi
 #
 # Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
 #
-- 
1.4.1.1
Previous: Jakub NarebskiNext: Junio C Hamano
Message 3 of 14 in “What's in git.git”
  1. Junio C HamanoAug 4, 2006
  2. Jakub NarebskiAug 4, 2006
  3. 1/4 autoconf: Check for working mmapJakub Narebski, Aug 4, 2006
  4. Junio C HamanoAug 4, 2006
  5. Jakub NarebskiAug 4, 2006
  6. 2/4 autoconf: Check for ll hh j z t size specifiers introduced by C99Jakub Narebski, Aug 4, 2006
  7. 3/4 autoconf: Typo cleanup, reordering etc.Jakub Narebski, Aug 4, 2006
  8. 4/4 Copy description of new build configuration variables to configure.acJakub Narebski, Aug 4, 2006
  9. Johannes SchindelinAug 4, 2006
  10. Jakub NarebskiAug 4, 2006
  11. Junio C HamanoAug 4, 2006
  12. Junio C HamanoAug 4, 2006
  13. Junio C HamanoAug 4, 2006
  14. Jakub NarebskiAug 4, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.