diff --git a/src/modules/files/file.c b/src/modules/files/file.c index caf0253dd4f18c828b630e64bc338bcd5ac3434a..9c4e9f4cec153f1b046a86bf32f2b0ca5e20c6c1 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -5,7 +5,7 @@ \*/ #include "global.h" -RCSID("$Id: file.c,v 1.117 1998/08/06 16:43:14 grubba Exp $"); +RCSID("$Id: file.c,v 1.118 1998/08/06 23:11:06 grubba Exp $"); #include "fdlib.h" #include "interpret.h" #include "svalue.h" @@ -1351,7 +1351,7 @@ int my_socketpair(int family, int type, int protocol, int sv[2]) * * FIXME: Configure-test? */ - int len; + PIKE_ACCEPT_TYPE len; MEMSET((char *)&addr,0,sizeof(struct sockaddr_in)); @@ -1386,7 +1386,7 @@ int my_socketpair(int family, int type, int protocol, int sv[2]) } /* Check what ports we got.. */ - len=sizeof(my_addr); + len = sizeof(my_addr); if(fd_getsockname(fd,(struct sockaddr *)&my_addr,&len) < 0) { fd_close(fd); @@ -1422,7 +1422,9 @@ retry_connect: int tmp2; for(tmp2=0;tmp2<20;tmp2++) { - int tmp, len2; + int tmp; + PIKE_ACCEPT_TYPE len2; + len2=sizeof(addr); tmp=fd_accept(fd,(struct sockaddr *)&addr,&len2); @@ -1446,7 +1448,8 @@ retry_connect: */ do { - int len3; + PIKE_ACCEPT_TYPE len3; + len3=sizeof(addr); retry_accept: sv[0]=fd_accept(fd,(struct sockaddr *)&addr,&len3); @@ -1905,11 +1908,11 @@ static void file_query_address(INT32 args) { struct sockaddr_in addr; int i; - /* Solaris thinks this variable should a size_t, everybody else thinks - * it should be an int. - */ - int len; char buffer[496],*q; + /* XOPEN GROUP think this variable should a size_t, BSD thinks it should + * be an int. + */ + PIKE_ACCEPT_TYPE len; if(FD <0) error("file->query_address(): Connection not open.\n"); diff --git a/src/modules/files/socket.c b/src/modules/files/socket.c index 823b66cdf42eadb208d801f76f7ec29d369c858a..6ea2cbad6bf41449962936ed98561836e6dfbc87 100644 --- a/src/modules/files/socket.c +++ b/src/modules/files/socket.c @@ -18,7 +18,7 @@ #include "file_machine.h" #include "file.h" -RCSID("$Id: socket.c,v 1.36 1998/07/15 23:26:59 hubbe Exp $"); +RCSID("$Id: socket.c,v 1.37 1998/08/06 23:12:24 grubba Exp $"); #ifdef HAVE_SYS_TYPE_H #include <sys/types.h> @@ -307,13 +307,12 @@ static void port_accept(INT32 args) struct sockaddr_in addr; struct port *this=THIS; int fd,tmp; - int len=0; struct object *o; + PIKE_ACCEPT_TYPE len=0; if(THIS->fd < 0) error("port->accept(): Port not open.\n"); - THREADS_ALLOW(); len=sizeof(addr); fd=fd_accept(this->fd, (struct sockaddr *)&addr, &len);