This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* x86 linux (including Android) structure alignment test for JNA */ | |
#include <assert.h> /* static_assert() */ | |
#include <stddef.h> /* offsetof() */ | |
/* My own simple test struct example: a 4-byte float and an 8-byte double. | |
* With a maximum alignment of 4 bytes, it should not require any padding and | |
* should always take up just 12 bytes, regardless of the order of members. | |
*/ | |
typedef struct BugsBeGoneTestStructure { | |
float field1; /* offset: 0, size: 4, padding: 0 */ |