Opened 5 years ago

Last modified 3 years ago

#58729 closed enhancement

legacy-support missing futimens() (and utimensat) — at Initial Version

Reported by: RJVB (René Bertin) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cjones051073 (Chris Jones), ken-cunningham-webuse
Port: legacy-support

Description

From man futimens on Linux:

NAME
       utimensat, futimens - change file timestamps with nanosecond precision

SYNOPSIS
       #include <fcntl.h> /* Definition of AT_* constants */
       #include <sys/stat.h>

       int utimensat(int dirfd, const char *pathname,
                     const struct timespec times[2], int flags);

       int futimens(int fd, const struct timespec times[2]);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       utimensat():
           Since glibc 2.10:
               _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
           Before glibc 2.10:
               _ATFILE_SOURCE
       futimens():
           Since glibc 2.10:
                  _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
           Before glibc 2.10:
                  _GNU_SOURCE

I just encountered futimens() trying to build a new kf5-kio version. It was easy enough to emulate using futimes().

What I do not know is whether this function is available on any Darwin version, nor what the project policy is for such situations (so feel free to close this is the function isn't acceptable).

Change History (0)

Note: See TracTickets for help on using tickets.