Uggg what a long 40 hrs this has been :c)

Sean Mathews mathewss "at" nutech.com
Thu, 10 Dec 1998 18:54:48 +0000


On Thu, 10 Dec 1998, James [Wez] Weatherall wrote:

> I suspect the difference in byte-order between Sparc and i386 
> architectures. Modifying the code that generates macros like Swap32 to
> cope with Linux on Sparc should fix this.
> 
 Hmm ok well i did my digging and these are the macros
and well from the looks of it it is automatic..
if the pointer points to the MSB then we are talking BIG ENDIAN
and the MSB in this case would be 0 thus (s)/(l) is directly used.
on the other hand if it points to the LSB (1) then Swap16/Swap32 is
used 

static const int rfbEndianTest = 1;
#define Swap16IfLE(s) (*(const char*)&rfbEndianTest ? Swap16(s) : (s))
#define Swap32IfLE(l) (*(const char*)&rfbEndianTest ? Swap32(l) : (l))

so if this is automatic then i must assume it is doing it's job?
or is this not the area you were refering to?


> Cheers,
> 
> James "Wez" Weatherall
> --
> Olivetti & Oracle Research Laboratory, Cambridge, UK - Tel : 343000
> Laboratory for Communications Engineering, Cambridge - Tel : -
> 
> 
> ---------------------------------------------------------------------
> The VNC mailing list     -   see http://www.orl.co.uk/vnc/intouch.html
> ---------------------------------------------------------------------
> 
> 
> 
> 



---------------------------------------------------------------------
The VNC mailing list     -   see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------