Re: glib: g_get_any_init() bug fix



On Thu, 21 Jan 1999, Sebastian Wilhelmi wrote:

> In different libs (like gtk+, gnome-libs, etc.) there are quite many
> uses of getpwuid, getpwnam, etc. If they (or more accurate their _r
> counterparts) all behave in the same unportable way, we might be
> better of, including some thread safe g_getpwuid() functions into
> glib. But I know, that this will make the Win32 porters unhappy and
> the beholders of the feature freeze.... but that comes to my TODO for
> glib 1.3.

This is getting insane. We're going to wind up wrapping every single libc
function in glib, turning it into a bloated piece of crap that nobody
wants to maintain thing. Having a few compatibility aids is a necessary
evil, but don't forget what glib was originally intended to do - provide
data structure & utility routines for the most common tasks of C
programmers. It succeeds at that task, but now everyone has their pet
feature that "everyone needs". :)

May I suggest that people wanting to use or develop threaded programs on
platforms without reentrant libc routines should either (a) switch to a
platform that has reentrant libc routines or (b) cope.

I'm not being a Linux bigot here. There are several OS's out there that
have thread-safe libc's (Linux being among them, although not at the top
of the pack). Trying to address the OS problem in any other place but the
OS is calling for a glib maintainance nightmare, and slower, more
error-prone glib-based software.

If someone is itching to write a new data structure for glib, adding GTrie
might be neat... Or finding out why g_get_any_init() allocates 4K of
memory. Or finding a way to speed up GMemChunk in the G_ALLOC_AND_FREE
case so it is at least as fast as malloc. Or providing a way for apps to
provide a hint as to the typical maximum number of {GList,GSList,GNode}
items used, so that the memory pool sizes can be optimized. Or...

-- Elliot
"In film you will find four basic story lines. Man versus man, man
 versus nature, nature versus nature, and dog versus vampire."
    - Steven Spielberg






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