bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libintl.h warnings with -Wundef


From: Paul Eggert
Subject: Re: libintl.h warnings with -Wundef
Date: Mon, 22 Sep 2008 10:25:30 -0700
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux)

Marc Espie <address@hidden> writes:

> On Sun, Sep 21, 2008 at 07:59:07AM -0700, Paul Eggert wrote:
>> The opposition to the OpenBSD-style deprecation of strcpy is not
>> political: it's technical.
>
> You missed the point completely. We have a belt-and-suspenders approach.
> We do advocate non-fixed size buffers. But mistakes happen, and

Yes, and this sounds like a technical point, which we can agree to
disagree about.  It's not a political issue.

If OpenBSD does advocate non-fixed size buffers, that's a welcome
improvement from the last time I seriously looked at the OpenSSH code
(several years ago).  It was littered with arbitrary limits that could
cause programs to misbehave.  See
<http://sourceware.org/ml/libc-alpha/2002-01/msg00096.html>.

> As far as I know, the real reason it's
> not in linux is because Ulrich Drepper is arrogant enough to say he *never*
> makes the kind of mistakes strlcpy is meant to catch.

Ulrich Drepper's opposition is not the "real reason", as the
issue is controversial independently of his opposition.
For more, please see the "Wish for 2002" thread at
<http://sourceware.org/ml/libc-alpha/2002-01/msg00001.html>.
My favorite comment in that thread was by Linux Torvalds in
<http://sourceware.org/ml/libc-alpha/2002-01/msg00133.html>,
and if you read that, you'll see that Torvalds agrees with Drepper here.

Also, the arguments against the strlcpy style are more subtle than the
brief summary you gave.  The strlcpy style is more complicated, and
engenders a different set of errors that are harder to detect and
prevent.  The GNU style is simpler, and this is a positive
characteristic when one tries to avoid errors.  Neither style
obviously dominates the other, and no scientific study demonstrates
that one style is more reliable than the other in practice.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]