{******************************************************************************}
{                       CnPack For Delphi/C++Builder                           }
{                     中国人自己的开放源码第三方开发包                         }
{                   (C)Copyright 2001-2015 CnPack 开发组                       }
{                   ------------------------------------                       }
{                                                                              }
{            本开发包是开源的自由软件，您可以遵照 CnPack 的发布协议来修        }
{        改和重新发布这一程序。                                                }
{                                                                              }
{            发布这一开发包的目的是希望它有用，但没有任何担保。甚至没有        }
{        适合特定目的而隐含的担保。更详细的情况请参阅 CnPack 发布协议。        }
{                                                                              }
{            您应该已经和开发包一起收到一份 CnPack 发布协议的副本。如果        }
{        还没有，可访问我们的网站：                                            }
{                                                                              }
{            网站地址：http://www.cnpack.org                                   }
{            电子邮件：master@cnpack.org                                       }
{                                                                              }
{******************************************************************************}

{******************************************************************************}
{                                                                              }
{                备注：该单元为公共编译指令和编译器版本信息包含文件            }
{                      该单元的内容参考了 JCL 和 GExperts                      }
{                                                                              }
{******************************************************************************}

//==============================================================================
// 功能配置选项
//==============================================================================

//{$DEFINE PERSONAL_EDITION}
{$DEFINE ENTERPRISE_EDITION}

{$IFNDEF PERSONAL_EDITION}
  {$DEFINE SUPPORT_DB}
  {$DEFINE SUPPORT_ADO}
{$ENDIF}

//==============================================================================
// 产生编译器版本信息
//==============================================================================

{$IFDEF VER300}
  {$DEFINE COMPILER23}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI23}
  {$DEFINE DELPHI10_SEATTLE}
  {$DEFINE BCB23}
  {$DEFINE BCB10_SEATTLE}
  {$DEFINE BDS17}
{$ENDIF}

{$IFDEF VER290}
  {$DEFINE COMPILER22}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI22}
  {$DEFINE DELPHIXE8}
  {$DEFINE BCB22}
  {$DEFINE BCBXE8}
  {$DEFINE BDS16}
{$ENDIF}

{$IFDEF VER280}
  {$DEFINE COMPILER21}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI21}
  {$DEFINE DELPHIXE7}
  {$DEFINE BCB21}
  {$DEFINE BCBXE7}
  {$DEFINE BDS15}
{$ENDIF}

{$IFDEF VER270}
  {$DEFINE COMPILER20}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI20}
  {$DEFINE DELPHIXE6}
  {$DEFINE BCB20}
  {$DEFINE BCBXE6}
  {$DEFINE BDS14}
{$ENDIF}

{$IFDEF VER260}
  {$DEFINE COMPILER19}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI19}
  {$DEFINE DELPHIXE5}
  {$DEFINE BCB19}
  {$DEFINE BCBXE5}
  {$DEFINE BDS12}
{$ENDIF}

{$IFDEF VER250}
  {$DEFINE COMPILER18}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI18}
  {$DEFINE DELPHIXE4}
  {$DEFINE BCB18}
  {$DEFINE BCBXE4}
  {$DEFINE BDS11}
{$ENDIF}

{$IFDEF VER240}
  {$DEFINE COMPILER17}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI17}
  {$DEFINE DELPHIXE3}
  {$DEFINE DELPHI2013}
  {$DEFINE BCB17}
  {$DEFINE BCBXE3}
  {$DEFINE BCB2013}
  {$DEFINE BDS10}
  {$DEFINE BDS2013}
{$ENDIF}

{$IFDEF VER230}
  {$DEFINE COMPILER16}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI16}
  {$DEFINE DELPHIXE2}
  {$DEFINE DELPHI2012}
  {$DEFINE BCB16}
  {$DEFINE BCBXE2}
  {$DEFINE BCB2012}
  {$DEFINE BDS9}
  {$DEFINE BDS2012}
{$ENDIF}

{$IFDEF VER220}
  {$DEFINE COMPILER15}
  {$IFDEF LINUX}
    {$DEFINE UCL10}
  {$ELSE}
    {$DEFINE VCL71}
  {$ENDIF}
  {$DEFINE DELPHI15}
  {$DEFINE DELPHIXE}
  {$DEFINE DELPHI2011}
  {$DEFINE BCB15}
  {$DEFINE BCBXE}
  {$DEFINE BCB2011}
  {$DEFINE BDS8}
  {$DEFINE BDS2011}
{$ENDIF}

{$IFDEF VER210}
  {$DEFINE COMPILER14}
  {$DEFINE VCL71}
  {$DEFINE DELPHI14}
  {$DEFINE DELPHI2010}
  {$DEFINE BCB14}
  {$DEFINE BCB2010}
  {$DEFINE BDS7}
  {$DEFINE BDS2010}
{$ENDIF}

