Re: [gtk-list] still a bug with getpwuid_r [was: Re: 1.1.14



Hi,
 
> Doubled by whom? 

By glib: here's the source:

        do
          {
            g_free (buffer);
            buffer = g_malloc (bufsize);

#    ifdef HAVE_GETPWUID_R_POSIX
            error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw);
            error = error < 0 ? errno : error;
#    else /* !HAVE_GETPWUID_R_POSIX */
            pw = getpwuid_r (getuid (), &pwd, buffer, bufsize);
            error = pw ? 0 : errno;
#    endif /* !HAVE_GETPWUID_R_POSIX */

            bufsize *= 2; /* here the bufzise gets doubled */
          }
        while (error == ERANGE); /* This loop us left, whenever the call
                                    to getpwuid succeded. */


> Don't forget that we are working on multiple
> architectures, and the Digital UNIX man page seems very specific.
> 
> I'd rather have it suffice in all situations rather than most.

I still think, it should work on DIGITAL as well.

Bye,
Sebastian
-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi@ira.uka.de           |      är himmlen så förunerligt blå
http://goethe.ira.uka.de/~wilhelmi   |



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