Changes to DBG_printf (dotnet/coreclr#20383)
1. will now restore the original errno in all cases
2. combine the snprintf calls in the if(bHeader) block, the only difference was the file/function string
3. we now check the return value of snprintf and _vsnprintf_s instead of ignoring them. When sprintf fails for the header, we just drop the header, when _vsnprintf_s fails for the message itself, we print an error.
4. replaced an alloca with a statically sized buffer
Commit migrated from https://github.com/dotnet/coreclr/commit/
cec441660fb12bd48dab3e4f234d5a6315121aa0