delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/04/24/20:07:18

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199904250104.UAA09243@modi.xraylith.wisc.edu>
X-Authentication-Warning: modi.xraylith.wisc.edu: localhost.xraylith.wisc.edu [127.0.0.1] didn't use HELO protocol
To: Anders Norlander <anorland AT hem2 DOT passagen DOT se>
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: gcc -U_WIN32 pitfalls!
In-reply-to: Your message of "Sat, 24 Apr 1999 10:26:32 +0200."
<37218038 DOT 23663084 AT hem2 DOT passagen DOT se>
Date: Sat, 24 Apr 1999 20:04:04 -0500
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>

Anders Norlander <anorland AT hem2 DOT passagen DOT se> writes:
> Here's the line at the top of sys/types.h causing these bugs:
> #if defined (GO32) || defined (__MSDOS__) || defined (_WIN32)
> 
> it should be:
> #if defined (GO32) || defined (__MSDOS__) || defined (_WIN32) ||
> defined(__CYGWIN__)
> 
> I don't think there are more of these bugs, a grep for _WIN32
> didn't reveal anything.
> 

Thanks for checking. I came to the same conclusion. I'm in the process
of doing some more serious checks (bootstrap GCC for example), and see
if it's ok.

The only other file that may be affected (other than Windows32 headers,
which is to be expected since those are win32 specific) is sys/fcntl.h.
The sys/stat.h _WIN32 part can be left as is.

--- sys/fcntl.h.~1  Sat Apr 24 19:46:24 1999
+++ sys/fcntl.h     Sat Apr 24 19:47:38 1999
@@ -43,7 +43,7 @@ extern "C" {
 #define        O_NONBLOCK      _FNONBLOCK
 #define        O_NOCTTY        _FNOCTTY
 /* For machines which care - */
-#ifdef _WIN32
+#if defined (_WIN32) || defined (__CYGWIN__)
 #define _FBINARY        0x10000
 #define _FTEXT          0x20000
 #define _FNOINHERIT    0x40000
@@ -64,7 +64,7 @@ extern "C" {
 #define _O_BINARY      O_BINARY
 #define _O_RAW         O_BINARY
 #define _O_NOINHERIT   O_NOINHERIT
-#endif
+#endif /* _WIN32 || __CYGWIN__ */
 
 #ifndef        _POSIX_SOURCE

Regards,
Mumit


--
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