aboutsummaryrefslogtreecommitdiffstats
path: root/cli_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli_main.c')
-rw-r--r--cli_main.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/cli_main.c b/cli_main.c
index ee5f67e93c..61c8c58ae7 100644
--- a/cli_main.c
+++ b/cli_main.c
@@ -1,7 +1,7 @@
/*
* Compile and link this with all CLI programs where the main routine
- * should get UTF-8 arguments on Windows. In those programs, declare
- * the main program as real_main() rather than main().
+ * should get UTF-8 arguments on Windows. In those programs, include the
+ * cli_main.h header to rename main to real_main on Windows.
*
* This is used in software licensed under the GPLv2, and its license MUST
* be compatible with that license.
@@ -62,12 +62,11 @@ wmain(int argc, wchar_t *wc_argv[])
argv[i] = utf8_string;
}
argv[i] = NULL;
- return real_main(argc, argv);
-}
-#else /* _WIN32 */
-int
-main(int argc, char *argv[])
-{
+ /*
+ * The original "main" routine was renamed to "real_main" via a macro in
+ * the cli_main.h header file since either "main" or "wmain" can be
+ * defined on Windows, but not both.
+ */
return real_main(argc, argv);
}
#endif