Subversion Repositories SvarDOS

Rev

Rev 616 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 616 Rev 1186
1
/*!\file sys/packon.h
1
/*!\file sys/packon.h
2
 *
2
 *
3
 * Sets structure packing to 1 byte.
3
 * Sets structure packing to 1 byte.
4
 */
4
 */
5
 
5
 
6
/*++
6
/*++
7

7

8
Copyright (c) 1990,91  Microsoft Corporation
8
Copyright (c) 1990,91  Microsoft Corporation
9

9

10
Module Name:
10
Module Name:
11

11

12
    packon.h
12
    packon.h
13

13

14
Abstract:
14
Abstract:
15

15

16
    This file turns packing of structures on.  (That is, it disables
16
    This file turns packing of structures on.  (That is, it disables
17
    automatic alignment of structure fields.)  An include file is needed
17
    automatic alignment of structure fields.)  An include file is needed
18
    because various compilers do this in different ways.
18
    because various compilers do this in different ways.
19

19

20
    The file packoff.h is the complement to this file.
20
    The file packoff.h is the complement to this file.
21

21

22
Author:
22
Author:
23

23

24
    Chuck Lenzmeier (chuckl) 4-Mar-1990
24
    Chuck Lenzmeier (chuckl) 4-Mar-1990
25

25

26
Revision History:
26
Revision History:
27

27

28
    15-Apr-1991 JohnRo
28
    15-Apr-1991 JohnRo
29
        Created lint-able variant.
29
        Created lint-able variant.
30

30

31
    20-Oct-1997 G.Vanem
31
    20-Oct-1997 G.Vanem
32
        Added Metaware support
32
        Added Metaware support
33

33

34
    05-Jul-1999 G.Vanem
34
    05-Jul-1999 G.Vanem
35
        Added LADsoft support
35
        Added LADsoft support
36

36

37
    01-Nov-2000 G. Vanem
37
    01-Nov-2000 G. Vanem
38
        Added Visual C/C++ support
38
        Added Visual C/C++ support
39

39

40
--*/
40
--*/
41
 
41
 
42
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
42
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
43
  #pragma option push -b -a8 -pc -A- /*P_O_Push*/
43
  #pragma option push -b -a8 -pc -A- /*P_O_Push*/
44
#endif
44
#endif
45
 
45
 
46
#if !(defined(lint) || defined(_lint))
46
#if !(defined(lint) || defined(_lint))
47
  #if defined(_MSC_VER) && (_MSC_VER >= 800)
47
  #if defined(_MSC_VER) && (_MSC_VER >= 800)
48
    #pragma warning(disable:4103)
48
    #pragma warning(disable:4103)
49
  #endif
49
  #endif
50
 
50
 
51
  #if defined(__HIGHC__)
51
  #if defined(__HIGHC__)
52
    #pragma push_align_members(1);
52
    #pragma push_align_members(1);
53
  #elif defined(__WATCOMC__) && (__WATCOMC__ >= 1000)
53
  #elif defined(__WATCOMC__) && (__WATCOMC__ >= 1000)
54
    #pragma pack(__push,1);
54
    #pragma pack(__push,1);
55
  #elif (defined(_MSC_VER) && (_MSC_VER > 800)) || \
55
  #elif (defined(_MSC_VER) && (_MSC_VER > 800)) || \
56
        (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
56
        (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
57
         defined(__POCC__) || defined(__LCC__)
57
         defined(__POCC__) || defined(__LCC__)
58
    #pragma pack(push,1)
58
    #pragma pack(push,1)
59
  #else
59
  #else
60
    #pragma pack(1)
60
    #pragma pack(1)
61
  #endif
61
  #endif
62
#endif
62
#endif
63
 
63
 
64
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
64
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
65
  #pragma option pop  /*P_O_Pop*/
65
  #pragma option pop  /*P_O_Pop*/
66
#endif
66
#endif
67
 
67