Release 20040914.
[wine/gsoc-2012-control.git] / include / poppack.h
blobef751a9fe1f1b07f99325b37e1a8f6b53f7326af
1 /*
2 * Copyright (C) 1999 Patrik Stridvall
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.
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.
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
19 #if defined(__WINE_PSHPACK_H3)
20 # ifndef __WINE_INTERNAL_POPPACK
21 # undef __WINE_PSHPACK_H3
22 # endif
23 /* Depth == 3 */
25 # 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)
33 # endif
35 #elif defined(__WINE_PSHPACK_H2)
36 # ifndef __WINE_INTERNAL_POPPACK
37 # undef __WINE_PSHPACK_H2
38 # endif
39 /* Depth == 2 */
41 # 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)
49 # endif
51 #elif defined(__WINE_PSHPACK_H)
52 # ifndef __WINE_INTERNAL_POPPACK
53 # undef __WINE_PSHPACK_H
54 # endif
55 /* Depth == 1 */
57 # if defined(__SUNPRO_CC)
58 # warning "Assuming a default alignment of 4"
59 # pragma pack(4)
60 # else
61 # pragma pack()
62 # endif
64 #else
65 /* Depth == 0 ! */
67 #error "Popping alignment isn't possible since no alignment has been pushed"
69 #endif
71 #undef __WINE_INTERNAL_POPPACK