Mail Archives: djgpp/1997/11/06/22:18:01
Sam Ravnborg wrote in message <3460bcb1 DOT 8980759 AT news DOT image DOT dk>...
>I have downloded DJGPP and like the look and feel of RHIDE (yes, I
>used Borland in the past).
>I am looking for an easy way to test my programs which int the end
>will run on an embedded target.
>I would like to use RHIDE/GCC to compile my programs if possible.
>
>In first place GCC fails because sizeof(int) == 4bytes == 32 bits.
>
>The requirements I have is:
>sizeof(int) == 2 bytes
>little endian
>alignment within records: ints are aligned to an even address.
>enums with less than 128 members s one byte in size.
>one byte equals 8 bits.
>
>My question is:
>Are there any easy way to setup GCC to these requirements - I know I
>have to figure out how to compile GCC etc. but want to hear any
>suggestion to the above first.
>
>--
>/Sam Ravnborg - sam DOT ravnborg AT image DOT dk
The best thing to do is to use he keyword short. You may be able to do a minor
change.
#define int short
Probably have some problems if you have used the word long in your code.
short long some_number; // :)
As for the number format, i'm not sure about little endian...
- Raw text -