Re: [hatari-devel] Windows build currently broken? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Windows build currently broken?
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Tue, 1 Jan 2019 09:44:01 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1546332243; bh=KzbA/bICLFmJQLrxL6G36Vxey5+vbaN6KyOF0OKmHsY=; h=Date:From:To:Subject:From; b=R37p8jp+4SlkrgQ46ASRzRvZcywwlK+IusBnYcy9yJa9Ye5X6N9jHEsrZJtosBnl/ EzEqClzfzsmh39wPSn4zMY1AUay3//Poj/OyDUgUOy4d5nd7V27FCf6Wz2wKQToab4 ZU9anfRWUMlsnf+r/WQDJJuNvuPzenVOEMRLNqFTGLzJdrAN52Ozki05mh+qsySZkx sgGoG4vtdlERWI/juN6Wdcf6g1kBn4r2BFc2MO9vPaOAs0yD75/7PjhTpivjRGmxFc aMn5ppMInlv+mOPnMs8ZTweOkW7BBi16ZJviSK0ghx54SeRTCAYXOQUOyTwldwNPGX f9108t/hLOxlg==
Am Sun, 30 Dec 2018 18:53:19 +0100
schrieb Thorsten Otto <admin@xxxxxxxxxxx>:
> On Sonntag, 30. Dezember 2018 18:38:12 CET Eero Tamminen wrote:
> > I think it's fine without it.
>
> Yes, maybe. But you still should not assume that O_NONBLOCK ==
> O_NDELAY. I usually use a header that wraps fcntl.h, or local
> definitions if it is not used too often, that look something like
>
> #ifdef HAVE_FCNTL_H
> #include <fcntl.h>
> #endif
> #ifdef HAVE_UNISTD_H
> #include <unistd.h>
> #endif
> #ifdef HAVE_IO_H
> #include <io.h>
> #endif
>
> #ifndef O_BINARY
> # ifdef _O_BINARY
> # define O_BINARY _O_BINARY
> # else
> # define O_BINARY 0
> # endif
> #endif
>
> #ifndef O_NDELAY
> # ifdef _O_NDELAY
> # define O_NDELAY _O_NDELAY
> # else
> # define O_NDELAY 0
> # endif
> #endif
>
> #ifndef O_NONBLOCK
> # ifdef _O_NONBLOCK
> # define O_NONBLOCK _O_NONBLOCK
> # else
> # define O_NONBLOCK 0
> # endif
> #endif
>
> etc. The definitions with leading underscore are sometimes used in
> some windows header files.
At least in my version of the MinGW cross compiler, the definitions
with underscores are not available at all. Looks like there is no way
to open a file in non-blocking mode when using MinGW?
Thomas