From: Bruno Haible Date: Thu, 29 Jun 2017 15:36:28 +0000 (+0200) Subject: stat, fstat: Compile stat-w32.c only on platforms that need it. X-Git-Tag: v1.0~6088 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8f706af3893cddc73f25bb7e8375fa567b3ad607;p=gnulib.git stat, fstat: Compile stat-w32.c only on platforms that need it. Suggested by Paul Eggert. * modules/stat (configure.ac): Request stat-w32.o only on native Windows. * modules/fstat (configure.ac): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 3c51e1faeb..7cce6df797 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-06-29 Bruno Haible + + stat, fstat: Compile stat-w32.c only on platforms that need it. + Suggested by Paul Eggert. + * modules/stat (configure.ac): Request stat-w32.o only on native + Windows. + * modules/fstat (configure.ac): Likewise. + 2017-06-25 Bruno Haible stat: Improve last change. diff --git a/modules/fstat b/modules/fstat index 7a62c6a72c..e498941844 100644 --- a/modules/fstat +++ b/modules/fstat @@ -19,7 +19,11 @@ configure.ac: gl_FUNC_FSTAT if test $REPLACE_FSTAT = 1; then AC_LIBOBJ([fstat]) - AC_LIBOBJ([stat-w32]) + case "$host_os" in + mingw*) + AC_LIBOBJ([stat-w32]) + ;; + esac gl_PREREQ_FSTAT fi gl_SYS_STAT_MODULE_INDICATOR([fstat]) diff --git a/modules/stat b/modules/stat index de9e7cdbb1..8d9dfd0faa 100644 --- a/modules/stat +++ b/modules/stat @@ -20,7 +20,11 @@ configure.ac: gl_FUNC_STAT if test $REPLACE_STAT = 1; then AC_LIBOBJ([stat]) - AC_LIBOBJ([stat-w32]) + case "$host_os" in + mingw*) + AC_LIBOBJ([stat-w32]) + ;; + esac gl_PREREQ_STAT fi gl_SYS_STAT_MODULE_INDICATOR([stat])