2
* This file has no copyright assigned and is placed in the Public Domain.
3
* This file is part of the w64 mingw-runtime package.
4
* No warranty is given; refer to the file DISCLAIMER within this package.
7
#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
8
#define NONAMELESSUNION 1
10
#if defined(NONAMELESSSTRUCT) && \
11
!defined(NONAMELESSUNION)
12
#define NONAMELESSUNION 1
14
#if defined(NONAMELESSUNION) && \
15
!defined(NONAMELESSSTRUCT)
16
#define NONAMELESSSTRUCT 1
19
#ifndef __ANONYMOUS_DEFINED
20
#define __ANONYMOUS_DEFINED
21
#if defined(__GNUC__) || defined(__GNUG__)
22
#define _ANONYMOUS_UNION __extension__
23
#define _ANONYMOUS_STRUCT __extension__
25
#define _ANONYMOUS_UNION
26
#define _ANONYMOUS_STRUCT
28
#ifndef NONAMELESSUNION
29
#define _UNION_NAME(x)
30
#define _STRUCT_NAME(x)
31
#else /* NONAMELESSUNION */
32
#define _UNION_NAME(x) x
33
#define _STRUCT_NAME(x) x
35
#endif /* __ANONYMOUS_DEFINED */
37
#ifndef DUMMYUNIONNAME
38
# ifdef NONAMELESSUNION
39
# define DUMMYUNIONNAME u
40
# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
41
# define DUMMYUNIONNAME2 u2
42
# define DUMMYUNIONNAME3 u3
43
# define DUMMYUNIONNAME4 u4
44
# define DUMMYUNIONNAME5 u5
45
# define DUMMYUNIONNAME6 u6
46
# define DUMMYUNIONNAME7 u7
47
# define DUMMYUNIONNAME8 u8
48
# define DUMMYUNIONNAME9 u9
49
# else /* NONAMELESSUNION */
50
# define DUMMYUNIONNAME
51
# define DUMMYUNIONNAME1 /* Wine uses this variant */
52
# define DUMMYUNIONNAME2
53
# define DUMMYUNIONNAME3
54
# define DUMMYUNIONNAME4
55
# define DUMMYUNIONNAME5
56
# define DUMMYUNIONNAME6
57
# define DUMMYUNIONNAME7
58
# define DUMMYUNIONNAME8
59
# define DUMMYUNIONNAME9
61
#endif /* DUMMYUNIONNAME */
63
#if !defined(DUMMYUNIONNAME1) /* MinGW does not define this one */
64
# ifdef NONAMELESSUNION
65
# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
67
# define DUMMYUNIONNAME1 /* Wine uses this variant */
69
#endif /* DUMMYUNIONNAME1 */
71
#ifndef DUMMYSTRUCTNAME
72
# ifdef NONAMELESSUNION
73
# define DUMMYSTRUCTNAME s
74
# define DUMMYSTRUCTNAME1 s1 /* Wine uses this variant */
75
# define DUMMYSTRUCTNAME2 s2
76
# define DUMMYSTRUCTNAME3 s3
77
# define DUMMYSTRUCTNAME4 s4
78
# define DUMMYSTRUCTNAME5 s5
80
# define DUMMYSTRUCTNAME
81
# define DUMMYSTRUCTNAME1 /* Wine uses this variant */
82
# define DUMMYSTRUCTNAME2
83
# define DUMMYSTRUCTNAME3
84
# define DUMMYSTRUCTNAME4
85
# define DUMMYSTRUCTNAME5
87
#endif /* DUMMYSTRUCTNAME */
89
/* These are for compatibility with the Wine source tree */
91
#ifndef WINELIB_NAME_AW
92
# ifdef __MINGW_NAME_AW
93
# define WINELIB_NAME_AW __MINGW_NAME_AW
96
# define WINELIB_NAME_AW(func) func##W
98
# define WINELIB_NAME_AW(func) func##A
101
#endif /* WINELIB_NAME_AW */
103
#ifndef DECL_WINELIB_TYPE_AW
104
# ifdef __MINGW_TYPEDEF_AW
105
# define DECL_WINELIB_TYPE_AW __MINGW_TYPEDEF_AW
107
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
109
#endif /* DECL_WINELIB_TYPE_AW */