fix endian detection problems for sparc

This commit is contained in:
blizzard%redhat.com 1999-08-25 13:20:59 +00:00
parent 42edf79460
commit 3561c6cd61
2 changed files with 16 additions and 6 deletions

View File

@ -66,10 +66,22 @@
#define G_LITTLE_ENDIAN 1
#define G_BIG_ENDIAN 2
/* check our endianness */
#if USE_MOZILLA_TYPES
/* include this before so that we can get endian definitions if
they are there... */
#if IS_LITTLE_ENDIAN
#include "xlibrgb.h"
/* check our endianness */
#ifdef USE_MOZILLA_TYPES
/* check to make sure that we don't have both types defined. */
#ifdef IS_LITTLE_ENDIAN
#ifdef IS_BIG_ENDIAN
#error what the hell? both endian types are defined!
#endif
#endif
#ifdef IS_LITTLE_ENDIAN
#define G_BYTE_ORDER G_LITTLE_ENDIAN
#else
#define G_BYTE_ORDER G_BIG_ENDIAN
@ -90,8 +102,6 @@
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#include "xlibrgb.h"
typedef enum {
LSB_FIRST,
MSB_FIRST

View File

@ -65,7 +65,7 @@ extern "C" {
* you will need to set these defines. It's pretty easy for Intel
* but I'm not sure about other platforms.
*/
#if USE_MOZILLA_TYPES
#ifdef USE_MOZILLA_TYPES
/* prtypes contains definitions for uint32/int32 and uint16/int16 */
#include "prtypes.h"
#include "prcpucfg.h"