diff -r 18988de676ac -r 28bd86c56793 lib/iec_types.h --- a/lib/iec_types.h Sun Mar 27 16:19:36 2011 +0200 +++ b/lib/iec_types.h Thu Mar 31 19:11:16 2011 +0200 @@ -3,7 +3,6 @@ #include #include -#include #include /*********************/ @@ -30,22 +29,17 @@ typedef float IEC_REAL; typedef double IEC_LREAL; - -#if !defined __timespec_defined && !defined __time_t_defined -# define __timespec_defined 1 - -struct timespec - { +#pragma pack(push,1) +typedef struct { long int tv_sec; /* Seconds. */ long int tv_nsec; /* Nanoseconds. */ - }; +}IEC_TIMESPEC; +#pragma pack(pop) -#endif - -typedef struct timespec IEC_TIME; -typedef struct timespec IEC_DATE; -typedef struct timespec IEC_DT; -typedef struct timespec IEC_TOD; +typedef IEC_TIMESPEC IEC_TIME; +typedef IEC_TIMESPEC IEC_DATE; +typedef IEC_TIMESPEC IEC_DT; +typedef IEC_TIMESPEC IEC_TOD; #ifndef STR_MAX_LEN #define STR_MAX_LEN 126 @@ -56,9 +50,11 @@ #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) #endif /*IEC_TYPES_H*/