mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Add check for word alignment
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6551 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7240b53230
commit
130e7c9aa3
7 changed files with 117 additions and 6 deletions
13
config/config.align.c
Normal file
13
config/config.align.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
/* This program will most likely crash on systems that need shorts and ints
|
||||
to be word aligned
|
||||
*/
|
||||
|
||||
int main ()
|
||||
{
|
||||
char buf[12];
|
||||
short sval = 4;
|
||||
int ival = 3;
|
||||
*(short *)(buf+1) = sval;
|
||||
*(int *)(buf+1) = ival;
|
||||
exit (0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue