fixed sleep, added cross-compile file for windows

AuthorKonata <konata@posteo.jp>
Date
Commit8ca5b24c7dbc0d69da5d7a82f4587f5c87163f8d
Parent0392d67
4 files changed, 20 insertions(+), 3 deletions(-)
Across_file.txt
@@ -0,0 +1,17 @@
1+[binaries]
2+c = '/usr/bin/x86_64-w64-mingw32-gcc'
3+ar = '/usr/x86_64-w64-mingw32/bin/ar'
4+strip = '/usr/bin/x86_64-w64-mingw32-strip'
5+exe_wrapper = 'wine'
6+
7+[properties]
8+
9+c_args = ['-std=gnu11', '-Wall', '-Wextra', '-Wpedantic']
10+c_link_args = []
11+needs_exe_wrapper = true
12+
13+[host_machine]
14+system = 'windows'
15+cpu_family = 'x86_64'
16+cpu = 'x86_64'
17+endian = 'little'
Minclude/cutils/misc.h
@@ -10,6 +10,6 @@
1010 #include <windows.h>
1111 #endif
1212
13-void sleep_ms(int milliseconds);
13+void sleep_ms(unsigned int milliseconds);
1414 uint32_t ntoh32(uint32_t const net);
1515 #endif //MISC_H
Mmeson.build
@@ -1,7 +1,7 @@
11 project('cutils', 'c')
22
33 WARNINGS = ['-Wall', '-Wpedantic', '-Wextra', '-Wnull-dereference', '-Wshadow', '-Wconversion', '-Wstrict-prototypes', '-Wmissing-prototypes', '-Wcast-qual', '-Wstrict-overflow=5', '-Wunreachable-code', '-Wno-unused-parameter' ]
4-CFLAGS = ['-std=c11', '-fstrict-aliasing', '-fPIC'] + WARNINGS
4+CFLAGS = ['-std=gnu11', '-fstrict-aliasing', '-fPIC'] + WARNINGS
55
66 subdir('include')
77 subdir('src')
Msrc/misc.c
@@ -1,6 +1,6 @@
11 #include <cutils/misc.h>
22
3-void sleep_ms(int milliseconds)
3+void sleep_ms(unsigned int milliseconds)
44 {
55 #ifdef __unix__
66 usleep(milliseconds * 1000);