Browse code

add pragmas for non-gcc compilers

git-svn: trunk@3767

Török Edvin authored on 2008/04/07 23:12:24
Showing 1 changed files
... ...
@@ -117,14 +117,29 @@ typedef struct {
117 117
 
118 118
 
119 119
 #if WORDS_BIGENDIAN == 0
120
+
120 121
 #ifndef HAVE_ATTRIB_PACKED 
121 122
 #define __attribute__((packed))
122 123
 #endif
124
+#ifdef HAVE_PRAGMA_PACK
125
+#pragma pack(1)
126
+#endif
127
+#ifdef HAVE_PRAGMA_PACK_HPPA
128
+#pragma pack 1
129
+#endif
130
+
123 131
 union unaligned {
124 132
 	int32_t una_u32;
125 133
 	int32_t una_s32;
126 134
 	int16_t una_s16;
127 135
 } __attribute__((packed));
136
+
137
+#ifdef HAVE_PRAGMA_PACK
138
+#pragma pack()
139
+#endif
140
+#ifdef HAVE_PRAGMA_PACK_HPPA
141
+#pragma pack
142
+#endif
128 143
 /* Little endian */
129 144
 #define le16_to_host(v)	(v)
130 145
 #define le32_to_host(v)	(v)