[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
0001-utimes-detect-utimes-correctly-on-OS-2-kLIBC.patch
Description: Text document
- [PATCH 07/12] pipe_filter_ii_execute: port to OS/2 kLIBC, (continued)
- [PATCH 07/12] pipe_filter_ii_execute: port to OS/2 kLIBC, KO Myung-Hun, 2015/05/27
- [PATCH 08/12] dup, dup2, fcntl: support a directory fd on OS/2 kLIBC, KO Myung-Hun, 2015/05/27
- [PATCH 09/12] opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC, KO Myung-Hun, 2015/05/27
- [PATCH 10/12] configmake: prepend /@unixroot on OS/2 kLIBC, KO Myung-Hun, 2015/05/27
- [PATCH 11/12] utimes: detect utimes() correctly on OS/2 kLIBC, KO Myung-Hun, 2015/05/27
- [PATCH 12/12] openat_proc_name: port to OS/2 kLIBC, KO Myung-Hun, 2015/05/27