This patch was given by ademin (thanks!).
http://code.google.com/p/google-glog/issues/detail?id=12
git-svn-id: https://google-glog.googlecode.com/svn/trunk@64
eb4d4688-79bd-11dd-afb4-
1d65580434c0
}
static void MyUserNameInitializer() {
// TODO(hamaji): Probably this is not portable.
+#if defined(OS_WINDOWS)
+ const char* user = getenv("USERNAME");
+#else
const char* user = getenv("USER");
+#endif
if (user != NULL) {
g_my_user_name = user;
} else {