Reading 32bit Packed Binary Data On 64bit System

Code:
struct
{
        WORD    version;
        BOOL    upgrade;
        time_t  time1;
            time_t  time2;
} apparms;

File *fp;
fp = fopen(filePath, "r+b");
fread(&apparms, sizeof(apparms), 1, fp);
return Py_BuildValue("{s:i,s:l,s:l}",
  "sysVersion",apparms.version,
  "powerFailTime", apparms.time1,
  "normKitExpDate", apparms.time2
 );
Now on a 32 bit system this works great, but on a 64 bit my time_t sizes are different (32bit vs 64 bit longs).

Last edited by shabbir; 15Dec2008 at 12:44.. Reason: Code block