On 09 Jun 2005, at 19:12, nobuyoshi nakada wrote: > Hi, > > At Fri, 10 Jun 2005 10:35:20 +0900, > nobuyoshi nakada wrote in [ruby-core:05181]: > >>> Somehow the rb_fd_init macro is conflicting with the definition of >>> rb_fd_init in eval.c. >>> >>> intern.h has: >>> >>> #ifdef NFDBITS >>> #else >>> #define rb_fd_init(f) FD_ZERO(f) >>> >>> eval.c has: >>> >>> #ifdef NFDBITS >>> void >>> rb_fd_init(fds) >>> >> >> Why is NFDBITS defined in intern.h but not in eval.c? >> > > Sorry, it was inverted and point taken now. But fd_set should be > defined there, at the previous typedef line in intern.h. However, > NFDBITS isn't defined yet? Ah! intern.h gets included (via ruby.h) before sys/types.h. The following patch fixes things: Index: intern.h =================================================================== RCS file: /src/ruby/intern.h,v retrieving revision 1.169 diff -u -r1.169 intern.h --- intern.h 3 Jun 2005 14:23:14 -0000 1.169 +++ intern.h 10 Jun 2005 02:27:56 -0000 @@ -145,6 +145,9 @@ NORETURN(void rb_error_frozen _((const char*))); void rb_check_frozen _((VALUE)); /* eval.c */ + +#include <sys/types.h> + #ifdef NFDBITS typedef struct { int maxfd; -- Eric Hodel - drbrain / segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04