libk  Check-in [7c202a8b17]

Overview
Comment:insert explicit cast to hopefully silence compiler warnings on some systems
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7c202a8b17f192a8a83fbe1fe55455af3d92d9180a6ccbb0729a5caabfc41346
User & Date: lexi on 2019-08-22 00:03:38
Other Links: manifest | tags
Context
2019-08-22
01:37
add first iteration of knum header check-in: 5560c2725b user: lexi tags: trunk
00:03
insert explicit cast to hopefully silence compiler warnings on some systems check-in: 7c202a8b17 user: lexi tags: trunk
2019-08-21
23:35
replace `.` with `source` in shell scripts for compatibility; change `sh` shebangs to use bash instead check-in: 34059b4bf6 user: lexi tags: trunk
Changes

Modified arch/typesize.c from [750b65151f] to [6b637ac574].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
#include <stdio.h>
#include <limits.h>
#include <stddef.h>

#ifndef _emit_m4_include
#	define sflag(flag,val) printf("-D"#flag"=\"%s\" ", val)
#	define mflag(flag,val) printf("-D"#flag"=-%llu ", val + 1)
#	define iflag(flag,val) printf("-D"#flag"=%llu ", val)
#	define fflag(flag,val) printf("-D"#flag"=%Lf ", val)
#else
#	define sflag(flag,val) printf("define(`"#flag"',`%s')dnl\n", val)
#	define mflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", val + 1)
#	define iflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", val)
#	define fflag(flag,val) printf("define(`"#flag"',`%Lf')dnl\n", val)
#endif

#define type_found(val) (found_type & (val / 8))
#define checkbits(type,x) \
	if(!type_found(x) && sizeof(type) == (x/CHAR_BIT)) \
		sflag(type_bit##x, #type), found_type |= (x / 8)

#define describe_integral(type,label) { \
	unsigned type maxval = -1; \




|
|
|
|
|

|
|
|
|

>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <limits.h>
#include <stddef.h>

#ifdef _emit_m4_include
#	define sflag(flag,val) printf("define(`"#flag"',`%s')dnl\n", val)
#	define mflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", (long long unsigned)(val + 1))
#	define iflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", (long long unsigned)val)
#	define fflag(flag,val) printf("define(`"#flag"',`%Lf')dnl\n", val)
#else
#	define sflag(flag,val) printf("-D"#flag"=\"%s\" ", val)
#	define mflag(flag,val) printf("-D"#flag"=-%llu ", (long long unsigned)(val + 1))
#	define iflag(flag,val) printf("-D"#flag"=%llu ", (long long unsigned)val)
#	define fflag(flag,val) printf("-D"#flag"=%Lf ", val)
#endif

#define type_found(val) (found_type & (val / 8))
#define checkbits(type,x) \
	if(!type_found(x) && sizeof(type) == (x/CHAR_BIT)) \
		sflag(type_bit##x, #type), found_type |= (x / 8)

#define describe_integral(type,label) { \
	unsigned type maxval = -1; \

Modified build.sh from [e2a59a38b7] to [b43f4693b2].

168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
}

say "commencing libk build $build at $(timestamp)"
# set -x

# get type data
mkdir -p $gen
$cc -D_emit_m4_include arch/typesize.c -o $gen/typesize 
$gen/typesize > gen/typesize.m

# generate syscall tables
if test $posix = yes; then
	# on posix, we simply abuse CPP to garner a list of syscalls;
	# the file arch/posix/syscalls contains a list of syscalls
	# we wish to import; we use sed to transform this into a form







|







168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
}

say "commencing libk build $build at $(timestamp)"
# set -x

# get type data
mkdir -p $gen
report $cc -D_emit_m4_include arch/typesize.c -o $gen/typesize 
$gen/typesize > gen/typesize.m

# generate syscall tables
if test $posix = yes; then
	# on posix, we simply abuse CPP to garner a list of syscalls;
	# the file arch/posix/syscalls contains a list of syscalls
	# we wish to import; we use sed to transform this into a form