All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 3/5] autoconf: Preliminary check for working mmap
Date: Tue, 5 Sep 2006 00:56:52 +0200	[thread overview]
Message-ID: <200609050056.52590.jnareb@gmail.com> (raw)
In-Reply-To: <200609050054.24279.jnareb@gmail.com>

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.)

Still it is better than having no mmap check at all.
Attention: uses implementation detail of AC_FUNC_MMAP!

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This patch sent earlier in other patch series and dropped,
as git uses private mapping, not private fixed. I think
that this check is better than no check at all...

 config.mak.in |    2 +-
 configure.ac  |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/config.mak.in b/config.mak.in
index 2947560..2c8fd2c 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -37,6 +37,6 @@ NO_C99_FORMAT=@NO_C99_FORMAT@
 NO_STRCASESTR=@NO_STRCASESTR@
 NO_STRLCPY=@NO_STRLCPY@
 NO_SETENV=@NO_SETENV@
-#NO_MMAP=@NO_MMAP@
+NO_MMAP=@NO_MMAP@
 #NO_ICONV=@NO_ICONV@
 
diff --git a/configure.ac b/configure.ac
index fc5b813..799321e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -249,6 +249,13 @@ AC_CHECK_FUNC(setenv,
 AC_SUBST(NO_SETENV)
 #
 # Define NO_MMAP if you want to avoid mmap.
+AC_FUNC_MMAP
+if test $ac_cv_func_mmap_fixed_mapped != yes; then
+	NO_MMAP=YesPlease
+else
+	NO_MMAP=
+fi
+AC_SUBST(NO_MMAP)
 #
 # Define NO_ICONV if your libc does not properly support iconv.
 
-- 
1.4.1.1

  parent reply	other threads:[~2006-09-04 22:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-04 22:54 [PATCH 0/5] Some autoconf patches Jakub Narebski
2006-09-04 22:55 ` [PATCH 1/5] autoconf: Add some commented out variables to config.mak.in Jakub Narebski
2006-09-04 22:55 ` [PATCH 2/5] autoconf: Add -liconv to LIBS when NEEDS_LIBICONV Jakub Narebski
2006-09-05 16:25   ` Jonas Fonseca
2006-09-05 20:03     ` [PATCH] autoconf: Fix copy'n'paste error Jakub Narebski
2006-09-05 21:27     ` [PATCH 2/5] autoconf: Add -liconv to LIBS when NEEDS_LIBICONV Junio C Hamano
2006-09-04 22:56 ` Jakub Narebski [this message]
2006-09-04 23:36   ` [PATCH 3/5] autoconf: Preliminary check for working mmap Junio C Hamano
2006-09-04 23:43     ` Jakub Narebski
2006-09-05  3:09       ` Shawn Pearce
2006-09-05  5:10         ` Junio C Hamano
2006-09-05  6:25           ` Shawn Pearce
2006-09-05  7:43             ` Junio C Hamano
2006-09-06  3:40               ` Shawn Pearce
2006-09-06  7:17                 ` Junio C Hamano
2006-09-06  8:15                 ` Junio C Hamano
2006-09-07  5:58                   ` Shawn Pearce
2006-09-04 22:57 ` [PATCH 4/5] autoconf: Check for subprocess.py Jakub Narebski
2006-09-04 22:58 ` [PATCH 5/5] autoconf: Quote AC_CACHE_CHECK arguments Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609050056.52590.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.