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

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 2, 2015, 21:15 UTC
Message-ID
<1433279744-23379-3-git-send-email-sunshine@sunshineco.com>
In-Reply-To
<1433279744-23379-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>
---
 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 3 of 4 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. 2/2 configure: add getdelim() checkEric Sunshine, Jun 2, 2015
  4. Jeff KingJun 3, 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.