• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
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.
5  */
6 
7 #if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
8 #define NONAMELESSUNION		1
9 #endif
10 #if defined(NONAMELESSSTRUCT) && \
11    !defined(NONAMELESSUNION)
12 #define NONAMELESSUNION		1
13 #endif
14 #if defined(NONAMELESSUNION)  && \
15    !defined(NONAMELESSSTRUCT)
16 #define NONAMELESSSTRUCT	1
17 #endif
18 
19 #ifndef __ANONYMOUS_DEFINED
20 #define __ANONYMOUS_DEFINED
21 #if defined(__GNUC__) || defined(__GNUG__)
22 #define _ANONYMOUS_UNION	__extension__
23 #define _ANONYMOUS_STRUCT	__extension__
24 #else
25 #define _ANONYMOUS_UNION
26 #define _ANONYMOUS_STRUCT
27 #endif
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
34 #endif
35 #endif	/* __ANONYMOUS_DEFINED */
36 
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
60 # endif
61 #endif	/* DUMMYUNIONNAME */
62 
63 #if !defined(DUMMYUNIONNAME1)	/* MinGW does not define this one */
64 # ifdef NONAMELESSUNION
65 #  define DUMMYUNIONNAME1 u1	/* Wine uses this variant */
66 # else
67 #  define DUMMYUNIONNAME1	/* Wine uses this variant */
68 # endif
69 #endif	/* DUMMYUNIONNAME1 */
70 
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
79 # else
80 #  define DUMMYSTRUCTNAME
81 #  define DUMMYSTRUCTNAME1	/* Wine uses this variant */
82 #  define DUMMYSTRUCTNAME2
83 #  define DUMMYSTRUCTNAME3
84 #  define DUMMYSTRUCTNAME4
85 #  define DUMMYSTRUCTNAME5
86 # endif
87 #endif /* DUMMYSTRUCTNAME */
88 
89 /* These are for compatibility with the Wine source tree */
90 
91 #ifndef WINELIB_NAME_AW
92 # ifdef __MINGW_NAME_AW
93 #   define WINELIB_NAME_AW  __MINGW_NAME_AW
94 # else
95 #  ifdef UNICODE
96 #   define WINELIB_NAME_AW(func) func##W
97 #  else
98 #   define WINELIB_NAME_AW(func) func##A
99 #  endif
100 # endif
101 #endif	/* WINELIB_NAME_AW */
102 
103 #ifndef DECL_WINELIB_TYPE_AW
104 # ifdef __MINGW_TYPEDEF_AW
105 #  define DECL_WINELIB_TYPE_AW  __MINGW_TYPEDEF_AW
106 # else
107 #  define DECL_WINELIB_TYPE_AW(type)  typedef WINELIB_NAME_AW(type) type;
108 # endif
109 #endif	/* DECL_WINELIB_TYPE_AW */
110 
111