-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmetac_default_target_info.h
43 lines (40 loc) · 1.29 KB
/
metac_default_target_info.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _METAC_DEFAULT_TARGET_INFO_H_
#define _METAC_DEFAULT_TARGET_INFO_H_
#include "os/compat.h"
#include "metac_target_info.h"
#if defined(_MSC_VER)
#define _Alignof(X) \
__alignof(X)
#elif defined (__cplusplus)
#define _Alignof(X) \
alignof(X)
#elif defined(__TINYC__)
#define _Alignof(X) \
__alignof__(X)
#endif
// thanks msvc for not supporting struct literals
// in c++ mode ... great job!
static const metac_target_info_t default_target_info =
{
/*.SizeBool =*/ sizeof(bool),
/*.SizeShort =*/ sizeof(short),
/*.SizeInt =*/ sizeof(int),
/*.SizeLong =*/ sizeof(long),
/*.SizeSizeT =*/ sizeof(size_t),
/*.SizeFloat =*/ sizeof(float),
/*.SizeDouble =*/ sizeof(double),
/*.SizeLongLong =*/ sizeof(long long),
/*.SizeLongDouble =*/ sizeof(long double),
/*.AlignmentBool =*/ _Alignof(bool),
/*.AlignmentShort =*/ _Alignof(short),
/*.AlignmentInt =*/ _Alignof(int),
/*.AlignmentLong =*/ _Alignof(long),
/*.AlignmentSizeT =*/ _Alignof(size_t),
/*.AlignmentFloat =*/ _Alignof(float),
/*.AlignmentDouble =*/ _Alignof(double),
/*.AlignmentLongLong =*/ _Alignof(long long),
/*.AlignmentLongDouble =*/ _Alignof(long double),
/*.PtrSize =*/ sizeof(void*),
/*.AlignmentChar =*/ _Alignof(char)
};
#endif //_METAC_DEFAULT_TARGET_INFO_H_