1 | /*
|
---|
2 | * Copyright (C) 1999 Patrik Stridvall
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #if defined(__WINE_PSHPACK_H15)
|
---|
29 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
30 | # undef __WINE_PSHPACK_H15
|
---|
31 | # endif
|
---|
32 | /* Depth == 15 */
|
---|
33 |
|
---|
34 | # if __WINE_PSHPACK_H14 == 1
|
---|
35 | # pragma pack(1)
|
---|
36 | # elif __WINE_PSHPACK_H14 == 2
|
---|
37 | # pragma pack(2)
|
---|
38 | # elif __WINE_PSHPACK_H14 == 8
|
---|
39 | # pragma pack(8)
|
---|
40 | # else
|
---|
41 | # pragma pack(4)
|
---|
42 | # endif
|
---|
43 |
|
---|
44 | #elif defined(__WINE_PSHPACK_H14)
|
---|
45 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
46 | # undef __WINE_PSHPACK_H14
|
---|
47 | # endif
|
---|
48 | /* Depth == 14 */
|
---|
49 |
|
---|
50 | # if __WINE_PSHPACK_H13 == 1
|
---|
51 | # pragma pack(1)
|
---|
52 | # elif __WINE_PSHPACK_H13 == 2
|
---|
53 | # pragma pack(2)
|
---|
54 | # elif __WINE_PSHPACK_H13 == 8
|
---|
55 | # pragma pack(8)
|
---|
56 | # else
|
---|
57 | # pragma pack(4)
|
---|
58 | # endif
|
---|
59 |
|
---|
60 | #elif defined(__WINE_PSHPACK_H13)
|
---|
61 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
62 | # undef __WINE_PSHPACK_H13
|
---|
63 | # endif
|
---|
64 | /* Depth == 13 */
|
---|
65 |
|
---|
66 | # if __WINE_PSHPACK_H12 == 1
|
---|
67 | # pragma pack(1)
|
---|
68 | # elif __WINE_PSHPACK_H12 == 2
|
---|
69 | # pragma pack(2)
|
---|
70 | # elif __WINE_PSHPACK_H12 == 8
|
---|
71 | # pragma pack(8)
|
---|
72 | # else
|
---|
73 | # pragma pack(4)
|
---|
74 | # endif
|
---|
75 |
|
---|
76 | #elif defined(__WINE_PSHPACK_H12)
|
---|
77 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
78 | # undef __WINE_PSHPACK_H12
|
---|
79 | # endif
|
---|
80 | /* Depth == 12 */
|
---|
81 |
|
---|
82 | # if __WINE_PSHPACK_H11 == 1
|
---|
83 | # pragma pack(1)
|
---|
84 | # elif __WINE_PSHPACK_H11 == 2
|
---|
85 | # pragma pack(2)
|
---|
86 | # elif __WINE_PSHPACK_H11 == 8
|
---|
87 | # pragma pack(8)
|
---|
88 | # else
|
---|
89 | # pragma pack(4)
|
---|
90 | # endif
|
---|
91 |
|
---|
92 | #elif defined(__WINE_PSHPACK_H11)
|
---|
93 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
94 | # undef __WINE_PSHPACK_H11
|
---|
95 | # endif
|
---|
96 | /* Depth == 11 */
|
---|
97 |
|
---|
98 | # if __WINE_PSHPACK_H10 == 1
|
---|
99 | # pragma pack(1)
|
---|
100 | # elif __WINE_PSHPACK_H10 == 2
|
---|
101 | # pragma pack(2)
|
---|
102 | # elif __WINE_PSHPACK_H10 == 8
|
---|
103 | # pragma pack(8)
|
---|
104 | # else
|
---|
105 | # pragma pack(4)
|
---|
106 | # endif
|
---|
107 |
|
---|
108 | #elif defined(__WINE_PSHPACK_H10)
|
---|
109 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
110 | # undef __WINE_PSHPACK_H10
|
---|
111 | # endif
|
---|
112 | /* Depth == 10 */
|
---|
113 |
|
---|
114 | # if __WINE_PSHPACK_H9 == 1
|
---|
115 | # pragma pack(1)
|
---|
116 | # elif __WINE_PSHPACK_H9 == 2
|
---|
117 | # pragma pack(2)
|
---|
118 | # elif __WINE_PSHPACK_H9 == 8
|
---|
119 | # pragma pack(8)
|
---|
120 | # else
|
---|
121 | # pragma pack(4)
|
---|
122 | # endif
|
---|
123 |
|
---|
124 | #elif defined(__WINE_PSHPACK_H9)
|
---|
125 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
126 | # undef __WINE_PSHPACK_H9
|
---|
127 | # endif
|
---|
128 | /* Depth == 9 */
|
---|
129 |
|
---|
130 | # if __WINE_PSHPACK_H8 == 1
|
---|
131 | # pragma pack(1)
|
---|
132 | # elif __WINE_PSHPACK_H8 == 2
|
---|
133 | # pragma pack(2)
|
---|
134 | # elif __WINE_PSHPACK_H8 == 8
|
---|
135 | # pragma pack(8)
|
---|
136 | # else
|
---|
137 | # pragma pack(4)
|
---|
138 | # endif
|
---|
139 |
|
---|
140 | #elif defined(__WINE_PSHPACK_H8)
|
---|
141 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
142 | # undef __WINE_PSHPACK_H8
|
---|
143 | # endif
|
---|
144 | /* Depth == 8 */
|
---|
145 |
|
---|
146 | # if __WINE_PSHPACK_H7 == 1
|
---|
147 | # pragma pack(1)
|
---|
148 | # elif __WINE_PSHPACK_H7 == 2
|
---|
149 | # pragma pack(2)
|
---|
150 | # elif __WINE_PSHPACK_H7 == 8
|
---|
151 | # pragma pack(8)
|
---|
152 | # else
|
---|
153 | # pragma pack(4)
|
---|
154 | # endif
|
---|
155 |
|
---|
156 | #elif defined(__WINE_PSHPACK_H7)
|
---|
157 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
158 | # undef __WINE_PSHPACK_H7
|
---|
159 | # endif
|
---|
160 | /* Depth == 7 */
|
---|
161 |
|
---|
162 | # if __WINE_PSHPACK_H6 == 1
|
---|
163 | # pragma pack(1)
|
---|
164 | # elif __WINE_PSHPACK_H6 == 2
|
---|
165 | # pragma pack(2)
|
---|
166 | # elif __WINE_PSHPACK_H6 == 8
|
---|
167 | # pragma pack(8)
|
---|
168 | # else
|
---|
169 | # pragma pack(4)
|
---|
170 | # endif
|
---|
171 |
|
---|
172 | #elif defined(__WINE_PSHPACK_H6)
|
---|
173 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
174 | # undef __WINE_PSHPACK_H6
|
---|
175 | # endif
|
---|
176 | /* Depth == 6 */
|
---|
177 |
|
---|
178 | # if __WINE_PSHPACK_H5 == 1
|
---|
179 | # pragma pack(1)
|
---|
180 | # elif __WINE_PSHPACK_H5 == 2
|
---|
181 | # pragma pack(2)
|
---|
182 | # elif __WINE_PSHPACK_H5 == 8
|
---|
183 | # pragma pack(8)
|
---|
184 | # else
|
---|
185 | # pragma pack(4)
|
---|
186 | # endif
|
---|
187 |
|
---|
188 | #elif defined(__WINE_PSHPACK_H5)
|
---|
189 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
190 | # undef __WINE_PSHPACK_H5
|
---|
191 | # endif
|
---|
192 | /* Depth == 5 */
|
---|
193 |
|
---|
194 | # if __WINE_PSHPACK_H4 == 1
|
---|
195 | # pragma pack(1)
|
---|
196 | # elif __WINE_PSHPACK_H4 == 2
|
---|
197 | # pragma pack(2)
|
---|
198 | # elif __WINE_PSHPACK_H4 == 8
|
---|
199 | # pragma pack(8)
|
---|
200 | # else
|
---|
201 | # pragma pack(4)
|
---|
202 | # endif
|
---|
203 |
|
---|
204 | #elif defined(__WINE_PSHPACK_H4)
|
---|
205 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
206 | # undef __WINE_PSHPACK_H4
|
---|
207 | # endif
|
---|
208 | /* Depth == 4 */
|
---|
209 |
|
---|
210 | # if __WINE_PSHPACK_H3 == 1
|
---|
211 | # pragma pack(1)
|
---|
212 | # elif __WINE_PSHPACK_H3 == 2
|
---|
213 | # pragma pack(2)
|
---|
214 | # elif __WINE_PSHPACK_H3 == 8
|
---|
215 | # pragma pack(8)
|
---|
216 | # else
|
---|
217 | # pragma pack(4)
|
---|
218 | # endif
|
---|
219 |
|
---|
220 | #elif defined(__WINE_PSHPACK_H3)
|
---|
221 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
222 | # undef __WINE_PSHPACK_H3
|
---|
223 | # endif
|
---|
224 | /* Depth == 3 */
|
---|
225 |
|
---|
226 | # if __WINE_PSHPACK_H2 == 1
|
---|
227 | # pragma pack(1)
|
---|
228 | # elif __WINE_PSHPACK_H2 == 2
|
---|
229 | # pragma pack(2)
|
---|
230 | # elif __WINE_PSHPACK_H2 == 8
|
---|
231 | # pragma pack(8)
|
---|
232 | # else
|
---|
233 | # pragma pack(4)
|
---|
234 | # endif
|
---|
235 |
|
---|
236 | #elif defined(__WINE_PSHPACK_H2)
|
---|
237 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
238 | # undef __WINE_PSHPACK_H2
|
---|
239 | # endif
|
---|
240 | /* Depth == 2 */
|
---|
241 |
|
---|
242 | # if __WINE_PSHPACK_H == 1
|
---|
243 | # pragma pack(1)
|
---|
244 | # elif __WINE_PSHPACK_H == 2
|
---|
245 | # pragma pack(2)
|
---|
246 | # elif __WINE_PSHPACK_H == 8
|
---|
247 | # pragma pack(8)
|
---|
248 | # else
|
---|
249 | # pragma pack(4)
|
---|
250 | # endif
|
---|
251 |
|
---|
252 | #elif defined(__WINE_PSHPACK_H)
|
---|
253 | # ifndef __WINE_INTERNAL_POPPACK
|
---|
254 | # undef __WINE_PSHPACK_H
|
---|
255 | # endif
|
---|
256 | /* Depth == 1 */
|
---|
257 |
|
---|
258 | # if defined(__SUNPRO_CC)
|
---|
259 | # warning "Assuming a default alignment of 4"
|
---|
260 | # pragma pack(4)
|
---|
261 | # else
|
---|
262 | # pragma pack()
|
---|
263 | # endif
|
---|
264 |
|
---|
265 | #else
|
---|
266 | /* Depth == 0 ! */
|
---|
267 |
|
---|
268 | #error "Popping alignment isn't possible since no alignment has been pushed"
|
---|
269 |
|
---|
270 | #endif
|
---|
271 |
|
---|
272 | #undef __WINE_INTERNAL_POPPACK
|
---|