emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 3f76389: Fix compilation errors with MinGW64 GCC 11


From: Eli Zaretskii
Subject: emacs-28 3f76389: Fix compilation errors with MinGW64 GCC 11
Date: Sun, 24 Oct 2021 13:20:43 -0400 (EDT)

branch: emacs-28
commit 3f763898aaafa547a2a991eed99d2694670b07e4
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix compilation errors with MinGW64 GCC 11
    
    * lib-src/ntlib.c (_GL_ATTRIBUTE_MALLOC)
    (_GL_ATTRIBUTE_DEALLOC_FREE): Define to avoid compilation errors
    with MinGW64 GCC 11.  Suggested by Andy Moreton
    <andrewjmoreton@gmail.com>.  Do not merge to master.
---
 lib-src/ntlib.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index bcbc006..ccf827c 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -20,6 +20,15 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* Temporary workaround for compilation problems with MinGW64 GCC 11.
+   The funky #ifdef's are to avoid warnings about unused macros.  */
+#define _GL_ATTRIBUTE_MALLOC
+#define _GL_ATTRIBUTE_DEALLOC_FREE
+#ifdef _GL_ATTRIBUTE_MALLOC
+#endif
+#ifdef _GL_ATTRIBUTE_DEALLOC_FREE
+#endif
+
 #include <windows.h>
 #include <stdlib.h>
 #include <stdio.h>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]