diff --git a/compiler/comptime.v b/compiler/comptime.v index bb594786d3..c2d4bed885 100644 --- a/compiler/comptime.v +++ b/compiler/comptime.v @@ -41,6 +41,12 @@ fn (p mut Parser) comp_time() { p.statements_no_rcbr() p.genln('#endif') } + else if name == 'tinyc' { + p.genln('#ifdef __TINYC__') + p.check(.lcbr) + p.statements_no_rcbr() + p.genln('#endif') + } else { println('Supported platforms:') println(supported_platforms) diff --git a/compiler/msvc.v b/compiler/msvc.v index 2b6c2e9c82..b4591d00ee 100644 --- a/compiler/msvc.v +++ b/compiler/msvc.v @@ -4,6 +4,9 @@ import os #flag windows -l shell32 +// RegOpenKeyExA etc +#flag windows -l advapi32 + struct MsvcResult { full_cl_exe_path string exe_path string diff --git a/thirdparty/glfw/glfw3.dll b/thirdparty/glfw/glfw3.dll index 1ed6f46c8d..d9040da92c 100644 Binary files a/thirdparty/glfw/glfw3.dll and b/thirdparty/glfw/glfw3.dll differ diff --git a/vlib/builtin/int.v b/vlib/builtin/int.v index 919ffbe5d8..fc71270bf1 100644 --- a/vlib/builtin/int.v +++ b/vlib/builtin/int.v @@ -31,7 +31,7 @@ pub fn (a f64) eq(b f64) bool { return C.fabs(a - b) <= C.DBL_EPSILON } pub fn (a f32) eq(b f32) bool { - return C.fabsf(a - b) <= C.FLT_EPSILON + return C.fabs(a - b) <= C.FLT_EPSILON } pub fn (a f64) eqbit(b f64) bool { return C.DEFAULT_EQUAL(a, b) diff --git a/vlib/builtin/string.v b/vlib/builtin/string.v index 088ab2b942..6f62fb3e90 100644 --- a/vlib/builtin/string.v +++ b/vlib/builtin/string.v @@ -201,7 +201,11 @@ pub fn (s string) u32() u32 { } pub fn (s string) u64() u64 { - return C.strtoull(*char(s.str), 0, 0) + //$if tinyc { + return u64(s.int()) // TODO + //} $else { + //return C.strtoull(*char(s.str), 0, 0) + //} //return C.atoll(s.str) // temporary fix for tcc on windows. }