Skip to content
Snippets Groups Projects
Commit 0515dac0 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

use the Apple's recommended way of detecting big endian machines, WITHOUT
using autoconf
parent 45c7c449
No related branches found
No related tags found
No related merge requests found
...@@ -23,10 +23,9 @@ ...@@ -23,10 +23,9 @@
#include "List.h" #include "List.h"
// How RGBA values are packed and unpacked into/from a 4-byte // How RGBA values are packed and unpacked into/from a 4-byte
// integer. Don't use 'LITTLE_ENDIAN': Apple defines it in its system // integer:
// headers.
#if defined(HAVE_BIG_ENDIAN) #if defined(__BIG_ENDIAN__)
# define PACK_COLOR(R,G,B,A) ( (unsigned int)((R)<<24 | (G)<<16 | (B)<<8 | (A)) ) # define PACK_COLOR(R,G,B,A) ( (unsigned int)((R)<<24 | (G)<<16 | (B)<<8 | (A)) )
# define UNPACK_RED(X) ( ( (X) >> 24 ) & 0xff ) # define UNPACK_RED(X) ( ( (X) >> 24 ) & 0xff )
# define UNPACK_GREEN(X) ( ( (X) >> 16 ) & 0xff ) # define UNPACK_GREEN(X) ( ( (X) >> 16 ) & 0xff )
......
This diff is collapsed.
dnl $Id: configure.in,v 1.61 2005-03-14 06:32:33 geuzaine Exp $ dnl $Id: configure.in,v 1.62 2005-06-06 22:05:28 geuzaine Exp $
dnl dnl
dnl Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle dnl Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
dnl dnl
...@@ -399,9 +399,6 @@ case "$UNAME" in ...@@ -399,9 +399,6 @@ case "$UNAME" in
esac esac
dnl Is the machine big or little endian?
AC_C_BIGENDIAN(FLAGS="-DHAVE_BIG_ENDIAN ${FLAGS}")
dnl Check for header files dnl Check for header files
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(sys/time.h sys/resource.h) AC_CHECK_HEADERS(sys/time.h sys/resource.h)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment