summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-07-27 15:16:06 +0300
committerEli Zaretskii <eliz@gnu.org>2015-07-27 15:16:06 +0300
commit70096743d5bed2c4c0221da32ebf824ad6a262c5 (patch)
tree993be5217857a47bffae2be1202f5fb7df7860b6 /nt
parent075f8d9626dca1e14ca1772d25f477e13045adf4 (diff)
downloademacs-70096743d5bed2c4c0221da32ebf824ad6a262c5.tar.gz
MS-Windows follow-up for recent TZ-related changes
* nt/mingw-cfg.site (ac_cv_header_pthread_h) (gl_cv_sys_struct_timespec_in_pthread_h): Force to "no", to avoid picking up 'struct timespec' from pthread.h, if it is installed on the user's system. We want either the definitions from MinGW system headers, if available, or the Gnulib replacements if not. * nt/inc/ms-w32.h <struct timespec>: Don't define, as we now use lib/time.h. * lib/time.in.h: Don't let __need_* symbols affect what happens on MinGW. These symbols are defined by MinGW system headers, but we don't want that to affect whether Gnulib portions of the header are or aren't used.
Diffstat (limited to 'nt')
-rw-r--r--nt/inc/ms-w32.h15
-rw-r--r--nt/mingw-cfg.site5
2 files changed, 5 insertions, 15 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index bfa5bb5e149..4fb32df0c07 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -306,21 +306,6 @@ int _getpid (void);
#include <time.h>
#define tzname _tzname
-/* 'struct timespec' is used by time-related functions in lib/ and
- elsewhere, but we don't use lib/time.h where the structure is
- defined. */
-/* MinGW64 defines 'struct timespec' and _TIMESPEC_DEFINED in sys/types.h. */
-/* Mingw.org's MinGW runtime versions 3.22 and upward define 'struct
- timespec' and __struct_timespec_defined in parts/time.h, which is
- included by time.h. */
-#if !defined (_TIMESPEC_DEFINED) && !defined (__struct_timespec_defined)
-struct timespec
-{
- time_t tv_sec; /* seconds */
- long int tv_nsec; /* nanoseconds */
-};
-#endif
-
/* Required for functions in lib/time_r.c, since we don't use lib/time.h. */
extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site
index 0be24dde12f..05034fedd48 100644
--- a/nt/mingw-cfg.site
+++ b/nt/mingw-cfg.site
@@ -35,6 +35,11 @@ ac_cv_header_getopt_h=no
# We don't want our struct timeval replaced due to Posix conformance
gl_cv_sys_struct_timeval_tv_sec=yes
+# We don't want pthread.h to be picked up just because it defines timespec
+gl_cv_sys_struct_timespec_in_pthread_h=no
+# Or at all...
+ac_cv_header_pthread_h=no
+
# ACL functions are implemented in w32.c
ac_cv_search_acl_get_file="none required"
ac_cv_func_acl_get_file=yes