blob: 67c278f0c1d3e92ce8c16376f51717bb4a283ae7 [file] [log] [blame]
Francois Gouget23a5b792000-10-19 20:20:07 +00001#if defined(__WINE_PSHPACK_H3)
2# ifndef __WINE_INTERNAL_POPPACK
3# undef __WINE_PSHPACK_H3
4# endif
5/* Depth == 3 */
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +00006
Francois Gouget23a5b792000-10-19 20:20:07 +00007# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
8# if __WINE_PSHPACK_H2 == 1
9# pragma pack(1)
10# elif __WINE_PSHPACK_H2 == 2
11# pragma pack(2)
12# elif __WINE_PSHPACK_H2 == 8
13# pragma pack(8)
14# else
15# pragma pack(4)
16# endif
17# elif !defined(RC_INVOKED)
18# error "Adjusting the alignment is not supported with this compiler"
19# endif
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +000020
Francois Gouget23a5b792000-10-19 20:20:07 +000021#elif defined(__WINE_PSHPACK_H2)
22# ifndef __WINE_INTERNAL_POPPACK
23# undef __WINE_PSHPACK_H2
24# endif
25/* Depth == 2 */
26
27# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
28# if __WINE_PSHPACK_H == 1
29# pragma pack(1)
30# elif __WINE_PSHPACK_H == 2
31# pragma pack(2)
32# elif __WINE_PSHPACK_H == 8
33# pragma pack(8)
34# else
35# pragma pack(4)
36# endif
37# elif !defined(RC_INVOKED)
38# error "Adjusting the alignment is not supported with this compiler"
39# endif
40
41#elif defined(__WINE_PSHPACK_H)
42# ifndef __WINE_INTERNAL_POPPACK
43# undef __WINE_PSHPACK_H
44# endif
45/* Depth == 1 */
46
47# if defined(__GNUC__) || defined(__SUNPRO_C)
48# pragma pack()
49# elif defined(__SUNPRO_CC)
50# warning "Assuming a default alignment of 4"
51# pragma pack(4)
52# elif !defined(RC_INVOKED)
53# error "Adjusting the alignment is not supported with this compiler"
54# endif
55
56#else
57/* Depth == 0 ! */
58
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +000059#error "Popping alignment isn't possible since no alignment has been pushed"
Francois Gouget23a5b792000-10-19 20:20:07 +000060
61#endif
62
63#undef __WINE_INTERNAL_POPPACK