Re: [PATCH 7/9] strbuf_getwholeline: use getdelim if it is available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 21, 2015 at 7:09 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Fri, Apr 17, 2015 at 06:16:48AM -0400, Eric Sunshine wrote:
>> > If somebody has a FreeBSD or OS X system to test on, I'd
>> > love to see what is needed to compile with HAVE_GETDELIM
>> > there.
>>
>> Modern Mac OS X, 10.10.x Yosemite, has getdelim() and git builds fine
>> with HAVE_GETDELIM. I also tested on old Snow Leopard 10.5.8 from
>> 2009. It does not have getdelim(). Unfortunately, I haven't been able
>> to determine when getdelim() was introduced on the Mac OS X, thus have
>> been unable to craft a simple rule for config.mak.uname.
>
> Thanks for looking into it. Since there haven't been any other takers in
> the meantime, do you want to prepare a patch that checks $(uname_R) for
> 10.10.x?  That's likely more conservative than is necessary, but we can
> loosen it later if somebody on 10.9.x shows up with test results.

I spent some time downloading old Xcode releases and poking through
the packages. Xcode 3.2.x seems to be the last in the Xcode 3 series,
and none of the Xcode 3.2.x versions I examined carried getdelim().
The first package in which I found getdelim() was Xcode 4.1.
(Unfortunately, Apple doesn't seem to make Xcode 4.0 available for
download anymore or it's only available to paying developers, so I
couldn't check it.) According to Wikipedia[1], Xcode 4.1 was released
the same day as Lion (OS X 10.7 [2]), but was also available to paying
developers for Snow Leopard (OS X 10.6).

Consequently, I think it's safe to say that getdelim() is available
for Lion (10.7) and later. If we don't mind being a bit less
conservative, then we might assume that it also is available for Snow
Leopard (10.6), which it definitely supported, but perhaps that's too
risky, since not everyone would have been a paid subscriber.

Alternately, we could make the test more dynamic and accurate by
grepping stdio.h for 'getdelim' or just by trying a test compile,
though that's probably too expensive.

[1]: http://en.wikipedia.org/wiki/Xcode
[2]: http://en.wikipedia.org/wiki/OS_X
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]