blob: 860b2a2bf1914a30800ebfc975b4e2b656877985 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
Description: iconv in kfreebsd is found in libc as on linux
On FreeBSD, iconv is a seperate library. In Debian, it is found in libc.
Author: Paul Gevers <elbrus@debian.org>
--- a/fpcsrc/rtl/unix/cwstring.pp
+++ b/fpcsrc/rtl/unix/cwstring.pp
@@ -25,9 +25,10 @@
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 @@
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 @@
{$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';
|