[Gdcm-hackers] gdcm-git:Grassroots DICOM branch release updated. f72c48059a88b1b61b5e715962c38bb37f
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: malat <ma...@us...> - 2023-10-30 14:02:45
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grassroots DICOM".
The branch, release has been updated
via f72c48059a88b1b61b5e715962c38bb37f8989f9 (commit)
from 22f2cef017090c67afe86bb2a4591579359a88f3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceforge.net/p/gdcm/gdcm/ci/f72c48059a88b1b61b5e715962c38bb37f8989f9/
commit f72c48059a88b1b61b5e715962c38bb37f8989f9
Author: Sean McBride <se...@ro...>
Date: Fri Oct 6 19:01:51 2023 -0400
Fixed OpenBSD build error by not using the unavailable iconv
iconv use was already conditionalized for MSVC, add OpenBSD conditionalization too.
diff --git a/Utilities/gdcmext/mec_mr3_io.c b/Utilities/gdcmext/mec_mr3_io.c
index ff396833b..264e16c1b 100644
--- a/Utilities/gdcmext/mec_mr3_io.c
+++ b/Utilities/gdcmext/mec_mr3_io.c
@@ -23,7 +23,13 @@
#include <stdlib.h>
#include <string.h>
-#ifndef _MSC_VER
+#if defined(_MSC_VER) || defined(__OpenBSD__)
+#define GDCM_HAS_ICONV 0
+#else
+#define GDCM_HAS_ICONV 1
+#endif
+
+#if GDCM_HAS_ICONV
#include <iconv.h>
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1900)
@@ -54,7 +60,7 @@ static size_t stream_read(void *ptr, size_t size, size_t nmemb,
struct app {
struct stream *in;
-#ifndef _MSC_VER
+#if GDCM_HAS_ICONV
iconv_t conv;
#endif
void *shift_jis_buffer;
@@ -62,7 +68,7 @@ struct app {
static struct app *create_app(struct app *self, struct stream *in) {
self->in = in;
-#ifndef _MSC_VER
+#if GDCM_HAS_ICONV
self->conv = iconv_open("utf-8", "shift-jis");
assert(self->conv != (iconv_t)-1);
#endif
@@ -358,7 +364,7 @@ static char *shift_jis_to_utf8(char *str, size_t len, struct app *self) {
const size_t guesstimate = len < 128 ? 128 : len * 2;
self->shift_jis_buffer = realloc(self->shift_jis_buffer, guesstimate);
char *dest_str = self->shift_jis_buffer;
-#ifndef _MSC_VER
+#if GDCM_HAS_ICONV
char *in_str = str;
char *out_str = dest_str;
size_t inbytes = len;
@@ -842,7 +848,7 @@ bool mec_mr3_print(const void *input, size_t len) {
#else
free(data.buffer);
#endif
-#ifndef _MSC_VER
+#if GDCM_HAS_ICONV
iconv_close(self->conv);
#endif
free(self->shift_jis_buffer);
-----------------------------------------------------------------------
Summary of changes:
Utilities/gdcmext/mec_mr3_io.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|