[Top][All Lists]

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


From: Marcus Brinkmann
Subject: libps/libihash
Date: Tue, 15 Jun 2004 20:04:02 +0200
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Tue, 15 Jun 2004 17:51:09 +0300,
Ognyan Kulev wrote:
> Marcus Brinkmann wrote:
> > I am back from Wizards of OS 3 and can commit patches.
> Although not related to this thread, what do you think about some form 
> of HURD_IHASH_ITERATE for non-C99 sources?  Specifically, the one used 
> in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=133640 .  The 
> maintainer of dpkg don't want to enable C99.  (I'll take care of getting 
> rid of constructor do_libpsinit next days.)

This belongs on bug-hurd.  Personally, it seems to me that it is a
mistake that libps uses libihash in its public interface.  The
structure should be opaque.  Accessor functions either exist or can be
added.  This requires a bit of thought, but from a shared library
design point of view, ps.h has to be considered harmful.  I prefer to
think of our ihash as an internal library (and in fact I didn't
realize the use in ps.h and the resulting problems, why wasn't that
discussed here - or did I miss it?).

In general, we will never hesitate to use all the power that modern
standards and their GNU implementations and extensions give us.  As
the code is inherently non-portable, it would be simple and feasible
to add -std=gnu99 to the Makefiles of dpkg for this single file only,
or only if the target architecture is the Hurd.  Somebody should
really make it a project to write a generic, portable libps.

As for Neal's constructor, you can likely do with an initializer
function that is called from main() early.  I did not check it out at
all, but that's probably the way to go (constructors are better used
in libraries where you can't expect the user to call an initializer
function explicitely).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]