delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/08/28/13:10:20

From: MCzapski AT openplus DOT com DOT au (Michael Czapski)
Subject: RE: gcc ... -U_WIN32 ... may cause problems
28 Aug 1998 13:10:20 -0700 :
Message-ID: <01BDD2AF.B9D42600.MCzapski.cygnus.gnu-win32@openplus.com.au>
Reply-To: "MCzapski AT openplus DOT com DOT au" <MCzapski AT openplus DOT com DOT au>
Mime-Version: 1.0
To: "'Sergey Okhapkin'" <sos AT prospect DOT com DOT ru>,
"gnu-win32 AT cygnus DOT com"
<gnu-win32 AT cygnus DOT com>

On Friday, August 28, 1998 5:40 PM, Sergey Okhapkin [SMTP:sos AT prospect DOT com DOT ru] 
wrote:
> Michael Czapski wrote:
> > as well).  Since gcc under Cygwin32 does not pre-define "__unix__" or
> > "__unix"
> > or "unix", as is the case under Linux, and in the Cygwin32/EGCS/gcc
> > environment
> > _WIN32 is defined the same as in the MS VC++ environment I had to code
> > #if defined(_WIN32) && !defined(__CYGWIN32__) in a number of places.  This
> > was
> > required to ensure that  Windows NT-specific service code is not compiled
> > under
>
> If you have some portability header file included in all sources, add to the
> beginning:
>
> #ifdef __CYGWIN32__
> #undef _WIN32
> #endif
>
> --
> Sergey Okhapkin, http://www.lexa.ru/sos
> Moscow, Russia
>

Hello Sergey,
I have a portability header and I could do what you suggest however the problem 
I describe would occur whether I do it your way or by 'gcc ... -U_WIN32 ...'. 
 In fact the way you suggest is the way I initially did it.  It took a bit of 
fiddling to isolate the problem area to the unistd.h and __MS_types__ :-).
Thanks for your suggestion anyway.
I just thought I return some of the favours by sharing a solution to a possible 
problem someone might have one day :-)

------------------
Cheers ...
Michael Czapski


-
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