# HG changeset patch # User Sebastien Jodogne # Date 1386075008 -3600 # Node ID d76b747aec1b3a46d6d7b4fca51418f0d0dde840 # Parent ca528c365a390581d849959bb8924bbfdabacccd improved check for big endianness diff -r ca528c365a39 -r d76b747aec1b THANKS --- a/THANKS Tue Dec 03 12:38:22 2013 +0100 +++ b/THANKS Tue Dec 03 13:50:08 2013 +0100 @@ -11,35 +11,36 @@ Code contributors ----------------- -* Cyril Paulus (cyril.paulus@student.ulg.ac.be), for the build process +* Cyril Paulus , for the build process and suggestions about the REST API. -* Will Ryder (will.ryder@sydney.edu.au), for improvements with the +* Will Ryder , for improvements with the handling of series with temporal positions (fMRI and dynamic PET). -* Ryan Walklin (ryanwalklin@gmail.com), for Mac OS X build. -* Peter Somlo (peter.somlo@gmail.com), for ClearCanvas and JPEG support. +* Ryan Walklin , for Mac OS X build. +* Peter Somlo , for ClearCanvas and JPEG support. * 12maksqwe@gmail.com, for fixing issue #8. * Julien Nabet, for various suggestions to improve the source code. +Debian/Ubuntu +------------- + +* Mathieu Malaterre , for sponsoring Orthanc. +* Andreas Tille , for help about packaging. +* Adam Conrad , to improve support of big endianness. + + +Fedora and Red Hat +------------------ + +* Mario Ceresa , for help about packaging. + + Artwork ------- https://code.google.com/p/orthanc/wiki/Logos -* Benjamin Golinvaux (golinvauxb@gmail.com), for creating the official logo. -* Jean-François Degbomont (jfdegbo@gmail.com), for submitting a logo. -* Martin Jolly (martin.jolly@gmail.com), for submitting a logo. -* Philippe Sepers (sepers.philippe@gmail.com), for submitting a logo. - - -Debian ------- - -* Mathieu Malaterre (mathieu.malaterre@gmail.com), for sponsoring Orthanc. -* Andreas Tille (andreas@an3as.eu), for help about packaging. - - -Fedora and Red Hat ------------------- - -* Mario Ceresa (mrceresa@gmail.com), for help about packaging. +* Benjamin Golinvaux , for creating the official logo. +* Jean-François Degbomont , for submitting a logo. +* Martin Jolly , for submitting a logo. +* Philippe Sepers , for submitting a logo. diff -r ca528c365a39 -r d76b747aec1b UnitTestsSources/main.cpp --- a/UnitTestsSources/main.cpp Tue Dec 03 12:38:22 2013 +0100 +++ b/UnitTestsSources/main.cpp Tue Dec 03 13:50:08 2013 +0100 @@ -522,18 +522,33 @@ } + +#if defined(__linux) +#include +#endif + TEST(Toolbox, Endianness) { -#if defined(__powerpc__) || defined(__powerpc64__) - ASSERT_EQ(Endianness_Big, Toolbox::DetectEndianness()); -#endif + // Parts of this test come from Adam Conrad + // http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728822#5 #if defined(_WIN32) ASSERT_EQ(Endianness_Little, Toolbox::DetectEndianness()); + +#elif defined(__linux) + +#if !defined(__BYTE_ORDER) +# error Support your platform here #endif -#if defined(__amd64__) || defined(__i386__) +# if __BYTE_ORDER == __BIG_ENDIAN + ASSERT_EQ(Endianness_Big, Toolbox::DetectEndianness()); +# else // __LITTLE_ENDIAN ASSERT_EQ(Endianness_Little, Toolbox::DetectEndianness()); +# endif + +#else +#error Support your platform here #endif }