Browse Source

Set macro iconv_is_in_libc for FreeBSD OS

(cherry picked from commit 01ad5f2c2825e09f0a78deb804d74a39286f2bdf)
Pierre Muller 2 years ago
parent
commit
2c884b8e49
1 changed files with 11 additions and 0 deletions
  1. 11 0
      rtl/unix/cwstring.pp

+ 11 - 0
rtl/unix/cwstring.pp

@@ -38,6 +38,17 @@ implementation
   {$endif}
   {$endif}
 {$endif}
 {$endif}
 
 
+{ Modern FreeBSD releases also claim to have iconv
+  function inside libc, at least
+  this is stated explicitly in iconv(3) man
+  of FreeBSD from 10.0 release
+  PM 2023-05-05 }
+{$ifdef freebsd}
+  {$ifndef DISABLE_ICONV_LIBC}
+    {$define iconv_is_in_libc}
+  {$endif}
+{$endif}
+
 {$ifndef iconv_is_in_libc}
 {$ifndef iconv_is_in_libc}
  {$if defined(haiku)}
  {$if defined(haiku)}
    {$linklib textencoding}
    {$linklib textencoding}