2012-08-01 21:46:10 -07:00
|
|
|
/* Set file access and modification times.
|
|
|
|
|
2022-01-01 02:45:51 -05:00
|
|
|
Copyright 2012-2022 Free Software Foundation, Inc.
|
2012-08-01 21:46:10 -07:00
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 12:11:39 -07:00
|
|
|
This file is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as
|
2022-02-23 11:11:52 -08:00
|
|
|
published by the Free Software Foundation, either version 3 of the
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 12:11:39 -07:00
|
|
|
License, or (at your option) any later version.
|
2012-08-01 21:46:10 -07:00
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 12:11:39 -07:00
|
|
|
This file is distributed in the hope that it will be useful,
|
2012-08-01 21:46:10 -07:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 12:11:39 -07:00
|
|
|
GNU Lesser General Public License for more details.
|
2012-08-01 21:46:10 -07:00
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 12:11:39 -07:00
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
2017-09-13 02:07:03 -07:00
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
2012-08-01 21:46:10 -07:00
|
|
|
|
|
|
|
/* Written by Paul Eggert. */
|
|
|
|
|
2012-06-22 14:26:37 -07:00
|
|
|
#include <time.h>
|
|
|
|
int fdutimens (int, char const *, struct timespec const [2]);
|
|
|
|
int utimens (char const *, struct timespec const [2]);
|
|
|
|
int lutimens (char const *, struct timespec const [2]);
|
|
|
|
|
|
|
|
#if GNULIB_FDUTIMENSAT
|
|
|
|
# include <fcntl.h>
|
|
|
|
# include <sys/stat.h>
|
|
|
|
|
2013-09-19 14:40:08 -07:00
|
|
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
|
|
|
#error "Please include config.h first."
|
|
|
|
#endif
|
2012-08-01 21:46:10 -07:00
|
|
|
_GL_INLINE_HEADER_BEGIN
|
|
|
|
#ifndef _GL_UTIMENS_INLINE
|
|
|
|
# define _GL_UTIMENS_INLINE _GL_INLINE
|
|
|
|
#endif
|
|
|
|
|
2012-06-22 14:26:37 -07:00
|
|
|
int fdutimensat (int fd, int dir, char const *name, struct timespec const [2],
|
|
|
|
int atflag);
|
|
|
|
|
|
|
|
/* Using this function makes application code slightly more readable. */
|
2012-08-01 21:46:10 -07:00
|
|
|
_GL_UTIMENS_INLINE int
|
2012-06-22 14:26:37 -07:00
|
|
|
lutimensat (int dir, char const *file, struct timespec const times[2])
|
|
|
|
{
|
|
|
|
return utimensat (dir, file, times, AT_SYMLINK_NOFOLLOW);
|
|
|
|
}
|
2012-08-01 21:46:10 -07:00
|
|
|
|
|
|
|
_GL_INLINE_HEADER_END
|
|
|
|
|
2012-06-22 14:26:37 -07:00
|
|
|
#endif
|