mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 05:00:12 +02:00
* Fix wide string shared library loading by adding 'lib' prefix if needed
git-svn-id: trunk@20568 -
This commit is contained in:
parent
c7259969ce
commit
ff5d25174a
@ -47,14 +47,18 @@ Uses
|
||||
Const
|
||||
{$ifndef useiconv}
|
||||
libiconvname='c'; // is in libc under Linux.
|
||||
libprefix='lib';
|
||||
{$else}
|
||||
{$ifdef haiku}
|
||||
libiconvname='textencoding'; // is in libtextencoding under Haiku
|
||||
libprefix='lib';
|
||||
{$else}
|
||||
{$ifdef darwin}
|
||||
libiconvname='libiconv';
|
||||
libprefix='';
|
||||
{$else}
|
||||
libiconvname='iconv';
|
||||
libprefix='lib';
|
||||
{$endif}
|
||||
{$endif}
|
||||
{$endif}
|
||||
@ -978,7 +982,7 @@ initialization
|
||||
setlocale(LC_ALL,'');
|
||||
|
||||
{ load iconvctl function }
|
||||
iconvlib:=LoadLibrary(libiconvname+'.'+SharedSuffix);
|
||||
iconvlib:=LoadLibrary(libprefix+libiconvname+'.'+SharedSuffix);
|
||||
if iconvlib<>0 then
|
||||
pointer(iconvctl):=GetProcAddress(iconvlib,iconvctlname);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user