summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePatch2/Server.cpp')
-rw-r--r--cpp/src/IcePatch2/Server.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp
index 91e71d708aa..75d28cef865 100644
--- a/cpp/src/IcePatch2/Server.cpp
+++ b/cpp/src/IcePatch2/Server.cpp
@@ -213,15 +213,24 @@ IcePatch2::PatcherService::usage(const string& appName)
print("Usage: " + appName + " [options] [DIR]\n" + options);
}
+#ifdef _WIN32
+
int
-main(int argc, char* argv[])
+wmain(int argc, wchar_t* argv[])
{
IcePatch2::PatcherService svc;
int status = EXIT_FAILURE;
-
-#ifdef _WIN32
status = svc.main(argc, argv);
+ return status;
+}
+
#else
+
+int
+main(int argc, char* argv[])
+{
+ IcePatch2::PatcherService svc;
+ int status = EXIT_FAILURE;
//
// For UNIX, force --nochdir option, so the service isn't started
// with / as the working directory. That way, if the data
@@ -236,7 +245,6 @@ main(int argc, char* argv[])
args.push_back(argv[i]);
}
status = svc.main(args);
-#endif
-
return status;
}
+#endif