summaryrefslogtreecommitdiff
path: root/modules/windows-stat-override
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-05-13 02:46:43 +0200
committerBruno Haible <bruno@clisp.org>2017-05-13 02:46:43 +0200
commit44fe2082cf3e604bf0b4fe7259d1edb7cce334da (patch)
tree865dcb65694f37ad20f13c290c32a77cc8dccac4 /modules/windows-stat-override
parent532f7f1eb74212b69e464ceaca943173619f7657 (diff)
downloadgnulib-44fe2082cf3e604bf0b4fe7259d1edb7cce334da.tar.gz
windows-stat-override: New module.
* lib/sys_stat.in.h (stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provide own definition. Define GNULIB_defined_struct_stat. (fstat, fstatat, lstat, stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provoke link error if this symbol is used and the corresponding module is not in use. (_stat64, _stat32i64, _stati64, _stat32, _stat64i32): Don't redefine if GNULIB_OVERRIDES_STRUCT_STAT. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_OVERRIDES_STRUCT_STAT. * modules/sys_stat (Makefile.am): Substitute GNULIB_OVERRIDES_STRUCT_STAT. * modules/windows-stat-override: New file.
Diffstat (limited to 'modules/windows-stat-override')
-rw-r--r--modules/windows-stat-override30
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/windows-stat-override b/modules/windows-stat-override
new file mode 100644
index 0000000000..027fa92760
--- /dev/null
+++ b/modules/windows-stat-override
@@ -0,0 +1,30 @@
+Description:
+On native Windows platforms, override 'struct stat'.
+
+Comment:
+This module should not be used as a dependency from a test module,
+otherwise when this module occurs as a tests-related module, it will
+have side effects on the compilation of the main modules in lib/.
+
+Files:
+
+Depends-on:
+sys_stat
+
+configure.ac:
+AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+AC_REQUIRE([AC_CANONICAL_HOST])
+case "$host_os" in
+ mingw*) GNULIB_OVERRIDES_STRUCT_STAT=1 ;;
+esac
+
+Makefile.am:
+
+Include:
+<sys/stat.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Bruno Haible