[cdo] 01/14: Add deregister patch to stop finding addrs of registers

Alastair McKinstry mckinstry at moszumanska.debian.org
Sun Aug 23 11:53:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to tag debian/1.6.9+dfsg.1-1
in repository cdo.

commit 6368cbec340ecfc5cb8b0eb686a81bd32a4dc532
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Jun 29 12:13:48 2015 +0100

    Add deregister patch to stop finding addrs of registers
---
 debian/changelog                |   2 +
 debian/patches/deregister.patch | 134 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series           |   1 +
 3 files changed, 137 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9a58f43..d5b58e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ cdo (1.6.9+dfsg.1-1) UNRELEASED; urgency=medium
   * New upstream release.
     - remove build-fix.patch for str2uuid(), now not needed.
   * Enable libfftw3 support
+  * Add deregister.patch, removing 'register' attributes from libcdi code
+    that breaks HPPA where it tries to find the addr of registers.
 
  -- Alastair McKinstry <mckinstry at debian.org>  Wed, 29 Apr 2015 19:19:51 +0100
 
diff --git a/debian/patches/deregister.patch b/debian/patches/deregister.patch
new file mode 100644
index 0000000..6c64a0c
--- /dev/null
+++ b/debian/patches/deregister.patch
@@ -0,0 +1,134 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Bugs-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790393
+Description: Remove 'register' from C code. Especially never try to get the
+ address of a register. Breaks HPPA code at least, and compilers do this
+ better in the 21st century.
+Last-Updated: 2015-06-29
+Forwarded: no
+
+Index: cdo-1.6.6+dfsg.1/libcdi/src/cdilib.c
+===================================================================
+--- cdo-1.6.6+dfsg.1.orig/libcdi/src/cdilib.c
++++ cdo-1.6.6+dfsg.1/libcdi/src/cdilib.c
+@@ -6020,7 +6020,7 @@ memcrc(const unsigned char *b, size_t n)
+ 
+   /* Extend with the length of the string. */
+   while (n != 0) {
+-    register uint32_t c = n & 0377;
++     uint32_t c = n & 0377;
+     n >>= 8;
+     s = (s << 8) ^ crctab[(s >> 24) ^ c];
+   }
+@@ -6038,9 +6038,9 @@ memcrc_r(uint32_t *state, const unsigned
+  */
+ 
+ 
+-  register uint32_t c, s = *state;
+-  register size_t n = block_len;
+-  register const unsigned char *b = block;
++   uint32_t c, s = *state;
++   size_t n = block_len;
++   const unsigned char *b = block;
+ 
+   for (; n > 0; --n) {
+     c = (uint32_t)(*b++);
+@@ -6052,7 +6052,7 @@ memcrc_r(uint32_t *state, const unsigned
+ 
+ #define SWAP_CSUM(BITWIDTH,BYTEWIDTH,NACC)                              \
+   do {                                                                  \
+-    register const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *)elems; \
++     const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *)elems; \
+     for (size_t i = 0; i < num_elems; ++i) {                            \
+       for(size_t aofs = NACC; aofs > 0; --aofs) {                       \
+         uint##BITWIDTH##_t accum = b[i + aofs - 1];                     \
+@@ -6079,7 +6079,7 @@ memcrc_r_eswap(uint32_t *state, const un
+                size_t elem_size)
+ {
+ #ifdef WORDS_BIGENDIAN
+-  register uint32_t s = *state;
++   uint32_t s = *state;
+ 
+   switch (elem_size)
+   {
+@@ -6109,8 +6109,8 @@ memcrc_r_eswap(uint32_t *state, const un
+ uint32_t
+ memcrc_finish(uint32_t *state, off_t total_size)
+ {
+-  register uint32_t c, s = *state;
+-  register uint64_t n = (uint64_t)total_size;
++   uint32_t c, s = *state;
++   uint64_t n = (uint64_t)total_size;
+ 
+   /* Extend with the length of the string. */
+   while (n != 0) {
+@@ -48913,7 +48913,7 @@ void avx_minmax_val_double(const double
+   double fmin[4], fmax[4];
+   __m256d current_max, current_min, work;
+ 
+-  // load max and min values into all four slots of the YMM registers
++  // load max and min values into all four slots of the YMM s
+   current_min = _mm256_set1_pd(*min);
+   current_max = _mm256_set1_pd(*max);
+ 
+@@ -49006,7 +49006,7 @@ void sse2_minmax_val_double(const double
+ {
+   __m128d current_max, current_min, work;
+   
+-  // load starting max and min values into all slots of the XMM registers
++  // load starting max and min values into all slots of the XMM s
+   current_min = _mm_set1_pd(*min);
+   current_max = _mm_set1_pd(*max);
+   
+@@ -49091,8 +49091,8 @@ void pwr6_minmax_val_double_unrolled6(co
+     size_t i, j;
+     size_t residual =  datasize % __UNROLL_DEPTH_1;
+     size_t ofs = datasize - residual;
+-    double register dmin[__UNROLL_DEPTH_1];
+-    double register dmax[__UNROLL_DEPTH_1];
++    double  dmin[__UNROLL_DEPTH_1];
++    double  dmax[__UNROLL_DEPTH_1];
+ 
+     for ( j = 0; j < __UNROLL_DEPTH_1; j++) 
+       {
+@@ -63703,7 +63703,7 @@ void listInitialize ( void )
+   pthread_mutexattr_destroy(&ma);
+ #endif
+   /* file is special and has its own table, which needs to be
+-   * created, before we register the listDestroy exit handler */
++   * created, before we  the listDestroy exit handler */
+   {
+     int null_id;
+     null_id = fileOpen_serial("/dev/null", "r");
+Index: cdo-1.6.6+dfsg.1/libcdi/src/cgribexlib.c
+===================================================================
+--- cdo-1.6.6+dfsg.1.orig/libcdi/src/cgribexlib.c
++++ cdo-1.6.6+dfsg.1/libcdi/src/cgribexlib.c
+@@ -763,7 +763,7 @@ void avx_minmax_val_double(const double
+   double fmin[4], fmax[4];
+   __m256d current_max, current_min, work;
+ 
+-  // load max and min values into all four slots of the YMM registers
++  // load max and min values into all four slots of the YMM s
+   current_min = _mm256_set1_pd(*min);
+   current_max = _mm256_set1_pd(*max);
+ 
+@@ -856,7 +856,7 @@ void sse2_minmax_val_double(const double
+ {
+   __m128d current_max, current_min, work;
+   
+-  // load starting max and min values into all slots of the XMM registers
++  // load starting max and min values into all slots of the XMM s
+   current_min = _mm_set1_pd(*min);
+   current_max = _mm_set1_pd(*max);
+   
+@@ -941,8 +941,8 @@ void pwr6_minmax_val_double_unrolled6(co
+     size_t i, j;
+     size_t residual =  datasize % __UNROLL_DEPTH_1;
+     size_t ofs = datasize - residual;
+-    double register dmin[__UNROLL_DEPTH_1];
+-    double register dmax[__UNROLL_DEPTH_1];
++    double  dmin[__UNROLL_DEPTH_1];
++    double  dmax[__UNROLL_DEPTH_1];
+ 
+     for ( j = 0; j < __UNROLL_DEPTH_1; j++) 
+       {
diff --git a/debian/patches/series b/debian/patches/series
index 7654be4..63010b3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 fix_typos.patch
 ignore.patch
 gotocc-fix.patch
+deregister.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cdo.git



More information about the debian-science-commits mailing list