From 38874956fa465cd4ef71c26a5ec6dec299d45a2f Mon Sep 17 00:00:00 2001 From: Giovanni Maruzzelli Date: Thu, 19 Apr 2012 11:32:29 +0200 Subject: [PATCH] gsmopen: gsmlib compile on windows with gsmlib, new solution for gsmlib, mod_gsmopen compiles again on linux (with gsmlib) --- .../win32/gsmlib.vcproj | 6 ++++-- .../endpoints/mod_gsmopen/gsmopen_protocol.cpp | 18 +++++++++++++++++- .../mod_gsmopen/mod_gsmopen.2008.vcproj | 6 +++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/win32/gsmlib.vcproj b/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/win32/gsmlib.vcproj index 7227391d18..a102fe5773 100755 --- a/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/win32/gsmlib.vcproj +++ b/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/win32/gsmlib.vcproj @@ -46,7 +46,7 @@ AdditionalIncludeDirectories="../vcproject,..,." PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H" StringPooling="true" - RuntimeLibrary="0" + RuntimeLibrary="2" EnableFunctionLevelLinking="true" RuntimeTypeInfo="true" PrecompiledHeaderFile=".\Release/gsmlib.pch" @@ -123,7 +123,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H" MinimalRebuild="true" BasicRuntimeChecks="3" - RuntimeLibrary="1" + RuntimeLibrary="3" RuntimeTypeInfo="true" PrecompiledHeaderFile=".\Debug/gsmlib.pch" AssemblerListingLocation=".\Debug/" @@ -148,6 +148,8 @@ Name="VCLibrarianTool" OutputFile=".\Debug\gsmlib.lib" SuppressStartupBanner="true" + IgnoreAllDefaultLibraries="false" + IgnoreDefaultLibraryNames="" /> @@ -2321,7 +2321,11 @@ int ucs2_to_utf8(private_t *tech_pvt, char *ucs2_in, char *utf8_out, size_t outb DEBUGA_GSMOPEN("1 ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n", GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out); +#ifdef WIN32 iconv_res = iconv(iconv_format, (const char **)&inbuf, &inbytesleft, &outbuf, &outbytesleft); +#else// WIN32 + iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft); +#endif// WIN32 if (iconv_res == (size_t) -1) { DEBUGA_GSMOPEN("2 ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n", GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out); @@ -2358,7 +2362,11 @@ int utf8_to_iso_8859_1(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, c DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf8_in=%s, iso_8859_1_out=%s\n", GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_in, iso_8859_1_out); +#ifdef WIN32 iconv_res = iconv(iconv_format, (const char **)&inbuf, &inbytesleft, &outbuf, &outbytesleft); +#else// WIN32 + iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft); +#endif// WIN32 if (iconv_res == (size_t) -1) { ERRORA("error: %s %d\n", GSMOPEN_P_LOG, strerror(errno), errno); return -1; @@ -2409,7 +2417,11 @@ int iso_8859_1_to_utf8(private_t *tech_pvt, char *iso_8859_1_in, char *utf8_out, } inbytesleft = strlen(iso_8859_1_in) * 2; +#ifdef WIN32 iconv_res = iconv(iconv_format, (const char **)&inbuf, &inbytesleft, &outbuf, &outbytesleft); +#else// WIN32 + iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft); +#endif// WIN32 if (iconv_res == (size_t) -1) { DEBUGA_GSMOPEN("ciao in=%s, inleft=%d, out=%s, outleft=%d, utf8_out=%s\n", GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_out); @@ -2453,7 +2465,11 @@ int utf8_to_ucs2(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, char *u DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf8_in=%s, converted=%s\n", GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_in, converted); +#ifdef WIN32 iconv_res = iconv(iconv_format, (const char **)&inbuf, &inbytesleft, &outbuf, &outbytesleft); +#else// WIN32 + iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft); +#endif// WIN32 if (iconv_res == (size_t) -1) { ERRORA("error: %s %d\n", GSMOPEN_P_LOG, strerror(errno), errno); return -1; diff --git a/src/mod/endpoints/mod_gsmopen/mod_gsmopen.2008.vcproj b/src/mod/endpoints/mod_gsmopen/mod_gsmopen.2008.vcproj index 2233a61624..6310d34e08 100644 --- a/src/mod/endpoints/mod_gsmopen/mod_gsmopen.2008.vcproj +++ b/src/mod/endpoints/mod_gsmopen/mod_gsmopen.2008.vcproj @@ -39,7 +39,7 @@ />