[med-svn] [Git][med-team/gdcm][master] d/patches: Fix compilation on big-endian arch

Mathieu Malaterre (@malat) gitlab at salsa.debian.org
Wed Mar 30 15:14:27 BST 2022



Mathieu Malaterre pushed to branch master at Debian Med / gdcm


Commits:
b3b97506 by Mathieu Malaterre at 2022-03-30T16:13:21+02:00
d/patches: Fix compilation on big-endian arch

- - - - -


2 changed files:

- + debian/patches/cb98ed45f51225b2791bdfaba388391d91265434.patch
- debian/patches/series


Changes:

=====================================
debian/patches/cb98ed45f51225b2791bdfaba388391d91265434.patch
=====================================
@@ -0,0 +1,46 @@
+From cb98ed45f51225b2791bdfaba388391d91265434 Mon Sep 17 00:00:00 2001
+From: Mathieu Malaterre <mathieu.malaterre at gmail.com>
+Date: Wed, 30 Mar 2022 16:04:14 +0200
+Subject: [PATCH] Revert "Remove some old unused and confusing code"
+
+This reverts commit 222f20d8bcdbee861f3142d842148e74ccfb4991.
+
+This code is still in use on BigEndian arch. For example
+
+```
+138         return Tag( Swap(val.GetGroup()), Swap(val.GetElement()) );
+(gdb)
+500         T swappedData = SwapperNoOp::Swap(data[0]);
+```
+---
+ Source/Common/gdcmSwapper.txx | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Source/Common/gdcmSwapper.txx b/Source/Common/gdcmSwapper.txx
+index fe32d6c27..d63ccd5d7 100644
+--- a/Source/Common/gdcmSwapper.txx
++++ b/Source/Common/gdcmSwapper.txx
+@@ -133,7 +133,10 @@ namespace gdcm
+     return tempF;
+     }
+ 
+-  template <> inline Tag SwapperNoOp::Swap<Tag>(Tag val);
++  template <> inline Tag SwapperNoOp::Swap<Tag>(Tag val)
++    {
++    return Tag( Swap(val.GetGroup()), Swap(val.GetElement()) );
++    }
+ 
+   template <> inline void SwapperNoOp::SwapArray(uint8_t *, size_t ) {}
+ 
+@@ -206,7 +209,10 @@ namespace gdcm
+     return tempF;
+     }
+ 
+-  template <> inline Tag SwapperDoOp::Swap<Tag>(Tag val);
++  template <> inline Tag SwapperDoOp::Swap<Tag>(Tag val)
++    {
++    return Tag( Swap((uint32_t)val.GetElementTag()) );
++    }
+ 
+   template <> inline void SwapperDoOp::SwapArray(uint8_t *, size_t ) {}
+ 


=====================================
debian/patches/series
=====================================
@@ -7,3 +7,4 @@ rename-pdf.patch
 #use_swig_add_library_for_csharp.patch
 #fix_charls_2.patch
 #fix_swig4.patch
+cb98ed45f51225b2791bdfaba388391d91265434.patch



View it on GitLab: https://salsa.debian.org/med-team/gdcm/-/commit/b3b975060e1099bcc94f12bfb8fb109b3177f5e8

-- 
View it on GitLab: https://salsa.debian.org/med-team/gdcm/-/commit/b3b975060e1099bcc94f12bfb8fb109b3177f5e8
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220330/dcb7f95e/attachment-0001.htm>


More information about the debian-med-commit mailing list