Patch for socket.c

Brian Rice water at tunes.org
Tue Feb 15 18:35:50 PST 2005


Hi. Can you provide some more information? Such as which platform and 
compiler were used when this was made.

On Feb 15, 2005, at 5:55 PM, Samuel Bronson wrote:

> `make plugins' gave me this:
>
> make[1]: Entering directory `/home/naesten/slate/src/plugins/socket'
> libtool --mode=compile gcc -O2 -fomit-frame-pointer -DNDEBUG=1 -s
> -I../../../src/mobius/vm/platform/includes -I. -I../../..
> -DSLATE_DATADIR=\"/usr/share/slate\" -o unix/socket.lo -c unix/socket.c
> mkdir unix/.libs
>  gcc -O2 -fomit-frame-pointer -DNDEBUG=1 -s
> -I../../../src/mobius/vm/platform/includes -I. -I../../..
> -DSLATE_DATADIR=\"/usr/share/slate\" -c unix/socket.c  -fPIC -DPIC -o
> unix/.libs/socket.o
> unix/socket.c: In function `socket_HandleSetAdd':
> unix/socket.c:154: error: parse error before "asm"
> unix/socket.c: In function `socket_HandleSetRemove':
> unix/socket.c:158: error: parse error before "asm"
>
> so I did this:
> --- src/plugins/socket/unix/socket.c	4 Feb 2005 16:31:38 -0000	1.5
> +++ src/plugins/socket/unix/socket.c	16 Feb 2005 00:43:01 -0000
> @@ -151,11 +151,13 @@
>  }
>
>  int socket_HandleSetAdd(int set, int fd) {
> -  return (set < num_HandleSets) ? FD_SET(fd, &HandleSets[set]) : -1;
> +  if (set >= num_HandleSets) return -1;
> +  FD_SET(fd, &HandleSets[set]); return 0;
>  }
>
>  int socket_HandleSetRemove(int set, int fd) {
> -  return (set < num_HandleSets) ? FD_CLR(fd, &HandleSets[set]) : -1;
> +  if (set >= num_HandleSets) return -1;
> +  FD_CLR(fd, &HandleSets[set]); return 0;
>  }
>
>  int socket_SelectHandles(int count, int rset, int wset, int next) {
>
>
>
--
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/




More information about the Slate mailing list