blob: 3da46bc64ba9c9f44eb6655d05958899fc48af3d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef _NT_STDALIGN_H_
#define _NT_STDALIGN_H_
#include <stddef.h>
#if defined __cplusplus
template <class __t> struct __alignof_helper { char __a; __t __b; };
# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
#else
# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
#endif
#define alignof _Alignof
#if __GNUC__
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
#endif
#ifdef _Alignas
# define alignas _Alignas
#endif
#endif /* _NT_STDALIGN_H_ */
|