Re: [PATCH] Add compat/setenv.c, use in git.c.
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- Dec 5, 2005, 18:39 UTC
- Message-ID
- <43948977.7060405@zytor.com>
- In-Reply-To
- <14404.1133806037@lotus.CS.Berkeley.EDU>
Jason Riedy wrote:
Show 13 quoted lines
> 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