view modules/windows-stat-override @ 18896:fe52e3ff1e84

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.
author Bruno Haible <bruno@clisp.org>
date Sat, 13 May 2017 02:46:43 +0200
parents
children
line wrap: on
line source

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