summaryrefslogtreecommitdiff
path: root/modules/fstatat
Commit message (Collapse)AuthorAgeFilesLines
* Use module 'filename' instead of module 'dosname'.Bruno Haible2020-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/at-func.c: Include filename.h instead of dosname.h. * lib/unlinkat.c: Likewise. * modules/areadlinkat (Depends-on): Add filename. Remove dosname. * modules/areadlinkat-with-size (Depends-on): Likewise. * modules/faccessat (Depends-on): Likewise. * modules/fchmodat (Depends-on): Likewise. * modules/fchownat (Depends-on): Likewise. * modules/fstatat (Depends-on): Likewise. * modules/mkdirat (Depends-on): Likewise. * modules/mkfifoat (Depends-on): Likewise. * modules/readlinkat (Depends-on): Likewise. * modules/selinux-at (Depends-on): Likewise. * modules/symlinkat (Depends-on): Likewise. * modules/unlinkat (Depends-on): Likewise. * modules/utimensat (Depends-on): Likewise. * lib/at-func2.c: Include filename.h instead of dosname.h. * modules/linkat (Depends-on): Add filename. Remove dosname. * modules/renameatu (Depends-on): Likewise. * lib/canonicalize.c: Include filename.h instead of dosname.h. * lib/canonicalize-lgpl.c: Likewise. * modules/canonicalize (Depends-on): Add filename. * modules/canonicalize-lgpl (Depends-on): Likewise. * lib/dirname.h: Include filename.h instead of dosname.h. * modules/dirname-lgpl (Depends-on): Add filename. Remove dosname. * lib/fchdir.c: Include filename.h instead of dosname.h. * modules/fchdir (Depends-on): Add filename. Remove dosname. * lib/openat.c: Include filename.h instead of dosname.h. * modules/openat (Depends-on): Add filename. Remove dosname. * lib/rmdir.c: Include filename.h instead of dosname.h. * modules/rmdir (Depends-on): Add filename. Remove dosname. * lib/savewd.c: Include filename.h instead of dosname.h. * modules/savewd (Depends-on): Add filename. Remove dosname. * lib/unlink.c: Include filename.h instead of dosname.h. * modules/unlink (Depends-on): Add filename. Remove dosname. * modules/relocatable-prog-wrapper (Depends-on): Add filename. * lib/relocwrapper.c: Update comments. * modules/lstat (Depends-on): Remove dosname.
* Several modules: Depend on stat.Bruno Haible2020-03-221-0/+1
| | | | | | | | | | | | | | | | | | | | | * modules/acl-permissions (Depends-on): Add stat. * modules/canonicalize (Depends-on): Likewise. * modules/file-has-acl (Depends-on): Likewise. * modules/fstat (Depends-on): Likewise. * modules/fstatat (Depends-on): Likewise. * modules/glob (Depends-on): Likewise. * modules/javacomp (Depends-on): Likewise. * modules/linkat (Depends-on): Likewise. * modules/mkdir (Depends-on): Likewise. * modules/pt_chown (Depends-on): Likewise. * modules/ptsname_r (Depends-on): Likewise. * modules/readlinkat (Depends-on): Likewise. * modules/rename (Depends-on): Likewise. * modules/renameatu (Depends-on): Likewise. * modules/tmpdir (Depends-on): Likewise. * modules/utimens (Depends-on): Likewise. * modules/relocatable-prog-wrapper (Depends-on): Add largefile. * modules/same (Depends-on): Remove stat.
* stat: work around Solaris bug with tv_nsec < 0Paul Eggert2017-11-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/posix-functions/fstat.texi (fstat): * doc/posix-functions/fstatat.texi (fstatat): * doc/posix-functions/lstat.texi (lstat): * doc/posix-functions/stat.texi (stat): Mention Solaris 11 bug. * lib/fstat.c, lib/fstatat.c, lib/lstat.c: Include stat-time.h. * lib/fstat.c (rpl_fstat) [!WINDOWS_NATIVE]: * lib/lstat.c (rpl_lstat): * lib/stat.c (rpl_stat): Normalize resulting timestamps. * lib/fstatat.c (normal_fstatat): New function. (rpl_fstatat): Use it. * lib/stat-time.h: Include intprops.h, errno.h, stddef.h. (stat_time_normalize): New function. * m4/fstat.m4 (gl_FUNC_FSTAT): * m4/fstatat.m4 (gl_FUNC_FSTATAT): * m4/lstat.m4 (gl_FUNC_LSTAT): * m4/stat.m4 (gl_FUNC_STAT): Replace on Solaris. * modules/fstat (Depends-on): * modules/fstatat (Depends-on): Add stat-time. * modules/stat-time (Depends-on): Add errno, intprops.
* statat: new module, split out from fstatatPaul Eggert2013-01-231-4/+1
| | | | | | | | | | | | | | | | GNU Emacs needs the POSIX-specified fstatat, but not the gnulib-specified statat and lstat. Split the latter two into a new module 'statat'. * lib/openat.h: Depend on GNULIB_STATAT, not GNULIB_FSTATAT. * lib/openat.h, lib/statat.c (STATAT_INLINE): Rename from FSTATAT_INLINE. All uses changed. * modules/fstatat (Files): Remove lib/statat.c. (gl_MODULE_INDICATOR([fstatat])): Remove. (lib_SOURCES): Remove. (Maintainer): Add self. * modules/statat, modules/statat-tests, tests/test-statat.c: New files. * tests/test-fstatat.c (BASE): Don't define if already defined. (do_stat, do_lstat) [!TEST_STATAT]: Test fstatat instead.
* fchmodat, fchownat, fstatat: port to non-inlining compilersPaul Eggert2012-10-151-0/+2
| | | | | | | | | | | | | | Problem reported for FreeBSD 9 by Jim Meyering in <http://lists.gnu.org/archive/html/bug-gnulib/2012-10/msg00070.html>. * lib/chmodat.c, lib/chownat.c, lib/statat.c: New files, which define FCHMODAT_INLINE etc. * lib/fchmodat.c (FCHMODAT_INLINE): * lib/fchownat.c (FCHOWNAT_INLINE): * lib/fstatat.c (FSTATAT_INLINE): Remove, as chmodat.c etc. now do this. * modules/fchmodat (Files): Add lib/chmodat.c. * modules/fchownat (Files): Add lib/chownat.c. * modules/fstatat (Files): Add lib/statat.c.
* faccessat, etc.: support AT_FDCWD-only usePaul Eggert2012-10-141-1/+0
| | | | | | | | | | | | | | * lib/at-func.c: If GNULIB_SUPPORT_ONLY_AT_FDCWD, then support this function only if its first argument is AT_FDCWD. Emacs wants faccessat for AT_EACCESS but not for any first-arg values other than AT_FDCWD, so it doesn't want all the openat machinery with fchdir etc. * modules/faccessat, modules/fchmodat, modules/fchownat (Files): * modules/fstatat, modules/mkdirat, modules/openat (Files): * modules/unlinkat (Files): Remove lib/openat-priv.h, as at-internal supplies this file. Removing this file here allows us to support programs like Emacs that avoid at-internal.
* fchmodat, fchownat, fstatat: use extern-inlinePaul Eggert2012-09-221-1/+1
| | | | | | | | | | | | | | | * lib/fchmodat.c, lib/openat.h (FCHMODAT_INLINE): * lib/fchownat.c, lib/openat.h (FCHOWNAT_INLINE): * lib/fstatat.c, lib/openat.h (FSTATAT_INLINE): New macros. * lib/openat.h: Replace all uses of 'static inline' with them. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * modules/fchmodat, modules/fchownat, modules/fstatat: * modules/openat-h: (Depends-on): Add extern-inline. (configure.ac): Remove AC_C_INLINE.
* Fix some modules' file list.Bruno Haible2011-11-161-0/+1
| | | | | | * modules/fstatat (Files): Add m4/lstat.m4. * modules/openat (Files): Likewise. * modules/unlinkat (Files): Likewise.
* More conditional dependencies.Bruno Haible2011-11-091-10/+10
| | | | | | | | | | | | | | | * modules/faccessat (Depends-on): Add conditions. * modules/fchmodat (Depends-on): Likewise. * modules/fchownat (Depends-on): Likewise. * modules/fstatat (Depends-on): Likewise. * modules/mkfifoat (Depends-on): Likewise. * modules/readlinkat (Depends-on): Likewise. * modules/symlinkat (Depends-on): Likewise. * modules/unlinkat (Depends-on): Likewise. * modules/utimensat (Depends-on): Likewise. * modules/mkdirat (Depends-on): Add sys_stat. Add conditions. * modules/linkat (Depends-on): Refine the conditions. * modules/renameat (Depends-on): Likewise.
* fstatat: Remove unused dependency.Bruno Haible2011-11-091-1/+0
| | | | * modules/fstatat (Depends-on): Remove fstat.
* New modules 'at-internal', 'openat-h', split off from module 'openat'.Bruno Haible2011-11-051-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_OPENAT. Don't invoke gl_PREREQ_OPENAT and gl_MODULE_INDICATOR. * modules/openat (Description): Add reference to POSIX function. (Files): Remove lib/openat.h, lib/openat-proc.c. (Depends-on): Add at-internal, openat-h. Remove fdopendir, gettext-h, intprops, unistd. (configure.ac): Remove AC_LIBOBJ of openat-proc. Invoke gl_PREREQ_OPENAT, gl_MODULE_INDICATOR here. Invoke gl_FCNTL_MODULE_INDICATOR. (Include): Remove unistd.h, openat.h. * modules/areadlinkat (Files): Add lib/at-func.c. (Depends-on): Add at-internal, dosname, errno, extensions, fchdir, openat-die, openat-h, save-cwd. * modules/areadlinkat-with-size (Files): Add lib/at-func.c. (Depends-on): Add at-internal, dosname, errno, extensions, fchdir, openat-die, openat-h, save-cwd, unistd. * modules/faccessat (Files): Add lib/at-func.c, lib/openat-priv.h. (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die, openat-h, save-cwd. Remove fcntl-h, openat. * modules/fchmodat (Files): Remove lib/openat.h. (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h, openat, stdbool, unistd. * modules/fchownat (Files): Remove lib/openat.h. (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h, openat, stdbool, sys_stat. * modules/fdopendir (Files): Remove lib/openat-priv.h, lib/openat-proc.c. (Depends-on): Add at-internal. (condigure.ac): Remove AC_LIBOBJ of openat-proc. * modules/fstatat (Files): Remove lib/openat.h. (Depends-on): Add at-internal, openat-h. Remove dirent, openat, stdbool, unistd. * modules/fts (Depends-on): Add openat-h. * modules/linkat (Depends-on): Add at-internal, openat-h. Remove openat. * modules/mkdirat (Files): Remove lib/openat.h. (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h, openat, stdbool, sys_stat. * modules/mkfifoat (Files): Add lib/at-func.c. (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die, openat-h, save-cwd. Remove fcntl-h, openat. * modules/openat-die (Depends-on): Add openat-h. Remove openat. * modules/readlinkat (Files): Add lib/at-func.c. (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die, openat-h, save-cwd. Remove fcntl-h, openat. * modules/renameat (Depends-on): Add at-internal, openat-h. Remove openat. * modules/selinux-at (Files): Add lib/at-func.c. (Depends-on): Add at-internal, dosname, errno, extensions, fchdir, fcntl-h, openat-die, openat-h, save-cwd, unistd. Remove openat. * modules/symlinkat (Files): Add lib/at-func.c. (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die, openat-h, save-cwd. Remove fcntl-h, openat. * modules/unlinkat (Files): Remove lib/openat.h. (Depends-on): Add at-internal, openat-h. Remove dirent, openat, stdbool. * modules/utimensat (Files): Add lib/at-func.c. (Depends-on): Add at-internal, dosname, errno, fchdir, fcntl-h, openat-die, openat-h, save-cwd. * modules/fchownat-tests (Depends-on): Add openat-h. Remove openat. * modules/fdutimensat-tests (Depends-on): Add openat. * modules/fstatat-tests (Depends-on): Add openat-h. * modules/readlinkat-tests (Depends-on): Add openat. * modules/symlinkat-tests (Depends-on): Add openat.
* New module 'fstatat', split off from module 'openat'.Bruno Haible2011-11-041-0/+45
* lib/openat.h (statat, lstatat): Enable only if GNULIB_FSTATAT is defined. * m4/fstatat.m4: New file. extracted from m4/openat.m4. * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FSTATAT. Don't invoke gl_FUNC_FSTATAT. (gl_FUNC_FSTATAT): Moved to m4/fstatat.m4. * modules/fstatat: New file, extracted from modules/openat. * modules/openat (Files): Remove lib/fstatat.c. (Depends-on): Remove lstat. (configure.ac): Remove AC_LIBOBJ of fstatat. * modules/fstatat-tests: New file, extracted from modules/openat-tests. * modules/openat-tests (Files): Remove tests/test-fstatat.c, tests/test-lstat.h, tests/test-stat.h. (Depends-on): Remove getcwd-lgpl. (Makefile.am): Remove rules for test-fstatat. * doc/posix-functions/fstatat.texi: Mention module 'fstatat' instead of module 'openat'. * NEWS: Mention the change. * modules/getcwd (Depends-on): Add fstatat. * modules/linkat (Depends-on): Likewise. * modules/mkfifoat-tests (Depends-on): Likewise. * modules/utimensat (Depends-on): Add fstatat. Remove openat.