winnt.h: Use Common macro for __C89_NAMELESSUNION and __C89_NAMELESSSTRUCT.

This commit is contained in:
Jacek Caban 2011-01-12 23:25:03 +01:00 committed by Alexandre Julliard
parent b1d9b7ee2a
commit 42874c62a7
2 changed files with 14 additions and 30 deletions

View File

@ -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;

View File

@ -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 */