{**********************************************************************
    Copyright(c) 2016 pda <pda2@yandex.ru>

    See the file COPYING.FPC, included in this distribution,
    for details about the copyright.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 **********************************************************************}

// Based on: http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Compiler_Versions
{$IFDEF VER40}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER50}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER55}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER60}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER10}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER15}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER70}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER80}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER90}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER93}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER100}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER110}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER120}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER125}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER130}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER140}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER150}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER160}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER170}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER180}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER130}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER140}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER150}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER160}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER170}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER180}{$DEFINE __TOC}{$ENDIF}
{$IFDEF VER185}{$DEFINE __TOC}{$ENDIF}{$IFDEF VER190}{$DEFINE __TOC}{$ENDIF}
{$IFDEF __TOC}
  {$MESSAGE ERROR 'Too old compiller version. Delphi 2009+ is required.'}
{$ENDIF}

{$DEFINE __TNC}
{$IFDEF VER200}{$DEFINE DELPHI_2009}{$DEFINE DELPHI_2009_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER210}{$DEFINE DELPHI_2010}{$DEFINE DELPHI_2010_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER220}{$DEFINE DELPHI_XE}{$DEFINE DELPHI_XE_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER230}{$DEFINE DELPHI_XE2}{$DEFINE DELPHI_XE2_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER240}{$DEFINE DELPHI_XE3}{$DEFINE DELPHI_XE3_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER250}{$DEFINE DELPHI_XE4}{$DEFINE DELPHI_XE4_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER260}{$DEFINE DELPHI_XE5}{$DEFINE DELPHI_XE5_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER270}{$DEFINE DELPHI_XE6}{$DEFINE DELPHI_XE6_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER280}{$DEFINE DELPHI_XE7}{$DEFINE DELPHI_XE7_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER290}{$DEFINE DELPHI_XE8}{$DEFINE DELPHI_XE8_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER300}{$DEFINE DELPHI_SEATTLE}{$DEFINE DELPHI_SEATTLE_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER310}{$DEFINE DELPHI_BERLIN}{$DEFINE DELPHI_BERLIN_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF VER320}{$DEFINE DELPHI_TOKYO}{$DEFINE DELPHI_TOKYO_PLUS}{$UNDEF __TNC}{$ENDIF}
{$IFDEF __TNC}
   {$UNDEF __TNC}
   {$DEFINE DELPHI_TOKYO_PLUS}
{$ENDIF}

{$IFDEF DELPHI_TOKYO_PLUS}{$DEFINE DELPHI_BERLIN_PLUS}{$ENDIF}
{$IFDEF DELPHI_BERLIN_PLUS}{$DEFINE DELPHI_SEATTLE_PLUS}{$ENDIF}
{$IFDEF DELPHI_SEATTLE_PLUS}{$DEFINE DELPHI_XE8_PLUS}{$ENDIF}
{$IFDEF DELPHI_XE8_PLUS}{$DEFINE DELPHI_XE7_PLUS}{$ENDIF}
{$IFDEF DELPHI_XE7_PLUS}{$DEFINE DELPHI_XE6_PLUS}{$ENDIF}
{$IFDEF DELPHI_XE6_PLUS}{$DEFINE DELPHI_XE5_PLUS}{$ENDIF}
{$IFDEF DELPHI_XE5_PLUS}{$DEFINE DELPHI_XE4_PLUS}{$ENDIF}
{$IFDEF DELPHI_XE4_PLUS}{$DEFINE DELPHI_XE3_PLUS}{$ENDIF}
{$IFDEF DELPHI_XE3_PLUS}{$DEFINE DELPHI_XE2_PLUS}{$ENDIF}
{$IFDEF DELPHI_XE2_PLUS}{$DEFINE DELPHI_XE_PLUS}{$ENDIF}
{$IFDEF DELPHI_XE_PLUS}{$DEFINE DELPHI_2010_PLUS}{$ENDIF}
{$IFDEF DELPHI_2010_PLUS}{$DEFINE DELPHI_2009_PLUS}{$ENDIF}

{$IFOPT W+}
  {$DEFINE _WARNINGS_ENABLED}
{$ENDIF}

{$IFDEF DELPHI_XE2_PLUS}{$DEFINE HAS_FORMATSETTINGS}{$ENDIF}
{$IFDEF DELPHI_XE4_PLUS}{$LEGACYIFEND ON}{$ENDIF}

{$DEFINE FPC_HAS_FEATURE_ANSISTRINGS}
{$DEFINE FPC_HAS_FEATURE_WIDESTRINGS}
{$DEFINE FPC_HAS_FEATURE_UNICODESTRINGS}
{$IFNDEF MSWINDOWS}{$DEFINE FPC_WIDESTRING_EQUAL_UNICODESTRING}{$ENDIF}
{$DEFINE FPC_HAS_TYPE_SINGLE}
{$DEFINE FPC_HAS_TYPE_DOUBLE}
{$DEFINE FPC_HAS_TYPE_EXTENDED}
{$IF SIZEOF(Extended) = 10}{$DEFINE CPUEXTENDED}{$IFEND}
{$DEFINE ENDIAN_LITTLE}


