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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
|
/*
* january, 2017, ported to portable library by mikkelfj.
* Based on dbgtools static assert counter, but with renamed macros.
*/
/*
dbgtools - platform independent wrapping of "nice to have" debug functions.
version 0.1, october, 2013
https://github.com/wc-duck/dbgtools
Copyright (C) 2013- Fredrik Kihlander
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Fredrik Kihlander
*/
/**
* Auto-generated header implementing a counter that increases by each include of the file.
*
* This header will define the macro __PSTATIC_ASSERT_COUNTER to be increased for each inclusion of the file.
*
* It has been generated with 3 amount of digits resulting in the counter wrapping around after
* 10000 inclusions.
*
* Usage:
*
* #include "this_header.h"
* int a = __PSTATIC_ASSERT_COUNTER; // 0
* #include "this_header.h"
* int b = __PSTATIC_ASSERT_COUNTER; // 1
* #include "this_header.h"
* int c = __PSTATIC_ASSERT_COUNTER; // 2
* #include "this_header.h"
* int d = __PSTATIC_ASSERT_COUNTER; // 3
*/
#ifndef __PSTATIC_ASSERT_COUNTER
# define __PSTATIC_ASSERT_COUNTER_0 0
# define __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_D1_0
# define __PSTATIC_ASSERT_COUNTER_D2_0
# define __PSTATIC_ASSERT_COUNTER_D3_0
#endif /* __PSTATIC_ASSERT_COUNTER */
#if !defined( __PSTATIC_ASSERT_COUNTER_D0_0 )
# define __PSTATIC_ASSERT_COUNTER_D0_0
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 0
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_1 )
# define __PSTATIC_ASSERT_COUNTER_D0_1
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 1
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_2 )
# define __PSTATIC_ASSERT_COUNTER_D0_2
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 2
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_3 )
# define __PSTATIC_ASSERT_COUNTER_D0_3
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 3
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_4 )
# define __PSTATIC_ASSERT_COUNTER_D0_4
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 4
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_5 )
# define __PSTATIC_ASSERT_COUNTER_D0_5
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 5
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_6 )
# define __PSTATIC_ASSERT_COUNTER_D0_6
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 6
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_7 )
# define __PSTATIC_ASSERT_COUNTER_D0_7
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 7
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_8 )
# define __PSTATIC_ASSERT_COUNTER_D0_8
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 8
#elif !defined( __PSTATIC_ASSERT_COUNTER_D0_9 )
# define __PSTATIC_ASSERT_COUNTER_D0_9
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 9
#else
# undef __PSTATIC_ASSERT_COUNTER_D0_1
# undef __PSTATIC_ASSERT_COUNTER_D0_2
# undef __PSTATIC_ASSERT_COUNTER_D0_3
# undef __PSTATIC_ASSERT_COUNTER_D0_4
# undef __PSTATIC_ASSERT_COUNTER_D0_5
# undef __PSTATIC_ASSERT_COUNTER_D0_6
# undef __PSTATIC_ASSERT_COUNTER_D0_7
# undef __PSTATIC_ASSERT_COUNTER_D0_8
# undef __PSTATIC_ASSERT_COUNTER_D0_9
# undef __PSTATIC_ASSERT_COUNTER_0
# define __PSTATIC_ASSERT_COUNTER_0 0
# if !defined( __PSTATIC_ASSERT_COUNTER_D1_0 )
# define __PSTATIC_ASSERT_COUNTER_D1_0
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 0
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_1 )
# define __PSTATIC_ASSERT_COUNTER_D1_1
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 1
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_2 )
# define __PSTATIC_ASSERT_COUNTER_D1_2
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 2
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_3 )
# define __PSTATIC_ASSERT_COUNTER_D1_3
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 3
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_4 )
# define __PSTATIC_ASSERT_COUNTER_D1_4
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 4
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_5 )
# define __PSTATIC_ASSERT_COUNTER_D1_5
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 5
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_6 )
# define __PSTATIC_ASSERT_COUNTER_D1_6
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 6
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_7 )
# define __PSTATIC_ASSERT_COUNTER_D1_7
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 7
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_8 )
# define __PSTATIC_ASSERT_COUNTER_D1_8
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 8
# elif !defined( __PSTATIC_ASSERT_COUNTER_D1_9 )
# define __PSTATIC_ASSERT_COUNTER_D1_9
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 9
# else
# undef __PSTATIC_ASSERT_COUNTER_D1_1
# undef __PSTATIC_ASSERT_COUNTER_D1_2
# undef __PSTATIC_ASSERT_COUNTER_D1_3
# undef __PSTATIC_ASSERT_COUNTER_D1_4
# undef __PSTATIC_ASSERT_COUNTER_D1_5
# undef __PSTATIC_ASSERT_COUNTER_D1_6
# undef __PSTATIC_ASSERT_COUNTER_D1_7
# undef __PSTATIC_ASSERT_COUNTER_D1_8
# undef __PSTATIC_ASSERT_COUNTER_D1_9
# undef __PSTATIC_ASSERT_COUNTER_1
# define __PSTATIC_ASSERT_COUNTER_1 0
# if !defined( __PSTATIC_ASSERT_COUNTER_D2_0 )
# define __PSTATIC_ASSERT_COUNTER_D2_0
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 0
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_1 )
# define __PSTATIC_ASSERT_COUNTER_D2_1
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 1
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_2 )
# define __PSTATIC_ASSERT_COUNTER_D2_2
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 2
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_3 )
# define __PSTATIC_ASSERT_COUNTER_D2_3
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 3
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_4 )
# define __PSTATIC_ASSERT_COUNTER_D2_4
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 4
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_5 )
# define __PSTATIC_ASSERT_COUNTER_D2_5
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 5
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_6 )
# define __PSTATIC_ASSERT_COUNTER_D2_6
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 6
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_7 )
# define __PSTATIC_ASSERT_COUNTER_D2_7
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 7
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_8 )
# define __PSTATIC_ASSERT_COUNTER_D2_8
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 8
# elif !defined( __PSTATIC_ASSERT_COUNTER_D2_9 )
# define __PSTATIC_ASSERT_COUNTER_D2_9
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 9
# else
# undef __PSTATIC_ASSERT_COUNTER_D2_1
# undef __PSTATIC_ASSERT_COUNTER_D2_2
# undef __PSTATIC_ASSERT_COUNTER_D2_3
# undef __PSTATIC_ASSERT_COUNTER_D2_4
# undef __PSTATIC_ASSERT_COUNTER_D2_5
# undef __PSTATIC_ASSERT_COUNTER_D2_6
# undef __PSTATIC_ASSERT_COUNTER_D2_7
# undef __PSTATIC_ASSERT_COUNTER_D2_8
# undef __PSTATIC_ASSERT_COUNTER_D2_9
# undef __PSTATIC_ASSERT_COUNTER_2
# define __PSTATIC_ASSERT_COUNTER_2 0
# if !defined( __PSTATIC_ASSERT_COUNTER_D3_0 )
# define __PSTATIC_ASSERT_COUNTER_D3_0
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 0
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_1 )
# define __PSTATIC_ASSERT_COUNTER_D3_1
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 1
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_2 )
# define __PSTATIC_ASSERT_COUNTER_D3_2
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 2
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_3 )
# define __PSTATIC_ASSERT_COUNTER_D3_3
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 3
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_4 )
# define __PSTATIC_ASSERT_COUNTER_D3_4
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 4
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_5 )
# define __PSTATIC_ASSERT_COUNTER_D3_5
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 5
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_6 )
# define __PSTATIC_ASSERT_COUNTER_D3_6
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 6
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_7 )
# define __PSTATIC_ASSERT_COUNTER_D3_7
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 7
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_8 )
# define __PSTATIC_ASSERT_COUNTER_D3_8
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 8
# elif !defined( __PSTATIC_ASSERT_COUNTER_D3_9 )
# define __PSTATIC_ASSERT_COUNTER_D3_9
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 9
# else
# undef __PSTATIC_ASSERT_COUNTER_D3_1
# undef __PSTATIC_ASSERT_COUNTER_D3_2
# undef __PSTATIC_ASSERT_COUNTER_D3_3
# undef __PSTATIC_ASSERT_COUNTER_D3_4
# undef __PSTATIC_ASSERT_COUNTER_D3_5
# undef __PSTATIC_ASSERT_COUNTER_D3_6
# undef __PSTATIC_ASSERT_COUNTER_D3_7
# undef __PSTATIC_ASSERT_COUNTER_D3_8
# undef __PSTATIC_ASSERT_COUNTER_D3_9
# undef __PSTATIC_ASSERT_COUNTER_3
# define __PSTATIC_ASSERT_COUNTER_3 0
# endif
# endif
# endif
#endif
#define __PSTATIC_ASSERT_COUNTER_JOIN_DIGITS_MACRO_(digit0,digit1,digit2,digit3) digit0##digit1##digit2##digit3
#define __PSTATIC_ASSERT_COUNTER_JOIN_DIGITS_MACRO(digit0,digit1,digit2,digit3) __PSTATIC_ASSERT_COUNTER_JOIN_DIGITS_MACRO_(digit0,digit1,digit2,digit3)
#undef __PSTATIC_ASSERT_COUNTER
#define __PSTATIC_ASSERT_COUNTER __PSTATIC_ASSERT_COUNTER_JOIN_DIGITS_MACRO(__PSTATIC_ASSERT_COUNTER_3,__PSTATIC_ASSERT_COUNTER_2,__PSTATIC_ASSERT_COUNTER_1,__PSTATIC_ASSERT_COUNTER_0)
|