Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <20000623124819.1588.qmail@web109.yahoomail.com> Date: Fri, 23 Jun 2000 05:48:19 -0700 (PDT) From: Earnie Boyd Reply-To: earnie_boyd AT yahoo DOT com Subject: RE: New GCC available for testing (TRY 3) -- fixes -mno-cygwin pr oblem To: nhv AT cape DOT com Cc: cygwin users MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --- Norman Vine wrote: -8<- > > 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 > As Chuck pointed out you should use __CYGWIN__ instead of _WIN32 in this case. However, I wouuld remove the outer #if. Isn't enought to do: #if defined(MAKEDLL) # define INTERFACE __declspec(dllexport) #elif defined(USEDLL) # define INTERFACE __declspec(dllimport) #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. > The community should be using __CYGWIN__ for preprocessor conditioning for the Cygwin GCC. One of the major problems I have with having the _WIN32 macro defined is that some software already uses the macro to condition for Win32 specific things and that gets in the way of compiling for POSIX. Cheers, ===== --- Earnie Boyd: __Cygwin: POSIX on Windows__ Cygwin Newbies: __Minimalist GNU for Windows__ Mingw32 List: Mingw Home: __________________________________________________ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/ -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com