1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tcc_win: fix tests

This commit is contained in:
spaceface777
2020-06-19 12:54:56 +02:00
committed by GitHub
parent e8b21b4242
commit 624005bbd0
15 changed files with 243 additions and 88 deletions

View File

@@ -139,9 +139,13 @@ pub fn (mut f File) flush() {
pub fn file_size(path string) int {
mut s := C.stat{}
$if windows {
C._wstat(path.to_wide(), voidptr(&s))
$if tinyc {
C.stat(charptr(path.str), voidptr(&s))
} $else {
C._wstat(path.to_wide(), voidptr(&s))
}
} $else {
C.stat(charptr(path.str), &s)
C.stat(charptr(path.str), voidptr(&s))
}
return s.st_size
}