config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases
authorEric Sunshine <sunshine@sunshineco.com>
Tue, 2 Jun 2015 21:15:43 +0000 (17:15 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Jun 2015 16:38:04 +0000 (09:38 -0700)
On Mac OS X, getdelim() first became available with Xcode 4.1[1], which
was released the same day as OS X 10.7 "Lion", so assume getdelim()
availability from 10.7 onward. (As of this writing, OS X is at 10.10
"Yosemite".)

According to Wikipedia[2], 4.1 was also available for download by paying
developers on OS X 10.6 "Snow Leopard", so it's possible that some 10.6
machines may have getdelim(). However, as strbuf's use of getdelim() is
purely an optimization, let's be conservative and assume 10.6 and
earlier lack getdelim().

[1]: Or, possibly with Xcode 4.0, but that version is no longer
available for download, or not available to non-paying developers,
so testing is not possible.

[2]: http://en.wikipedia.org/wiki/Xcode

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.mak.uname
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