Hi/2.

Paul Eggert wrote:
> I don't see why the workaround must be in freopen-safer.c. 
> freopen-safer has freopen as a prerequisite, so it can assume that
> freopen doesn't have the bug in question.
> 

Unfortunately, if freopen is not replaced by gnulib, freopen-safer also
has a bug.

>> +#ifdef __KLIBC__
>> +  FILE *result = freopen (filename, mode, stream);
>> +
>> +  /* On OS/2 kLIBC, freopen() returns NULL even if it is successful
>> +     if filename is NULL. */
>> +  if (!result && !errno)
>> +    result = stream;
>> +
>> +  return result;
>> +#else
>>    return freopen (filename, mode, stream);
>> +#endif
> 
> This should be refactored so that there's only one call to freopen, to
> avoid duplicating the code.

Ok.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr


Reply via email to