Update patch queue.

- Drop Explicit-64-bit-shifts-for-flags.patch, applied upstream.
- Refresh Fix-HDF5-detection-with-CMake-3.6.patch.
- Refresh Use-Debian-CMake-find-module-location.patch.
- Drop hdf5-1.10.patch, applied upstream.

Gbp-Dch: full
parent 2dbde636
From: Martyn Klassen <mklassen@robarts.ca>
Date: Mon, 29 Jun 2015 17:00:46 -0400
Subject: Explicit 64 bit shifts for flags
---
libsrc/ismrmrd.c | 10 +++++-----
tests/test_flags.cpp | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libsrc/ismrmrd.c b/libsrc/ismrmrd.c
index 3fba17c..303a9a3 100644
--- a/libsrc/ismrmrd.c
+++ b/libsrc/ismrmrd.c
@@ -474,7 +474,7 @@ size_t ismrmrd_sizeof_data_type(int data_type)
/* Misc. functions */
bool ismrmrd_is_flag_set(const uint64_t flags, const uint64_t val) {
- uint64_t bitmask = 1 << (val - 1);
+ uint64_t bitmask = (uint64_t)(1) << (val - 1);
return (flags & bitmask) > 0;
}
@@ -483,7 +483,7 @@ int ismrmrd_set_flag(uint64_t *flags, const uint64_t val) {
if (flags==NULL) {
return ISMRMRD_PUSH_ERR(ISMRMRD_RUNTIMEERROR, "Pointer should not be NULL.");
}
- bitmask = 1 << (val - 1);
+ bitmask = (uint64_t)(1) << (val - 1);
*flags |= bitmask;
return ISMRMRD_NOERROR;
}
@@ -501,7 +501,7 @@ int ismrmrd_clear_flag(uint64_t *flags, const uint64_t val) {
if (flags==NULL) {
return ISMRMRD_PUSH_ERR(ISMRMRD_RUNTIMEERROR, "Pointer should not be NULL.");
}
- bitmask = 1 << (val - 1);
+ bitmask = (uint64_t)(1) << (val - 1);
*flags &= ~bitmask;
return ISMRMRD_NOERROR;
}
@@ -520,7 +520,7 @@ bool ismrmrd_is_channel_on(const uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], c
if (channel_mask==NULL) {
return ISMRMRD_PUSH_ERR(ISMRMRD_RUNTIMEERROR, "Pointer to channel_mask should not be NULL.");
}
- bitmask = 1 << (chan % 64);
+ bitmask = (uint64_t)(1) << (chan % 64);
offset = chan / 64;
return (channel_mask[offset] & bitmask) > 0;
}
@@ -531,7 +531,7 @@ int ismrmrd_set_channel_on(uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const u
if (channel_mask==NULL) {
return ISMRMRD_PUSH_ERR(ISMRMRD_RUNTIMEERROR, "Pointer to channel_mask should not be NULL.");
}
- bitmask = 1 << (chan % 64);
+ bitmask = (uint64_t)(1) << (chan % 64);
offset = chan / 64;
channel_mask[offset] |= bitmask;
return ISMRMRD_NOERROR;
diff --git a/tests/test_flags.cpp b/tests/test_flags.cpp
index 7402f0a..6c7dc32 100644
--- a/tests/test_flags.cpp
+++ b/tests/test_flags.cpp
@@ -15,7 +15,7 @@ BOOST_AUTO_TEST_CASE(test_is_flag_set)
}
for (int f = 1; f <= 64; f++) {
- flags |= (1 << (f - 1));
+ flags |= ((uint64_t)1 << (f - 1));
BOOST_CHECK_EQUAL(ismrmrd_is_flag_set(flags, f), true);
}
}
@@ -28,7 +28,7 @@ BOOST_AUTO_TEST_CASE(test_set_flag)
for (int f = 1; f <= 64; f++) {
BOOST_CHECK_EQUAL(ismrmrd_set_flag(&flags, f), ISMRMRD_NOERROR);
- BOOST_REQUIRE((flags & (1 << (f - 1))) != 0);
+ BOOST_REQUIRE((flags & ((uint64_t)1 << (f - 1))) != 0);
}
}
@@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(test_clear_flag)
BOOST_CHECK_EQUAL(ismrmrd_clear_flag(NULL, ISMRMRD_IMAGE_USER8), ISMRMRD_RUNTIMEERROR);
for (int f = 1; f <= 64; f++) {
BOOST_CHECK_EQUAL(ismrmrd_clear_flag(&flags, f), ISMRMRD_NOERROR);
- BOOST_REQUIRE((flags & (1 << (f - 1))) == 0);
+ BOOST_REQUIRE((flags & ((uint64_t)1 << (f - 1))) == 0);
}
}
......@@ -7,24 +7,24 @@ Subject: Fix HDF5 detection with CMake 3.6.
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 456d4f4..ccdae44 100644
index 665e106..5e9b1a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,7 +97,7 @@ find_package(HDF5 1.8 COMPONENTS C)
@@ -111,7 +111,7 @@ find_package(HDF5 1.8 COMPONENTS C)
if (HDF5_FOUND)
set (ISMRMRD_DATASET_SUPPORT true)
set (ISMRMRD_DATASET_SOURCES libsrc/dataset.c libsrc/dataset.cpp)
- set (ISMRMRD_DATASET_INCLUDE_DIR ${HDF5_C_INCLUDE_DIR})
+ set (ISMRMRD_DATASET_INCLUDE_DIR ${HDF5_INCLUDE_DIRS})
set (ISMRMRD_DATASET_LIBRARIES ${HDF5_LIBRARIES})
else (HDF5_FOUND)
else ()
set (ISMRMRD_DATASET_SUPPORT false)
@@ -131,7 +131,7 @@ if (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
@@ -146,7 +146,7 @@ if (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
if(DEFINED ENV{HDF5_ROOT})
set(HDF5_BIN_DIR $ENV{HDF5_ROOT}/bin)
else (DEFINED ENV{HDF5_ROOT})
else ()
- set(HDF5_BIN_DIR ${HDF5_C_INCLUDE_DIR}/../bin)
+ set(HDF5_BIN_DIR ${HDF5_INCLUDE_DIRS}/../bin)
endif (DEFINED ENV{HDF5_ROOT})
endif ()
message("Install hdf5 libraries from ${HDF5_BIN_DIR} ")
install( DIRECTORY ${HDF5_BIN_DIR} DESTINATION bin/.. FILES_MATCHING PATTERN "*.dll" )
......@@ -7,12 +7,12 @@ Subject: Use Debian CMake find module location.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt
index 8988f17..3601f8f 100644
index 778ab5a..a4d8136 100644
--- a/examples/c/CMakeLists.txt
+++ b/examples/c/CMakeLists.txt
@@ -7,7 +7,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
message(FATAL_ERROR "ISMRMRD_HOME environment variable must be defined")
endif(NOT DEFINED ENV{ISMRMRD_HOME})
endif()
- list(APPEND CMAKE_MODULE_PATH "$ENV{ISMRMRD_HOME}/share/ismrmrd/cmake")
+ list(APPEND CMAKE_MODULE_PATH "$ENV{ISMRMRD_HOME}/lib/cmake/ismrmrd")
......
Index: ismrmrd-1.3.2/include/ismrmrd/dataset.h
===================================================================
--- ismrmrd-1.3.2.orig/include/ismrmrd/dataset.h
+++ ismrmrd-1.3.2/include/ismrmrd/dataset.h
@@ -9,6 +9,7 @@
#define ISMRMRD_DATASET_H
#include "ismrmrd/ismrmrd.h"
+#include <hdf5.h>
#ifdef __cplusplus
#include <string>
@@ -28,7 +29,7 @@ extern "C" {
typedef struct ISMRMRD_Dataset {
char *filename;
char *groupname;
- int fileid;
+ hid_t fileid;
} ISMRMRD_Dataset;
/**
Disable-HTML-timestamps.patch
Explicit-64-bit-shifts-for-flags.patch
Use-explicit-64-bit-shifts-in-testsuite.patch
Use-Debian-CMake-find-module-location.patch
Fix-HDF5-detection-with-CMake-3.6.patch
hdf5-1.10.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment