From 9f5c509b8b3f56ab06ebb214cf1ef9994431e136 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun
Date: Fri, 28 Nov 2014 16:43:14 +0900 Subject: [PATCH] utimes: detect utimes() correctly on OS/2 kLIBC utimes() of OS/2 kLIBC has some limitations. 1. OS/2 itself supports a file date since 1980 year in local time. 2. OS/2 itself supports only even seconds for a file time. 3. utimes() of OS/2 kLIBC does not work on an opened file. * m4/utimes.m4: Detect utimes() correctly on OS/2 kLIBC. * doc/posix-functions/utime.texi: Document the above limitations of utimes() on OS/2 kLIBC. --- doc/posix-functions/utime.texi | 7 +++++++ m4/utimes.m4 | 24 ++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/posix-functions/utime.texi b/doc/posix-functions/utime.texi index 9cfe373..f851c16 100644 --- a/doc/posix-functions/utime.texi +++ b/doc/posix-functions/utime.texi @@ -27,4 +27,11 @@ On some platforms, the prototype for @code{utime} omits @code{const} for the second argument. Fortunately, the argument is not modified, so it is safe to cast away const: mingw, MSVC 9. address@hidden +On OS/2, this funciton cannot set timestamp earlier than 1980 year in local +time. address@hidden +On OS/2, this function cannot set timestamp in odd seconds. address@hidden +On OS/2, this function does not work on an opened file. @end itemize diff --git a/m4/utimes.m4 b/m4/utimes.m4 index e26a576..45d9c69 100644 --- a/m4/utimes.m4 +++ b/m4/utimes.m4 @@ -1,5 +1,5 @@ # Detect some bugs in glibc's implementation of utimes. -# serial 3 +# serial 4 dnl Copyright (C) 2003-2005, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_UTIMES], #include