1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-09-03 01:21:16 +03:00

Show 'usage' information on console also for Windows

This commit is contained in:
bel
2014-03-13 21:41:17 +01:00
parent dd7f89f0a5
commit 51971ce6c7

View File

@@ -134,6 +134,15 @@ static void show_usage_and_exit(void)
const struct mg_option *options;
int i;
#ifdef WIN32
if (!AttachConsole(ATTACH_PARENT_PROCESS)) {
AllocConsole();
AttachConsole(GetCurrentProcessId());
}
freopen("CON", "a", stdout);
freopen("CON", "a", stderr);
#endif
fprintf(stderr, "Civetweb v%s, built on %s\n",
mg_version(), __DATE__);
fprintf(stderr, "Usage:\n");