From: <sil...@li...> - 2003-04-17 16:31:28
|
Update of /cvsroot/silgraphite/silgraphite/include In directory sc8-pr-cvs1:/tmp/cvs-serv1319 Modified Files: GrCommon.h Log Message: redefine grwchar to unsigned short so it is the same on windows and linux also only ues the pragmas and tchar.h for windows Index: GrCommon.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrCommon.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- GrCommon.h 16 Apr 2003 19:59:37 -0000 1.3 +++ GrCommon.h 17 Apr 2003 16:31:22 -0000 1.4 @@ -63,8 +63,9 @@ //#include <time.h> //#include <math.h> #include <limits.h> +#ifndef __GNUC__ #include <tchar.h> - +#endif //#include <crtdbg.h> //#include <exception> @@ -97,6 +98,7 @@ /*********************************************************************************************** Turn off the goofy warnings. ***********************************************************************************************/ +#ifdef _MSC_VER #pragma warning(disable: 4065) // Switch statement contains default but no case. #pragma warning(disable: 4097) // typedef-name 'xxx' used as synonym for class-name 'yyy'. #pragma warning(disable: 4100) // unreferenced formal parameter. @@ -121,7 +123,7 @@ #pragma warning(disable: 4710) // not inlined. #pragma warning(disable: 4786) // identifier truncated in debug info. #pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning). - +#endif /*********************************************************************************************** Simple types. @@ -136,6 +138,7 @@ typedef unsigned short UOLECHAR; typedef __int64 int64; // Hungarian: lln typedef unsigned __int64 uint64; // Hungarian llu +typedef unsigned short grwchar; // TODO ShonK: Make generic use these where appropriate. @@ -148,7 +151,6 @@ typedef achar * Psz; typedef const achar * Pcsz; -typedef wchar grwchar; /************************************************************************************* @@ -160,9 +162,9 @@ #define offsetof(cls,fld) ((int)&((cls *)0)->fld) #endif +#ifndef NO_ASM #define addrsafe_offsetof(cls,fld) reinterpret_cast<int>(AddrOf(((cls *)0)->fld)) -#ifndef NO_ASM template<typename T> inline T * AddrOf(T & x) { T * pt; |