Mail Archives: djgpp/1996/01/18/23:47:45
Hello,
1. I am porting sources from Microsoft C to DGGPP-C. what I need is 2-bytes
alignment for all structure elements.
DJGPP uses a default 4-bytes alignment strategy.
Microsoft C uses a pragma for non standard alignment, for example
#pragma pack(4) /* initiates 4-bytes alignment */
typedef struct
{
char aap; /* dutch for monkey */
int noot; /* dutch for nut */
} s_leesplankje; /* this is how I learned to read */
sizeof (s_leesplankje) = max( sizeof( char), 4) + sizeof( int)
#pragma pack(2) /* initiates 2-bytes alignment */
typedef struct
{
char aap;
int noot;
} s_leesplankje;
sizeof (s_leesplankje) = max( sizeof( char), 2) + sizeof( int)
How do I obtain the same results in DGGPP-C
2. Does DJGPP-C understand based pointers ?
3. What is the main difference between djgpp verion 1.12 and 2.0 ?
Fulco Bohle
- Raw text -