From: Carlos Laviola Date: Mon, 13 Oct 2014 19:16:54 +0000 (+0000) Subject: find_iconv_in_libc_on_debian X-Git-Tag: archive/raspbian/3.0.0+dfsg-11+rpi1~1^2^2^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8f3dbc84001b8d03d7eec5c66ea00dbba2a2c618;p=fpc.git find_iconv_in_libc_on_debian Gbp-Pq: Name find_iconv_in_libc_on_debian.patch --- diff --git a/fpcsrc/rtl/unix/cwstring.pp b/fpcsrc/rtl/unix/cwstring.pp index 57c3cea0..99e08d80 100644 --- a/fpcsrc/rtl/unix/cwstring.pp +++ b/fpcsrc/rtl/unix/cwstring.pp @@ -25,9 +25,10 @@ procedure SetCWidestringManager; implementation {$linklib c} +{$define debian} // Linux (and maybe glibc platforms in general), have iconv in glibc. -{$if defined(linux) or defined(solaris)} +{$if defined(linux) or defined(solaris) or defined(debian)} {$define iconv_is_in_libc} {$endif} @@ -89,7 +90,7 @@ function mblen(const s: pchar; n: size_t): size_t; cdecl; external clib name 'mb const -{$ifdef linux} +{$if defined(linux) or defined(debian)} __LC_CTYPE = 0; LC_ALL = 6; _NL_CTYPE_CLASS = (__LC_CTYPE shl 16); @@ -168,7 +169,7 @@ type {$endif} {$endif} -{$if (not defined(bsd) and not defined(beos)) or defined(iconv_is_in_libc) or (defined(darwin) and not defined(cpupowerpc32))} +{$if (not defined(bsd) and not defined(beos)) or defined(iconv_is_in_libc) or (defined(darwin) and not defined(cpupowerpc32)) or defined(debian)} function iconv_open(__tocode:pchar; __fromcode:pchar):iconv_t;cdecl;external libiconvname name 'iconv_open'; function iconv(__cd:iconv_t; __inbuf:ppchar; __inbytesleft:psize_t; __outbuf:ppchar; __outbytesleft:psize_t):size_t;cdecl;external libiconvname name 'iconv'; function iconv_close(__cd:iconv_t):cint;cdecl;external libiconvname name 'iconv_close';