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: Paul Eggert
Subject: Re: [PATCH 11/12] utimes: detect utimes() correctly on OS/2 kLIBC
Date: Wed, 27 May 2015 08:12:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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

          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?



reply via email to

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