From e600feda983a0fea41957eced19141d545b028c5 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 4 Apr 2020 15:59:43 +0200 Subject: [PATCH] cgen: __argc is already used on windows --- vlib/v/gen/cgen.v | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index a7e7e07205..baa0f691c1 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -757,9 +757,9 @@ fn (g mut Gen) gen_fn_decl(it ast.FnDecl) { is_main := it.name == 'main' if is_main { if g.pref.os == .windows { - g.write('int wmain(int __argc, wchar_t *__argv[], wchar_t *__envp[]') + g.write('int wmain(int ___argc, wchar_t *___argv[], wchar_t *___envp[]') } else { - g.write('int ${it.name}(int __argc, char** __argv') + g.write('int ${it.name}(int ___argc, char** ___argv') } } else { @@ -817,9 +817,9 @@ fn (g mut Gen) gen_fn_decl(it ast.FnDecl) { g.writeln('free(_const_os__args.data); // empty, inited in _vinit()') } if g.pref.os == .windows { - g.writeln('_const_os__args = os__init_os_args_wide(__argc, __argv);') + g.writeln('_const_os__args = os__init_os_args_wide(___argc, ___argv);') } else { - g.writeln('_const_os__args = os__init_os_args(__argc, (byteptr*)__argv);') + g.writeln('_const_os__args = os__init_os_args(___argc, (byteptr*)___argv);') } } }