mirror of https://github.com/flysand7/ciabatta.git
try cuik?
This commit is contained in:
parent
1f811d7646
commit
bdce40092d
2
build.py
2
build.py
|
@ -200,6 +200,8 @@ def assemble(src, out):
|
|||
sys.exit(code)
|
||||
|
||||
def compile(srcs, out, extra_flags = ''):
|
||||
if cc == 'cuik' and out.endswith('.o'):
|
||||
out = out[:-2]
|
||||
flags = cc_flags_str + ' ' + extra_flags + ' '.join(args.cflags)
|
||||
inputs = ' '.join(map(quote, srcs))
|
||||
cmdline = f'{cc} {flags} {inputs} -o {quote(out)}'
|
||||
|
|
|
@ -42,9 +42,11 @@ typedef unsigned int uint32_t;
|
|||
#endif
|
||||
|
||||
// stdbool.h
|
||||
#if !defined(__bool_true_false_are_defined)
|
||||
typedef _Bool bool;
|
||||
#define true ((bool)1)
|
||||
#define false ((bool)0)
|
||||
#endif
|
||||
|
||||
// Short type definitions
|
||||
typedef int8_t i8;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
void memset(void *dest, int ch, size_t length);
|
||||
int _wcsicmp(uint16_t *s1, uint16_t *s2);
|
|
@ -4,3 +4,25 @@ static void _fileapi_init();
|
|||
void _cia_init() {
|
||||
_fileapi_init();
|
||||
}
|
||||
|
||||
void memset(void *dest, int ch, size_t length) {
|
||||
u8 *bytes = dest;
|
||||
for(int i = 0; i != length; ++i) {
|
||||
bytes[i] = ch;
|
||||
}
|
||||
}
|
||||
|
||||
int _wcsicmp(uint16_t *s1, uint16_t *s2) {
|
||||
while(*s1 != 0 && *s2 != 0) {
|
||||
if(*s1 != *s2) {
|
||||
return *s1 - *s2;
|
||||
}
|
||||
}
|
||||
if(*s1 == 0 && *s2 != 0) {
|
||||
return -1;
|
||||
}
|
||||
if(*s1 != 0 && *s2 == 0) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -60,3 +60,5 @@ void __security_check_cookie(u64 retrieved) {
|
|||
ExitProcess(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue