Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-06

fpc-svn177-units-Mysql broken

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jan Ruzicka

Hi

the latest version (177) of fpc in svn does not compile on Mac OS X 10.3.9.

The make all ends with following:

/Users/j/fpc/fpc-svn/compiler/ppcppc -Xs -O1 -n -S2 -Fu/Users/j/fpc/fpc-svn/rtl/units/powerpc-darwin
-Fu/Users/j/fpc/fpc-svn/packages/base/ibase/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/postgres/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/mysql/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/sqlite/units/powerpc-darwin -FE. -FU/Users/j/fpc/fpc-svn/fcl/units/powerpc-darwin -dpowerpc -dRELEASE db.pp
dataset.inc(468,54) Error: Incompatible type for arg no. 1: Got "TDateTimeAlias", expected "Int64"
db.pp(2025) Fatal: There were 1 errors compiling module, stopping db.pp(2025) Error: Compilation aborted
make[3]: *** [db.ppu] Error 1
make[2]: *** [db_all] Error 2
make[1]: *** [fcl_all] Error 2
make: *** [build-stamp.powerpc-darwin] Error 2

>

Reply by email

Alexandrov Alexandru
to Jan Ruzicka

there is an inconsistency:

  TDateTimeRec = record
    case TFieldType of
      ftDate: (Date: Longint);
      ftTime: (Time: Longint);
      ftDateTime: (DateTime: TDateTimeAlias);
  end;
   TTimeStamp = record
      Time: integer;   { Number of milliseconds since midnight }
      Date: integer;   { One plus number of days since 1/1/0001 }
   end ;

TTimeStamp,Date is integer, and TDateTimeRec.ftDate is longint.

on AMD 64 integerlongint?

Alex

Jan Ruzicka wrote 31 lines
Hi the latest version (177) of fpc in svn does not compile on Mac OS X 10.3.9. The make all ends with following: /Users/j/fpc/fpc-svn/compiler/ppcppc -Xs -O1 -n -S2 -Fu/Users/j/fpc/fpc-svn/rtl/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/ibase/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/postgres/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/mysql/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/sqlite/units/powerpc-darwin -FE. -FU/Users/j/fpc/fpc-svn/fcl/units/powerpc-darwin -dpowerpc -dRELEASE db.pp dataset.inc(468,54) Error: Incompatible type for arg no. 1: Got "TDateTimeAlias", expected "Int64" db.pp(2025) Fatal: There were 1 errors compiling module, stopping db.pp(2025) Error: Compilation aborted make[3]: *** [db.ppu] Error 1 make[2]: *** [db_all] Error 2 make[1]: *** [fcl_all] Error 2 make: *** [build-stamp.powerpc-darwin] Error 2 >> _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Peter Vreman
to Alexandrov Alexandru
you wrote 17 lines
there is an inconsistency: TDateTimeRec = record case TFieldType of ftDate: (Date: Longint); ftTime: (Time: Longint); ftDateTime: (DateTime: TDateTimeAlias); end; TTimeStamp = record Time: integer; { Number of milliseconds since midnight } Date: integer; { One plus number of days since 1/1/0001 } end ; TTimeStamp,Date is integer, and TDateTimeRec.ftDate is longint. on AMD 64 integerlongint?

integer is 32 bit.

Peter

Reply by email

Alexandrov Alexandru
to Peter Vreman

IMHO we don't need date on 64 bit:

   TDateTimeRec = record
     case TFieldType of
       ftDate: (Date: integer);
       ftTime: (Time: integer);
       ftDateTime: (DateTime: TDateTimeAlias);
   end;
Peter Vreman wrote 25 lines
At 08:09 3-6-2005, you wrote: >there is an inconsistency: > > TDateTimeRec = record > case TFieldType of > ftDate: (Date: Longint); > ftTime: (Time: Longint); > ftDateTime: (DateTime: TDateTimeAlias); > end; > > TTimeStamp = record > Time: integer; { Number of milliseconds since midnight } > Date: integer; { One plus number of days since 1/1/0001 } > end ; > >TTimeStamp,Date is integer, and TDateTimeRec.ftDate is longint. > >on AMD 64 integerlongint? integer is 32 bit. Peter

Reply by email

Vincent Snijders
to Jan Ruzicka: Hi the latest version (177) of fpc in svn does not compile on Mac OS X 10.3.9. The make…
Jan Ruzicka wrote 22 lines
Hi the latest version (177) of fpc in svn does not compile on Mac OS X 10.3.9. The make all ends with following: /Users/j/fpc/fpc-svn/compiler/ppcppc -Xs -O1 -n -S2 -Fu/Users/j/fpc/fpc-svn/rtl/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/ibase/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/postgres/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/mysql/units/powerpc-darwin -Fu/Users/j/fpc/fpc-svn/packages/base/sqlite/units/powerpc-darwin -FE. -FU/Users/j/fpc/fpc-svn/fcl/units/powerpc-darwin -dpowerpc -dRELEASE db.pp dataset.inc(468,54) Error: Incompatible type for arg no. 1: Got "TDateTimeAlias", expected "Int64" db.pp(2025) Fatal: There were 1 errors compiling module, stopping db.pp(2025) Error: Compilation aborted make[3]: *** [db.ppu] Error 1 make[2]: *** [db_all] Error 2 make[1]: *** [fcl_all] Error 2 make: *** [build-stamp.powerpc-darwin] Error 2

I don't understand the code exactly. (It seems to assume that the DateTime field contains miliseconds since a certains startdate?) It is about this line:

         TimeStamp := MSecsToTimeStamp(Source.DateTime);

DataTime is a double. MSecsToTimeStamp expects a comp. Maybe a double can be converted to a comp on i386, but not on powerpc.

Vincent.

Reply by email