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