> > > Should work fine on Windows. fileno() is deprecated however, with 
> > > the following comment:
> > >         C:\Program Files\Microsoft Visual Studio
> > > 8\VC\INCLUDE\stdio.h(688) : see
> > >  declaration of 'fileno'
> > >         Message: 'The POSIX name for this item is deprecated. 
> > > Instead, use the ISO C++ conformant name: _fileno. See 
> online help for details.'
> > 
> > Only Microsoft would think that they get to unilaterally 
> deprecate a 
> > POSIX standard API :-(

a) It's not a POSIX platform.
b) There is a #define you can set to disable the deprecation, from what
I can tell.

> Yeah, these are the same guys who chose to implement select() 
> to only work on sockets and not on plain file descriptors 
> (for example you can't make it work on a pipe).  This must be 
> the single most far-reaching change they did to POSIX 
> compatibility.  It's incredibly idiotic and problematic.  And 
> note that it's not that it's deprecated -- it just doesn't 
> work at all :-(

You will notice that in the win32 API there is no such thing as a "plain
file descriptor". The Windows API has you using HANDLEs for both sockets
and files, and as long as you use the Windows API, you can pass them
both to the same function (just use waitformultipleobjects instead of
select() is only in the winsock library, which is there only for
compatibility with Berkeley Sockets. And it works with sockets created
that way...

That said, it can certainly be irritating :-) Oh, and if you want it for
pipes, look at some of the port code for win32 - claudio did a pipe()
implementation that works fine with select().


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not

Reply via email to