From 68eed88e6bef72bc5d63f8159929ca087e6a5b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Fri, 22 May 1998 13:29:15 +0200 Subject: [PATCH] Some compilers have broken typedef handling (Hi Metrowerks!). Rev: src/fdlib.h:1.16 --- src/fdlib.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/fdlib.h b/src/fdlib.h index b550978f22..e8ea35092a 100644 --- a/src/fdlib.h +++ b/src/fdlib.h @@ -1,5 +1,5 @@ /* - * $Id: fdlib.h,v 1.15 1998/05/22 08:25:53 neotron Exp $ + * $Id: fdlib.h,v 1.16 1998/05/22 11:29:15 grubba Exp $ */ #ifndef FDLIB_H #define FDLIB_H @@ -27,6 +27,10 @@ #include <sys/file.h> #endif +#ifdef HAVE_SOCKET_H +#include <socket.h> +#endif /* HAVE_SOCKET_H */ + #define fd_INTERPROCESSABLE 1 #define fd_CAN_NONBLOCK 2 @@ -157,10 +161,12 @@ void fd_waitor_set_customer(struct fd_waitor *x, FD customer, int flags); #define fd_LOCK_UN 4 #define fd_LOCK_NB 8 -typedef struct my_fd_set_s +struct my_fd_set_s { char bits[MAX_OPEN_FILEDESCRIPTORS/8]; -} my_fd_set; +}; + +typedef struct my_fd_set_s my_fd_set; #ifdef DEBUG #define fd_check_fd(X) do { if(fd_type[X]>=0) fatal("FD_SET on closed fd %d (%d) %s:%d.\n",X,da_handle[X],__FILE__,__LINE__); }while(0) @@ -283,10 +289,12 @@ typedef int FD; #define fd_shutdown_write 1 #define fd_shutdown_both 2 -typedef struct my_fd_set_s +struct my_fd_set_s { fd_set tmp; -} my_fd_set; +}; + +typedef struct my_fd_set_s my_fd_set; #define my_FD_CLR(FD,S) FD_CLR((FD), & (S)->tmp) #define my_FD_SET(FD,S) FD_SET((FD), & (S)->tmp) -- GitLab