[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114661: Attempt to fix time_t related problems with
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r114661: Attempt to fix time_t related problems with MinGW 4.0 runtime. |
Date: |
Mon, 14 Oct 2013 16:25:14 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114661
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2013-10-14 19:23:10 +0300
message:
Attempt to fix time_t related problems with MinGW 4.0 runtime.
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.
added:
nt/inc/mingw_time.h mingw_time.h-20131014162255-lyp5wzyze9mlpazd-1
modified:
nt/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1545
nt/inc/ms-w32.h msw32.h-20091113204419-o5vbwnq5f7feedwu-807
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32.c w32.c-20091113204419-o5vbwnq5f7feedwu-808
src/w32proc.c w32proc.c-20091113204419-o5vbwnq5f7feedwu-814
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog 2013-10-12 13:11:14 +0000
+++ b/nt/ChangeLog 2013-10-14 16:23:10 +0000
@@ -1,3 +1,9 @@
+2013-10-14 Eli Zaretskii <address@hidden>
+
+ * inc/mingw_time.h: New file.
+
+ * inc/ms-w32.h: Include mingw_time.h instead of doing its job.
+
2013-10-12 Eli Zaretskii <address@hidden>
* inc/dirent.h (struct dirent) [__MINGW_MAJOR_VERSION >= 4]: Make
=== added file 'nt/inc/mingw_time.h'
--- a/nt/inc/mingw_time.h 1970-01-01 00:00:00 +0000
+++ b/nt/inc/mingw_time.h 2013-10-14 16:23:10 +0000
@@ -0,0 +1,32 @@
+/* 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
=== modified file 'nt/inc/ms-w32.h'
--- a/nt/inc/ms-w32.h 2013-10-12 13:11:14 +0000
+++ b/nt/inc/ms-w32.h 2013-10-14 16:23:10 +0000
@@ -24,31 +24,7 @@
#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 */
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-10-14 15:37:12 +0000
+++ b/src/ChangeLog 2013-10-14 16:23:10 +0000
@@ -1,5 +1,9 @@
2013-10-14 Eli Zaretskii <address@hidden>
+ * 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
=== modified file 'src/w32.c'
--- a/src/w32.c 2013-08-29 15:32:04 +0000
+++ b/src/w32.c 2013-10-14 16:23:10 +0000
@@ -19,6 +19,8 @@
/*
Geoff Voelker (address@hidden) 7-29-94
*/
+
+#include <mingw_time.h>
#include <stddef.h> /* for offsetof */
#include <stdlib.h>
#include <stdio.h>
=== modified file 'src/w32proc.c'
--- a/src/w32proc.c 2013-09-11 17:31:29 +0000
+++ b/src/w32proc.c 2013-10-14 16:23:10 +0000
@@ -21,6 +21,7 @@
Adapted from alarm.c by Tim Fleehart
*/
+#include <mingw_time.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114661: Attempt to fix time_t related problems with MinGW 4.0 runtime.,
Eli Zaretskii <=