delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/01/11/05:44:10

Date: Sat, 11 Jan 2003 12:41:07 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <1659-Sat11Jan2003124106+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <3E1FEA6C.71BB41E7@phekda.freeserve.co.uk> (message from Richard
Dawe on Sat, 11 Jan 2003 09:57:00 +0000)
Subject: Re: strlcat, strlcpy, revision 2 [PATCH]
References: <E18WkK2-00014U-00 AT phekda DOT freeserve DOT co DOT uk> <4634-Fri10Jan2003223842+0200-eliz AT is DOT elta DOT co DOT il> <3E1FEA6C DOT 71BB41E7 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Sat, 11 Jan 2003 09:57:00 +0000
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> > 
> > I might be forgetting something, but IIRC, strncat also always
> > nul-terminated the result, didn't it?
> 
> Our implementation does, but not all do.

Really?  I thought the nul-termination by strncat was mandated by
ANSI C89, wasn't it?

> Again, our implementation could be updated to cope with overlapping buffers.

Doesn't it do that already?  If not, what does it do?

> If our implementation were able to cope with overlapping buffers, I guess we
> could add that as a @port-note. But why tell people things like that?

As I explained in another message, I think programmers should know
_exactly_ what does our implementation do in these cases.  But that's
just my opinion; I wouldn't object to having the ``undefined
behavior'' text if others think it's appropriate.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019