annotate lib/utimensat.c @ 17463:203c036eb0c6

bootstrap: support checksum utils without a --status option * build-aux/bootstrap: Only look for sha1sum if updating po files. Add sha1 to the list of supported checksum utils since it's now supported through adjustments below. (update_po_files): Remove the use of --status in a way that will suppress all error messages, but since this is only used to minimize updates, it shouldn't cause an issue. Exit early if there is a problem updating the po file checksums. (find_tool): Remove the check for --version support as this is optional as per commit 86186b17. Don't even check for the presence of the command as if that is needed, it's supported through configuring prerequisites in bootstrap.conf. Prompt that when a tool isn't found, one can define an environment variable to add to the hardcoded search list.
author Pádraig Brady <P@draigBrady.com>
date Thu, 08 Aug 2013 11:08:49 +0100
parents 5f320210ead1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12174
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
1 /* Set the access and modification time of a file relative to directory fd.
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
2 Copyright (C) 2009-2013 Free Software Foundation, Inc.
12174
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
3
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
4 This program is free software: you can redistribute it and/or modify
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
7 (at your option) any later version.
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
8
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
12 GNU General Public License for more details.
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
13
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
16
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
17 /* written by Eric Blake */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
18
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
19 #include <config.h>
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
20
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
21 #include <sys/stat.h>
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
22
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
23 #include <errno.h>
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
24 #include <fcntl.h>
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
25
12468
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
26 #include "stat-time.h"
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
27 #include "timespec.h"
12174
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
28 #include "utimens.h"
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
29
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
30 #if HAVE_UTIMENSAT
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
31
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
32 # undef utimensat
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
33
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
34 /* If we have a native utimensat, but are compiling this file, then
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
35 utimensat was defined to rpl_utimensat by our replacement
12468
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
36 sys/stat.h. We assume the native version might fail with ENOSYS,
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
37 or succeed without properly affecting ctime (as is the case when
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
38 using newer glibc but older Linux kernel). In this scenario,
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
39 rpl_utimensat checks whether the native version is usable, and
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
40 local_utimensat provides the fallback manipulation. */
12174
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
41
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
42 static int local_utimensat (int, char const *, struct timespec const[2], int);
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
43 # define AT_FUNC_NAME local_utimensat
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
44
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
45 /* Like utimensat, but work around native bugs. */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
46
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
47 int
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
48 rpl_utimensat (int fd, char const *file, struct timespec const times[2],
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
49 int flag)
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
50 {
17387
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
51 # if defined __linux__ || defined __sun
14811
64be6c8e9bab utimensat: do not reference an out-of-scope buffer
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
52 struct timespec ts[2];
64be6c8e9bab utimensat: do not reference an out-of-scope buffer
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
53 # endif
64be6c8e9bab utimensat: do not reference an out-of-scope buffer
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
54
12468
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
55 /* See comments in utimens.c for details. */
12174
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
56 static int utimensat_works_really; /* 0 = unknown, 1 = yes, -1 = no. */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
57 if (0 <= utimensat_works_really)
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
58 {
12468
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
59 int result;
17387
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
60 # if defined __linux__ || defined __sun
12525
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
61 struct stat st;
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
62 /* As recently as Linux kernel 2.6.32 (Dec 2009), several file
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
63 systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT,
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
64 but work if both times are either explicitly specified or
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
65 UTIME_NOW. Work around it with a preparatory [l]stat prior
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
66 to calling utimensat; fortunately, there is not much timing
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
67 impact due to the extra syscall even on file systems where
17387
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
68 UTIME_OMIT would have worked.
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
69
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
70 The same bug occurs in Solaris 11.1 (Apr 2013).
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
71
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
72 FIXME: Simplify this for Linux in 2016 and for Solaris in
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
73 2024, when file system bugs are no longer common. */
12525
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
74 if (times && (times[0].tv_nsec == UTIME_OMIT
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
75 || times[1].tv_nsec == UTIME_OMIT))
12468
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
76 {
12525
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
77 if (fstatat (fd, file, &st, flag))
12468
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
78 return -1;
12525
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
79 if (times[0].tv_nsec == UTIME_OMIT && times[1].tv_nsec == UTIME_OMIT)
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
80 return 0;
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
81 if (times[0].tv_nsec == UTIME_OMIT)
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
82 ts[0] = get_stat_atime (&st);
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
83 else
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
84 ts[0] = times[0];
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
85 if (times[1].tv_nsec == UTIME_OMIT)
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
86 ts[1] = get_stat_mtime (&st);
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
87 else
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
88 ts[1] = times[1];
53f80a530574 futimens, utimensat: work around ntfs-3g bug
Eric Blake <ebb9@byu.net>
parents: 12468
diff changeset
89 times = ts;
12468
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
90 }
15991
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
91 # ifdef __hppa__
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
92 /* Linux kernel 2.6.22.19 on hppa does not reject invalid tv_nsec
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
93 values. */
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
94 else if (times
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
95 && ((times[0].tv_nsec != UTIME_NOW
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
96 && (times[0].tv_nsec < 0
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
97 || times[0].tv_nsec >= 1000000000))
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
98 || (times[1].tv_nsec != UTIME_NOW
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
99 && (times[1].tv_nsec < 0
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
100 || times[1].tv_nsec >= 1000000000))))
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
101 {
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
102 errno = EINVAL;
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
103 return -1;
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
104 }
19758b0c3160 utimensat: Work around problem on Linux/hppa.
Bruno Haible <bruno@clisp.org>
parents: 14811
diff changeset
105 # endif
17387
5f320210ead1 utimens, utimensat: work around Solaris UTIME_OMIT bug
Paul Eggert <eggert@cs.ucla.edu>
parents: 17249
diff changeset
106 # endif
12468
ff7c15d38975 futimens, utimensat: work around Linux bug
Eric Blake <ebb9@byu.net>
parents: 12174
diff changeset
107 result = utimensat (fd, file, times, flag);
12174
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
108 /* Linux kernel 2.6.25 has a bug where it returns EINVAL for
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
109 UTIME_NOW or UTIME_OMIT with non-zero tv_sec, which
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
110 local_utimensat works around. Meanwhile, EINVAL for a bad
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
111 flag is indeterminate whether the native utimensat works, but
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
112 local_utimensat will also reject it. */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
113 if (result == -1 && errno == EINVAL && (flag & ~AT_SYMLINK_NOFOLLOW))
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
114 return result;
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
115 if (result == 0 || (errno != ENOSYS && errno != EINVAL))
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
116 {
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
117 utimensat_works_really = 1;
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
118 return result;
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
119 }
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
120 }
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
121 /* No point in trying openat/futimens, since on Linux, futimens is
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
122 implemented with the same syscall as utimensat. Only avoid the
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
123 native utimensat due to an ENOSYS failure; an EINVAL error was
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
124 data-dependent, and the next caller may pass valid data. */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
125 if (0 <= utimensat_works_really && errno == ENOSYS)
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
126 utimensat_works_really = -1;
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
127 return local_utimensat (fd, file, times, flag);
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
128 }
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
129
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
130 #else /* !HAVE_UTIMENSAT */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
131
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
132 # define AT_FUNC_NAME utimensat
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
133
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
134 #endif /* !HAVE_UTIMENSAT */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
135
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
136 /* Set the access and modification time stamps of FILE to be
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
137 TIMESPEC[0] and TIMESPEC[1], respectively; relative to directory
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
138 FD. If flag is AT_SYMLINK_NOFOLLOW, change the times of a symlink,
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
139 or fail with ENOSYS if not possible. If TIMESPEC is null, set the
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
140 time stamps to the current time. If possible, do it without
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
141 changing the working directory. Otherwise, resort to using
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
142 save_cwd/fchdir, then utimens/restore_cwd. If either the save_cwd
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
143 or the restore_cwd fails, then give a diagnostic and exit nonzero.
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
144 Return 0 on success, -1 (setting errno) on failure. */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
145
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
146 /* AT_FUNC_NAME is now utimensat or local_utimensat. */
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
147 #define AT_FUNC_F1 lutimens
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
148 #define AT_FUNC_F2 utimens
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
149 #define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
150 #define AT_FUNC_POST_FILE_PARAM_DECLS , struct timespec const ts[2], int flag
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
151 #define AT_FUNC_POST_FILE_ARGS , ts
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
152 #include "at-func.c"
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
153 #undef AT_FUNC_NAME
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
154 #undef AT_FUNC_F1
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
155 #undef AT_FUNC_F2
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
156 #undef AT_FUNC_USE_F1_COND
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
157 #undef AT_FUNC_POST_FILE_PARAM_DECLS
73f2681e0524 utimensat: new module
Eric Blake <ebb9@byu.net>
parents:
diff changeset
158 #undef AT_FUNC_POST_FILE_ARGS