El 09/12/17 a les 00:41, Werner Pamler via Lazarus ha escrit:
Am 08.12.2017 um 22:32 schrieb Juha Manninen via Lazarus:
How does it fail? Lazarus 1.8 was meant to still compile with FPC 2.6.4.
However with Lazarus trunk I would be happy to go ahead and forget 2.6.4.
If the fix for Lazarus 1.8 is easy, please upload a patch.

Tested on Win32 where it fails in interfaces\win32\win32int because unit "character" is not found. It is in rtl\objpas of fpc3.04, but not of fpc 2.6.4, it came in with fpc 3.0.0

Yes, my dirty hack was to copy character.pas from fpc-3.0.0 (and all other needed units[*]) to interfaces\win32. I also add to edit character.pas to add the missing resource strings and the definition of ENoConstructException


--- fpc-3.0.0/rtl/objpas/character.pas  2013-08-20 06:55:05.000000000 +0200
+++ laz_1_8/lcl/interfaces/win32/character.pas 2017-12-09 11:51:22.606416879 +0100
@@ -195,6 +195,19 @@
   SysUtils,
   RtlConsts;

+ResourceString
+  SStringIndexOutOfRange        = 'String index %d out of range [1 - %d]';
+ SHighSurrogateOutOfRange = 'High surrogate $%x out of range [$D800 - $DBFF]'; + SLowSurrogateOutOfRange = 'Low surrogate $%x out of range [$DC00 - $DFFF]'; + SInvalidUTF32Char = 'Invalid UTF32 character $%x. Valid UTF32 character must be in range [$0 - $10FFFF] except surrogate range [$D800-$DFFF]'; + SInvalidHighSurrogate = 'Invalid high surrogate at index %d. High surrogate must be followed by a low surrogate pair';
+  SInvalidUnicodeCodePointSequence = 'Invalid unicode code point sequence';
+  SClassCantBeConstructed       = 'Class %s can not be constructed';
+
+type
+
+  ENoConstructException = class(Exception);
+
 const
   LETTER_CATEGORIES = [
TUnicodeCategory.ucUppercaseLetter, TUnicodeCategory.ucLowercaseLetter,


[*] the complete list of missing units is

?       character.pas
?       unicodedata.inc
?       unicodedata.pas
?       unicodedata_be.inc
?       unicodedata_le.inc
?       unicodenumtable.pas
?       weight_derivation.inc


I know I'll have to upgrade to fpc 3 someday, but what worries me about it is my (and other 3rd party units) use of ansistrings as binary buffers. I did some quick tests some time ago an nothing seemed broken, but I'm somewhat reluctant since my software has to run unattended 24/7 (or more like 24/5). OTOH I can always keep a copy of fpc-2.6.4 and lazarus 1.6.4 recompile if something goes wrong.


Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to