Kore 3
Loading...
Searching...
No Matches
global.h
Go to the documentation of this file.
1#ifndef KORE_GLOBAL_HEADER
2#define KORE_GLOBAL_HEADER
3
7
8#include <stdbool.h>
9#include <stdint.h>
10
11#if defined(KORE_PPC)
12#define KORE_BIG_ENDIAN
13#else
14#define KORE_LITTLE_ENDIAN
15#endif
16
17#if defined(KORE_PPC)
18#define KORE_BIG_ENDIAN
19#else
20#define KORE_LITTLE_ENDIAN
21#endif
22
23#ifdef _MSC_VER
24#define KORE_INLINE static __forceinline
25#else
26#define KORE_INLINE static __attribute__((always_inline)) inline
27#endif
28
29#ifdef _MSC_VER
30#define KORE_MICROSOFT
31#define KORE_MICROSOFT
32#endif
33
34#if defined(_WIN32)
35
36#if !defined(KORE_CONSOLE) && !defined(KORE_WINDOWSAPP)
37#define KORE_WINDOWS
38#endif
39
40#elif defined(__APPLE__)
41
42#include <TargetConditionals.h>
43
44#if TARGET_OS_IPHONE
45
46#if !defined(KORE_TVOS)
47#define KORE_IOS
48#endif
49
50#define KORE_APPLE_SOC
51
52#else
53
54#define KORE_MACOS
55
56#if defined(__arm64__)
57#define KORE_APPLE_SOC
58#endif
59
60#endif
61
62#define KORE_POSIX
63
64#elif defined(__linux__)
65
66#if !defined(KORE_ANDROID)
67#define KORE_LINUX
68#endif
69
70#define KORE_POSIX
71
72#endif
73
74#ifdef KORE_WINDOWS
75#if defined(KORE_DYNAMIC)
76#define KORE_FUNC __declspec(dllimport)
77#define KORE_FUNC __declspec(dllimport)
78#elif defined(KORE_DYNAMIC_COMPILE)
79#define KORE_FUNC __declspec(dllexport)
80#define KORE_FUNC __declspec(dllexport)
81#else
82#define KORE_FUNC
83#define KORE_FUNC
84#endif
85#else
86#define KORE_FUNC
87#define KORE_FUNC
88#endif
89
90#if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
91#define KORE_64
92#endif
93
94#define KORE_ARRAY_SIZE(name) (sizeof(name) / sizeof(name[0]))
95
96#ifdef __cplusplus
97extern "C" {
98#endif
99int kickstart(int argc, char **argv);
100#ifdef __cplusplus
101}
102#endif
103
104#endif