summaryrefslogtreecommitdiff
path: root/ld/align.h
diff options
context:
space:
mode:
Diffstat (limited to 'ld/align.h')
-rw-r--r--ld/align.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/ld/align.h b/ld/align.h
index ba33fb8..02bbe43 100644
--- a/ld/align.h
+++ b/ld/align.h
@@ -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)))
+*/
+