{$IFDEF VER200}
  {$DEFINE COMPILER12}
  {$DEFINE VCL71}
  {$DEFINE DELPHI12}
  {$DEFINE DELPHI2009}
  {$DEFINE BCB12}
  {$DEFINE BCB2009}
  {$DEFINE BDS6}
  {$DEFINE BDS2009}
{$ENDIF}

{$IFDEF VER185}
  {$DEFINE COMPILER11}
  {$DEFINE VCL71}
  {$DEFINE DELPHI11}
  {$DEFINE DELPHI2007}
  {$DEFINE BCB11}
  {$DEFINE BCB2007}
  {$DEFINE BDS5}
  {$DEFINE BDS2007}
  {$UNDEF VER180}
{$ENDIF}

{$IFDEF VER180}
  {$DEFINE COMPILER10}
  {$DEFINE VCL71}
  {$DEFINE DELPHI10}
  {$DEFINE DELPHI2006}
  {$DEFINE BCB10}
  {$DEFINE BCB2006}
  {$DEFINE BDS4}
  {$DEFINE BDS2006}
{$ENDIF}

{$IFDEF VER170}
  {$DEFINE COMPILER9}
  {$DEFINE VCL71}
  {$DEFINE DELPHI9}
  {$DEFINE DELPHI2005}
  {$DEFINE BDS3}
  {$DEFINE BDS2005}
{$ENDIF}

{$IFDEF VER160}
  {$DEFINE COMPILER8}
  {$DEFINE VCL71}
  {$DEFINE DELPHI8}
  {$DEFINE BDS2}
{$ENDIF}

{$IFDEF VER150}
  {$DEFINE COMPILER7}
  {$IFDEF LINUX}
    {$DEFINE CLX10}
  {$ELSE}
    {$DEFINE VCL70}
    {$DEFINE CLX10}
    {$IFDEF BCB}
      {$DEFINE BCB7}
    {$ELSE}
      {$DEFINE DELPHI7}
    {$ENDIF}
  {$ENDIF}
{$ENDIF}

{$IFDEF VER140}
  {$DEFINE COMPILER6}
  {$IFDEF LINUX}
    {$DEFINE CLX10}
    {$IFDEF CONDITIONALEXPRESSIONS}
      {$IFDEF CompilerVersion}
        {$IF System.RTLVersion = 14.1}
          {$DEFINE KYLIX2}
        {$IFEND}
        {$IF System.RTLVersion = 14.5}
          {$DEFINE KYLIX3}
        {$IFEND}
      {$ELSE}
        {$DEFINE KYLIX1}
      {$ENDIF}
    {$ENDIF}
  {$ELSE}
    {$DEFINE VCL60}
    {$DEFINE CLX10}
    {$IFDEF BCB}
      {$DEFINE BCB6}
    {$ELSE}
      {$DEFINE DELPHI6}
    {$ENDIF}
  {$ENDIF}
{$ENDIF}

{$IFDEF VER130}
  {$DEFINE COMPILER5}
  {$DEFINE VCL50}
  {$IFDEF BCB}
    {$DEFINE BCB5}
  {$ELSE}
    {$DEFINE DELPHI5}
  {$ENDIF}
{$ENDIF}

{$IFDEF VER125}
  {$DEFINE COMPILER4}
  {$DEFINE VCL40}
  {$DEFINE BCB4}
{$ENDIF}

{$IFDEF VER120}
  {$DEFINE COMPILER4}
  {$DEFINE VCL40}
  {$DEFINE DELPHI4}
{$ENDIF}

{$IFDEF VER110}
  {$DEFINE COMPILER35}
  {$DEFINE VCL30}
  {$DEFINE BCB3}
{$ENDIF}

{$IFDEF VER100}
  {$DEFINE COMPILER3}
  {$DEFINE VCL30}
  {$DEFINE DELPHI3}
{$ENDIF}

{$IFDEF VER93}
  {$DEFINE COMPILER2}
  {$DEFINE VCL20}
  {$DEFINE BCB1}
{$ENDIF}

{$IFDEF VER90}
  {$DEFINE COMPILER2}
  {$DEFINE VCL20}
  {$DEFINE DELPHI2}
{$ENDIF}

{$IFDEF VER80}
  {$DEFINE COMPILER1}
  {$DEFINE VCL10}
  {$DEFINE DELPHI1}
{$ENDIF}

// DELPHIX_UP from DELPHIX mappings

