summaryrefslogtreecommitdiff
path: root/nt/inc/stdalign.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-07-29 18:43:09 +0300
committerEli Zaretskii <eliz@gnu.org>2012-07-29 18:43:09 +0300
commit55a6cca64fe00c54a4c880f404dcb362f555034e (patch)
tree2c16fd6016b6ff79b8fcc19af401f6bef06cae0f /nt/inc/stdalign.h
parentdbcf001cd7877a7f03a9307afbb82190b24bc356 (diff)
downloademacs-55a6cca64fe00c54a4c880f404dcb362f555034e.tar.gz
MS-Windows followup for 2012-07-28T23:05:32Z!eggert@cs.ucla.edu.
nt/inc/stdalign.h (_Alignas, alignas): Define. src/makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h. Fixes: debbugs:9772
Diffstat (limited to 'nt/inc/stdalign.h')
-rw-r--r--nt/inc/stdalign.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/nt/inc/stdalign.h b/nt/inc/stdalign.h
index 2ff7a43096f..7e349dc31d0 100644
--- a/nt/inc/stdalign.h
+++ b/nt/inc/stdalign.h
@@ -13,4 +13,13 @@
#endif
#define alignof _Alignof
+#if __GNUC__
+# define _Alignas(a) __attribute__ ((__aligned__ (a)))
+#elif 1300 <= _MSC_VER
+# define _Alignas(a) __declspec (align (a))
+#endif
+#ifdef _Alignas
+# define alignas _Alignas
+#endif
+
#endif /* _NT_STDALIGN_H_ */