blob: 2cc94be3f6d7e4b65839cbcd35a1e5286139e4c8 [file] [log] [blame]
Rich Felker9bff7c12012-08-25 23:15:13 -04001#ifndef _STDALIGN_H
2#define _STDALIGN_H
3
Szabolcs Nagy70729de2014-08-26 17:42:15 +02004#ifndef __cplusplus
5
Rich Felker9bff7c12012-08-25 23:15:13 -04006/* this whole header only works in C11 or with compiler extensions */
7#if __STDC_VERSION__ < 201112L && defined( __GNUC__)
8#define _Alignas(t) __attribute__((__aligned__(t)))
9#define _Alignof(t) __alignof__(t)
10#endif
11
12#define alignas _Alignas
13#define alignof _Alignof
Szabolcs Nagy70729de2014-08-26 17:42:15 +020014
15#endif
16
Rich Felker9bff7c12012-08-25 23:15:13 -040017#define __alignas_is_defined 1
18#define __alignof_is_defined 1
19
20#endif