Thanks to all of you. The __attribute__ worked but later came to know about #pragma pack also and tried that and simpler. However I am using compile option -m32 but I would like long to be 64 bit rather than 32 bit. Is using long long the only way to go about doing it. What is the best way to make long a 64 bit irrespective of whether it is compiled for a 32-bit or for a 64-bit architecture ? -- Sent from: http://gcc.1065356.n8.nabble.com/gcc-Help-f629689.html