comparison src/common.h @ 129:fc11b1d1ad34

fix initial from header in mbox format. start moving to PST_LE_GET* rather than LE*_CPU macros so we can eventually remove the pragma packing.
author Carl Byington <carl@five-ten-sg.com>
date Thu, 05 Feb 2009 12:09:04 -0800
parents c2482d0cd84e
children e35fd42bac05
comparison
equal deleted inserted replaced
128:7f747c8c9d02 129:fc11b1d1ad34
4 4
5 5
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdarg.h> 8 #include <stdarg.h>
9
10
11 // switch to maximal packing for all structures in the libpst interface
12 // this is reverted in the vbuf.h include
13 #ifdef _MSC_VER
14 #pragma pack(push, 1)
15 #endif
16 #if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC)
17 #pragma pack(1)
18 #endif
9 19
10 20
11 #ifndef _MSC_VER 21 #ifndef _MSC_VER
12 #include <stdint.h> 22 #include <stdint.h>
13 #include <inttypes.h> 23 #include <inttypes.h>
22 typedef long long int64_t; 32 typedef long long int64_t;
23 #endif 33 #endif
24 34
25 35
26 #ifndef _WIN32 36 #ifndef _WIN32
27 #pragma pack(1)
28 typedef uint32_t DWORD; 37 typedef uint32_t DWORD;
29 typedef uint16_t WORD; 38 typedef uint16_t WORD;
30 typedef uint8_t BYTE; 39 typedef uint8_t BYTE;
31 typedef uint32_t UINT32; 40 typedef uint32_t UINT32;
32 typedef struct { // copied from wine 41 typedef struct { // copied from wine