bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 11/12] utimes: detect utimes() correctly on OS/2 kLIBC


From: KO Myung-Hun
Subject: Re: [PATCH 11/12] utimes: detect utimes() correctly on OS/2 kLIBC
Date: Thu, 28 May 2015 19:46:13 +0900
User-agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:10.0.6esrpre) Gecko/20120715 Firefox/10.0.6esrpre SeaMonkey/2.7.2

Hi/2.

Paul Eggert wrote:
> KO Myung-Hun wrote:
>> +        /* utimes() of OS/2 kLIBC does not work on an opened file */
>> +        else if (close (fd) != 0)
>> +          result |= 1;
> 
> This limitation of should be documented in
> doc/posix-functions/utimes.texi, presumably as an OS/2 deficiency that
> Gnulib doesn't work around.  Also, the other deficiences of OS/2 should
> be documented (at least the ones that Gnulib works around, but also the
> other obvious ones).
> 

Fixed.

>>           else if (utimes (file, timeval) != 0)
>>             result |= 2;
>>           else if (utimes (file, NULL) != 0)
>>             result |= 8;
>> -        else if (fstat (fd, &st1) != 0)
>> +        else if (lstat (file, &st1) != 0)
>> +          result |= 1;
>> +        else if ((fd = open (file, O_WRONLY)) < 0)
> 
> Can you redo the test order so that the file is opened just once?

Fixed.

-- 
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

Attachment: 0001-utimes-detect-utimes-correctly-on-OS-2-kLIBC.patch
Description: Text document


reply via email to

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