acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
_start.h
1
2
// _start.h
3
// acme
4
//
5
// Created by Camilo Sasuke Thomas Borregaard Soerensen on 16/09/20.
6
// Copyright (c) 2020 Camilo Sasuke Thomas Borregaard Soerensen. All rights reserved.
7
//
8
#pragma once
9
10
11
#include "acme/include/_acme.h"
12
#include "acme/release/_.h"
13
#include "configuration_selection.h"
14
#include "acme/platform/_features.h"
15
#include "debugbreak.h"
16
//#include "configuration/debug.h"
17
#include "operating_system/platform_setup.h"
18
#include "operating_system/configuration.h"
19
#include "operating_system/types.h"
20
#include "include/_setup.h"
21
22
23
#if REFERENCING_DEBUGGING
24
25
#define REFDBG(...) __VA_ARGS__
26
#define COMMA_REFDBG(...) , REFDBG(__VA_ARGS__)
27
28
#else
29
30
#define REFDBG(...)
31
#define COMMA_REFDBG(...)
32
33
#endif
34
35
36
#include "__standard_type.h"
37
#include "acme/include/_operating_system.h"
38
#include "acme/constant/memory_heap.h"
39
#include "operating_system/system.h"
40
//#ifdef _STDIO_H_
41
//#error "already included?!?! _____ (After including operating_system/system.h)"
42
//#endif
43
44
45
#ifdef WINDOWS
46
#define WINDOWS_API __stdcall
47
#else
48
#define WINDOWS_API
49
#endif
50
51
52
53
54
// From __setup.h by camilo on 2022-11-25 14:53 <3ThomasBorregaardSorensen!!
55
#ifdef _DEBUG
56
#ifndef _DEBUG
57
#define _DEBUG 1
58
#endif
59
#endif
60
61
62
#ifdef _DEBUG
63
#ifndef _DEBUG
64
#define DEBUG 1
65
#endif
66
#endif
67
68
69
// From __setup.h by camilo on 2022-11-25 14:53 <3ThomasBorregaardSorensen!!
70
#ifdef _DEBUG
71
#ifndef _DEBUG
72
#define __DEBUG
73
#endif
74
#else
75
#define NNDEBUG
76
#endif
77
78
79
#define CA2_ACME
80
81
82
#if defined(__cplusplus)
83
84
//#include <atomic>
85
#include <initializer_list>
86
//#ifdef _STDIO_H_
87
//#error "already included?!?! _____ (After including initializer_list)"
88
//#endif
89
#include <typeinfo>
90
//#ifdef _STDIO_H_
91
//#error "already included?!?! _____ (After including typeinfo)"
92
//#endif
93
//#include <tuple>
94
//#ifdef _STDIO_H_
95
//#error "already included?!?! _____ (After including tuple)"
96
//#endif
97
#include <type_traits>
98
//#ifdef _STDIO_H_
99
//#error "already included?!?! _____ (After including type_traits)"
100
//#endif
101
102
103
#endif
104
105
106
typedef
iptr memsize_storage;
107
typedef
iptr strsize_storage;
108
109
typedef
iptr memsize;
110
typedef
iptr character_count;
111
typedef
i64 filesize;
112
113
114
#if WCHAR_T_SIZE == 16
115
#define __END_CHARBIT(xxx) __CONCATENATE(xxx, 16)
116
#define __MID_CHARBIT(xxx, zzz) __CONCATENATE3(xxx, 16, zzz)
117
#elif WCHAR_T_SIZE == 32
118
#define __END_CHARBIT(xxx) __CONCATENATE(xxx, 32)
119
#define __MID_CHARBIT(xxx, zzz) __CONCATENATE3(xxx, 32, zzz)
120
#else
121
#error "Please define WCHAR_T_SIZE"
122
#endif
123
124
125
#define __found_index(i) ((i) >= 0)
126
#define __not_found_index(i) ((i) < 0)
127
128
129
#if defined(_DEBUG)
130
131
132
#define RELEASE_INLINE
133
134
135
#else
136
137
138
#define RELEASE_INLINE inline
139
140
141
#endif
142
143
144
#define MEMORY_INLINE RELEASE_INLINE
145
146
147
#if defined(FREEBSD)
148
149
#define inplace_new_throw_spec throw()
150
#define new_throw_spec
151
#define del_throw_spec noexcept
152
#define MEMORY_DECL
153
154
#elif defined(OPENBSD)
155
156
#define inplace_new_throw_spec throw()
157
#define new_throw_spec
158
#define del_throw_spec noexcept
159
#define MEMORY_DECL
160
161
#elif defined(WINDOWS)
162
163
//#define inplace_new_throw_spec
164
#define inplace_new_throw_spec noexcept
165
#define new_throw_spec
166
#define del_throw_spec noexcept
167
#define MEMORY_DECL __cdecl
168
169
#elif defined(SOLARIS)
170
171
#define inplace_new_throw_spec
172
#define new_throw_spec throw (std::bad_alloc)
173
#define del_throw_spec throw()
174
#define MEMORY_DECL
175
176
#elif defined(LINUX)
177
#define inplace_new_throw_spec noexcept
178
#define new_throw_spec
179
#define del_throw_spec noexcept
180
#define MEMORY_DECL
181
182
#elif defined(__APPLE__)
183
184
#define inplace_new_throw_spec throw()
185
#define new_throw_spec
186
#define del_throw_spec throw()
187
#define MEMORY_DECL
188
189
#elif defined(__ANDROID__)
190
191
#define inplace_new_throw_spec noexcept
192
#define new_throw_spec
193
#define del_throw_spec noexcept
194
#define MEMORY_DECL
195
196
#else
197
198
#define inplace_new_throw_spec
199
#define new_throw_spec
200
#define del_throw_spec
201
#define MEMORY_DECL
202
203
#endif
204
205
206
//#if defined(_DEBUG) && !defined(NO_ACME_MEMORY_MANAGEMENT)
207
//#define ___new ___new(__FILE__, __LINE__)
208
//#else
209
//#define memory_new ___new
210
//#endif
211
212
213
#include "acme/memory/_new.h"
214
//#ifdef _STDIO_H_
215
//#error "already included?!?! _____ (After including acme/memory/_new.h)"
216
//#endif
217
218
219
//#include "acme/include/_new.h"
220
221
222
223
_start.h
Generated by
1.17.0