[Opentnl-cvs] tnl/tnl tnlMethodDispatch.cpp,1.2,1.3
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2004-05-12 22:13:45
|
Update of /cvsroot/opentnl/tnl/tnl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27611/tnl Modified Files: tnlMethodDispatch.cpp Log Message: Fixed (hopefully) issue on big endian hardware with RPCs of < 32 bit types Index: tnlMethodDispatch.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tnlMethodDispatch.cpp 8 May 2004 00:19:08 -0000 1.2 --- tnlMethodDispatch.cpp 12 May 2004 22:13:27 -0000 1.3 *************** *** 247,259 **** --- 247,287 ---- { case TypeS8: + #ifdef TNL_BIG_ENDIAN + if(!argList[i].isVector) + { + bstream.write(((S8 *) intArg)[3]); + } + else + #endif bstream.write(*((S8 *) intArg)); break; case TypeU8: + #ifdef TNL_BIG_ENDIAN + if(!argList[i].isVector) + { + bstream.write(((U8 *) intArg)[3]); + } + else + #endif bstream.write(*((U8 *) intArg)); break; case TypeS16: + #ifdef TNL_BIG_ENDIAN + if(!argList[i].isVector) + { + bstream.write(((S16 *) intArg)[1]); + } + else + #endif bstream.write(*((S16 *) intArg)); break; case TypeU16: + #ifdef TNL_BIG_ENDIAN + if(!argList[i].isVector) + { + bstream.write(((U16 *) intArg)[1]); + } + else + #endif bstream.write(*((U16 *) intArg)); break; *************** *** 412,424 **** --- 440,480 ---- { case TypeS8: + #ifdef TNL_BIG_ENDIAN + if(!argList[i].isVector) + { + bstream->read(((S8 *) intArg) + 3); + } + else + #endif bstream->read((S8 *) arg); break; case TypeU8: + #ifdef TNL_BIG_ENDIAN + if(!argList[i].isVector) + { + bstream->read(((U8 *) intArg) + 3); + } + else + #endif bstream->read((U8 *) arg); break; case TypeS16: + #ifdef TNL_BIG_ENDIAN + if(!argList[i].isVector) + { + bstream->read(((S16 *) intArg) + 1); + } + else + #endif bstream->read((S16 *) arg); break; case TypeU16: + #ifdef TNL_BIG_ENDIAN + if(!argList[i].isVector) + { + bstream->read(((U16 *) intArg) + 1); + } + else + #endif bstream->read((S16 *) arg); break; |