[med-svn] r15410 - trunk/packages/orthanc/trunk/debian/patches

Sebastien Jodogne jodogne-guest at moszumanska.debian.org
Tue Dec 3 13:31:16 UTC 2013


Author: jodogne-guest
Date: 2013-12-03 13:31:16 +0000 (Tue, 03 Dec 2013)
New Revision: 15410

Added:
   trunk/packages/orthanc/trunk/debian/patches/check-endianness
Modified:
   trunk/packages/orthanc/trunk/debian/patches/series
Log:
integration of a patch for better check of endianness

Added: trunk/packages/orthanc/trunk/debian/patches/check-endianness
===================================================================
--- trunk/packages/orthanc/trunk/debian/patches/check-endianness	                        (rev 0)
+++ trunk/packages/orthanc/trunk/debian/patches/check-endianness	2013-12-03 13:31:16 UTC (rev 15410)
@@ -0,0 +1,46 @@
+Description: Detect correct endianness of the host machine
+Author: Sebastien Jodogne <s.jodogne at gmail.com> and Adam Conrad <adconrad at ubuntu.com>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: Orthanc-0.7.2/UnitTestsSources/main.cpp
+===================================================================
+--- Orthanc-0.7.2.orig/UnitTestsSources/main.cpp	2013-11-08 16:08:14.000000000 +0100
++++ Orthanc-0.7.2/UnitTestsSources/main.cpp	2013-12-03 14:24:49.344914848 +0100
+@@ -522,18 +522,33 @@
+ }
+ 
+ 
++
++#if defined(__linux)
++#include <endian.h>
++#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
+ }
+ 

Modified: trunk/packages/orthanc/trunk/debian/patches/series
===================================================================
--- trunk/packages/orthanc/trunk/debian/patches/series	2013-12-03 13:16:13 UTC (rev 15409)
+++ trunk/packages/orthanc/trunk/debian/patches/series	2013-12-03 13:31:16 UTC (rev 15410)
@@ -1,2 +1,2 @@
+check-endianness
 doxygen-jquery
-




More information about the debian-med-commit mailing list