Merge from gnulib
This incorporates: 2017-05-14 same-inode: Adapt for windows-stat-inodes 2017-05-14 windows-stat-inodes: New module 2017-05-14 stat-time: Adapt for windows-stat-timespec * lib/gnulib.mk.in: Regenerate. * lib/stat-time.h, lib/sys_types.in.h, m4/sys_types_h.m4: Copy from gnulib.
This commit is contained in:
parent
792ffa0223
commit
10037e4be2
4 changed files with 57 additions and 1 deletions
|
@ -838,6 +838,7 @@ WERROR_CFLAGS = @WERROR_CFLAGS@
|
|||
WIDGET_OBJ = @WIDGET_OBJ@
|
||||
WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
|
||||
WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
|
||||
WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
|
||||
WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@
|
||||
WINDOW_SYSTEM_OBJ = @WINDOW_SYSTEM_OBJ@
|
||||
WINDRES = @WINDRES@
|
||||
|
@ -2693,6 +2694,7 @@ sys/types.h: sys_types.in.h $(top_builddir)/config.status
|
|||
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
|
||||
-e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
|
||||
-e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
|
||||
-e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
|
||||
< $(srcdir)/sys_types.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
|
|
@ -170,8 +170,12 @@ get_stat_birthtime (struct stat const *st)
|
|||
/* Native Windows platforms (but not Cygwin) put the "file creation
|
||||
time" in st_ctime (!). See
|
||||
<https://msdn.microsoft.com/en-us/library/14h5k7ff(VS.80).aspx>. */
|
||||
# if _GL_WINDOWS_STAT_TIMESPEC
|
||||
t = st->st_ctim;
|
||||
# else
|
||||
t.tv_sec = st->st_ctime;
|
||||
t.tv_nsec = 0;
|
||||
# endif
|
||||
#else
|
||||
/* Birth time is not supported. */
|
||||
t.tv_sec = -1;
|
||||
|
|
|
@ -42,6 +42,48 @@
|
|||
# define _GL_WINDOWS_64_BIT_OFF_T 1
|
||||
#endif
|
||||
|
||||
/* Override dev_t and ino_t if distinguishable inodes support is requested
|
||||
on native Windows. */
|
||||
#if @WINDOWS_STAT_INODES@
|
||||
|
||||
# if @WINDOWS_STAT_INODES@ == 2
|
||||
/* Experimental, not useful in Windows 10. */
|
||||
|
||||
/* Define dev_t to a 64-bit type. */
|
||||
# if !defined GNULIB_defined_dev_t
|
||||
typedef unsigned long long int rpl_dev_t;
|
||||
# undef dev_t
|
||||
# define dev_t rpl_dev_t
|
||||
# define GNULIB_defined_dev_t 1
|
||||
# endif
|
||||
|
||||
/* Define ino_t to a 128-bit type. */
|
||||
# if !defined GNULIB_defined_ino_t
|
||||
/* MSVC does not have a 128-bit integer type.
|
||||
GCC has a 128-bit integer type __int128, but only on 64-bit targets. */
|
||||
typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t;
|
||||
# undef ino_t
|
||||
# define ino_t rpl_ino_t
|
||||
# define GNULIB_defined_ino_t 1
|
||||
# endif
|
||||
|
||||
# else /* @WINDOWS_STAT_INODES@ == 1 */
|
||||
|
||||
/* Define ino_t to a 64-bit type. */
|
||||
# if !defined GNULIB_defined_ino_t
|
||||
typedef unsigned long long int rpl_ino_t;
|
||||
# undef ino_t
|
||||
# define ino_t rpl_ino_t
|
||||
# define GNULIB_defined_ino_t 1
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
/* Indicator, for gnulib internal purposes. */
|
||||
# define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@
|
||||
|
||||
#endif
|
||||
|
||||
/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */
|
||||
/* But avoid namespace pollution on glibc systems. */
|
||||
#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# sys_types_h.m4 serial 6
|
||||
# sys_types_h.m4 serial 7
|
||||
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -17,6 +17,14 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
|
|||
|
||||
dnl Whether to override the 'off_t' type.
|
||||
AC_REQUIRE([gl_TYPE_OFF_T])
|
||||
|
||||
dnl Whether to override the 'dev_t' and 'ino_t' types.
|
||||
m4_ifdef([gl_WINDOWS_STAT_INODES], [
|
||||
AC_REQUIRE([gl_WINDOWS_STAT_INODES])
|
||||
], [
|
||||
WINDOWS_STAT_INODES=0
|
||||
])
|
||||
AC_SUBST([WINDOWS_STAT_INODES])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
|
||||
|
|
Loading…
Add table
Reference in a new issue