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

List:       kmail-devel
Subject:    Re: kmail under Solaris and Linux
From:       Waldo Bastian <bastian () kde ! org>
Date:       2002-01-31 22:10:43
[Download RAW message or body]

On Thursday 31 January 2002 07:31 am, Michael Häckel wrote:
> On Thursday 31 January 2002 15:49:15, Olaf J. Schumann wrote:
> > Why not byte-swaping the index-files to (say) little-endian (= IMHO
> > network-byte-order). If you complain about speed: each ip-packet has to
> > be byte swaped on i386. If you read the index-files into memory, then you
> > have to swap them once, you read them. If you mmap them (sorry, I'm to
> > lazy to use the source :-) then it would be harder.
>
> We do mmap.
>
> > Or: second approach: have an header witch ensures, that the index-file
> > has the right endianess and perhaps the size of the datastructures (32
> > vs. 64 bit etc.) are ok. If not: erase the index-file and rebuild it.
> > (has to be done with each switch Linux/Solaris
>
> When switching between Linux and True64, there possibly might be yet
> another problem. However actually we only use 16 bit ushort in the index
> file. Don't know how many bits that are on True64.

Btw, a single htonl/htons call isn't going to kill you. In glibc it's either a 
#define htons(x) x if the byte-order is ok already (is it on i386?) and 
otherwise a single rorw instruction.

Cheers,
Waldo
-- 
bastian@kde.org  |   SuSE Labs KDE Developer  |  bastian@suse.com

_______________________________________________
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