Browse Source

* fixed bootstrapping problems

florian 21 years ago
parent
commit
61cf2984c7
2 changed files with 16 additions and 5 deletions
  1. 11 3
      compiler/ptconst.pas
  2. 5 2
      rtl/objpas/sysutils/sysstrh.inc

+ 11 - 3
compiler/ptconst.pas

@@ -192,13 +192,18 @@ implementation
                          else if is_constrealnode(p) and
                                  (torddef(t.def).typ=scurrency)
                            { allow bootstrapping }
-{$ifndef VER1_0}
+{$ifdef VER1_0}
                                  and (trealconstnode(p).value_real*10000 >= low(int64)) and
                                  (trealconstnode(p).value_real*10000 <= high(int64))
-{$endif ndef VER1_0}
+{$endif VER1_0}
                            then
                              begin
+{$ifdef VER1_0}
+                               { only trunc is 64 bit in 1.0.x so use trunc here to allow bootstrapping }
+                               intvalue:=trunc(trealconstnode(p).value_real*10000);
+{$else VER1_0}
                                intvalue:=round(trealconstnode(p).value_real*10000);
+{$endif VER1_0}
                              end
                          else
                            begin
@@ -1092,7 +1097,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.88  2004-06-20 08:55:30  florian
+  Revision 1.89  2004-06-20 20:41:47  florian
+    * fixed bootstrapping problems
+
+  Revision 1.88  2004/06/20 08:55:30  florian
     * logs truncated
 
   Revision 1.87  2004/06/18 15:16:46  peter

+ 5 - 2
rtl/objpas/sysutils/sysstrh.inc

@@ -45,7 +45,7 @@ const
   MaxDateTime: TDateTime =  2958465.99999; { 12/31/9999 11:59:59.999 PM }
 
 {$ifndef VER1_0}
-{$if defined(FPC_HAS_TYPE_EXTENDED) or defined(FPC_HAS_TYPE_FLOAT)}
+{$if defined(FPC_HAS_TYPE_EXTENDED) or defined(FPC_HAS_TYPE_FLOAT128)}
   MinCurrency: Currency = -922337203685477.5807;
   MaxCurrency: Currency =  922337203685477.5807;
 {$else}
@@ -190,7 +190,10 @@ function BCDToInt(Value: integer): integer;
 
 {
   $Log$
-  Revision 1.6  2004-06-13 10:49:50  florian
+  Revision 1.7  2004-06-20 20:42:37  florian
+    * fixed bootstrapping problems
+
+  Revision 1.6  2004/06/13 10:49:50  florian
     * fixed some bootstrapping problems as well as some 64 bit stuff
 
   Revision 1.5  2004/06/12 13:23:17  michael