Import upstream version 1.28
[debian/tar] / gnu / utimens.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Set file access and modification times.
4
5    Copyright 2012-2014 Free Software Foundation, Inc.
6
7    This program is free software: you can redistribute it and/or modify it
8    under the terms of the GNU General Public License as published by the
9    Free Software Foundation; either version 3 of the License, or any
10    later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 /* Written by Paul Eggert.  */
21
22 #include <time.h>
23 int fdutimens (int, char const *, struct timespec const [2]);
24 int utimens (char const *, struct timespec const [2]);
25 int lutimens (char const *, struct timespec const [2]);
26
27 #if GNULIB_FDUTIMENSAT
28 # include <fcntl.h>
29 # include <sys/stat.h>
30
31 #ifndef _GL_INLINE_HEADER_BEGIN
32  #error "Please include config.h first."
33 #endif
34 _GL_INLINE_HEADER_BEGIN
35 #ifndef _GL_UTIMENS_INLINE
36 # define _GL_UTIMENS_INLINE _GL_INLINE
37 #endif
38
39 int fdutimensat (int fd, int dir, char const *name, struct timespec const [2],
40                  int atflag);
41
42 /* Using this function makes application code slightly more readable.  */
43 _GL_UTIMENS_INLINE int
44 lutimensat (int dir, char const *file, struct timespec const times[2])
45 {
46   return utimensat (dir, file, times, AT_SYMLINK_NOFOLLOW);
47 }
48
49 _GL_INLINE_HEADER_END
50
51 #endif