Re: [PATCH v2] Makefile: Use libc strlcpy on OSX >= 10.2
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 24, 2009, 19:42 UTC
- Message-ID
- <7v8wp0o5il.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <7f978c810901241101h227c5437p88ca7c9cc54abc9a@mail.gmail.com>
Benjamin Kramer <benny.kra@googlemail.com> writes:
> OSX supports strlcpy(3) since 10.2 so we don't need > to use our own. This revised also patch checks the darwin > version. 10.0 is darwin v1.3; 10.1 is darwin v1.4.
What does the output from "uname -r" and "uname -s" look like on your box (and older OSX boxes)?
> @@ -643,7 +643,9 @@ ifeq ($(uname_S),Darwin) > ifneq ($(shell expr "$(uname_R)" : '9\.'),2) > OLD_ICONV = UnfortunatelyYes > endif
This existing one says "If 'uname -r' output does not begin with two characters '9.' (nine and dot), then set OLD_ICONV".
> - NO_STRLCPY = YesPlease > + ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
And this new one says "If 'uname -r' output begins with two characters '1.' (one and dot), then set NO_STRLCPY".
> + NO_STRLCPY = YesPlease > + endif
I am guessing that 'uname -r' says 9.X in "Darwin 9.X" (which is OSX 10.5), and existing conditional says that versions before 9.X needs OLD_ICONV but later ones do not need it.
Does 1.X stand for OSX 10.2? A quick googling finds a handful pages that say that OSX 10.2 = Darwin 6.x and OSX 10.3 = Darwin 7.x, and I am not sure where you are getting that "begins with one-and-dot" from....
Show 5 quoted lines
> NO_MEMMEM = YesPlease > THREADED_DELTA_SEARCH = YesPlease > endif > -- > 1.6.1.285.g3454