Subject: Re: [PATCH] Add compat/setenv.c, use in git.c.

From: "H. Peter Anvin" <[email-masked]>
Date: Mon, 05 Dec 2005 10:39:51 -0800

Jason Riedy wrote:
> And Junio C Hamano writes:
>  - putenv(3) says
>  - 	The string pointed to by string becomes part of the environment,
>  - 	so altering the string changes the environment.
> 
> Good catch, thanks.  The Solaris man page first says the 
> string space is "no longer used", but at the very end warns 
> against using an automatic variable.  Chalk one up for lousy 
> docs.
> 
> (And sizeof(char) is just habit; 99% of my mallocs aren't of 
> char...  Sorry.)
> 

Personally I consider it a serious bug in the C language that 
sizeof(char) == 1 by definition.  It basically prohibits a whole lot of 
useful machine models.

	-hpa