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

List:       kde-commits
Subject:    Re: kdesupport/mimelib
From:       Don Sanders <don () sanders ! org>
Date:       2000-04-18 8:23:49
[Download RAW message or body]

On Tue, 18 Apr 2000, Waldo Bastian wrote:
> On Mon, 17 Apr 2000, Don Sanders wrote:
> > Maybe
> >
> >  void DwDateTime::_FromUnixTime(DwUint32 aTime) {
> > -    DwUint32 t = aTime + mZone*60;
> >  #if defined(USE_PORTABLE_GMTIME)
> > +    DwUint32 t = aTime + mZone*60;
> >      struct tm tt
> >      my_gmtime_r(&t, &tt);
> > #elif defined(HAVE_GMTIME_R)
> > +    time_t t = aTime + mZone*60;
> >     struct tm tt
> >     gmtime_r(&t, &tt);
> > #else
> > +    time_t t = aTime + mZone*60;
> >     struct tm tt = *gmtime((time_t*)&t);
> > #endif
> >
> > might be better (though I haven't tested this and could be wrong).
> 
> Yes. If we are looking at it anyway, we better remove this whole 
> PORTABLE_GMTIME thing and add a autoconf test for HAVE_GMTIME_R.
> Then the code makes sense.

Okay, if you say so. To be honest I would prefer it if mimelib wasn't modified
much.

> Although it is sort of stupid to debug code that 
> nobody uses :-]

Yes.

BFN,
Don.

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

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