1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-16 01:22:18 +03:00
Files
gnulib/doc/posix-functions/utimes.texi
KO Myung-Hun 8968c785d7 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/utimes.texi: Document the above limitations of
utimes() on OS/2 kLIBC.
2016-01-15 10:09:00 -08:00

51 lines
1.4 KiB
Plaintext

@node utimes
@section @code{utimes}
@findex utimes
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/utimes.html}
Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
@item
The declaration of this function lacks @code{const} in the second argument
on some platforms:
OSF/1 5.1.
@item
On some platforms, this function mis-handles trailing slash:
FreeBSD 7.2, Solaris 9.
@item
This function cannot set full timestamp resolution. In particular,
some platforms incorrectly round rather than truncate. Use
@code{utimensat(AT_FDCWD,file,times,0)}, or the gnulib module utimens,
instead.
@item
On some platforms, @code{utimes (file, NULL)} fails to set the
file's timestamp to the current time:
glibc 2.3.3.
@item
On some platforms, @code{utimes} failed on read-only files when
@code{utime} worked fine.
glibc 2.2.5.
@item
On OS/2, this function cannot set the timestamp to earlier than the
year 1980 in local time.
@item
On OS/2, this function cannot set the timestamp to an odd number of
seconds.
@item
On OS/2, this function does not work on an opened file.
@end itemize
Extension: Gnulib provides a module @samp{utimens} that works around these
problems and allows to set the time with nanosecond resolution (as far as
supported by the file system).