mirror of
https://github.com/lammertb/libhttp.git
synced 2025-09-03 01:21:16 +03:00
replace Windows CRLF with Unix newline
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
34
src/main.c
34
src/main.c
@@ -1510,25 +1510,25 @@ static int MakeConsole() {
|
||||
if (!ok) {
|
||||
if (!AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||
FreeConsole();
|
||||
if (!AllocConsole()) {
|
||||
err = GetLastError();
|
||||
if (err==ERROR_ACCESS_DENIED) {
|
||||
MessageBox(NULL, "Insufficient rights to create a console window", "Error", MB_ICONERROR);
|
||||
}
|
||||
}
|
||||
AttachConsole(GetCurrentProcessId());
|
||||
}
|
||||
if (!AllocConsole()) {
|
||||
err = GetLastError();
|
||||
if (err==ERROR_ACCESS_DENIED) {
|
||||
MessageBox(NULL, "Insufficient rights to create a console window", "Error", MB_ICONERROR);
|
||||
}
|
||||
}
|
||||
AttachConsole(GetCurrentProcessId());
|
||||
}
|
||||
|
||||
ok = (GetConsoleWindow() != NULL);
|
||||
if (ok) {
|
||||
freopen("CONIN$", "r", stdin);
|
||||
freopen("CONOUT$", "w", stdout);
|
||||
freopen("CONOUT$", "w", stderr);
|
||||
}
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
SetConsoleTitle(server_name);
|
||||
if (ok) {
|
||||
freopen("CONIN$", "r", stdin);
|
||||
freopen("CONOUT$", "w", stdout);
|
||||
freopen("CONOUT$", "w", stderr);
|
||||
}
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
SetConsoleTitle(server_name);
|
||||
}
|
||||
|
||||
return ok;
|
||||
|
Reference in New Issue
Block a user