Mercurial > hg > octave-shane > gnulib-hg
annotate lib/utimens.h @ 17255:d81be792518a
update from texinfo
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Tue, 01 Jan 2013 15:51:49 -0800 |
parents | e542fd46ad6f |
children | 1f9070ef79b0 |
rev | line source |
---|---|
17026
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
1 /* Set file access and modification times. |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
2 |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
17028
diff
changeset
|
3 Copyright 2012-2013 Free Software Foundation, Inc. |
17026
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
4 |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
5 This program is free software: you can redistribute it and/or modify it |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
6 under the terms of the GNU General Public License as published by the |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
7 Free Software Foundation; either version 3 of the License, or any |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
8 later version. |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
9 |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
13 GNU General Public License for more details. |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
14 |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
15 You should have received a copy of the GNU General Public License |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
17 |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
18 /* Written by Paul Eggert. */ |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
19 |
8223
ca249819379f
* lib/getdate.h (includes): Include <time.h>, not "timespec.h".
Eric Blake <ebb9@byu.net>
parents:
5486
diff
changeset
|
20 #include <time.h> |
13696
bfe487360d66
fdutimens, fdutimensat: update signature, again
Eric Blake <eblake@redhat.com>
parents:
13686
diff
changeset
|
21 int fdutimens (int, char const *, struct timespec const [2]); |
5147 | 22 int utimens (char const *, struct timespec const [2]); |
12158 | 23 int lutimens (char const *, struct timespec const [2]); |
12193 | 24 |
25 #if GNULIB_FDUTIMENSAT | |
26 # include <fcntl.h> | |
27 # include <sys/stat.h> | |
28 | |
17026
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
29 _GL_INLINE_HEADER_BEGIN |
17028
ce2683fe3994
Keep the extern-inline macros closer together.
Paul Eggert <eggert@cs.ucla.edu>
parents:
17026
diff
changeset
|
30 #ifndef _GL_UTIMENS_INLINE |
ce2683fe3994
Keep the extern-inline macros closer together.
Paul Eggert <eggert@cs.ucla.edu>
parents:
17026
diff
changeset
|
31 # define _GL_UTIMENS_INLINE _GL_INLINE |
ce2683fe3994
Keep the extern-inline macros closer together.
Paul Eggert <eggert@cs.ucla.edu>
parents:
17026
diff
changeset
|
32 #endif |
17026
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
33 |
13696
bfe487360d66
fdutimens, fdutimensat: update signature, again
Eric Blake <eblake@redhat.com>
parents:
13686
diff
changeset
|
34 int fdutimensat (int fd, int dir, char const *name, struct timespec const [2], |
13686
f7caccc03505
fdutimensat: add an atflag parameter
Eric Blake <eblake@redhat.com>
parents:
12193
diff
changeset
|
35 int atflag); |
12193 | 36 |
37 /* Using this function makes application code slightly more readable. */ | |
17026
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
38 _GL_UTIMENS_INLINE int |
13696
bfe487360d66
fdutimens, fdutimensat: update signature, again
Eric Blake <eblake@redhat.com>
parents:
13686
diff
changeset
|
39 lutimensat (int dir, char const *file, struct timespec const times[2]) |
12193 | 40 { |
13696
bfe487360d66
fdutimens, fdutimensat: update signature, again
Eric Blake <eblake@redhat.com>
parents:
13686
diff
changeset
|
41 return utimensat (dir, file, times, AT_SYMLINK_NOFOLLOW); |
12193 | 42 } |
17026
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
43 |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
44 _GL_INLINE_HEADER_END |
ca6d65189199
utimens: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
13696
diff
changeset
|
45 |
12193 | 46 #endif |