mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-14 14:01:48 +03:00
* modules/windows-stat-timespec: New file. * m4/windows-stat-timespec.m4: New file. * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_STAT_TIMESPEC. * modules/sys_stat (Makefile.am): Substitute WINDOWS_STAT_TIMESPEC. * lib/sys_stat.in.h (struct stat) [WINDOWS_STAT_TIMESPEC]: Declare with fields st_atim, st_mtim, st_ctim. (st_atime, st_mtime, st_ctime): Define as macros. (_GL_WINDOWS_STAT_TIMESPEC): New macro. * lib/stat-w32.h (_gl_convert_FILETIME_to_timespec) [_GL_WINDOWS_STAT_TIMESPEC]: New declaration. * lib/stat-w32.c (_gl_convert_FILETIME_to_timespec) [_GL_WINDOWS_STAT_TIMESPEC]: New function. (_gl_convert_FILETIME_to_POSIX): Adjust coding style. (_gl_fstat_by_handle): If _GL_WINDOWS_STAT_TIMESPEC, convert the FILETIME to 'struct timespec', not 'time_t'. * lib/stat.c (rpl_stat): If _GL_WINDOWS_STAT_TIMESPEC, convert the FILETIME to 'struct timespec', not 'time_t'. * lib/stat-time.h (STAT_TIMESPEC): Define also if _GL_WINDOWS_STAT_TIMESPEC. * doc/windows-stat-timespec.texi: New file. * doc/gnulib.texi: Include it.
88 lines
3.3 KiB
Plaintext
88 lines
3.3 KiB
Plaintext
Description:
|
|
A <sys/stat.h> for systems with missing declarations.
|
|
|
|
Files:
|
|
lib/sys_stat.in.h
|
|
m4/sys_stat_h.m4
|
|
m4/unistd_h.m4
|
|
|
|
Depends-on:
|
|
include_next
|
|
snippet/arg-nonnull
|
|
snippet/c++defs
|
|
snippet/warn-on-use
|
|
sys_types
|
|
time
|
|
|
|
configure.ac:
|
|
gl_HEADER_SYS_STAT_H
|
|
AC_PROG_MKDIR_P
|
|
|
|
Makefile.am:
|
|
BUILT_SOURCES += sys/stat.h
|
|
|
|
# We need the following in order to create <sys/stat.h> when the system
|
|
# has one that is incomplete.
|
|
sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
|
$(AM_V_at)$(MKDIR_P) sys
|
|
$(AM_V_GEN)rm -f $@-t $@ && \
|
|
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
|
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
|
|
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
|
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
|
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
|
|
-e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
|
|
-e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
|
|
-e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
|
|
-e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
|
|
-e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
|
|
-e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
|
|
-e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
|
|
-e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
|
|
-e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
|
|
-e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
|
|
-e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
|
|
-e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
|
|
-e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
|
|
-e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
|
|
-e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
|
|
-e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
|
|
-e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
|
|
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
|
|
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
|
|
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
|
|
-e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
|
|
-e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
|
|
-e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
|
|
-e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
|
|
-e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
|
|
-e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
|
|
-e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
|
|
-e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
|
|
-e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
|
|
-e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
|
|
-e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
|
|
-e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
|
|
-e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
|
|
-e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
|
|
-e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
|
|
-e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
|
|
-e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
|
|
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
|
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
|
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
|
< $(srcdir)/sys_stat.in.h; \
|
|
} > $@-t && \
|
|
mv $@-t $@
|
|
MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
|
|
MOSTLYCLEANDIRS += sys
|
|
|
|
Include:
|
|
<sys/stat.h>
|
|
|
|
License:
|
|
LGPLv2+
|
|
|
|
Maintainer:
|
|
all
|