git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Kramer <benny.kra@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] Makefile: Use libc strlcpy on OSX >= 10.2
Date: Sat, 24 Jan 2009 21:23:33 +0100	[thread overview]
Message-ID: <7f978c810901241223n4f7c581av8a687a12b60367fe@mail.gmail.com> (raw)
In-Reply-To: <7v8wp0o5il.fsf@gitster.siamese.dyndns.org>

On Sat, Jan 24, 2009 at 20:42, Junio C Hamano <gitster@pobox.com> wrote:
>
> This existing one says "If 'uname -r' output does not begin with two
> characters '9.' (nine and dot), then set OLD_ICONV".
>
> 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.

Yeah, that's because versions before 10.5 aka darwin 9 aka "Leopard" have a
broken iconv implementation.

> 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....

I've got my information from [1]. It says:

darwin 1.3 => OSX 10.0
darwin 1.4 => OSX 10.1
darwin 6 => OSX 10.2
darwin 7 => OSX 10.3
etc.

I don't know why they chose this weird versioning scheme, but wait, it gets
even crazier

darwin 1.4.1 => OSX 10.1
darwin 5.1 => OSX 10.1.1

So my patch checks only for 10.1 but not for 10.1.1 *sigh*

-     NO_STRLCPY = YesPlease
+     ifeq ($(shell expr "$(uname_R)" : '[015]\.'),2)
+             NO_STRLCPY = YesPlease
+     endif

Should get all darwin versions before 6.0 in which strlcpy(3) was
introduced. Thanks for your patience ;)

---------------
[1] http://www.opensource.apple.com/darwinsource/

      reply	other threads:[~2009-01-24 20:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-24 19:01 [PATCH v2] Makefile: Use libc strlcpy on OSX >= 10.2 Benjamin Kramer
2009-01-24 19:42 ` Junio C Hamano
2009-01-24 20:23   ` Benjamin Kramer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f978c810901241223n4f7c581av8a687a12b60367fe@mail.gmail.com \
    --to=benny.kra@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).