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

List:       kde-pim
Subject:    Re: [Kde-pim] Marcus Bains line
From:       Adriaan de Groot <adridg () cs ! kun ! nl>
Date:       2002-07-04 12:00:06
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 04 July 2002 13:41, Cornelius Schumacher wrote:
> > This won't build on FreeBSD, because line 31 of timezone.cpp uses
> > timezone(), which is a totally different definition to the one on Linux.
> > On FreeBSD, timezone takes two int parameters, and returns a character
> > pointer to the TZ shortform, as used in dates (GMT, BST, CET etc).
>
> timezone should be a variable and not a function according to the manpage
> of localtime. 

It's still a Linuxism, unfortunately. Took us a long time to figure out what 
was going wrong in, um, krfb I think where timezone was also used as a 
variable.

Some sample output:

bash-2.05$ uname ; man timezone
FreeBSD
TIMEZONE(3)            FreeBSD Library Functions Manual            TIMEZONE(3)

NAME
     timezone - return the timezone abbreviation

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     char *
     timezone(int zone, int dst);

<snip>

and on another machine:

[adridg@catwoman adridg]$ uname ; man localtime
Linux
CTIME(3)            Linux Programmer's Manual            CTIME(3)



NAME
       asctime,  ctime,  gmtime,  localtime,  mktime  - transform
       binary date and time to ASCII

SYNOPSIS
      ....
       struct tm *localtime(const time_t *timep);

       time_t mktime(struct tm *timeptr);

       extern char *tzname[2];
       long int timezone;
<snip>


_WHY_ there has to be this difference is beyond me. I believe assignments to 
timezone under Linux can be mirrored by calls to tzset() in BSD. Strangely, 
Solaris has a time_t timezone.

You might want to grep for timezone in the rest of the KDE sources, to find 
out what we did to patch that over in other programs.


As for the whole MB-line problem, for some reason I don't have it at all.  
Pretty much the same system as Andy -- except I'm still on 4.4 and not on 4.6 
(relevant?) -- and my MB line follows the timezone whereever I put it.

- -- 
Work: http://www.cs.kun.nl/~adridg/frescos/
Play: http://freebsd.kde.org/  http://slac.com/~pilone/kpilot_home/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9JDjHdqzuAf6io/4RAtyaAJ0YHOccJJY3Jm/fGZeu0vCQdXciAQCgg+zy
/A+tTjCDdCa13htwFNVbGSM=
=JezG
-----END PGP SIGNATURE-----

_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

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