------- Comment #8 from davek at gcc dot gnu dot org  2010-04-15 10:13 -------
Mid-air collision!
Mid-air collision detected!

  :)

(In reply to comment #5)

> I remember correctly), I wonder whether we should simply special case mingw32
> and conditional to the macro being defined 

  Yeah, that seems like the reasonable answer.

> (don't remember: _MINGW32?) 

  Nearly: __MINGW32__

> just include the required headers, and use ioctlsocket in place of ioctl. 

Not quite, I think: the correct thing to do would be just #if out the clause
altogether.  In 'doze, file handles and sockets aren't interchangeable, and
FIONREAD is only valid using ioctlsocket on a socket handle.  All the C++ stuff
will only be using underlying C stdio FILEs, I think, and won't work with
sockets at all, so we'll not actually ever have a real socket here.  Cygwin
goes to great trouble to simulate unix-style fds behind the scenes, but on
MinGW you get the raw Windows API which has separate file fds and socket
handles, so we'll only ever encounter real files here.

Gonna be AFK for most of today I'm afraid but will look at this more tomorrow.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43738

Reply via email to