UnixLib select and speed

John Tytgat John.Tytgat at aaug.net
Sat Dec 4 14:04:51 PST 2004


In message <4d181d06e9sbellon at sbellon.de>
          Stefan Bellon <sbellon at sbellon.de> wrote:

> John Tytgat wrote:
> > In message <4d18083f23sbellon at sbellon.de>
> >           Stefan Bellon <sbellon at sbellon.de> wrote:
> 
> > > Peter, your latest commit to unix/select.c contains the following
> > > line twice:
> > > 
> > >           int bits = (nfds % WORD_BITS) ?: WORD_BITS;
> > > 
> > > Is there some GNUish operator ?: or has something gone wrong?
> > > Neither I nor Norcroft C don't know this ?: thing.
> 
> > Someone is never too old to learn ;-)
> 
> Yep.
> 
> > This is semantically the same as :
> 
> > 	int bits = (nfds % WORD_BITS) ? (nfds % WORD_BITS) : WORD_BITS;
> 
> That's what I suspected as it's the only way it makes sense. But is
> this C90 or C99, or just GNU?

GNUish I think.

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven



More information about the gcc mailing list