Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2018-03

Some RTL bug fixes and suggestions

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

NetSpirit

Anyone, who responsible to make fixes in code, please, check if my next suggestions can be applied.

=============

In file 'rtl\win\wininc\struct.inc' need declare NMHDR.code field as Integer (as in Delphi), not UINT.
I know, Windows SDK declare this as UINT, but constants, used in this field, are often declared as signed, e.g:

NM_CLICK = -(2);
NM_DBLCLK = -(3);
NM_KILLFOCUS = -(8);
NM_OUTOFMEMORY = -(1);

This require explicit cast in every code (e. g. if Integer(NMHDR.code) = NM_CLICK then ...).
In Delphi NMHDR.code declared as Integer.

=============
packages\pasjpeg

Error usage after compile in -Mdelphiunicode mode. In file 'packages\pasjpeg\src\jpeglib.pas' member
jpeg_error_mgr.format_message still uses AnsiString which is wrong. Because at the end of file 'packages\pasjpeg\src\jconfig.inc' exists switch {$MODE DELPHI}
Possible solution: {$ifndef UNICODE}{$MODE DELPHI}{$endif}

=============

File 'packages\winunits-base\src\wininet.pp' - error compile in -Mdelphiunicode mode (with -dFPC_OS_UNICODE cmd line switch).

There is errors in declarations of overloaded functions
- FindFirstUrlCacheEntry
- FindNextUrlCacheEntry

Reply by email

Sven Barth
to NetSpirit

NetSpirit schrieb am Mo., 26. März 2018, 16:10:

Show quoted text 18 lines
packages\pasjpeg Error usage after compile in -Mdelphiunicode mode. In file 'packages\pasjpeg\src\jpeglib.pas' member jpeg_error_mgr.format_message still uses AnsiString which is wrong. Because at the end of file 'packages\pasjpeg\src\jconfig.inc' exists switch {$MODE DELPHI} Possible solution: {$ifndef UNICODE}{$MODE DELPHI}{$endif} ============= File 'packages\winunits-base\src\wininet.pp' - error compile in -Mdelphiunicode mode (with -dFPC_OS_UNICODE cmd line switch). There is errors in declarations of overloaded functions - FindFirstUrlCacheEntry - FindNextUrlCacheEntry

The RTL and packages are not geared for compilation with different modes. Leave that be until this is handled by an official release.

Regards,
Sven

Reply by email