delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/08/29/10:15:25

From: earnie_boyd AT yahoo DOT com (Earnie Boyd)
Subject: Re: I: gcc ... -U_WIN32 ... may cause problems
29 Aug 1998 10:15:25 -0700 :
Message-ID: <19980829133256.3242.rocketmail.cygnus.gnu-win32@send103.yahoomail.com>
Reply-To: earnie_boyd AT yahoo DOT com
Mime-Version: 1.0
To: MCzapski AT openplus DOT com DOT au, Michael Weiser <michael AT weiser DOT saale-net DOT de>
Cc: gnu-win32 AT cygnus DOT com

---Michael Weiser <michael AT weiser DOT saale-net DOT de> wrote:
>
> Hello Michael, you wrote:
> >Cygwin32 but unix-specific daemon code is compiled instead, for
example.  To 
> >avoid coding #if defined construct as shown I decided to undefine
_WIN32 when 
> >compiling in Cygwin32 environment by using a command line of a form
"gcc ... 
> >-U_WIN32 ...".  Before I did that the application worked fine
however as soon 
> Wouldn't it be cleaner and easier to code something like
> 
> #if defined __unix__ || defined __CYGWIN32__
> ...
> #endif
> 
> and
> 
> #if defined _WIN32 && !defined __CYGWIN32__
> ...
> #endif
> 
> around parts of your program that should behave like on unix under
> cygwin? IMHO that wouldn't be more effort than solving your current
> problem and all the others that will arise if something in the headers
> or the cygwin tools gets changed.

Since we are giving humble opinions here is mine:

Leave the _WIN32 and WINNT for MS' use and get rid of them from the
specs altogether.  I've had to be cautious about this before and
_WIN32 being defined for CYGWIN32 and even MINGW32 definitely gets in
the way on occasion.


_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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