diff options
Diffstat (limited to 'src/portable.cpp')
-rw-r--r-- | src/portable.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/portable.cpp b/src/portable.cpp index 03d5366..0107f2c 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -14,7 +14,6 @@ extern char **environ; #include <qglobal.h> #include <qdatetime.h> -#include <iconv.h> #if defined(_MSC_VER) || defined(__BORLANDC__) #define popen _popen @@ -369,31 +368,3 @@ int portable_pclose(FILE *stream) return pclose(stream); } -void * portable_iconv_open(const char* tocode, const char* fromcode) -{ - return iconv_open(tocode,fromcode); -} - -size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft, - char** outbuf, size_t *outbytesleft) -{ -// libiconv is a mess. For some platforms/version the prototype of inbuf is -// "const char **", for others it is "char **". C++ requires the proper cast to -// avoid a compile error, that is were the CASTNEEDED is for. -#if ((defined(_LIBICONV_VERSION) && (_LIBICONV_VERSION>=0x0109) && \ - !((defined(_OS_MAC_) || defined(Q_OS_MACX) )&& (_LIBICONV_VERSION==0x010B))) \ - || defined(_OS_SOLARIS_) \ - || defined(_OS_NETBSD_) \ - ) -#define CASTNEEDED(x) (x) -#else -#define CASTNEEDED(x) (char **)(x) -#endif - return iconv((iconv_t)cd,CASTNEEDED(inbuf),inbytesleft,outbuf,outbytesleft); -} - -int portable_iconv_close (void *cd) -{ - return iconv_close((iconv_t)cd); -} - |