summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--configure.ac1
-rw-r--r--rfb/rfbproto.h10
3 files changed, 5 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 338f0ba..168873f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,6 @@ project(LibVNCServer)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckTypeSize)
-include(TestBigEndian)
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
include(CheckCSourceRuns)
@@ -163,8 +162,6 @@ if(NOT HAVE_LIBVNCSERVER_IN_ADDR_T)
set(LIBVNCSERVER_NEED_INADDR_T 1)
endif(NOT HAVE_LIBVNCSERVER_IN_ADDR_T)
-TEST_BIG_ENDIAN(LIBVNCSERVER_WORDS_BIGENDIAN)
-
# TODO:
# LIBVNCSERVER_ENOENT_WORKAROUND
# inline
diff --git a/configure.ac b/configure.ac
index 6e60a0f..5d05c12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -503,7 +503,6 @@ AC_CHECK_HEADERS([arpa/inet.h endian.h fcntl.h netdb.h netinet/in.h stdlib.h std
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
-AC_C_BIGENDIAN
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h
index 9b082dd..354f1aa 100644
--- a/rfb/rfbproto.h
+++ b/rfb/rfbproto.h
@@ -80,11 +80,11 @@
#endif
#endif
-/* some autotool versions do not properly prefix
- WORDS_BIGENDIAN, so do that manually */
-#ifdef WORDS_BIGENDIAN
-#define LIBVNCSERVER_WORDS_BIGENDIAN
-#endif
+# include <endian.h>
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define LIBVBNCSERVER_WORDS_BIGENDIAN 1
+# endif
+
/* MS compilers don't have strncasecmp */
#ifdef _MSC_VER