Re: [Vala] How to wrap select(2)'s fd_set?



Am Thursday 05 February 2009 15:03:57 schrieb Sam Liddicott:
Ok, I now found out:

FD_ZERO is defined as __FD_ZERO which in turn is defined as:

/* We don't use `memset' because this would require a prototype and
  the array isn't too big.  */
#define __FD_ZERO(s) \
 do { \
   unsigned int __i; \
   fd_set *__arr = (s); \
   for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
     __FDS_BITS (__arr)[__i] = 0; \
 } while (0)

The valac-generated part

readfds = (FD_ZERO (&_tmp0), _tmp0);

is a syntax error then.

Anything we can do about that or just give in and leaving FdSet a full
class?

use memset ?

Heh, right. Will you try to get the patch into the respective c libraries?

-- 
:M:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]