{$IFDEF DELPHI23}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI23_UP}
  {$DEFINE DELPHI22_UP}
  {$DEFINE DELPHI21_UP}
  {$DEFINE DELPHI20_UP}
  {$DEFINE DELPHI19_UP}
  {$DEFINE DELPHI18_UP}
  {$DEFINE DELPHI17_UP}
  {$DEFINE DELPHI16_UP}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI10_SEATTLE}
  {$DEFINE DELPHI10_SEATTLE_UP}
  {$DEFINE DELPHIXE8_UP}
  {$DEFINE DELPHIXE7_UP}
  {$DEFINE DELPHIXE6_UP}
  {$DEFINE DELPHIXE5_UP}
  {$DEFINE DELPHIXE4_UP}
  {$DEFINE DELPHIXE3_UP}
  {$DEFINE DELPHIXE2_UP}
  {$DEFINE DELPHIXE_UP}

  // NO DELPHI2014 defined, so need define below here.
  {$DEFINE DELPHI2013_UP}
  {$DEFINE DELPHI2012_UP}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI22}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI22_UP}
  {$DEFINE DELPHI21_UP}
  {$DEFINE DELPHI20_UP}
  {$DEFINE DELPHI19_UP}
  {$DEFINE DELPHI18_UP}
  {$DEFINE DELPHI17_UP}
  {$DEFINE DELPHI16_UP}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHIXE8}
  {$DEFINE DELPHIXE8_UP}
  {$DEFINE DELPHIXE7_UP}
  {$DEFINE DELPHIXE6_UP}
  {$DEFINE DELPHIXE5_UP}
  {$DEFINE DELPHIXE4_UP}
  {$DEFINE DELPHIXE3_UP}
  {$DEFINE DELPHIXE2_UP}
  {$DEFINE DELPHIXE_UP}

  // NO DELPHI2014 defined, so need define below here.
  {$DEFINE DELPHI2013_UP}
  {$DEFINE DELPHI2012_UP}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI21}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI21_UP}
  {$DEFINE DELPHI20_UP}
  {$DEFINE DELPHI19_UP}
  {$DEFINE DELPHI18_UP}
  {$DEFINE DELPHI17_UP}
  {$DEFINE DELPHI16_UP}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHIXE7}
  {$DEFINE DELPHIXE7_UP}
  {$DEFINE DELPHIXE6_UP}
  {$DEFINE DELPHIXE5_UP}
  {$DEFINE DELPHIXE4_UP}
  {$DEFINE DELPHIXE3_UP}
  {$DEFINE DELPHIXE2_UP}
  {$DEFINE DELPHIXE_UP}

  // NO DELPHI2014 defined, so need define below here.
  {$DEFINE DELPHI2013_UP}
  {$DEFINE DELPHI2012_UP}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI20}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI20_UP}
  {$DEFINE DELPHI19_UP}
  {$DEFINE DELPHI18_UP}
  {$DEFINE DELPHI17_UP}
  {$DEFINE DELPHI16_UP}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHIXE6}
  {$DEFINE DELPHIXE6_UP}
  {$DEFINE DELPHIXE5_UP}
  {$DEFINE DELPHIXE4_UP}
  {$DEFINE DELPHIXE3_UP}
  {$DEFINE DELPHIXE2_UP}
  {$DEFINE DELPHIXE_UP}

  // NO DELPHI2014 defined, so need define below here.
  {$DEFINE DELPHI2013_UP}
  {$DEFINE DELPHI2012_UP}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI19}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI19_UP}
  {$DEFINE DELPHI18_UP}
  {$DEFINE DELPHI17_UP}
  {$DEFINE DELPHI16_UP}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHIXE5}
  {$DEFINE DELPHIXE5_UP}
  {$DEFINE DELPHIXE4_UP}
  {$DEFINE DELPHIXE3_UP}
  {$DEFINE DELPHIXE2_UP}
  {$DEFINE DELPHIXE_UP}

  // NO DELPHI2014 defined, so need define below here.
  {$DEFINE DELPHI2013_UP}
  {$DEFINE DELPHI2012_UP}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI18}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI18_UP}
  {$DEFINE DELPHI17_UP}
  {$DEFINE DELPHI16_UP}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHIXE4}
  {$DEFINE DELPHIXE4_UP}
  {$DEFINE DELPHIXE3_UP}
  {$DEFINE DELPHIXE2_UP}
  {$DEFINE DELPHIXE_UP}

  // NO DELPHI2014 defined, so need define below here.
  {$DEFINE DELPHI2013_UP}
  {$DEFINE DELPHI2012_UP}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI17}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI17_UP}
  {$DEFINE DELPHI16_UP}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHIXE3}
  {$DEFINE DELPHIXE3_UP}
  {$DEFINE DELPHIXE2_UP}
  {$DEFINE DELPHIXE_UP}
{$ENDIF}

{$IFDEF DELPHI2013}
  {$DEFINE DELPHI2013_UP}
  {$DEFINE DELPHI2012_UP}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI16}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI16_UP}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHIXE2}
  {$DEFINE DELPHIXE2_UP}
  {$DEFINE DELPHIXE_UP}
{$ENDIF}

