Index: /trunk/include/iprt/formats/lx.h
===================================================================
--- /trunk/include/iprt/formats/lx.h	(revision 74643)
+++ /trunk/include/iprt/formats/lx.h	(revision 74644)
@@ -35,4 +35,5 @@
 #include <iprt/assertcompile.h>
 
+RT_C_DECLS_BEGIN
 
 #ifndef IMAGE_OS2_SIGNATURE_LX
@@ -41,5 +42,4 @@
 #endif
 
-#pragma pack(1) /** @todo mostly unnecessary. */
 
 /**
@@ -47,5 +47,5 @@
  * This structure is exactly 196 bytes long.
  */
-struct e32_exe
+typedef struct e32_exe
 {
     uint8_t             e32_magic[2];
@@ -125,5 +125,5 @@
     uint32_t            e32_stacksize;
     uint8_t             e32_res3[20];
-};
+} e32_exe;
 AssertCompileSize(struct e32_exe, 196);
 
@@ -198,16 +198,19 @@
 /** @} */
 
+
 /** @name Relocations (aka Fixups).
  * @{ */
-typedef union _offset
+typedef union r32_offset
 {
     uint16_t            offset16;
     uint32_t            offset32;
-} offset;
+} r32_offset;
+AssertCompileSize(r32_offset, 4);
 
 /** A relocation.
  * @remark this structure isn't very usable since LX relocations comes in too many size variations.
  */
-struct r32_rlc
+#pragma pack(1)
+typedef struct r32_rlc
 {
     uint8_t             nr_stype;
@@ -218,8 +221,8 @@
     union targetid
     {
-        offset          intref;
+        r32_offset      intref;
         union extfixup
         {
-            offset      proc;
+            r32_offset  proc;
             uint32_t    ord;
         } extref;
@@ -227,10 +230,12 @@
         {
             uint16_t    entry;
-            offset      addval;
+            r32_offset  addval;
         } addfix;
     } r32_target;
     uint16_t            r32_srccount;
     uint16_t            r32_chain;
-};
+} r32_rlc;
+#pragma pack()
+AssertCompileSize(r32_rlc, 16);
 
 /** @name Some attempt at size constanstants.
@@ -283,5 +288,5 @@
 
 /** The Object Table Entry. */
-struct o32_obj
+typedef struct o32_obj
 {
     /** The size of the object. */
@@ -297,5 +302,6 @@
     /** Reserved */
     uint32_t            o32_reserved;
-};
+} o32_obj;
+AssertCompileSize(o32_obj, 24);
 
 /** @name o32_flags
@@ -343,5 +349,5 @@
 
 /** A Object Page Map Entry. */
-struct o32_map
+typedef struct o32_map
 {
     /** The file offset of the page. */
@@ -351,5 +357,6 @@
     /** Per page flags describing how the page is encoded in the file. */
     uint16_t            o32_pageflags;
-};
+} o32_map;
+AssertCompileSize(o32_map, 8);
 
 /** @name o32 o32_pageflags
@@ -372,5 +379,6 @@
 
 /** Iteration Record format (RLE compressed page). */
-struct LX_Iter
+#pragma pack(1)
+typedef struct LX_Iter
 {
     /** Number of iterations. */
@@ -380,5 +388,7 @@
     /** The bytes. */
     uint8_t             LX_Iterdata;
-};
+} LX_Iter;
+#pragma pack()
+AssertCompileSize(LX_Iter, 5);
 
 /** @} */
@@ -386,5 +396,6 @@
 
 /** A Resource Table Entry */
-struct rsrc32
+#pragma pack(1)
+typedef struct rsrc32
 {
     /** Resource Type. */
@@ -398,5 +409,7 @@
     /** Offset of the resource that within the object. */
     uint32_t            offset;
-};
+} rsrc32;
+#pragma pack()
+AssertCompileSize(rsrc32, 14);
 
 
@@ -406,5 +419,5 @@
 /** Entry bundle.
  * Header descripting up to 255 entries that follows immediatly after this structure. */
-struct b32_bundle
+typedef struct b32_bundle
 {
     /** The number of entries. */
@@ -414,5 +427,6 @@
     /** The index of the object containing these entry points. */
     uint16_t            b32_obj;
-};
+} b32_bundle;
+AssertCompileSize(b32_bundle, 4);
 
 /** @name b32_type
@@ -434,5 +448,6 @@
 
 /** Entry point. */
-struct e32_entry
+#pragma pack(1)
+typedef struct e32_entry
 {
     /** Entry point flags */
@@ -441,5 +456,5 @@
     {
         /** ENTRY16 or ENTRY32. */
-        offset          e32_offset;
+        r32_offset      e32_offset;
         /** GATE16 */
         struct scallgate
@@ -459,5 +474,6 @@
         } e32_fwd;
     } e32_variant;
-};
+} e32_entry;
+#pragma pack()
 
 /** @name e32_flags
@@ -481,5 +497,6 @@
 /** @} */
 
-#pragma pack()
+
+RT_C_DECLS_END
 
 #endif
