Re: [gtk-list] pb (?) with glib : GLib-ERROR



"Georg C. F. Greve" wrote:
> 
> Content-Type: text/plain; charset=US-ASCII
> 
>  || On 22 Jan 1999 13:48:42 +0100,
>  || regarding "[gtk-list] pb (?) with glib : GLib-ERROR",
>  || j.saito@wanadoo.fr (Junichi Saito) wrote:
> 
>  js> I got the following message, while trying to run panel from gnome-core
>  js> with enlightenment (it wouldn't start) :
> 
>  js> GLib-ERROR **: Could not read account information: No such file or
>  js> directory
>  js> This comes from 'gutils.c' of glib.
>  js> What was it looking for ?
>  js> The system is a i386 linux.
> 
> I got the same problem.... wasn't able to get GNOME to run at all in
> the past 3 days... usually it compiles fine but it won't run.
> 
> Any help appreciated...
> 
> Regards,
>         Georg

I've got the same when runing gnome-gen-mimedb during install of
gnome-libs.
Here is a patch which apparently solves the problem. In fact one should
never
test the errno before testing the return value of the function.

Regards,
-velco
--- gutils.c.old	Sat Jan 23 02:13:12 1999
+++ gutils.c	Sat Jan 23 02:32:34 1999
@@ -447,16 +447,11 @@
 	    buffer = g_realloc (buffer, bufsize);
 #    ifdef HAVE_GETPWUID_R_POSIX
 	    error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw);
-	    if (errno == 0) /* The errorcode is in error (might be 0, too) */
-	      errno = error;
 #    else /* HAVE_GETPWUID_R_POSIX */
 	    pw = getpwuid_r (getuid (), &pwd, buffer, bufsize);
 #    endif /* HAVE_GETPWUID_R_POSIX */
-	    if (errno == 0)
-	      {
-		g_assert (pw);
+	    if (error == 0 && pw)
 		break;
-	      }
 
 	    if (errno != ERANGE)
 	      g_error ("Could not read account information: %s", 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]