1 Mar 2007 12:50
Re: /usr/local/bin/ssphys: unrecognized file during LOADVSSNAMES
Ferry Huberts <ferry <at> hupie.com>
2007-03-01 11:50:11 GMT
2007-03-01 11:50:11 GMT
try looking at the ntoh and hton macros in the linux kernel. these convert between big endian and little endian -- Ferry Huberts > Marcel Juffermans schrieb: >> Yes, it's a Mac. Is there a standard way to convert little endian to >> big endian that you know of? Looking at SSTypes.h there aren't that >> many places where a conversion would need to happen. I'm happy to >> submit patches, if I have a code snippet that can do the conversion. >> > I expect, that these are a few places where you have to change the > encoding. I simply copy the bytes from the file into a buffer and later > "cast" this to the specific record. You can not simply reverse the order > of the buffer. You have to do it for each POD and each non trivial type. > You can check the SSTypes.h file. In this files all used PODs are > defined. Starting from there you can search for the specific variables, > that need to be converted. > > I searched at koders.com for an easy way to convert the encoding. In the > Crypto++ project they used functions like ByteReverse for each type. You > could conditionally define these functions to be empty on non MSB platforms. > > Have a look here: > http://www.koders.com/?s=ByteReverse&scope=MRQTFFSB89LYUL924H2V49DP2C&la=Cpp > > I don't have much time this week, otherwise I would help out. So this is > only a little information > > Dirk(Continue reading)
RSS Feed