[fpc-devel] Problems with WINDOWS define (Revision 2291)

DSTRODT at aol.com DSTRODT at aol.com
Sun Jan 15 21:13:49 CET 2006


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20060115/8bc41a62/attachment.html>


More information about the fpc-devel mailing list