projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
545ef84
)
Add __aligned() and __alignas() macros
author
H. Peter Anvin
<hpa@zytor.com>
Thu, 14 Feb 2008 08:01:20 +0000
(
00:01
-0800)
committer
H. Peter Anvin
<hpa@zytor.com>
Thu, 14 Feb 2008 08:01:20 +0000
(
00:01
-0800)
Add macros __aligned() (which takes a byte count), and __alignas()
(which takes a type or expression whose type is used, same as sizeof).
com32/include/klibc/compiler.h
patch
|
blob
|
history
diff --git
a/com32/include/klibc/compiler.h
b/com32/include/klibc/compiler.h
index
02af9a0
..
9f5d36e
100644
(file)
--- a/
com32/include/klibc/compiler.h
+++ b/
com32/include/klibc/compiler.h
@@
-115,4
+115,8
@@
/* Packed structures */
#define __packed __attribute__((packed))
+/* Alignment */
+#define __aligned(x) __attribute__((aligned(x)))
+#define __alignas(x) __attribute__((aligned(__alignof__(x))))
+
#endif