summaryrefslogtreecommitdiff
path: root/vdservice
diff options
context:
space:
mode:
Diffstat (limited to 'vdservice')
-rw-r--r--vdservice/vdservice.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp
index 4701f5a..9c5f569 100644
--- a/vdservice/vdservice.cpp
+++ b/vdservice/vdservice.cpp
@@ -1216,7 +1216,22 @@ void VDService::write_agent_control(uint32_t type, uint32_t opaque)
}
}
-int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
+#ifdef __GNUC__
+#undef _tmain
+#ifdef UNICODE
+int _tmain(int argc, TCHAR* argv[]);
+int main(void)
+{
+ int argc;
+ argv = CommandLineToArgvW(GetCommandLineW(), &argc);
+ return _tmain(argc, argv);
+}
+#else
+#define _tmain main
+#endif
+#endif
+
+int _tmain(int argc, TCHAR* argv[])
{
bool success = false;