michael@110: Index: include/sswf/libsswf.h michael@110: --- include/sswf/libsswf.h.orig 2008-06-23 07:51:47 +0200 michael@110: +++ include/sswf/libsswf.h 2008-06-23 18:10:33 +0200 michael@110: @@ -71,12 +71,14 @@ michael@110: /* wint_t is an "equivalent" to wchar_t without being limited to 16 bits as on MS-Windows */ michael@110: #ifndef _MSVC michael@110: #ifndef __APPLE_CC__ michael@110: +#ifndef __FreeBSD__ michael@110: #ifndef _WINT_T michael@110: #define _WINT_T michael@110: typedef unsigned int wint_t; michael@110: #endif michael@110: #endif michael@110: #endif michael@110: +#endif michael@110: michael@110: #ifndef M_PI michael@110: #define M_PI 3.14159265358979323846 michael@110: @@ -88,7 +90,7 @@ michael@110: #define rint(x) ((double) (long) floor(x + 0.5)) michael@110: #endif michael@110: michael@110: -#ifdef _LIBICONV_H michael@110: +#if defined(_LIBICONV_H) && !defined(__FreeBSD__) michael@110: #define ICONV_INPUT_CAST michael@110: #else michael@110: /* older versions of iconv() were broken in regard to the michael@110: Index: include/sswf/libsswf_c.h michael@110: --- include/sswf/libsswf_c.h.orig 2008-06-23 07:51:47 +0200 michael@110: +++ include/sswf/libsswf_c.h 2008-06-23 18:10:33 +0200 michael@110: @@ -38,7 +38,7 @@ michael@110: michael@110: #include michael@110: #include michael@110: -#if IRIX michael@110: +#if IRIX || defined(__FreeBSD__) michael@110: #include michael@110: #endif michael@110: #include michael@111: Index: src/lib/libsswf_tag_header.c++ michael@111: --- src/lib/libsswf_tag_header.c++.orig 2009-02-25 11:44:25.018888440 +0100 michael@111: +++ src/lib/libsswf_tag_header.c++ 2009-02-25 12:03:04.998881702 +0100 michael@111: @@ -745,7 +745,7 @@ michael@111: } michael@111: #endif michael@111: michael@111: - r = (int) iconv(f_iconvertor, ICONV_INPUT_CAST &string, &in, &p, &out); michael@111: + r = (int) iconv(f_iconvertor, ICONV_INPUT_CAST const_cast(&string), &in, &p, &out); michael@111: if(r < 0) { michael@111: if(s != buf) { michael@111: MemFree(s); michael@111: Index: src/lib/sswf_lexical.c++ michael@111: --- src/sswf/sswf_lexical.c++.orig 2008-06-23 07:51:47.000000000 +0200 michael@111: +++ src/sswf/sswf_lexical.c++ 2009-02-25 12:06:36.214881561 +0100 michael@111: @@ -2026,7 +2026,7 @@ michael@111: out = sizeof(outchar); michael@111: output = (char *) &outchar; michael@111: b = (int) f_mb_count; michael@111: - a = (int) iconv(f_iconvertor, ICONV_INPUT_CAST &input, &f_mb_count, &output, &out); michael@111: + a = (int) iconv(f_iconvertor, ICONV_INPUT_CAST const_cast(&input), &f_mb_count, &output, &out); michael@111: // the output buffer will usually be full before the michael@111: // input is fully emptied! michael@111: if(a < 0 && errno == E2BIG && out == 0 && b != (int) f_mb_count) {