# [PATCH] Makefile: minor improvements for Mac OS X (Darwin)

2 messages from 2009-02-05 to 2009-02-05. Participants: Jay Soffian, Junio C Hamano.
Thread: https://gitlist.dev/t/17579

## Jay Soffian, 2009-02-05 06:09

Subject: [PATCH] Makefile: minor improvements for Mac OS X (Darwin)
Message-ID: <1233814148-67700-1-git-send-email-jaysoffian@gmail.com>
URL: https://gitlist.dev/e/1233814148-67700-1-git-send-email-jaysoffian%40gmail.com

```
1) Instead of requesting OLD_ICONV on all Mac OS X versions except for 10.5
(which will break when 10.6 is released), exlicitly request it for versions
older than 10.5.

2) NO_STRLCPY is not needed since Mac OS X 10.2. Noticed by Benjamin Kramer.

Note that uname -r returns the underlying Darwin version, which can be mapped
to Mac OS X version at http://www.opensource.apple.com/darwinsource/

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
This patch incorporates gmane 106991. Hopefully it was okay to squash in the
other minor change as well.

 Makefile |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 830143e..77f1083 100644
--- a/Makefile
+++ b/Makefile
@@ -652,10 +652,12 @@ endif
 ifeq ($(uname_S),Darwin)
 	NEEDS_SSL_WITH_CRYPTO = YesPlease
 	NEEDS_LIBICONV = YesPlease
-	ifneq ($(shell expr "$(uname_R)" : '9\.'),2)
+	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
 	endif
-	NO_STRLCPY = YesPlease
+	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
+		NO_STRLCPY = YesPlease
+	endif
 	NO_MEMMEM = YesPlease
 	THREADED_DELTA_SEARCH = YesPlease
 endif
-- 
1.6.1.2.331.g6c1bc

```

## Junio C Hamano, 2009-02-05 06:50

Subject: Re: [PATCH] Makefile: minor improvements for Mac OS X (Darwin)
Message-ID: <7viqnpidi0.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7viqnpidi0.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1233814148-67700-1-git-send-email-jaysoffian@gmail.com>

```
Thanks; will apply directly to master to see if anybody screams, as I do
not have access to any OSX machine.

```
