From 8f706af3893cddc73f25bb7e8375fa567b3ad607 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 29 Jun 2017 17:36:28 +0200 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ modules/fstat | 6 +++++- modules/stat | 6 +++++- 3 files changed, 18 insertions(+), 2 deletions(-) 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]) -- 2.39.5