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

[PATCH 2/2] configure: add getdelim() check

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 2, 2015, 18:18 UTC
Message-ID
<1433269138-10890-3-git-send-email-sunshine@sunshineco.com>
In-Reply-To
<1433269138-10890-1-git-send-email-sunshine@sunshineco.com>

As an optimization, strbuf will take advantage of getdelim() if available, so add a configure check which defines HAVE_GETDELIM if found.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
Tested on:
* OS X 10.10.3 "Yosemite" with Xcode 6.3.2
* OS X 10.5.8 "Leopard" with Xcode 3.1
* Linux
* FreeBSD
 configure.ac | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index bbdde85..14012fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1041,6 +1041,12 @@ GIT_CHECK_FUNC(initgroups,
 [NO_INITGROUPS=YesPlease])
 GIT_CONF_SUBST([NO_INITGROUPS])
 #
+# Define HAVE_GETDELIM if you have getdelim in the C library.
+GIT_CHECK_FUNC(getdelim,
+[HAVE_GETDELIM=YesPlease],
+[HAVE_GETDELIM=])
+GIT_CONF_SUBST([HAVE_GETDELIM])
+#
 #
 # Define NO_MMAP if you want to avoid mmap.
 #
-- 
2.4.2.598.gb4379f4
Previous: Eric SunshineNext: Jeff King
Message 8 of 9 in “auto-detect getdelim()”
  1. 0/2 auto-detect getdelim()Eric Sunshine, Jun 2, 2015
  2. 1/2 config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releasesEric Sunshine, Jun 2, 2015
  3. Jeff KingJun 2, 2015
  4. Jeff KingJun 2, 2015
  5. Eric SunshineJun 2, 2015
  6. Jeff KingJun 2, 2015
  7. Eric SunshineJun 2, 2015
  8. 2/2 configure: add getdelim() checkEric Sunshine, Jun 2, 2015
  9. Jeff KingJun 2, 2015

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.