libk  Diff

Differences From Artifact [46cfa15699]:

To Artifact [7135ae8006]:


1
2
3
4
5




6
7
8
9
10
11
12
..
77
78
79
80
81
82
83

84
85
86
87
88
89
90
...
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
#ifndef KIcore
#define KIcore
#include <k/type.h>
#include <k/io.h>
#include <k/str.h>





typedef struct kvar {
	ksraw name;
	ksraw val;
	char* platform;
} kvar;

................................................................................
#		endif
#	endif
#	if (__STDC_VERSION__ >= 201103L)
#		define KFstd_c11
#		define KVstd c11
#	endif
#	ifdef __cplusplus

#		define KFstd_cpp
#		define KVstd c++
#		if (__cplusplus >= 201103L)
#			define KFstd_cpp11
#			define KVstd c++11
#		endif /* TODO: add more */
#	endif
................................................................................
 * being defined in C++ or K&R C. */
#if defined (__cplusplus) && ! defined(KFclean)
#	if __cplusplus >= 201103L
#		define null nullptr
#	else
#		define null ((void*)0)
#	endif
#elif defined __STDC__
	enum { null = 0 };
	/* believe it or not, this is actually
	 * completely legal. doesn't even raise
	 * a single warning. i was surprised too. */





#elif ! defined(KFclean)
#	define null ((void*)0)
#endif


#ifdef __cplusplus
#	define noreturn [[ noreturn ]]
#elif __STDC_VERSION__ >= 201103L
#	define noreturn _Noreturn
#else
#	define noreturn

#endif




noreturn void kstop(stat_long code);




#ifdef KFclean
#	undef noreturn

#endif

#endif





>
>
>
>







 







>







 







|



|
>
>
>
>
>




>
|
|
|
|
|
|
>


>
>
>
|
>
>
>

|
<
>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
...
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
#ifndef KIcore
#define KIcore
#include <k/type.h>
#include <k/io.h>
#include <k/str.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct kvar {
	ksraw name;
	ksraw val;
	char* platform;
} kvar;

................................................................................
#		endif
#	endif
#	if (__STDC_VERSION__ >= 201103L)
#		define KFstd_c11
#		define KVstd c11
#	endif
#	ifdef __cplusplus
#		define KFstd_c89
#		define KFstd_cpp
#		define KVstd c++
#		if (__cplusplus >= 201103L)
#			define KFstd_cpp11
#			define KVstd c++11
#		endif /* TODO: add more */
#	endif
................................................................................
 * being defined in C++ or K&R C. */
#if defined (__cplusplus) && ! defined(KFclean)
#	if __cplusplus >= 201103L
#		define null nullptr
#	else
#		define null ((void*)0)
#	endif
#elif defined __STDC__ && (!defined __clang__ || defined KFclean)
	enum { null = 0 };
	/* believe it or not, this is actually
	 * completely legal. doesn't even raise
	 * a single warning in GCC. i was surprised
	 * too. alas, it later turned out that
	 * clang will throw a fit about this, so
	 * we only use the enum method if __clang__
	 * is undefined, or if the alternative is
	 * no null keyword at all. */
#elif ! defined(KFclean)
#	define null ((void*)0)
#endif

#ifndef KFclean
#	ifdef __cplusplus
#		define noreturn [[ noreturn ]]
#	elif __STDC_VERSION__ >= 201103L
#		define noreturn _Noreturn
#	else
#		define noreturn
#	endif
#endif

#ifdef __cplusplus
	[[noreturn]] void kstop(stat_long code);
#elif __STDC_VERSION__ >= 201103L
	_Noreturn void kstop(stat_long code);
#else
	void kstop(stat_long code);
#endif

#ifdef __cplusplus

}
#endif

#endif