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      1   #include <stdio.h>
     2      2   #include <limits.h>
     3      3   #include <stddef.h>
     4      4   
     5         -#ifndef _emit_m4_include
     6         -#	define sflag(flag,val) printf("-D"#flag"=\"%s\" ", val)
     7         -#	define mflag(flag,val) printf("-D"#flag"=-%llu ", val + 1)
     8         -#	define iflag(flag,val) printf("-D"#flag"=%llu ", val)
     9         -#	define fflag(flag,val) printf("-D"#flag"=%Lf ", val)
            5  +#ifdef _emit_m4_include
            6  +#	define sflag(flag,val) printf("define(`"#flag"',`%s')dnl\n", val)
            7  +#	define mflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", (long long unsigned)(val + 1))
            8  +#	define iflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", (long long unsigned)val)
            9  +#	define fflag(flag,val) printf("define(`"#flag"',`%Lf')dnl\n", val)
    10     10   #else
    11         -#	define sflag(flag,val) printf("define(`"#flag"',`%s')dnl\n", val)
    12         -#	define mflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", val + 1)
    13         -#	define iflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", val)
    14         -#	define fflag(flag,val) printf("define(`"#flag"',`%Lf')dnl\n", val)
           11  +#	define sflag(flag,val) printf("-D"#flag"=\"%s\" ", val)
           12  +#	define mflag(flag,val) printf("-D"#flag"=-%llu ", (long long unsigned)(val + 1))
           13  +#	define iflag(flag,val) printf("-D"#flag"=%llu ", (long long unsigned)val)
           14  +#	define fflag(flag,val) printf("-D"#flag"=%Lf ", val)
    15     15   #endif
           16  +
    16     17   #define type_found(val) (found_type & (val / 8))
    17     18   #define checkbits(type,x) \
    18     19   	if(!type_found(x) && sizeof(type) == (x/CHAR_BIT)) \
    19     20   		sflag(type_bit##x, #type), found_type |= (x / 8)
    20     21   
    21     22   #define describe_integral(type,label) { \
    22     23   	unsigned type maxval = -1; \

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

   168    168   }
   169    169   
   170    170   say "commencing libk build $build at $(timestamp)"
   171    171   # set -x
   172    172   
   173    173   # get type data
   174    174   mkdir -p $gen
   175         -$cc -D_emit_m4_include arch/typesize.c -o $gen/typesize 
          175  +report $cc -D_emit_m4_include arch/typesize.c -o $gen/typesize 
   176    176   $gen/typesize > gen/typesize.m
   177    177   
   178    178   # generate syscall tables
   179    179   if test $posix = yes; then
   180    180   	# on posix, we simply abuse CPP to garner a list of syscalls;
   181    181   	# the file arch/posix/syscalls contains a list of syscalls
   182    182   	# we wish to import; we use sed to transform this into a form