]> code.delx.au - gnu-emacs/blobdiff - nt/preprep.c
Merge from origin/emacs-25
[gnu-emacs] / nt / preprep.c
index 5a632b3875f5f81a5deb49c17ea6e04f390c2cd7..303e2ef0a0c73d8ded43486daaa432e4c3f81d2f 100644 (file)
@@ -1,5 +1,5 @@
 /* Pre-process emacs.exe for profiling by MSVC.
-   Copyright (C) 1999, 2001-201 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -25,7 +25,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 #include <stdio.h>
 #include <fcntl.h>
 #include <time.h>
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(MINGW_W64)
 #define _ANONYMOUS_UNION
 #define _ANONYMOUS_STRUCT
 #endif
@@ -288,7 +288,7 @@ relocate_offset (DWORD_PTR offset,
   ((DWORD_PTR)(rva) - (section)->VirtualAddress)
 
 #define RVA_TO_PTR(var,section,filedata) \
-  ((unsigned char *)(RVA_TO_OFFSET(var,section) + (filedata)->file_base))
+  ((void *)((unsigned char *)(RVA_TO_OFFSET(var,section) + (filedata)->file_base)))
 
 /* Convert address in executing image to RVA.  */
 #define PTR_TO_RVA(ptr) ((DWORD_PTR)(ptr) - (DWORD_PTR) GetModuleHandle (NULL))