nt/inc/mingw_time.h: New file.
nt/inc/ms-w32.h: Include mingw_time.h instead of doing its job.
src/w32proc.c: Include mingw_time.h.
src/w32.c: Include mingw_time.h.
+2013-10-14 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/mingw_time.h: New file.
+
+ * inc/ms-w32.h: Include mingw_time.h instead of doing its job.
+
2013-10-12 Eli Zaretskii <eliz@gnu.org>
* inc/dirent.h (struct dirent) [__MINGW_MAJOR_VERSION >= 4]: Make
--- /dev/null
+/* Fix issues related to MinGW 4.x handling of time data types. */
+
+#ifndef _MINGW_TIME_H
+#define _MINGW_TIME_H
+
+/* The @#$%^&! MinGW developers stopped updating the values of
+ __MINGW32_VERSION, __MINGW32_MAJOR_VERSION, and
+ __MINGW32_MINOR_VERSION values in v4.x of the runtime, to
+ "discourage its uses". So the values of those macros can no longer
+ be trusted, and we need the workaround below, to have a single set
+ of macros we can trust. (The .17 minor version is arbitrary.) */
+#ifdef __MINGW32__
+#include <_mingw.h>
+#endif
+/* MinGW64 doesn't have this problem, and does not define
+ __MINGW_VERSION. */
+#ifndef __MINGW64_VERSION_MAJOR
+# ifndef __MINGW_VERSION
+# define __MINGW_VERSION 3.17
+# undef __MINGW_MAJOR_VERSION
+# define __MINGW_MAJOR_VERSION 3
+# undef __MINGW_MINOR_VERSION
+# define __MINGW_MINOR_VERSION 17
+# undef __MINGW_PATCHLEVEL
+# define __MINGW_PATCHLEVEL 0
+# endif
+#endif
+#if __MINGW_MAJOR_VERSION >= 4
+# define _USE_32BIT_TIME_T
+#endif
+
+#endif
#define WINDOWSNT
#endif
-/* The @#$%^&! MinGW developers stopped updating the values of
- __MINGW32_VERSION, __MINGW32_MAJOR_VERSION, and
- __MINGW32_MINOR_VERSION values in v4.x of the runtime, to
- "discourage its uses". So the values of those macros can no longer
- be trusted, and we need the workaround below, to have a single set
- of macros we can trust. (The .17 minor version is arbitrary.) */
-#ifdef __MINGW32__
-#include <_mingw.h>
-#endif
-/* MinGW64 doesn't have this problem, and does not define
- __MINGW_VERSION. */
-#ifndef __MINGW64_VERSION_MAJOR
-# ifndef __MINGW_VERSION
-# define __MINGW_VERSION 3.17
-# undef __MINGW_MAJOR_VERSION
-# define __MINGW_MAJOR_VERSION 3
-# undef __MINGW_MINOR_VERSION
-# define __MINGW_MINOR_VERSION 17
-# undef __MINGW_PATCHLEVEL
-# define __MINGW_PATCHLEVEL 0
-# endif
-#endif
-#if __MINGW_MAJOR_VERSION >= 4
-# define _USE_32BIT_TIME_T
-#endif
+#include <mingw_time.h>
/* #undef const */
2013-10-14 Eli Zaretskii <eliz@gnu.org>
+ * w32proc.c: Include mingw_time.h.
+
+ * w32.c: Include mingw_time.h.
+
Implement scrolling of TTY menus when the screen is too short.
* term.c (tty_menu_display): Accept an additional argument, the
/*
Geoff Voelker (voelker@cs.washington.edu) 7-29-94
*/
+
+#include <mingw_time.h>
#include <stddef.h> /* for offsetof */
#include <stdlib.h>
#include <stdio.h>
Adapted from alarm.c by Tim Fleehart
*/
+#include <mingw_time.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>