>From aaf33358e79e0210f2e8dab17fd8a33ac97383b9 Mon Sep 17 00:00:00 2001
From: Paul Eggert
Date: Mon, 29 Apr 2019 12:27:04 -0700
Subject: [PATCH] Disable __attribute__ ((cold)) on MinGW
* src/conf_post.h (ATTRIBUTE_COLD) [__MINGW32__]:
Define to empty on this platform.
---
src/conf_post.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/conf_post.h b/src/conf_post.h
index 7699d2c95b..4af1ba9331 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -59,7 +59,7 @@ along with GNU Emacs. If not, see . */
into the same 1-, 2-, or 4-byte allocation unit in the MinGW
builds. It was also needed to port to pre-C99 compilers, although
we don't care about that any more. */
-#if NS_IMPL_GNUSTEP || defined(__MINGW32__)
+#if NS_IMPL_GNUSTEP || defined __MINGW32__
typedef unsigned int bool_bf;
#else
typedef bool bool_bf;
@@ -225,7 +225,9 @@ extern void _DebPrint (const char *fmt, ...);
extern char *emacs_getenv_TZ (void);
extern int emacs_setenv_TZ (char const *);
-#if __has_attribute (cold)
+/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
+ . */
+#if __has_attribute (cold) && !defined __MINGW32__
# define ATTRIBUTE_COLD __attribute__ ((cold))
#else
# define ATTRIBUTE_COLD
--
2.20.1