diff 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
line wrap: on
line diff
--- a/src/common.h	Thu Feb 05 09:22:22 2009 -0800
+++ b/src/common.h	Thu Feb 05 12:09:04 2009 -0800
@@ -8,6 +8,16 @@
 #include <stdarg.h>
 
 
+// switch to maximal packing for all structures in the libpst interface
+// this is reverted in the vbuf.h include
+#ifdef _MSC_VER
+    #pragma pack(push, 1)
+#endif
+#if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC)
+    #pragma pack(1)
+#endif
+
+
 #ifndef  _MSC_VER
     #include <stdint.h>
     #include <inttypes.h>
@@ -24,7 +34,6 @@
 
 
 #ifndef _WIN32
-    #pragma pack(1)
     typedef uint32_t  DWORD;
     typedef uint16_t   WORD;
     typedef uint8_t    BYTE;