mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 04:49:31 +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
|
Const
|
||||||
{$ifndef useiconv}
|
{$ifndef useiconv}
|
||||||
libiconvname='c'; // is in libc under Linux.
|
libiconvname='c'; // is in libc under Linux.
|
||||||
|
libprefix='lib';
|
||||||
{$else}
|
{$else}
|
||||||
{$ifdef haiku}
|
{$ifdef haiku}
|
||||||
libiconvname='textencoding'; // is in libtextencoding under Haiku
|
libiconvname='textencoding'; // is in libtextencoding under Haiku
|
||||||
|
libprefix='lib';
|
||||||
{$else}
|
{$else}
|
||||||
{$ifdef darwin}
|
{$ifdef darwin}
|
||||||
libiconvname='libiconv';
|
libiconvname='libiconv';
|
||||||
|
libprefix='';
|
||||||
{$else}
|
{$else}
|
||||||
libiconvname='iconv';
|
libiconvname='iconv';
|
||||||
|
libprefix='lib';
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -978,7 +982,7 @@ initialization
|
|||||||
setlocale(LC_ALL,'');
|
setlocale(LC_ALL,'');
|
||||||
|
|
||||||
{ load iconvctl function }
|
{ load iconvctl function }
|
||||||
iconvlib:=LoadLibrary(libiconvname+'.'+SharedSuffix);
|
iconvlib:=LoadLibrary(libprefix+libiconvname+'.'+SharedSuffix);
|
||||||
if iconvlib<>0 then
|
if iconvlib<>0 then
|
||||||
pointer(iconvctl):=GetProcAddress(iconvlib,iconvctlname);
|
pointer(iconvctl):=GetProcAddress(iconvlib,iconvctlname);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user