Sign in Join

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

Mailing lists / fpc-pascal / 2004-06

TDBF makes assumption that breaks win32 compat

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Vincent Snijders
Show quoted text 27 lines
Tony Maro schreef: > The TDBF assumes that if you are running FPC you are NOT in Windows. > Sorry this isn't a diff, but I don't have the tools in my Windows > environment yet... > > Note the first $ifdef FPC - in Windows it causes it to reference a unix > type. It should be a {$ifndef WIN32} most likely... and it won't build. This issue was already fixed in CVS :-). This piece of code doesn't work in Kylix yet, I think. Revision 1.48: ----- @@ -2440,9 +2438,11 @@ procedure TDbfGlobals.InitUserName; {$ifdef FPC} +{$ifndef WIN32} var TempName: UTSName; {$endif} +{$endif} begin {$ifdef WIN32} FUserNameLen := MAX_COMPUTERNAME_LENGTH+1; ----- Micha

Can this patch be applied in FPC CVS too?

Regards,
Vincent.

Unknown author
to Vincent Snijders
Vincent Snijders wrote 31 lines
On Fri, 25 Jun 2004 09:51:25 +0200 Micha Nelissen wrote: > Tony Maro schreef: > > The TDBF assumes that if you are running FPC you are NOT in Windows. > > Sorry this isn't a diff, but I don't have the tools in my Windows > > environment yet... > > > > Note the first $ifdef FPC - in Windows it causes it to reference a unix > > type. It should be a {$ifndef WIN32} most likely... and it won't build. > > This issue was already fixed in CVS :-). This piece of code doesn't work > in Kylix yet, I think. Revision 1.48: > > ----- > @@ -2440,9 +2438,11 @@ > > procedure TDbfGlobals.InitUserName; > {$ifdef FPC} > +{$ifndef WIN32} > var > TempName: UTSName; > {$endif} > +{$endif} > begin > {$ifdef WIN32} > FUserNameLen := MAX_COMPUTERNAME_LENGTH+1; > ----- > > Micha Can this patch be applied in FPC CVS too?

Applied.

Michael.

Vincent Snijders
to Unknown author
Applied. Michael.

Thanks.

If the following patch is applied, make install works on win32. ATM, Dbf_Wtil is not compiled on win32, but make install wants to install it. With this patch it is compiled on win32 too.

Index: fpc-1.9/fcl/db/dbase/Dbf.pas
=================================================================== RCS file: /FPC/CVS/fpc/fcl/db/dbase/Dbf.pas,v
retrieving revision 1.1
diff -u -r1.1 Dbf.pas
--- fpc-1.9/fcl/db/dbase/Dbf.pas 21 Jun 2004 20:49:37 -0000 1.1 +++ fpc-1.9/fcl/db/dbase/Dbf.pas 27 Jun 2004 11:59:57 -0000 @@ -437,8 +437,8 @@
Libc,
{$endif}
Types,
- Dbf_Wtil,
{$endif}
+ Dbf_Wtil,
{$ifdef DELPHI_6}
Variants,
{$endif}

Unknown author
to Vincent Snijders
Vincent Snijders wrote 9 lines
On Sun, 27 Jun 2004 00:57:28 +0200 (CEST) wrote: > > Applied. > > Michael. Thanks. If the following patch is applied, make install works on win32. ATM, Dbf_Wtil is not compiled on win32, but make install wants to install it. With this patch it is compiled on win32 too.

Applied too.
Please test, because I applied the patch on Linux, so I only tested Linux compilation, not win32...

Michael.