Commit 49bfc728 authored by dscho's avatar dscho

solaris endian changes

parent ab4126d1
......@@ -34,7 +34,10 @@
MUTEX(logMutex);
char rfbEndianTest = (_BYTE_ORDER == _LITTLE_ENDIAN);
/* we cannot compare to _LITTLE_ENDIAN, because some systems
(as Solaris) assume little endian if _LITTLE_ENDIAN is
defined, even if _BYTE_ORDER is not _LITTLE_ENDIAN */
char rfbEndianTest = (_BYTE_ORDER == 1234);
/*
* rfbLog prints a time-stamped message to the log file (stderr).
......
......@@ -62,9 +62,22 @@ typedef unsigned long KeySym;
#include <machine/endian.h>
#define _BYTE_ORDER BYTE_ORDER
#define _LITTLE_ENDIAN LITTLE_ENDIAN
#elif sparc
#elif defined (__SVR4) && defined (__sun) /* Solaris */
#include <sys/types.h>
#if defined(__sparc)
/* SPARC here (big endian) */
#ifndef _BIG_ENDIAN
#define _BIG_ENDIAN 4321
#endif
#define _BYTE_ORDER _BIG_ENDIAN
#elif defined(__i386)
#ifndef _LITTLE_ENDIAN
#define _LITTLE_ENDIAN 1234
#endif
#define _BYTE_ORDER _LITTLE_ENDIAN
#else
#error Solaris 2.5.1 had ppc support did it not? :-)
#endif
#undef Bool
#define Bool char
#undef SIGNED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment