[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: 64-bit time_t
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2003-09-29 12:54:53
[Download RAW message or body]

On Mon, Sep 29, 2003 at 10:01:44AM +0200, Adriaan de Groot wrote:
> Can you conditionalize on sizeof?
>
yes

> ie.  would
> 
> #if sizeof(time_t) > sizeof(l_struct.ut_time)
> 
> work? I doubt it, since sizeof() isn't something known at preprocess time.
> 
yep, it does not work. but you can simply use a normal if; the condition
will be always true or false, so the compiler will optimize away the
unnecessary branch. i do this trick for 64-bit special-casing in
kdm/backend/genauth.c. anyway, this can cause warnings, so having a
config.h #defines for data type sizes is certainly cleaner.

greetings

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic