This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: gcc -U_WIN32 pitfalls!
- To: Anders Norlander <anorland@hem2.passagen.se>
- Subject: Re: gcc -U_WIN32 pitfalls!
- From: Mumit Khan <khan@xraylith.wisc.EDU>
- Date: Sat, 24 Apr 1999 20:04:04 -0500
- cc: cygwin@sourceware.cygnus.com
Anders Norlander <anorland@hem2.passagen.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@sourceware.cygnus.com