diff --git a/ChangeLog b/ChangeLog index 1a98ecdb1..40af2a785 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Mar 5 00:38:54 2002 Owen Taylor + + * glib/gutils.c (g_get_any_init): Where we have + getpwuid[_r], use that in preference to $HOME, and + only check $HOME as a fallback if getpwuid fails. + (#2311) + Sun Mar 3 21:09:24 2002 Owen Taylor * configure.in: Default to --disable-gtk-doc, to avoid diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 1a98ecdb1..40af2a785 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Tue Mar 5 00:38:54 2002 Owen Taylor + + * glib/gutils.c (g_get_any_init): Where we have + getpwuid[_r], use that in preference to $HOME, and + only check $HOME as a fallback if getpwuid fails. + (#2311) + Sun Mar 3 21:09:24 2002 Owen Taylor * configure.in: Default to --disable-gtk-doc, to avoid diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1a98ecdb1..40af2a785 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Tue Mar 5 00:38:54 2002 Owen Taylor + + * glib/gutils.c (g_get_any_init): Where we have + getpwuid[_r], use that in preference to $HOME, and + only check $HOME as a fallback if getpwuid fails. + (#2311) + Sun Mar 3 21:09:24 2002 Owen Taylor * configure.in: Default to --disable-gtk-doc, to avoid diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 1a98ecdb1..40af2a785 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +Tue Mar 5 00:38:54 2002 Owen Taylor + + * glib/gutils.c (g_get_any_init): Where we have + getpwuid[_r], use that in preference to $HOME, and + only check $HOME as a fallback if getpwuid fails. + (#2311) + Sun Mar 3 21:09:24 2002 Owen Taylor * configure.in: Default to --disable-gtk-doc, to avoid diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 1a98ecdb1..40af2a785 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Tue Mar 5 00:38:54 2002 Owen Taylor + + * glib/gutils.c (g_get_any_init): Where we have + getpwuid[_r], use that in preference to $HOME, and + only check $HOME as a fallback if getpwuid fails. + (#2311) + Sun Mar 3 21:09:24 2002 Owen Taylor * configure.in: Default to --disable-gtk-doc, to avoid diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 1a98ecdb1..40af2a785 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Tue Mar 5 00:38:54 2002 Owen Taylor + + * glib/gutils.c (g_get_any_init): Where we have + getpwuid[_r], use that in preference to $HOME, and + only check $HOME as a fallback if getpwuid fails. + (#2311) + Sun Mar 3 21:09:24 2002 Owen Taylor * configure.in: Default to --disable-gtk-doc, to avoid diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1a98ecdb1..40af2a785 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Tue Mar 5 00:38:54 2002 Owen Taylor + + * glib/gutils.c (g_get_any_init): Where we have + getpwuid[_r], use that in preference to $HOME, and + only check $HOME as a fallback if getpwuid fails. + (#2311) + Sun Mar 3 21:09:24 2002 Owen Taylor * configure.in: Default to --disable-gtk-doc, to avoid diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1a98ecdb1..40af2a785 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Tue Mar 5 00:38:54 2002 Owen Taylor + + * glib/gutils.c (g_get_any_init): Where we have + getpwuid[_r], use that in preference to $HOME, and + only check $HOME as a fallback if getpwuid fails. + (#2311) + Sun Mar 3 21:09:24 2002 Owen Taylor * configure.in: Default to --disable-gtk-doc, to avoid diff --git a/glib/gutils.c b/glib/gutils.c index 29516d638..f0a938aa7 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -744,10 +744,12 @@ g_get_any_init (void) #endif /* G_OS_WIN32 */ } - if (!g_home_dir) - g_home_dir = g_strdup (g_getenv ("HOME")); - #ifdef G_OS_WIN32 + /* We check $HOME first for Win32, though it is a last resort for Unix + * where we prefer the results of getpwuid(). + */ + g_home_dir = g_strdup (g_getenv ("HOME")); + /* In case HOME is Unix-style (it happens), convert it to * Windows style. */ @@ -879,8 +881,11 @@ g_get_any_init (void) } } # endif /* G_OS_WIN32 */ - + #endif /* !HAVE_PWD_H */ + + if (!g_home_dir) + g_home_dir = g_strdup (g_getenv ("HOME")); #ifdef __EMX__ /* change '\\' in %HOME% to '/' */