aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-07-27 15:16:06 +0300
committerEli Zaretskii2015-07-27 15:16:06 +0300
commit70096743d5bed2c4c0221da32ebf824ad6a262c5 (patch)
tree993be5217857a47bffae2be1202f5fb7df7860b6
parent075f8d9626dca1e14ca1772d25f477e13045adf4 (diff)
downloademacs-70096743d5bed2c4c0221da32ebf824ad6a262c5.tar.gz
emacs-70096743d5bed2c4c0221da32ebf824ad6a262c5.zip
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.
-rw-r--r--lib/time.in.h8
-rw-r--r--nt/inc/ms-w32.h15
-rw-r--r--nt/mingw-cfg.site5
3 files changed, 10 insertions, 18 deletions
diff --git a/lib/time.in.h b/lib/time.in.h
index a983f498e51..1adfe925398 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -24,9 +24,11 @@
24 declare a few standard symbols, rather than to declare all the 24 declare a few standard symbols, rather than to declare all the
25 symbols. Also, Solaris 8 <time.h> eventually includes itself 25 symbols. Also, Solaris 8 <time.h> eventually includes itself
26 recursively; if that is happening, just include the system <time.h> 26 recursively; if that is happening, just include the system <time.h>
27 without adding our own declarations. */ 27 without adding our own declarations. MinGW system headers use
28#if (defined __need_time_t || defined __need_clock_t \ 28 these symbols as well, but we don't want to exclude MinGW from the
29 || defined __need_timespec \ 29 'else' branch below. */
30#if (((defined __need_time_t || defined __need_clock_t \
31 || defined __need_timespec) && !defined __MINGW32__) \
30 || defined _@GUARD_PREFIX@_TIME_H) 32 || defined _@GUARD_PREFIX@_TIME_H)
31 33
32# @INCLUDE_NEXT@ @NEXT_TIME_H@ 34# @INCLUDE_NEXT@ @NEXT_TIME_H@
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);
306#include <time.h> 306#include <time.h>
307#define tzname _tzname 307#define tzname _tzname
308 308
309/* 'struct timespec' is used by time-related functions in lib/ and
310 elsewhere, but we don't use lib/time.h where the structure is
311 defined. */
312/* MinGW64 defines 'struct timespec' and _TIMESPEC_DEFINED in sys/types.h. */
313/* Mingw.org's MinGW runtime versions 3.22 and upward define 'struct
314 timespec' and __struct_timespec_defined in parts/time.h, which is
315 included by time.h. */
316#if !defined (_TIMESPEC_DEFINED) && !defined (__struct_timespec_defined)
317struct timespec
318{
319 time_t tv_sec; /* seconds */
320 long int tv_nsec; /* nanoseconds */
321};
322#endif
323
324/* Required for functions in lib/time_r.c, since we don't use lib/time.h. */ 309/* Required for functions in lib/time_r.c, since we don't use lib/time.h. */
325extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict); 310extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
326extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict); 311extern 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
35# We don't want our struct timeval replaced due to Posix conformance 35# We don't want our struct timeval replaced due to Posix conformance
36gl_cv_sys_struct_timeval_tv_sec=yes 36gl_cv_sys_struct_timeval_tv_sec=yes
37 37
38# We don't want pthread.h to be picked up just because it defines timespec
39gl_cv_sys_struct_timespec_in_pthread_h=no
40# Or at all...
41ac_cv_header_pthread_h=no
42
38# ACL functions are implemented in w32.c 43# ACL functions are implemented in w32.c
39ac_cv_search_acl_get_file="none required" 44ac_cv_search_acl_get_file="none required"
40ac_cv_func_acl_get_file=yes 45ac_cv_func_acl_get_file=yes