{$IFDEF DELPHI2012}
  {$DEFINE DELPHI2012_UP}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI15}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI15_UP}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHIXE}
  {$DEFINE DELPHIXE_UP}
{$ENDIF}

{$IFDEF DELPHI2011}
  {$DEFINE DELPHI2011_UP}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI14}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI14_UP}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI2010}
  {$DEFINE DELPHI2010_UP}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI12}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI12_UP}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI2009}
  {$DEFINE DELPHI2009_UP}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI11}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI11_UP}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI2007}
  {$DEFINE DELPHI2007_UP}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI10}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI10_UP}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI2006}
  {$DEFINE DELPHI2006_UP}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI9}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI9_UP}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI2005}
  {$DEFINE DELPHI2005_UP}
{$ENDIF}

{$IFDEF DELPHI8}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI8_UP}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI7}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI7_UP}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI6}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI6_UP}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI5}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI5_UP}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI4}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI4_UP}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI3}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI3_UP}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI2}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI2_UP}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

{$IFDEF DELPHI1}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI1_UP}
{$ENDIF}

// BCBX_UP from BCBX mappings

{$IFDEF BCB23}
  {$DEFINE BCB}
  {$DEFINE BCB23_UP}
  {$DEFINE BCB22_UP}
  {$DEFINE BCB21_UP}
  {$DEFINE BCB20_UP}
  {$DEFINE BCB19_UP}
  {$DEFINE BCB18_UP}
  {$DEFINE BCB17_UP}
  {$DEFINE BCB16_UP}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB10_SEATTLE}
  {$DEFINE BCB10_SEATTLE_UP}
  {$DEFINE BCBXE8_UP}
  {$DEFINE BCBXE7_UP}
  {$DEFINE BCBXE6_UP}
  {$DEFINE BCBXE5_UP}
  {$DEFINE BCBXE4_UP}
  {$DEFINE BCBXE3_UP}
  {$DEFINE BCBXE2_UP}
  {$DEFINE BCBXE_UP}

  // NO BCB2014 defined, so need define below here.
  {$DEFINE BCB2013_UP}
  {$DEFINE BCB2012_UP}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB22}
  {$DEFINE BCB}
  {$DEFINE BCB22_UP}
  {$DEFINE BCB21_UP}
  {$DEFINE BCB20_UP}
  {$DEFINE BCB19_UP}
  {$DEFINE BCB18_UP}
  {$DEFINE BCB17_UP}
  {$DEFINE BCB16_UP}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCBXE8}
  {$DEFINE BCBXE8_UP}
  {$DEFINE BCBXE7_UP}
  {$DEFINE BCBXE6_UP}
  {$DEFINE BCBXE5_UP}
  {$DEFINE BCBXE4_UP}
  {$DEFINE BCBXE3_UP}
  {$DEFINE BCBXE2_UP}
  {$DEFINE BCBXE_UP}

  // NO BCB2014 defined, so need define below here.
  {$DEFINE BCB2013_UP}
  {$DEFINE BCB2012_UP}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB21}
  {$DEFINE BCB}
  {$DEFINE BCB21_UP}
  {$DEFINE BCB20_UP}
  {$DEFINE BCB19_UP}
  {$DEFINE BCB18_UP}
  {$DEFINE BCB17_UP}
  {$DEFINE BCB16_UP}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCBXE7}
  {$DEFINE BCBXE7_UP}
  {$DEFINE BCBXE6_UP}
  {$DEFINE BCBXE5_UP}
  {$DEFINE BCBXE4_UP}
  {$DEFINE BCBXE3_UP}
  {$DEFINE BCBXE2_UP}
  {$DEFINE BCBXE_UP}

  // NO BCB2014 defined, so need define below here.
  {$DEFINE BCB2013_UP}
  {$DEFINE BCB2012_UP}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB20}
  {$DEFINE BCB}
  {$DEFINE BCB20_UP}
  {$DEFINE BCB19_UP}
  {$DEFINE BCB18_UP}
  {$DEFINE BCB17_UP}
  {$DEFINE BCB16_UP}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCBXE6}
  {$DEFINE BCBXE6_UP}
  {$DEFINE BCBXE5_UP}
  {$DEFINE BCBXE4_UP}
  {$DEFINE BCBXE3_UP}
  {$DEFINE BCBXE2_UP}
  {$DEFINE BCBXE_UP}

  // NO BCB2014 defined, so need define below here.
  {$DEFINE BCB2013_UP}
  {$DEFINE BCB2012_UP}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB19}
  {$DEFINE BCB}
  {$DEFINE BCB19_UP}
  {$DEFINE BCB18_UP}
  {$DEFINE BCB17_UP}
  {$DEFINE BCB16_UP}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCBXE5}
  {$DEFINE BCBXE5_UP}
  {$DEFINE BCBXE4_UP}
  {$DEFINE BCBXE3_UP}
  {$DEFINE BCBXE2_UP}
  {$DEFINE BCBXE_UP}

  // NO BCB2014 defined, so need define below here.
  {$DEFINE BCB2013_UP}
  {$DEFINE BCB2012_UP}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB18}
  {$DEFINE BCB}
  {$DEFINE BCB18_UP}
  {$DEFINE BCB17_UP}
  {$DEFINE BCB16_UP}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCBXE4}
  {$DEFINE BCBXE4_UP}
  {$DEFINE BCBXE3_UP}
  {$DEFINE BCBXE2_UP}
  {$DEFINE BCBXE_UP}

  // NO BCB2014 defined, so need define below here.
  {$DEFINE BCB2013_UP}
  {$DEFINE BCB2012_UP}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB17}
  {$DEFINE BCB}
  {$DEFINE BCB17_UP}
  {$DEFINE BCB16_UP}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCBXE3}
  {$DEFINE BCBXE3_UP}
  {$DEFINE BCBXE2_UP}
  {$DEFINE BCBXE_UP}
{$ENDIF}

