libbase: logging fixes
- getprogname(): call basename() which is available in mingw's crt.
Don't potentially go recursive with DCHECK_GT().
- Use Win32 critical section instead of mutex.
- Change log_characters check to compile-time.
- Fix code that gets the basename of __FILE__. The previous code was not
setting _file, so it didn't work.
- Save and restore errno for LOG calls. Inspired by similar Chromium code.
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2 files changed