libk  Diff

Differences From Artifact [9c53671363]:

To Artifact [694c1d32cc]:


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
--- kcore/def.h.m → <k/def.h>
--- ~ lexi hale <lexi@hale.su>
--- this file gathers information on the environment it's
--- being compiled in, setting macros that other headers
--- need. it will be emitted as <k/def.h>.
--- vim: ft=c
#ifndef KIdef
#define KIdef


[ifdef atom_target_bits]
	[define target: [atom_target_arch].[atom_target_os].[atom_target_bits]]

	#define KVbits [atom_target_bits]
[else]
	[define target: [atom_target_arch].[atom_target_os]]
[endif]

#define KVtarget [target]
#define KVos [atom_target_os]
#define KVarch [atom_target_arch]

[if [target_unix] == yes]
	#define KFenv_unix
	#define KFenv_posix
[else]
	[if [target_posix] == yes]
		#define KFenv_posix
	[endif]
[endif]

#define Kpragma(p) _Pragma(#p)
#if defined(__GNUC__) || defined(__clang__)
#   define Kerror(msg) Kpragma(GCC error #msg) 
#else
#   define Kerror(msg) Kpragma(message #msg)
#endif
#define Knoimpl(fn) Kerror(no implementation of fn for platform [target])

#endif
|
|
|
|
|
|


>

|
<
>
|
<
|
<
>
|
|
|
>
|
|
|
<
|
|
<
<










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
dnl kcore/def.h.m → <k/def.h>
dnl ~ lexi hale <lexi@hale.su>
dnl this file gathers information on the environment it's
dnl being compiled in, setting macros that other headers
dnl need. it will be emitted as <k/def.h>.
dnl vim: ft=c
#ifndef KIdef
#define KIdef
define(`def',`#define $1 $2')

ifdef(`atom_target_bits',`

	define(`target',`atom_target_arch.atom_target_os.atom_target_bits')
	def(KVbits,atom_target_bits)',`

	define(`target',atom_target_arch.atom_target_os)')


def(KVtarget,target)
def(KVos,atom_target_os)
def(KVarch,atom_target_arch)

ifelse(target_unix,`yes',
		`def(`KFenv_unix',)
		def(`KFenv_posix',)',`

		ifelse(target_posix,`yes',
			`def(KFenv_posix)')')



#define Kpragma(p) _Pragma(#p)
#if defined(__GNUC__) || defined(__clang__)
#   define Kerror(msg) Kpragma(GCC error #msg) 
#else
#   define Kerror(msg) Kpragma(message #msg)
#endif
#define Knoimpl(fn) Kerror(no implementation of fn for platform [target])

#endif