On 02/21/2013 08:07 PM, Michael Goffioul wrote:
> _putenv will actually make a copy of the string provided
Thanks, can you please try the attached patch instead?
It uses strcmp rather than pointer comparison.
From 196482f5d6b1f72780d3a25858d8238a97b87f22 Mon Sep 17 00:00:00 2001
From: Paul Egger
On Tue, Feb 19, 2013 at 10:37 PM, John W. Eaton wrote:
> On 02/19/2013 05:46 PM, Paul Eggert wrote:
>
>> On 02/19/13 14:04, John W. Eaton wrote:
>>
>>> and also to use _putenv in the normal case when the argument string to
>>> putenv contains "VAR=VAL".
>>>
>>
>> Ouch, thanks for catching that; i
> Date: Thu, 21 Feb 2013 09:39:50 -0800
> From: Paul Eggert
> CC: Andy Wingo , bonz...@gnu.org, bug-gnulib@gnu.org
>
> On 02/21/13 09:36, Eli Zaretskii wrote:
> >> Otherwise, full_read sets errno to 0 if it returns a length less than
> >> > the length we asked for
> > Where does it do that? I do
On 02/21/13 01:53, Joerg Schilling wrote:
> - gcc warns for so called "uninitilized varaiables" and other compilers
> rightfully for the same code complain about useless code after you
> added the "initialization" gcc asked for.
We avoid this problem Coreutils, Tar, etc. by putti
On 02/21/13 09:36, Eli Zaretskii wrote:
>> Otherwise, full_read sets errno to 0 if it returns a length less than
>> > the length we asked for
> Where does it do that? I don't think I see this. Maybe I'm blind.
No, it's just hard to see.
It's the line "errno = ZERO_BYTE_TRANSFER_ERRNO;" in full-
> From: Andy Wingo
> Cc: Eli Zaretskii , egg...@cs.ucla.edu, bug-gnulib@gnu.org
> Date: Thu, 21 Feb 2013 17:47:43 +0100
>
> On Thu 21 Feb 2013 17:29, Paolo Bonzini writes:
>
> > Il 20/02/2013 20:58, Andy Wingo ha scritto:
> >>
> >> if (full_read (fd, cookie, sizeof cookie) != sizeof cook
On 02/21/13 09:16, Paolo Bonzini wrote:
> I think usually errno is undefined for return values other than -1
That's true for system calls, but full_read is
different in that it sets errno whenever it returns
a value other than the requested size. That way,
the caller can distinguish a short read
Il 21/02/2013 17:47, Andy Wingo ha scritto:
>> > Doesn't it need to set errno to zero before calling full_read?
> Not sure! If full_read requires that errno be 0 going in, then yes, we
> should. Is this a requirement?
Hmm, I think usually errno is undefined for return values other than -1,
so ne
On Thu 21 Feb 2013 17:29, Paolo Bonzini writes:
> Il 20/02/2013 20:58, Andy Wingo ha scritto:
>>
>> if (full_read (fd, cookie, sizeof cookie) != sizeof cookie
>> || full_read (fd, SCM_BYTEVECTOR_CONTENTS (bv),
>> SCM_BYTEVECTOR_LENGTH (bv)) != SCM_BYTEVECTOR_LEN
Eric Blake writes:
> On 02/21/2013 02:11 AM, Christian Egli wrote:
>> Hi all
>>
>> I would like to use xalloc in liblouis[1] a library (and a couple of
>> programs) for braille transcription. The main author just sprinkled the
>> library code with stuff like
>>
>> foo = malloc(FOO_SIZE);
>> if
Il 20/02/2013 20:58, Andy Wingo ha scritto:
>
> if (full_read (fd, cookie, sizeof cookie) != sizeof cookie
> || full_read (fd, SCM_BYTEVECTOR_CONTENTS (bv),
> SCM_BYTEVECTOR_LENGTH (bv)) != SCM_BYTEVECTOR_LENGTH
> (bv))
> {
> int errno_save = errno;
On 02/21/2013 02:11 AM, Christian Egli wrote:
> Hi all
>
> I would like to use xalloc in liblouis[1] a library (and a couple of
> programs) for braille transcription. The main author just sprinkled the
> library code with stuff like
>
> foo = malloc(FOO_SIZE);
> if (!foo)
>outOfMemory();
>
>
Eric Blake wrote:
> On 02/20/2013 11:30 AM, Sergey Poznyakoff wrote:
> > Hi Paul,
> >
> >> Developers are assumed to have up-to-date systems where -Werror is
> >> appropriate.
> >
> > Frankly, I cannot imagine a situation where treaing a warning as an
> > error can be appropriate. That's why I
Hi all
I would like to use xalloc in liblouis[1] a library (and a couple of
programs) for braille transcription. The main author just sprinkled the
library code with stuff like
foo = malloc(FOO_SIZE);
if (!foo)
outOfMemory();
I would like to replace this with xmalloc. However it appears that
14 matches
Mail list logo