|
From: <and...@us...> - 2006-04-07 20:59:05
|
Revision: 1225 Author: andreradke Date: 2006-04-07 13:58:44 -0700 (Fri, 07 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1225&view=rev Log Message: ----------- Prepare for Mac OS X Intel builds: Make conversion between big endian and little endian dependent on target architecture rather than MACVERSION and WIN95VERSION. Modified Paths: -------------- Frontier/trunk/Common/headers/frontierdefs.h Frontier/trunk/Common/headers/osincludes.h Modified: Frontier/trunk/Common/headers/frontierdefs.h =================================================================== --- Frontier/trunk/Common/headers/frontierdefs.h 2006-04-07 20:43:31 UTC (rev 1224) +++ Frontier/trunk/Common/headers/frontierdefs.h 2006-04-07 20:58:44 UTC (rev 1225) @@ -34,7 +34,6 @@ #ifdef WIN95VERSION - #define PACKFLIPPED /* enable little endian / big endian conversion for database file functions */ #define FRONTIERCOM 1 #ifndef OPMLEDITOR #define FRONTIERWEB 0 Modified: Frontier/trunk/Common/headers/osincludes.h =================================================================== --- Frontier/trunk/Common/headers/osincludes.h 2006-04-07 20:43:31 UTC (rev 1224) +++ Frontier/trunk/Common/headers/osincludes.h 2006-04-07 20:58:44 UTC (rev 1225) @@ -307,4 +307,19 @@ #include <string.h> #include <assert.h> +/* + 2006-04-07 aradke: determine native byte order. + checking whether WIN32 is defined is rather crude, + but I haven't found a better way yet. +*/ + +#if defined(__LITTLE_ENDIAN__) || defined(WIN32) + #define PACKFLIPPED 1 /* enable little endian / big endian conversion for database file functions */ +#elif defined(__BIG_ENDIAN__) + #undef PACKFLIPPED /* big endian is native database format, no need to convert */ +#else + #error Failed to determine native byte order of target architecture, update osincludes.h +#endif + + #endif /* __osincludes_h__ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |