Changed packing declaration in iec_types
authorEdouard Tisserant
Fri, 01 Apr 2011 11:10:06 +0200
changeset 256 101c7f148b9a
parent 254 28bd86c56793
child 270 f1674941c3ad
Changed packing declaration in iec_types
lib/iec_types.h
--- a/lib/iec_types.h	Thu Mar 31 19:11:16 2011 +0200
+++ b/lib/iec_types.h	Fri Apr 01 11:10:06 2011 +0200
@@ -29,12 +29,10 @@
 typedef float    IEC_REAL;
 typedef double   IEC_LREAL;
 
-#pragma pack(push,1)
 typedef struct {
     long int tv_sec;            /* Seconds.  */
     long int tv_nsec;           /* Nanoseconds.  */
-}IEC_TIMESPEC;
-#pragma pack(pop)
+}__attribute__((packed)) IEC_TIMESPEC;
 
 typedef IEC_TIMESPEC IEC_TIME;
 typedef IEC_TIMESPEC IEC_DATE;
@@ -50,11 +48,9 @@
 #endif
 
 typedef STR_LEN_TYPE __strlen_t;
-#pragma pack(push,1)
 typedef struct {
     __strlen_t len;
     uint8_t body[STR_MAX_LEN];
-} IEC_STRING;
-#pragma pack(pop)
+} __attribute__((packed)) IEC_STRING;
 
 #endif /*IEC_TYPES_H*/