[Lazarus] Unicode branch
Marco van de Voort
marcov at stack.nl
Mon Jun 10 10:53:52 CEST 2013
On Mon, Jun 10, 2013 at 03:07:00PM +0800, Paul Ishenin wrote:
> >> {$ifdef UNICODE}
> >> TResourceType = PWideChar;
> >> {$else}
> >> TResourceType = PChar;
> >> {$endif}
> >
> > Where is UNICODE defined ?
> >
> > Because the RTL is compiled with the FPC_UNICODE_RTL define.
>
> That define was made in FPC RTL for windows CE. I think now we simple
> need to replace it with something new.
UNICODE is now reserved for Delphiunicode mode afaik. So we use
FPC_OS_UNICODE as global define to signal that FPC expects API units in
two-byte value. (because there is simply more Delphi code that tests for
2009+ with unicode than 3rd party API units)
In headers that already have unicode we've added
{$IFDEF FPC_OS_UNICODE}{$define unicode} {$endif}
to the top, since that is local only.
This will get hard in places where FPC/Lazarus redefines API structures for
own purposes. E.g. if you fix this, further down it redefines wndclass.
More information about the Lazarus
mailing list