{$IFDEF BCB2013}
  {$DEFINE BCB2013_UP}
  {$DEFINE BCB2012_UP}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB16}
  {$DEFINE BCB}
  {$DEFINE BCB16_UP}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCBXE2}
  {$DEFINE BCBXE2_UP}
  {$DEFINE BCBXE_UP}
{$ENDIF}

{$IFDEF BCB2012}
  {$DEFINE BCB2012_UP}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB15}
  {$DEFINE BCB}
  {$DEFINE BCB15_UP}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCBXE}
  {$DEFINE BCBXE_UP}
{$ENDIF}

{$IFDEF BCB2011}
  {$DEFINE BCB2011_UP}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB14}
  {$DEFINE BCB}
  {$DEFINE BCB14_UP}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB2010}
  {$DEFINE BCB2010_UP}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB12}
  {$DEFINE BCB}
  {$DEFINE BCB12_UP}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB2009}
  {$DEFINE BCB2009_UP}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB11}
  {$DEFINE BCB}
  {$DEFINE BCB11_UP}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB2007}
  {$DEFINE BCB2007_UP}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB10}
  {$DEFINE BCB}
  {$DEFINE BCB10_UP}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB2006}
  {$DEFINE BCB2006_UP}
{$ENDIF}

{$IFDEF BCB7}
  {$DEFINE BCB}
  {$DEFINE BCB7_UP}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB6}
  {$DEFINE BCB}
  {$DEFINE BCB6_UP}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB5}
  {$DEFINE BCB}
  {$DEFINE BCB5_UP}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB4}
  {$DEFINE BCB}
  {$DEFINE BCB4_UP}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB3}
  {$DEFINE BCB}
  {$DEFINE BCB3_UP}
  {$DEFINE BCB1_UP}
{$ENDIF}

{$IFDEF BCB1}
  {$DEFINE BCB}
  {$DEFINE BCB1_UP}
{$ENDIF}

// KYLIXX_UP from KYLIXX mappings

{$IFDEF KYLIX3}
  {$DEFINE KYLIX}
  {$DEFINE KYLIX3_UP}
  {$DEFINE KYLIX2_UP}
  {$DEFINE KYLIX1_UP}
{$ENDIF}

{$IFDEF KYLIX2}
  {$DEFINE KYLIX}
  {$DEFINE KYLIX2_UP}
  {$DEFINE KYLIX1_UP}
{$ENDIF}

{$IFDEF KYLIX1}
  {$DEFINE KYLIX}
  {$DEFINE KYLIX1_UP}
{$ENDIF}

// BDSXX_UP from BDSXX mappings

