Hi
On Dec 3, 2003, at 3:49 PM, Paul J Stevens wrote:
> I changed u64_t to int64_t because gcc -Wall started warning about:
>
> auth/authldap.c:787:
>
> /* pass through any error from __auth_get_every_match() */
> return ( known < 0 ? known : 0 );
ok, just skimmed through it and did see that one. Anyway, In quite a
lot of functions in db.c I've changed the return type from u64_t to
int, and used the u64_t variable as a call by reference parameter. That
way, it's much easier to check a function for an error, without
resorting to using comparisons between unsigned values and -1 for
instance.
I guess this is another one of those places that this needs to be fixed.
>
> if known is unsigned this doesn't make any sense, does it ?
>
> Anyway, I did some googling on u64_t, and only found some references
> to old minix docs AND dbmail !!! Is u64_t deprecated? Or else, where
> is it defined? And why doesn't dbmail use glib instead ?
u64_t is defined in dbmailtypes.h as unsigned long long.
This could be a portability problem, I guess.
Using glib would be quite nice of course, not only for the datatypes
(u64_t -> guint64), but also for things like linked lists, which are
very nicely done in glib.
2 problems though:
1. It's a lot of work to port everything to glib. Although I must say
it sounds very good to me.
2. It adds a library dependency. But I guess glib is available for all
platforms we need to support, given the fact that GTK+ also runs on
almost everything.
It could be a long-term goal to port to glib. Certainly not short-term.
Cheers,
Ilja
--
IC&S
Stadhouderslaan 57
3583 JD Utrecht
telnr. 030-6355730
faxnr. 030-6355731
PGP-key:
http://www.ic-s.nl/keys/ilja.txt