Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 02:18:57PM -0400, Eric Sunshine wrote: The use of 'expr' in this new test is decidedly different from existing instances which merely check if `uname -R` matches a particular single digit and a period. If the new test took the same approach, it would have to match

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 02:44:13PM -0400, Jeff King wrote: + ifeq ($(shell expr $(shell expr $(uname_R) : '\([0-9][0-9]*\)\.') '=' 11),1) Do you need to spawn two shells? It seems like: $(shell expr `expr $(uname_R) : '\([0-9][0-9]*\)'` '=' 11),1) Oops, I missed the trailing '.'

[PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Eric Sunshine
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

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Eric Sunshine
On Tue, Jun 2, 2015 at 3:04 PM, Jeff King p...@peff.net wrote: On Tue, Jun 02, 2015 at 02:44:13PM -0400, Jeff King wrote: + ifeq ($(shell expr $(shell expr $(uname_R) : '\([0-9][0-9]*\)\.') '=' 11),1) Do you need to spawn two shells? It seems like: $(shell expr `expr $(uname_R) :

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 03:57:44PM -0400, Eric Sunshine wrote: Oops, I missed the trailing '.' in the regex there, and it probably needs double-quotes in case the inner expr fails to match anything. Which is messy considering the double quotes already surrounding $(uname_R). Suggestions?

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Eric Sunshine
On Tue, Jun 2, 2015 at 4:01 PM, Jeff King p...@peff.net wrote: On Tue, Jun 02, 2015 at 03:57:44PM -0400, Eric Sunshine wrote: Oops, I missed the trailing '.' in the regex there, and it probably needs double-quotes in case the inner expr fails to match anything. Which is messy considering