Merge branch 'es/configure-getdelim'
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2015 19:21:43 +0000 (12:21 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2015 19:21:43 +0000 (12:21 -0700)
Auto-detect availability of getdelim() that helps optimized version
of strbuf_getwholeline().

* es/configure-getdelim:
configure: add getdelim() check
config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

config.mak.uname
configure.ac
index d26665fa54c90a45724c0eb6bdbcbb81c94574a1..943c43965e68fe39fa6e0ea266c3ac376f6e0125 100644 (file)
@@ -102,6 +102,9 @@ ifeq ($(uname_S),Darwin)
        ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
                NO_STRLCPY = YesPlease
        endif
+       ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
+               HAVE_GETDELIM = YesPlease
+       endif
        NO_MEMMEM = YesPlease
        USE_ST_TIMESPEC = YesPlease
        HAVE_DEV_TTY = YesPlease
index bbdde85c3dcca460dd0aebee6415ccce184885dc..14012fad720c1fdade1f305b1a7092abf2146ac1 100644 (file)
@@ -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.
 #