else
printf("unknown\n");
} else
- printf("sizeof(short) = %d\n", sizeof(short));
+ printf("sizeof(short) = %d\n", (int) sizeof(short));
exit(0);
}
int
cliopen(char *host, char *port)
{
- int fd, i, on;
+ int fd, on;
+ socklen_t i;
const char *protocol;
struct in_addr inaddr;
struct servent *sp;
loop_udp(int sockfd)
{
int maxfdp1, nread, ntowrite, stdineof,
- clilen, servlen, flags;
+ clilen, flags;
+ socklen_t servlen;
fd_set rset;
struct sockaddr_in cliaddr; /* for UDP server */
struct sockaddr_in servaddr; /* for UDP client */
int
servopen(char *host, char *port)
{
- int fd, newfd, i, on, pid;
+ int fd, newfd, on, pid;
+ socklen_t i;
const char *protocol;
struct in_addr inaddr;
struct servent *sp;
#include <fcntl.h>
#include <sys/ioctl.h>
+#ifdef FIOASYNC
+ static void sigio_func(int);
+#endif
+
void
sockopts(int sockfd, int doall)
{
- int option, optlen;
+ int option;
+ socklen_t optlen;
struct linger ling;
struct timeval timer;
if (sigio) {
#ifdef FIOASYNC
- static void sigio_func(int);
+ /*static void sigio_func(int); */
/*
* Should be able to set this with fcntl(O_ASYNC) or fcntl(FASYNC),
ptr = vptr;
nleft = nbytes;
for (i = 0; i < UIO_MAXIOV; i++) {
- iov[i].iov_base = ptr;
+ iov[i].iov_base = (char *) ptr;
n = (nleft >= chunksize) ? chunksize : nleft;
iov[i].iov_len = n;
if (verbose)
- fprintf(stderr, "iov[%2d].iov_base = %x, iov[%2d].iov_len = %d\n",
- i, iov[i].iov_base, i, iov[i].iov_len);
+ fprintf(stderr, "iov[%2d].iov_base = %p, iov[%2d].iov_len = %d\n",
+ i, iov[i].iov_base, i, (int) iov[i].iov_len);
ptr += n;
if ((nleft -= n) == 0)
break;