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.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp
index fdb68fdedb6..655ea552c0a 100644
--- a/cpp/src/IcePatch2/Server.cpp
+++ b/cpp/src/IcePatch2/Server.cpp
@@ -211,15 +211,34 @@ IcePatch2::PatcherService::usage(const string& appName)
print("Usage: " + appName + " [options] [DIR]\n" + options);
}
+#ifdef _WIN32
+
+//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications.
+#ifdef __BCCPLUSPLUS__
+
int
main(int argc, char* argv[])
+
+#else
+
+int
+wmain(int argc, wchar_t* argv[])
+
+#endif
{
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
@@ -234,7 +253,7 @@ main(int argc, char* argv[])
args.push_back(argv[i]);
}
status = svc.main(args);
-#endif
-
return status;
}
+
+#endif