Module: wine Branch: master Commit: 42874c62a79a10aa00e8f7f3bfa4d9e39cb87c38 URL: http://source.winehq.org/git/wine.git/?a=commit;h=42874c62a79a10aa00e8f7f3bf...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Jan 12 23:25:03 2011 +0100
winnt.h: Use Common macro for __C89_NAMELESSUNION and __C89_NAMELESSSTRUCT.
---
include/winineti.h | 8 ++++---- include/winnt.h | 36 ++++++++++-------------------------- 2 files changed, 14 insertions(+), 30 deletions(-)
diff --git a/include/winineti.h b/include/winineti.h index 4f86db6..f1eb880 100644 --- a/include/winineti.h +++ b/include/winineti.h @@ -46,9 +46,9 @@ typedef struct _INTERNET_CACHE_CONFIG_INFOA BOOL fPerUser; DWORD dwSyncMode; DWORD dwNumCachePaths; - __C89_NAMELESSUNION union + __C89_NAMELESS union { - __C89_NAMELESSSTRUCT struct + __C89_NAMELESS struct { CHAR CachePath[MAX_PATH]; DWORD dwCacheSize; @@ -68,9 +68,9 @@ typedef struct _INTERNET_CACHE_CONFIG_INFOW BOOL fPerUser; DWORD dwSyncMode; DWORD dwNumCachePaths; - __C89_NAMELESSUNION union + __C89_NAMELESS union { - __C89_NAMELESSSTRUCT struct + __C89_NAMELESS struct { WCHAR CachePath[MAX_PATH]; DWORD dwCacheSize; diff --git a/include/winnt.h b/include/winnt.h index 6cd97bc..d3df022 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -230,42 +230,26 @@ extern "C" { #define DUMMYUNIONNAME8 u8 #endif /* !defined(NONAMELESSUNION) */
-#ifndef __C89_NAMELESSSTRUCT +#ifndef __C89_NAMELESS # if !defined(__WINESRC__) && !defined(WINE_NO_NAMELESS_EXTENSION) # ifdef __GNUC__ /* Anonymous structs support starts with gcc 2.96/g++ 2.95 */ # if (__GNUC__ > 2) || ((__GNUC__ == 2) && ((__GNUC_MINOR__ > 95) || ((__GNUC_MINOR__ == 95) && defined(__cplusplus)))) -# define __C89_NAMELESSSTRUCT __extension__ +# define __C89_NAMELESS __extension__ # endif # elif defined(_MSC_VER) -# define __C89_NAMELESSSTRUCT +# define __C89_NAMELESS # endif # endif -# ifdef __C89_NAMELESSSTRUCT -# define __C89_NAMELESSSTRUCTNAME -# else -# define __C89_NAMELESSSTRUCT -# define __C89_NAMELESSSTRUCTNAME DUMMYSTRUCTNAME -# endif #endif
-#ifndef __C89_NAMELESSUNION -# if !defined(__WINESRC__) && !defined(WINE_NO_NAMELESS_EXTENSION) -# ifdef __GNUC__ - /* Anonymous unions support starts with gcc 2.96/g++ 2.95 */ -# if (__GNUC__ > 2) || ((__GNUC__ == 2) && ((__GNUC_MINOR__ > 95) || ((__GNUC_MINOR__ == 95) && defined(__cplusplus)))) -# define __C89_NAMELESSUNION __extension__ -# endif -# elif defined(_MSC_VER) -# define __C89_NAMELESSUNION -# endif -# endif -# ifdef __C89_NAMELESSUNION -# define __C89_NAMELESSUNIONNAME -# else -# define __C89_NAMELESSUNION -# define __C89_NAMELESSUNIONNAME DUMMYUNIONNAME -# endif +#ifdef __C89_NAMELESS +# define __C89_NAMELESSSTRUCTNAME +# define __C89_NAMELESSUNIONNAME +#else +# define __C89_NAMELESS +# define __C89_NAMELESSSTRUCTNAME DUMMYSTRUCTNAME +# define __C89_NAMELESSUNIONNAME DUMMYUNIONNAME #endif
/* C99 restrict support */