List Archive


Thread Index


From: Benjamin Gilbert <>
Subject: Re: MinGW-w64 build failure with 1.3.1 and 1.3.2
Date: Mon, 20 Nov 2017 20:46:37 -0500

On Mon, Nov 20, 2017 at 7:16 AM, Thomas Klausner <> wrote:
Good point. Is MinGW's open() fine (file permissions, see comment
above that)? What would be the proper ifdef to check for MinGW and not
redefine open() there?

The MinGW-w64 headers define open() as taking an optional third argument, and this doesn't appear to be MinGW-specific, since AFAICT the MinGW-w64 runtime doesn't override msvcrt's open().  While MSDN doesn't document open() and I don't know what the Windows headers say, says that at least _open() takes a third argument as well.  So possibly the open macro isn't necessary.

In any event, it appears that nonrandomopentest.c only exists to test nonrandomopen.c, and the latter isn't built on Windows.  It seems the correct fix is not to build nonrandomopentest on Windows either.

--Benjamin Gilbert

Made by MHonArc.