[fpc-devel] Some RTL bug fixes and suggestions

NetSpirit netspirit at meta.ua
Mon Mar 26 16:10:24 CEST 2018

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);

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


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

More information about the fpc-devel mailing list