Subject: bug#12881: Assume at least POSIX.1-1988 for fcntl.h

From: Paul Eggert <[email-masked]>
Date: Sat, 17 Nov 2012 20:41:24 -0800

On 11/17/2012 07:46 PM, Eli Zaretskii wrote:
> O_RDWR doesn't need to be defined
> (it is already defined by a Windows system header)

OK, sorry, I misunderstood your earlier recommendation (to move
O_NOCTTY) to also refer to O_RDWR.  If you like, I can easily
remove the unnecessary definition of O_RDWR in nt/inc/unistd.h.

> defining O_NOCTTY in a header included by many sources is wrong, because it
> triggers compilation of other non-Windows friendly code elsewhere.
  
No, there's no "#ifdef O_NOCTTY" or "#if ... defined O_NOCTTY ..."
anywhere in Emacs that would be affected by this definition.
The non-Microsoft code already falls back on "#define O_NOCTTY 0"
for platforms that lack O_NOCTTY, and the Microsoft code can
safely do the same.

> Looks like I invested all that effort in vain

I don't see why here, either.  Neither of these appear to be problems
that would break a build or cause Emacs to misbehave.  And even if they
were, any fixes would be trivial.