{$IFDEF BDS17}
  {$DEFINE BDS}
  {$DEFINE BDS17_UP}
  {$DEFINE BDS16_UP}
  {$DEFINE BDS15_UP}
  {$DEFINE BDS14_UP}
  {$DEFINE BDS12_UP}
  {$DEFINE BDS11_UP}
  {$DEFINE BDS10_UP}
  {$DEFINE BDS9_UP}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}

  // NO BDS2014 defined, so need define below here.
  {$DEFINE BDS2013_UP}
  {$DEFINE BDS2012_UP}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS16}
  {$DEFINE BDS}
  {$DEFINE BDS16_UP}
  {$DEFINE BDS15_UP}
  {$DEFINE BDS14_UP}
  {$DEFINE BDS12_UP}
  {$DEFINE BDS11_UP}
  {$DEFINE BDS10_UP}
  {$DEFINE BDS9_UP}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}

  // NO BDS2014 defined, so need define below here.
  {$DEFINE BDS2013_UP}
  {$DEFINE BDS2012_UP}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS15}
  {$DEFINE BDS}
  {$DEFINE BDS15_UP}
  {$DEFINE BDS14_UP}
  {$DEFINE BDS12_UP}
  {$DEFINE BDS11_UP}
  {$DEFINE BDS10_UP}
  {$DEFINE BDS9_UP}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}

  // NO BDS2014 defined, so need define below here.
  {$DEFINE BDS2013_UP}
  {$DEFINE BDS2012_UP}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS14}
  {$DEFINE BDS}
  {$DEFINE BDS14_UP}
  {$DEFINE BDS12_UP}
  {$DEFINE BDS11_UP}
  {$DEFINE BDS10_UP}
  {$DEFINE BDS9_UP}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}

  // NO BDS2014 defined, so need define below here.
  {$DEFINE BDS2013_UP}
  {$DEFINE BDS2012_UP}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS12}
  {$DEFINE BDS}
  {$DEFINE BDS12_UP}
  {$DEFINE BDS11_UP}
  {$DEFINE BDS10_UP}
  {$DEFINE BDS9_UP}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}

  // NO BDS2014 defined, so need define below here.
  {$DEFINE BDS2013_UP}
  {$DEFINE BDS2012_UP}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS11}
  {$DEFINE BDS}
  {$DEFINE BDS11_UP}
  {$DEFINE BDS10_UP}
  {$DEFINE BDS9_UP}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}

  // NO BDS2014 defined, so need define below here.
  {$DEFINE BDS2013_UP}
  {$DEFINE BDS2012_UP}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS10}
  {$DEFINE BDS}
  {$DEFINE BDS10_UP}
  {$DEFINE BDS9_UP}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS2013}
  {$DEFINE BDS2013_UP}
  {$DEFINE BDS2012_UP}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS9}
  {$DEFINE BDS}
  {$DEFINE BDS9_UP}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS2012}
  {$DEFINE BDS2012_UP}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS8}
  {$DEFINE BDS}
  {$DEFINE BDS8_UP}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS2011}
  {$DEFINE BDS2011_UP}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS7}
  {$DEFINE BDS}
  {$DEFINE BDS7_UP}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS2010}
  {$DEFINE BDS2010_UP}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS6}
  {$DEFINE BDS}
  {$DEFINE BDS6_UP}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS2009}
  {$DEFINE BDS2009_UP}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS5}
  {$DEFINE BDS}
  {$DEFINE BDS5_UP}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS2007}
  {$DEFINE BDS2007_UP}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS4}
  {$DEFINE BDS}
  {$DEFINE BDS4_UP}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS2006}
  {$DEFINE BDS2006_UP}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS3}
  {$DEFINE BDS}
  {$DEFINE BDS3_UP}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS2005}
  {$DEFINE BDS2005_UP}
{$ENDIF}

{$IFDEF BDS2}
  {$DEFINE BDS}
  {$DEFINE BDS2_UP}
  {$DEFINE BDS1_UP}
{$ENDIF}

{$IFDEF BDS1}
  {$DEFINE BDS}
  {$DEFINE BDS1_UP}
{$ENDIF}

// COMPILERX_UP from COMPILERX mappings

{$IFDEF COMPILER23}
  {$DEFINE COMPILER23_UP}
  {$DEFINE COMPILER22_UP}
  {$DEFINE COMPILER21_UP}
  {$DEFINE COMPILER20_UP}
  {$DEFINE COMPILER19_UP}
  {$DEFINE COMPILER18_UP}
  {$DEFINE COMPILER17_UP}
  {$DEFINE COMPILER16_UP}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER22}
  {$DEFINE COMPILER22_UP}
  {$DEFINE COMPILER21_UP}
  {$DEFINE COMPILER20_UP}
  {$DEFINE COMPILER19_UP}
  {$DEFINE COMPILER18_UP}
  {$DEFINE COMPILER17_UP}
  {$DEFINE COMPILER16_UP}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER21}
  {$DEFINE COMPILER21_UP}
  {$DEFINE COMPILER20_UP}
  {$DEFINE COMPILER19_UP}
  {$DEFINE COMPILER18_UP}
  {$DEFINE COMPILER17_UP}
  {$DEFINE COMPILER16_UP}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER20}
  {$DEFINE COMPILER20_UP}
  {$DEFINE COMPILER19_UP}
  {$DEFINE COMPILER18_UP}
  {$DEFINE COMPILER17_UP}
  {$DEFINE COMPILER16_UP}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER19}
  {$DEFINE COMPILER19_UP}
  {$DEFINE COMPILER18_UP}
  {$DEFINE COMPILER17_UP}
  {$DEFINE COMPILER16_UP}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER18}
  {$DEFINE COMPILER18_UP}
  {$DEFINE COMPILER17_UP}
  {$DEFINE COMPILER16_UP}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER17}
  {$DEFINE COMPILER17_UP}
  {$DEFINE COMPILER16_UP}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER16}
  {$DEFINE COMPILER16_UP}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER15}
  {$DEFINE COMPILER15_UP}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER14}
  {$DEFINE COMPILER14_UP}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER12}
  {$DEFINE COMPILER12_UP}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER11}
  {$DEFINE COMPILER11_UP}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER10}
  {$DEFINE COMPILER10_UP}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER9}
  {$DEFINE COMPILER9_UP}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER8}
  {$DEFINE COMPILER8_UP}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER7}
  {$DEFINE COMPILER7_UP}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER6}
  {$DEFINE COMPILER6_UP}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER5}
  {$DEFINE COMPILER5_UP}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER4}
  {$DEFINE COMPILER4_UP}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER35}
  {$DEFINE COMPILER35_UP}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER3}
  {$DEFINE COMPILER3_UP}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER2}
  {$DEFINE COMPILER2_UP}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

