www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/06/22/23:26:20

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Reply-To: <nhv AT cape DOT com>
From: "Norman Vine" <nhv AT cape DOT com>
To: <cygwin AT sourceware DOT cygnus DOT com>
Subject: RE: New GCC available for testing (TRY 3) -- fixes -mno-cygwin pr oblem
Date: Thu, 22 Jun 2000 23:19:05 -0400
Message-ID: <000001bfdcc1$ce9a97e0$ec36ba8c@nhv>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2232.26
In-Reply-To: <20000623014835.15486.qmail@web120.yahoomail.com>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211

> Earnie Boyd writes:

>> Norman Vine wrote:

>> What is the consensus of opinion as to the 'best' way to 
>> differentiate a 'Cygwin' compile in a header file.
>> 
>> I have been stumbling apon this a lot recently
>> #if defined( _WIN32 ) 
>> 
>> which IMHO breaks Cygwin
>> 
>
>Me too, and that is why I modify the specs file to only define 
>_WIN32 and WINNT
>if the -mno-cygwin switch is specified.

Hadn't thought of doing that - cute :-)

However fine as this is for my local compiles it still doesn't 
help much when trying to write or help maintain cross-platform 
OpenSource libraries where we can not expect the user to be using
anything other then the 'as distributed' toolkit.

Also IMHO it seems as if the _WIN32 define is sometimes useful
for instance when building DLL's 

#if defined(_WIN32)
   #if defined(MAKEDLL)
   #  define INTERFACE __declspec(dllexport)
   #elif defined(USEDLL)
   #  define INTERFACE __declspec(dllimport)
   #else
   #  define INTERFACE
   #endif
#else
#  define INTERFACE
#endif   


I maintain it would be a GOOD THING if we the Cygwin user
community came up with a 'standard way' of doing this.

Regards

Norman Vine


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019