Sign in Join

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

Mailing lists / fpc-devel / 2006-01

Problems with WINDOWS define (Revision 2291)

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Unknown author

Revision 2291 adds a WINDOWS define for all Win platforms. I'm sure Florian had a very good reason for doing this but it seems to cause some problems for TP-compatible programs which already have some sort of mysterious meaning attached to that define (specifically, unzip, plex and pyacc). The following patch corrects this problem. I see that Peter fixed unzip with revision 2299 but that is a pretty extensive patch. Mine is much smaller and takes a simpler approach.

Index: unzip.pp
=================================================================== --- unzip.pp (revision 2293)
+++ unzip.pp (working copy)
@@ -48,6 +48,9 @@

{$IFDEF FPC}
{$DEFINE BIT32}
+ {$IFDEF  WINDOWS}
+   {$UNDEF WINDOWS}
+  {$ENDIF}
{$ENDIF}

{$IFDEF OS2}
Index: plex.pas
=================================================================== --- plex.pas (revision 2293)
+++ plex.pas (working copy)
@@ -64,6 +64,11 @@
{$IFDEF DPMI}
{$M 32768}
{$ENDIF}
+{$IFDEF FPC}
+ {$IFDEF WINDOWS}
+ {$UNDEF WINDOWS}
+ {$ENDIF}
+{$ENDIF}
{$IFDEF Windows}
{$M 32768,0}
{$ENDIF}
Index: pyacc.pas
=================================================================== --- pyacc.pas (revision 2293)
+++ pyacc.pas (working copy)
@@ -105,6 +105,11 @@
{$IFDEF DPMI}
{$M 32768}
{$ENDIF}
+{$IFDEF FPC}
+ {$IFDEF WINDOWS}
+ {$UNDEF WINDOWS}
+ {$ENDIF}
+{$ENDIF}
{$IFDEF Windows}
{$M 32768,0}
{$ENDIF}

Dave

Reply by email

peter green
to Unknown author

should we use MSWINDOWS instead especailly as thats what borland seems to be using for windows now (in addition to the more specific WIN32).

Earlier message 64 lines
-----Original Message----- From: Behalf Of Sent: 15 January 2006 20:14 To: Subject: [fpc-devel] Problems with WINDOWS define (Revision 2291) Revision 2291 adds a WINDOWS define for all Win platforms. I'm sure Florian had a very good reason for doing this but it seems to cause some problems for TP-compatible programs which already have some sort of mysterious meaning attached to that define (specifically, unzip, plex and pyacc). The following patch corrects this problem. I see that Peter fixed unzip with revision 2299 but that is a pretty extensive patch. Mine is much smaller and takes a simpler approach. Index: unzip.pp =================================================================== --- unzip.pp (revision 2293) +++ unzip.pp (working copy) @@ -48,6 +48,9 @@ {$IFDEF FPC} {$DEFINE BIT32} + {$IFDEF WINDOWS} + {$UNDEF WINDOWS} + {$ENDIF} {$ENDIF} {$IFDEF OS2} Index: plex.pas =================================================================== --- plex.pas (revision 2293) +++ plex.pas (working copy) @@ -64,6 +64,11 @@ {$IFDEF DPMI} {$M 32768} {$ENDIF} +{$IFDEF FPC} + {$IFDEF WINDOWS} + {$UNDEF WINDOWS} + {$ENDIF} +{$ENDIF} {$IFDEF Windows} {$M 32768,0} {$ENDIF} Index: pyacc.pas =================================================================== --- pyacc.pas (revision 2293) +++ pyacc.pas (working copy) @@ -105,6 +105,11 @@ {$IFDEF DPMI} {$M 32768} {$ENDIF} +{$IFDEF FPC} + {$IFDEF WINDOWS} + {$UNDEF WINDOWS} + {$ENDIF} +{$ENDIF} {$IFDEF Windows} {$M 32768,0} {$ENDIF} Dave

Reply by email