Răsfoiți Sursa

+ defined FPC_FULLVERSION as integer constant containing the version,
release and patch level are always two digits so the version can
be compared numerically: so 2.2.2 results in 20202, resolves #11568

git-svn-id: trunk@11504 -

florian 17 ani în urmă
părinte
comite
e0ff540918
3 a modificat fișierele cu 11 adăugiri și 0 ștergeri
  1. 1 0
      .gitattributes
  2. 1 0
      compiler/options.pas
  3. 9 0
      tests/webtbs/tw11568.pp

+ 1 - 0
.gitattributes

@@ -8408,6 +8408,7 @@ tests/webtbs/tw11435c.pp svneol=native#text/plain
 tests/webtbs/tw11436.pp svneol=native#text/plain
 tests/webtbs/tw1152.pp svneol=native#text/plain
 tests/webtbs/tw11543.pp svneol=native#text/plain
+tests/webtbs/tw11568.pp svneol=native#text/plain
 tests/webtbs/tw1157.pp svneol=native#text/plain
 tests/webtbs/tw1157b.pp svneol=native#text/plain
 tests/webtbs/tw11619.pp svneol=native#text/plain

+ 1 - 0
compiler/options.pas

@@ -2578,6 +2578,7 @@ begin
   set_system_macro('FPC_VERSION',version_nr);
   set_system_macro('FPC_RELEASE',release_nr);
   set_system_macro('FPC_PATCH',patch_nr);
+  set_system_macro('FPC_FULLVERSION',Format('%d%.02d%.02d',[StrToInt(version_nr),StrToInt(release_nr),StrToInt(patch_nr)]));
 
   for i:=low(tfeature) to high(tfeature) do
     if i in features then

+ 9 - 0
tests/webtbs/tw11568.pp

@@ -0,0 +1,9 @@
+{$if not(fpc_fullversion>20202)}
+  {$error Problem with fpc_fullversion}
+{$endif}
+
+{ force compiler error if it's defined wrong }
+{$if fpc_fullversion>20202)}
+begin
+end.
+{$endif}