{$IFDEF COMPILER1}
  {$DEFINE COMPILER1_UP}
{$ENDIF}

// VCLXX_UP from VCLXX mappings

{$IFDEF UCL10}
  {$DEFINE UCL10_UP}
{$ENDIF}

{$IFDEF VCL71}
  {$DEFINE VCL71_UP}
  {$DEFINE VCL70_UP}
  {$DEFINE VCL60_UP}
  {$DEFINE VCL50_UP}
  {$DEFINE VCL40_UP}
  {$DEFINE VCL30_UP}
  {$DEFINE VCL20_UP}
  {$DEFINE VCL10_UP}
{$ENDIF}

{$IFDEF VCL70}
  {$DEFINE VCL70_UP}
  {$DEFINE VCL60_UP}
  {$DEFINE VCL50_UP}
  {$DEFINE VCL40_UP}
  {$DEFINE VCL30_UP}
  {$DEFINE VCL20_UP}
  {$DEFINE VCL10_UP}
{$ENDIF}

{$IFDEF VCL60}
  {$DEFINE VCL60_UP}
  {$DEFINE VCL50_UP}
  {$DEFINE VCL40_UP}
  {$DEFINE VCL30_UP}
  {$DEFINE VCL20_UP}
  {$DEFINE VCL10_UP}
{$ENDIF}

{$IFDEF VCL50}
  {$DEFINE VCL50_UP}
  {$DEFINE VCL40_UP}
  {$DEFINE VCL30_UP}
  {$DEFINE VCL20_UP}
  {$DEFINE VCL10_UP}
{$ENDIF}

{$IFDEF VCL40}
  {$DEFINE VCL40_UP}
  {$DEFINE VCL30_UP}
  {$DEFINE VCL20_UP}
  {$DEFINE VCL10_UP}
{$ENDIF}

{$IFDEF VCL30}
  {$DEFINE VCL30_UP}
  {$DEFINE VCL20_UP}
  {$DEFINE VCL10_UP}
{$ENDIF}

{$IFDEF VCL20}
  {$DEFINE VCL20_UP}
  {$DEFINE VCL10_UP}
{$ENDIF}

{$IFDEF VCL10}
  {$DEFINE VCL10_UP}
{$ENDIF}

// CLXXX_UP from CLXXX mappings

{$IFDEF CLX10}
  {$DEFINE CLX10_UP}
{$ENDIF}

//==============================================================================
// 交叉平台相关定义
//==============================================================================

{$IFDEF COMPILER1}
  {$DEFINE WIN16}
  {$DEFINE MSWINDOWS}
{$ENDIF}

{$IFDEF BDS}
  {$DEFINE DOTNET}
{$ENDIF}

{$IFDEF WIN32}
  {$DEFINE MSWINDOWS}
{$ENDIF}

{$IFDEF LINUX}
  {$DEFINE UNIX}
  {$DEFINE COMPLIB_CLX}
{$ENDIF}

{$IFNDEF COMPLIB_CLX}
  {$DEFINE COMPLIB_VCL}
{$ENDIF}

//==============================================================================
// 映射版本信息到更友好的指令
//==============================================================================

{$IFDEF COMPILER3_UP}
  {$DEFINE SUPPORTS_WIDESTRING}
  {$DEFINE SUPPORTS_INTERFACE}
{$ENDIF}

{$IFDEF COMPILER35_UP}
  {$DEFINE SUPPORTS_EXTSYM}
  {$DEFINE SUPPORTS_NODEFINE}
{$ENDIF}

