Skip to content
Snippets Groups Projects
Commit adb32fb4 authored by rswindell's avatar rswindell
Browse files

Use Microsoft magic to "ignore regular line breaks in the message definition...

Use Microsoft magic to "ignore regular line breaks in the message definition text." of socket error strings on Windows:
strips the embedded line-feeds from the socket error description.
parent 8ea8d21f
Branches
Tags
No related merge requests found
...@@ -506,7 +506,7 @@ DLLEXPORT const char* socket_strerror(int error_number) ...@@ -506,7 +506,7 @@ DLLEXPORT const char* socket_strerror(int error_number)
{ {
static char msg[256]; static char msg[256];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, // dwFlags FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, // dwFlags
NULL, // lpSource NULL, // lpSource
error_number, // dwMessageId error_number, // dwMessageId
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // dwLanguageId MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // dwLanguageId
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment