[pcre-dev] [Bug 2152] warning: "FWRITE" redefined ... error:…

Top Page

Reply to this message
Author: admin
Date:  
To: pcre-dev
Old-Topics: [pcre-dev] [Bug 2152] New: warning: "FWRITE" redefined ... error: _O_BINARY undeclared
Subject: [pcre-dev] [Bug 2152] warning: "FWRITE" redefined ... error: _O_BINARY undeclared
https://bugs.exim.org/show_bug.cgi?id=2152

Michael Haubenwallner <michael.haubenwallner@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.haubenwallner@ssi-s
                   |                            |chaefer.com


--- Comment #13 from Michael Haubenwallner <michael.haubenwallner@???> ---
(In reply to Reini Urban from comment #12)
> (In reply to Philip Hazel from comment #11)
> > (In reply to Zoltan Herczeg from comment #10)
> > > > +/* some cmake's define it still */
> > > > +#if defined(__CYGWIN__) && defined(WIN32)
> > > > #define WIN32
> > > > #endif
> > >
> > > What was the conclusion of this change?
> >
> > I applied the patch, changing "defined(WIN32)" into "!defined(WIN32)".
>
> I'll check why it was needed in the first place for Cygwin. But only next
> week. Right now I'm on a hot Greek island without access to my Windows
> machine.


Back from the island already?

These 3 lines were introduced in r849:
https://vcs.pcre.org/pcre2/code/trunk/src/pcre2grep.c?r1=843&r2=849

Something really feels wrong here:
For the earlier #define WIN32, the condition "not defined __CYGWIN__" was
explicitly added, so why should there be need to define WIN32 later with
Cygwin?

Probably the idea was to #undef WIN32 - as in:
#if defined(__CYGWIN__) && defined(WIN32)
-#define WIN32
+#undef WIN32
#endif

Then the cmake comment would make some sense actually!

--
You are receiving this mail because:
You are on the CC list for the bug.