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

peter green plugwash at P10Link.net
Sun Jan 15 21:30:04 CET 2006


should we use MSWINDOWS instead especailly as thats what borland seems to be
using for windows now (in addition to the more specific WIN32).
  -----Original Message-----
  From: fpc-devel-bounces at lists.freepascal.org
[mailto:fpc-devel-bounces at lists.freepascal.org]On Behalf Of DSTRODT at aol.com
  Sent: 15 January 2006 20:14
  To: fpc-devel at lists.freepascal.org
  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20060115/4c9f5508/attachment.html>


More information about the fpc-devel mailing list