Re: [hatari-devel] Windows build currently broken?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


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.








Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/