git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Timo Hirvonen <tihirvon@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Use setenv(), fix warnings
Date: Sun, 26 Feb 2006 10:06:41 -0800	[thread overview]
Message-ID: <7vmzge570u.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060226171346.33ad3e47.tihirvon@gmail.com> (Timo Hirvonen's message of "Sun, 26 Feb 2006 17:13:46 +0200")

Timo Hirvonen <tihirvon@gmail.com> writes:

>   - Use setenv() instead of putenv()
>   - Fix -Wundef -Wold-style-definition warnings
>   - Make pll_free() static

I think the last one makes sense, and I can see why some people
may prefer -Wundef but I am not sure about the first one.  Care
to defend why we should prefer setenv()?  IIRC, initially we did
not use setenv() anywhere because certain platforms only had
putenv().

> diff --git a/fsck-objects.c b/fsck-objects.c
> @@ -483,7 +483,7 @@ int main(int argc, char **argv)
>  	if (standalone && check_full)
>  		die("Only one of --standalone or --full can be used.");
>  	if (standalone)
> -		putenv("GIT_ALTERNATE_OBJECT_DIRECTORIES=");
> +		setenv("GIT_ALTERNATE_OBJECT_DIRECTORIES", "", 1);

For platforms with only putenv we did this; here, what we really
wanted to do was unsetenv.

  reply	other threads:[~2006-02-26 18:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-26 15:13 [PATCH] Use setenv(), fix warnings Timo Hirvonen
2006-02-26 18:06 ` Junio C Hamano [this message]
2006-02-26 18:37   ` Timo Hirvonen
2006-02-26 19:38     ` Jason Riedy
2006-02-26 20:29     ` 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=7vmzge570u.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=tihirvon@gmail.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).