All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Jason Riedy <ejr@EECS.Berkeley.EDU>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Add compat/setenv.c, use in git.c.
Date: Mon, 05 Dec 2005 10:39:51 -0800	[thread overview]
Message-ID: <43948977.7060405@zytor.com> (raw)
In-Reply-To: <14404.1133806037@lotus.CS.Berkeley.EDU>

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

  reply	other threads:[~2005-12-05 18:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-02 23:08 [PATCH] Add compat/setenv.c, use in git.c Jason Riedy
2005-12-04  6:26 ` Junio C Hamano
2005-12-04 21:07 ` H. Peter Anvin
2005-12-04 22:24   ` Junio C Hamano
2005-12-04 22:31   ` Junio C Hamano
2005-12-04 23:34     ` H. Peter Anvin
2005-12-05 18:07     ` Jason Riedy
2005-12-05 18:39       ` H. Peter Anvin [this message]
2005-12-06  3:35       ` Junio C Hamano
2005-12-06 19:59         ` Jason Riedy
2005-12-06 21:10           ` Morten Welinder
2005-12-06 21:41             ` Junio C Hamano
2005-12-06 22:18               ` Jason Riedy
2005-12-07  0:58               ` Morten Welinder
2005-12-04 23:01 ` [PATCH] compat/setenv: do not free what we fed putenv(3) 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=43948977.7060405@zytor.com \
    --to=hpa@zytor.com \
    --cc=ejr@EECS.Berkeley.EDU \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.