diff options
Diffstat (limited to 'ld/align.h')
-rw-r--r-- | ld/align.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -5,6 +5,16 @@ #ifndef S_ALIGNMENT # define align(x) #else -# define align(x) ((x) = ((int) (x) + (S_ALIGNMENT-1)) & ~(S_ALIGNMENT-1)) - /* assumes sizeof(int) == sizeof(char *) */ +# define align(x) ((x)=(void*) \ + ((char *)(x) + ((S_ALIGNMENT-(int)(x)) & (S_ALIGNMENT-1)))) #endif + + + + + + +/* * assumes sizeof(int) == sizeof(char *) * +# define align(x) ((x) = (void *)(((int) (x) + (S_ALIGNMENT-1)) & ~(S_ALIGNMENT-1))) +*/ + |