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

List:       kmail-devel
Subject:    Re: kmail under Solaris and Linux
From:       Michael =?iso-8859-1?q?H=E4ckel?= <haeckel () kde ! org>
Date:       2002-02-02 8:54:59
[Download RAW message or body]

On Samstag, 2. Februar 2002 03:49, Waldo Bastian wrote:
>
> It adds a two word (8 byte) header to the index file which contains a byte
> order indicator and the size of long (4 or 8) used for the index file.
>
> If the header is not present we assume that both the byte order and the
> size of long of the index file matches with that of the host.
>
> The QStrings are always written in network order, just as with Qt 2. That
> means that if the host order differs from network order, they are swapped
> first, before being written. If the host order _is_ network order, they are
> NOT swapped!
>
> This means that the patch is supposed to restore compatibility on Sparc
> with KDE 2 index-files, but it will probably also mean that it breaks
> compatibility on Sparc with KDE 3 beta1/2 index-files. During testing I
> noticed that you will get lots of chinese (korean?) in the subjects of your
> msg-list in that case. (Do not panic! :-) Selecting the message should
> result in the proper subject being shown.

Sounds good so far.

> I have replaced all ints with either Q_UINT32 or Q_INT32, int seems to be
> always 4 bytes, even on 64-bit platforms but we better use an explicit
> 32-bit type to minimize surprises.

According to Thomas Leiter sizeof(int) == 8 on True64 with Compaq's compiler.

> I also converted MsgPartType to Q_UINT32. gcc gives sizeof(MsgpartType) ==
> 4 , but I'm not sure if every compiler does.
>
> The long is another story. It will be either 64 bit or 32 bit. If the size
> of long in the index file doesn't match with the size of long of the host,
> the long is converted. The conversion from 64 bit to 32 bit just drops the
> 32 most significant bits. 32 bit seems to be enough for most info.... it
> will be enough for the date till 2038 and it will be enough for the offset
> as long as the mbox file does not exceed 4Gb. (But if your mbox is 4Gb, you
> probably shouldn't be using mbox.)

This is something I never understood. According to my calculations 32 bit are 
enough until 2106 at least if it's a Q_UINT32 and not a Q_INT32.

> It works fine for me, but I haven't tested it cross-platform yet. If you
> test it make sure to backup your Mail directory first.

This of course needs to be done.

Regards,
Michael Häckel


_______________________________________________
kmail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread] 

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