Project

General

Profile

Actions

Feature #13111

closed

Want futimes(), lutimes() and timespec/timeval conversion macros

Added by Andy Fiddaman almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

The futimes(), lutimes() functions and the TIMESPEC_TO_TIMEVAL() and TIMEVAL_TO_TIMESPEC() macros are not standardised but found in Linux and BSDs.
Even though software should move to the POSIX futimens() and utimensat(), some software expects these functions/macros to exist and they are trivial to implement.

Testing notes, see attached Gerrit review:

build:illumos:ig_timesfunc% LD_LIBRARY_PATH=../../../../../proto/root_i386-nd/usr/lib ./utimes.32
Testing:
... atime: 1280793678.123456789
... mtime: 1492732800.000000017
..... utimes()
..... lutimes()
..... futimes()
..... futimesat()
..... futimens()
..... utimensat()
Testing:
... atime: 1320796855.000000009
... mtime: 1498953611.987654321
..... utimes()
..... lutimes()
..... futimes()
..... futimesat()
..... futimens()
..... utimensat()
build:illumos:ig_timesfunc% LD_LIBRARY_PATH=../../../../../proto/root_i386-nd/usr/lib/amd64 ./utimes.64
Testing:
... atime: 1280793678.123456789
... mtime: 1492732800.000000017
..... utimes()
..... lutimes()
..... futimes()
..... futimesat()
..... futimens()
..... utimensat()
Testing:
... atime: 1320796855.000000009
... mtime: 1498953611.987654321
..... utimes()
..... lutimes()
..... futimes()
..... futimesat()
..... futimens()
..... utimensat()

Related issues

Related to illumos gate - Bug #6162: utimes(2) man page is staleClosedDamian Wojslaw2015-08-25

Actions
Actions

Also available in: Atom PDF