endian badness

This commit is contained in:
David Rose 2002-08-05 17:21:25 +00:00
parent d51e8e9c50
commit d6ed3123bb
3 changed files with 7 additions and 17 deletions

View File

@ -33,10 +33,10 @@
// unchanged for big-endian machines.
////////////////////////////////////////////////////////////////////
#ifdef IS_LITTLE_ENDIAN
typedef ReversedNumericData BigEndian;
#else
#ifdef WORDS_BIGENDIAN
typedef NativeNumericData BigEndian;
#else
typedef ReversedNumericData BigEndian;
#endif
#endif

View File

@ -19,7 +19,7 @@
#ifndef LITTLEENDIAN_H
#define LITTLEENDIAN_H
#include <pandabase.h>
#include "pandabase.h"
#include "numeric_types.h"
#include "nativeNumericData.h"
@ -33,10 +33,10 @@
// unchanged for little-endian machines.
////////////////////////////////////////////////////////////////////
#ifdef IS_LITTLE_ENDIAN
typedef NativeNumericData LittleEndian;
#else
#ifdef WORDS_BIGENDIAN
typedef ReversedNumericData LittleEndian;
#else
typedef NativeNumericData LittleEndian;
#endif
#endif

View File

@ -27,10 +27,6 @@
// Later (especially for non-NSPR platforms) we'll have to do the work
// ourselves.
// This file also defines one of the macros IS_BIG_ENDIAN or
// IS_LITTLE_ENDIAN, as appropriate. (In the case of NSPR, these are
// defined automatically.)
#ifdef HAVE_NSPR
@ -71,12 +67,6 @@ typedef unsigned long PN_uint32;
typedef double PN_float64;
#ifdef WORDS_BIGENDIAN
#undef IS_LITTLE_ENDIAN
#else
#define IS_LITTLE_ENDIAN 1
#endif
#endif // HAVE_NSPR
#endif