{$IFDEF COMPILER4_UP}
  {$DEFINE SUPPORTS_INT64}
  {$DEFINE SUPPORTS_DYNAMICARRAYS}
  {$DEFINE SUPPORTS_DEFAULTPARAMS}
  {$DEFINE SUPPORTS_REINTRODUCE}
  {$DEFINE SUPPORTS_OVERLOAD}
{$ENDIF}

{$IFDEF COMPILER6_UP}
  {$DEFINE SUPPORTS_ENUMVALUES}
  {$DEFINE SUPPORTS_VARIANTS}
  {$DEFINE SUPPORTS_IFDIRECTIVE}
{$ENDIF}

{$IFDEF DELPHI}
  {$DEFINE SUPPORTS_PASCAL}
{$ENDIF}

{$IFDEF BCB}
  {$DEFINE SUPPORTS_PASCAL}
  {$DEFINE SUPPORTS_CPLUSPLUS}
{$ENDIF}

{$IFDEF BDS}
  {$DEFINE SUPPORTS_PASCAL}
  {$DEFINE SUPPORTS_CSHARP}
  {$DEFINE IDE_WIDECONTROL}
  {$DEFINE OTA_NEW_BREAKPOINT_NOBUG}  // 2005 以上的 NewBreakpoint 才能工作

  {$IFNDEF COMPILER12_UP}
    // 2005~2007 Compiler is Ansi but Editor String is Utf8
    {$DEFINE IDE_STRING_ANSI_UTF8}
  {$ENDIF}
{$ENDIF}

{$IFDEF BDS}
  {$DEFINE SUPPORTS_INLINE}
{$ENDIF}

{$IFDEF DELPHIXE2_UP}
  {$DEFINE SUPPORT_UNITNAME_DOT}
{$ENDIF}

{$IFDEF DELPHIXE_UP}
  {$DEFINE TSTRINGS_HAS_WRITEBOM} // XE TStrings has WriteBOM property.
{$ENDIF}

{$IFDEF BDS2012_UP}
  {$DEFINE SUPPORTS_32_AND_64}
  {$DEFINE SUPPORTS_FMX}
  {$DEFINE SUPPORTS_CROSS_PLATFORM}
  {$DEFINE LIST_NEW_POINTER}
{$ENDIF}

{$IFDEF BDS2010_UP}
  {$DEFINE SUPPORTS_INTERFACE_AS_OBJECT}
{$ENDIF}

{$IFDEF BDS2009_UP}
  {$DEFINE UNICODE_STRING}
  {$DEFINE OBJECT_HAS_TOSTRING}  // TObject.ToString Function
  {$DEFINE OBJECT_HAS_EQUAL}     // TObject.Equal Function
  {$DEFINE SUPPORT_OTA_PROJECT_CONFIGURATION}
  {$IFNDEF DELPHIXE2_UP}  // 2009/2010/XE has a Project Version Number Bug
    {$DEFINE PROJECT_VERSION_NUMBER_BUG}
  {$ENDIF}
{$ENDIF}

{$IFDEF BDS2007_UP}
  {$DEFINE IDE_CONF_MANAGER}
{$ENDIF}

{$IFDEF COMPILER21_UP}
  {$DEFINE NOT_SUPPORT_BDE}
{$ENDIF}

//==============================================================================
// 调试设置
//==============================================================================

{.$DEFINE DEBUG}
{.$DEFINE USE_JCL}

{$IFDEF RELEASE}
  {$UNDEF DEBUG}
{$ENDIF}

{.$IFDEF DELPHI2009_UP}
  {.$UNDEF USE_JCL}
{.$ENDIF}

//==============================================================================
// 针对 PascalScript 的调试设置
//==============================================================================

{$DEFINE ALLDEBUG}

//==============================================================================
// 开发包语种定义
//==============================================================================

{$DEFINE GB2312}
{.$DEFINE BIG5}
{.$DEFINE ENGLISH}

//==============================================================================
// 下面的编译指令请勿更改
//==============================================================================

{$A+ Force alignment on word/dword boundaries}
{$S+ stack checking}

{$B- Short evaluation of boolean values}
{$H+ Long string support}
{$V- No var string checking}
{$X+ Extended syntax}
{$P+ Open string parameters}
{$J+ Writeable typed constants}
{$R- No Range checking}

{$IFDEF COMPILER6_UP}
  {$WARN SYMBOL_PLATFORM OFF}
  {$WARN UNIT_PLATFORM OFF}
  {$WARN SYMBOL_DEPRECATED OFF}
  {$WARN UNIT_DEPRECATED OFF}
{$ENDIF}

{$IFDEF COMPILER7_UP}
  {$WARN UNSAFE_CAST OFF}
  {$WARN UNSAFE_CODE OFF}
  {$WARN UNSAFE_TYPE OFF}
{$ENDIF}

{$IFDEF BCB}
  {$OBJEXPORTALL ON}
{$ENDIF}

{$DEFINE CN_USE_MSXML}
