cxflag203 / superobject

Automatically exported from code.google.com/p/superobject
0 stars 0 forks source link

XE4 support #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile in XE4

What is the expected output? What do you see instead?
The compiler complains that DecimalSeparator does not exist.
That's because there are constructs like this:

{$if defined(NEED_FORMATSETTINGS)}FormatSettings.{$ifend}DecimalSeparator

NEED_FORMATSETTINGS is set for newer compilers, but not for XE4.

This will be an issue for every upcoming release. 

Maybe it's better to either detect old versions instead, and assume that this 
will never change in the future

Another option could be to use conditional expressions. 
That's what I did to get it to compile. I'm not sure in which exact version 
they were introduced though, so it could be troublesome for older versions.

{$if defined(FPC)}
  {$DEFINE HAVE_INLINE}
{$ifend}

{$if RTLVersion >= 17.0}
  {$DEFINE HAVE_INLINE}
{$ifend}

{$if RTLVersion >= 21.0}
  {$define HAVE_RTTI}
{$ifend}

{$if RTLVersion >= 23.0}
  {$define NEED_FORMATSETTINGS}
{$ifend}

{$if defined(FPC) and defined(VER2_6)}
  {$define NEED_FORMATSETTINGS}
{$ifend}

What version of the product are you using? On what operating system?
XE4

Please provide any additional information below.

Original issue reported on code.google.com by woutervannifterick on 11 Sep 2013 at 3:14

GoogleCodeExporter commented 9 years ago
Here the fix that code support XE4 :)

Original comment by dragonfl...@gmail.com on 12 Sep 2013 at 2:38

Attachments: