From: "Torsten Bögershausen" <tboegi@web•de>
To: Benoit Sigoure <tsunanet@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] Fix compilation on OS X.
Date: Sat, 20 Jul 2013 14:06:48 +0200 [thread overview]
Message-ID: <51EA7D58.3050800@web.de> (raw)
In-Reply-To: <1374306567-16640-1-git-send-email-tsunanet@gmail.com>
On 2013-07-20 09.49, Benoit Sigoure wrote:
> +#ifdef __APPLE__
> +// On OS X libc headers don't define this symbol.
> +extern char **environ;
> +#endif
> +
A more generic approach could be:
In the file "config.mak.uname": Define a variable in the Darwin section like this
NO_EXT_ENVIRON = UnfortunatelyYes
In "Makefile", pick it up, and convert it into a compiler option:
ifdef NO_EXT_ENVIRON
BASIC_CFLAGS += -DNO_EXT_ENVIRON
endif
And in "git-compat-util.h", add these lines "at a good place":
#ifdef NO_EXT_ENVIRON
extern char **environ;
#endif
This will allow other OS to use the NO_EXT_ENVIRON when needed,.
Thanks for working on this.
/Torsten
next prev parent reply other threads:[~2013-07-20 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-20 7:49 [PATCH] Fix compilation on OS X Benoit Sigoure
2013-07-20 7:55 ` Ramkumar Ramachandra
2013-07-20 7:56 ` tsuna
2013-07-20 12:06 ` Torsten Bögershausen [this message]
2013-07-20 18:41 ` Benoit Sigoure
2013-07-21 5:53 ` Junio C Hamano
2013-07-21 6:10 ` tsuna
2013-07-21 6:17 ` [PATCH] Revert "compat/unsetenv.c: Fix a sparse warning" Benoit Sigoure
2013-07-21 19:54 ` Benoit Sigoure
2013-07-21 22:09 ` Junio C Hamano
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=51EA7D58.3050800@web.de \
--to=tboegi@web$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=tsunanet@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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