blob: ef751a9fe1f1b07f99325b37e1a8f6b53f7326af [file] [log] [blame]
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00001/*
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
Francois Gouget23a5b792000-10-19 20:20:07 +000019#if defined(__WINE_PSHPACK_H3)
20# ifndef __WINE_INTERNAL_POPPACK
21# undef __WINE_PSHPACK_H3
22# endif
23/* Depth == 3 */
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +000024
Dimitrie O. Paun41d75182003-09-11 23:08:58 +000025# if __WINE_PSHPACK_H2 == 1
26# pragma pack(1)
27# elif __WINE_PSHPACK_H2 == 2
28# pragma pack(2)
29# elif __WINE_PSHPACK_H2 == 8
30# pragma pack(8)
31# else
32# pragma pack(4)
Francois Gouget23a5b792000-10-19 20:20:07 +000033# endif
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +000034
Francois Gouget23a5b792000-10-19 20:20:07 +000035#elif defined(__WINE_PSHPACK_H2)
36# ifndef __WINE_INTERNAL_POPPACK
37# undef __WINE_PSHPACK_H2
38# endif
39/* Depth == 2 */
40
Dimitrie O. Paun41d75182003-09-11 23:08:58 +000041# if __WINE_PSHPACK_H == 1
42# pragma pack(1)
43# elif __WINE_PSHPACK_H == 2
44# pragma pack(2)
45# elif __WINE_PSHPACK_H == 8
46# pragma pack(8)
47# else
48# pragma pack(4)
Francois Gouget23a5b792000-10-19 20:20:07 +000049# endif
50
51#elif defined(__WINE_PSHPACK_H)
52# ifndef __WINE_INTERNAL_POPPACK
53# undef __WINE_PSHPACK_H
54# endif
55/* Depth == 1 */
56
Dimitrie O. Paun41d75182003-09-11 23:08:58 +000057# if defined(__SUNPRO_CC)
Francois Gouget23a5b792000-10-19 20:20:07 +000058# warning "Assuming a default alignment of 4"
59# pragma pack(4)
Dimitrie O. Paun41d75182003-09-11 23:08:58 +000060# else
61# pragma pack()
Francois Gouget23a5b792000-10-19 20:20:07 +000062# endif
63
64#else
65/* Depth == 0 ! */
66
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +000067#error "Popping alignment isn't possible since no alignment has been pushed"
Francois Gouget23a5b792000-10-19 20:20:07 +000068
69#endif
70
71#undef __WINE_INTERNAL_POPPACK