include/msvcrt: Guard crtdefs.h with _INC_CRTDEFS (resend).

Nicolas Le Cam niko.lecam at gmail.com
Sun Mar 11 10:08:02 CDT 2012


Fixes redefinition errors on mingw-w64:
In file included from
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/vadefs.h:13:0,
                from
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/_mingw_stdarg.h:14,
                from
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/stdarg.h:140,
                from /usr/lib/gcc/i686-w64-mingw32/4.6/include/stdarg.h:1,
                from ../../../../../src/include/msvcrt/stdio.h:14,
                from ../../../../../src/dlls/msvcp90/tests/misc.c:19:
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/_mingw.h:649:16:
error: redefinition of ‘struct localeinfo_struct’
../../../../../src/include/msvcrt/crtdefs.h:195:16: note: originally
defined here
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/_mingw.h:652:3:
error: conflicting types for ‘_locale_tstruct’
../../../../../src/include/msvcrt/crtdefs.h:199:3: note: previous
declaration of ‘_locale_tstruct’ was here
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/_mingw.h:652:20:
error: conflicting types for ‘_locale_t’
../../../../../src/include/msvcrt/crtdefs.h:199:21: note: previous
declaration of ‘_locale_t’ was here

-- 
Nicolas Le Cam
-------------- next part --------------
From 0c7b388840f45a50db932af272bfa76f70a4db2e Mon Sep 17 00:00:00 2001
From: Nicolas Le Cam <niko.lecam at gmail.com>
Date: Thu, 1 Mar 2012 22:57:20 +0100
Subject: include/msvcrt: Guard crtdefs.h with _INC_CRTDEFS.

---
 include/msvcrt/crtdefs.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/msvcrt/crtdefs.h b/include/msvcrt/crtdefs.h
index 06ce9c3..b9e9499 100644
--- a/include/msvcrt/crtdefs.h
+++ b/include/msvcrt/crtdefs.h
@@ -97,8 +97,6 @@
 # endif
 #endif
 
-#define _ARGMAX 100
-
 #ifndef _MSVCRT_LONG_DEFINED
 #define _MSVCRT_LONG_DEFINED
 /* we need 32-bit longs even on 64-bit */
@@ -106,6 +104,11 @@ typedef int __msvcrt_long;
 typedef unsigned int __msvcrt_ulong;
 #endif
 
+#ifndef _INC_CRTDEFS
+#define _INC_CRTDEFS
+
+#define _ARGMAX 100
+
 #ifndef _INTPTR_T_DEFINED
 #ifdef  _WIN64
 typedef __int64 intptr_t;
@@ -236,4 +239,6 @@ typedef struct threadlocaleinfostruct {
 #define _THREADLOCALEINFO
 #endif
 
+#endif /* _INC_CRTDEFS */
+
 #endif /* __WINE_CRTDEFS_H */
-- 
1.7.9.1


More information about the wine-patches mailing list