@@ -19,17 +19,20 @@
#endif
#include <sys/types.h>
-#include <sys/timeb.h>
#ifdef DOSorWIN32
+#include <sys/timeb.h>
#include <time.h>
#else
#include <sys/time.h>
#endif
+
#include <sys/stat.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#ifdef STDARG
#include <stdarg.h>
#endif
@@ -50,6 +50,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -48,6 +48,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -48,6 +48,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -52,6 +52,7 @@ usage()
" n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -52,6 +52,7 @@ usage()
" n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -80,6 +80,7 @@ usage()
#endif
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -79,6 +79,7 @@ usage()
#endif
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -60,6 +60,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -65,6 +65,7 @@ usage()
fprintf(stdout, " i Ignore non-test files dir entries\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -53,6 +53,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -51,6 +51,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -53,6 +53,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -55,6 +55,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -65,6 +65,7 @@ usage()
fprintf(stdout, " n Suppress test directory create operations\n");
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -8,7 +8,10 @@
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
+int
main(argc, argv)
int argc;
char **argv;
@@ -49,6 +49,7 @@ int nc, nl, np, nxo, na;
#define cunlink(s) if (s) unlink(s)
+int
main(argc, argv)
char **argv;
{
@@ -24,6 +24,7 @@ char *Prog, *File;
int getattfmt();
void prtstat();
+int
main(argc, argv)
int argc;
char *argv[];
@@ -36,6 +36,7 @@
(void) write(2, errbuf, 2);}
#include <string.h>
+#include <stdlib.h>
int opterr = 1;
int optind = 1;
@@ -94,7 +95,9 @@ char **argv, *opts;
#include <stdio.h>
+int
main(ac, av)
+int ac;
char **av;
{
register int i;
@@ -17,6 +17,7 @@
#include <fcntl.h>
#endif
+int
main(argc, argv)
int argc;
char *argv[];
@@ -21,6 +21,7 @@
#endif
#endif /* DOSorWIN32 */
+int
main(argc, argv)
int argc;
char *argv[];
@@ -53,6 +53,7 @@ static char TBAR[MAXPATHLEN];
static char LBAR[MAXPATHLEN];
static char str[STRCHARS];
+int
main(ac,av)
int ac;
char *av[];
@@ -26,6 +26,7 @@
static int stats = 0;
+int
main(argc, argv)
int argc;
char *argv[];
@@ -21,6 +21,7 @@
#endif
#endif /* DOSorWIN32 */
+int
main(argc, argv)
int argc;
char *argv[];
@@ -14,7 +14,11 @@
#include <unistd.h>
#endif /* DOSorWIN32 */
-main()
+/*ARGSUSED*/
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
{
char buffer[8192];
int size = 8192;
@@ -34,6 +34,7 @@ static int stats = 0;
static void statit ARGS_((char *));
+int
main(argc, argv)
int argc;
char *argv[];
@@ -18,8 +18,10 @@
#include "../tests.h"
-main(argc,argv)
-char **argv;
+int
+main(argc, argv)
+ int argc;
+ char **argv;
{
int n;
char buf[1024];
@@ -18,7 +18,11 @@
#include <unistd.h>
#endif /* DOSorWIN32 */
-main()
+/*ARGSUSED*/
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
{
int fd;
struct stat statb;
@@ -31,6 +31,7 @@ static DIR * my_opendir ARGS_((char *name));
static void print ARGS_((char *));
static struct dirent *my_readdir ARGS_((DIR *dirp));
+int
main(argc, argv)
int argc;
char *argv[];
@@ -34,6 +34,7 @@
static DIR *my_opendir ARGS_((char *));
static void print ARGS_((char *));
+int
main(argc, argv)
int argc;
char *argv[];
@@ -174,8 +174,9 @@ main(argc, argv)
* XXX shouldn't have to cast eachresult?
*/
clnt_stat =
- clnt_broadcast_time(sock, RPROG, RVERS, RPROC_NUM, xdr_void, &a,
- xdr_void, &b, (resultproc_t)eachresult, &t);
+ clnt_broadcast_time(sock, RPROG, RVERS, RPROC_NUM,
+ (xdrproc_t)xdr_void, &a, (xdrproc_t)xdr_void, &b,
+ (resultproc_t)eachresult, &t);
if(clnt_stat != RPC_TIMEDOUT) {
printf("error: clnt_stat = %d\n", clnt_stat);
clnt_perrno(clnt_stat);
@@ -243,9 +244,9 @@ xdr_rmtcallres(xdrs, crp)
{
#ifdef SVR3
- if (xdr_reference(xdrs, (caddr_t *)&crp->port_ptr, sizeof (ulong), xdr_u_long) &&
+ if (xdr_reference(xdrs, (caddr_t *)&crp->port_ptr, sizeof (ulong), (xdrproc_t)xdr_u_long) &&
#else
- if (xdr_reference(xdrs, (caddr_t *)&crp->port_ptr, sizeof (u_long), xdr_u_long) &&
+ if (xdr_reference(xdrs, (caddr_t *)&crp->port_ptr, sizeof (u_long), (xdrproc_t)xdr_u_long) &&
#endif
xdr_u_long(xdrs, &crp->resultslen))
return ((*(crp->xdr_results))(xdrs, crp->results_ptr));
@@ -387,7 +388,7 @@ clnt_broadcast_time(sock, prog, vers, proc, xargs, argsp, xresults,
recv_again:
msg.acpted_rply.ar_verf = _null_auth;
msg.acpted_rply.ar_results.where = (caddr_t)&r;
- msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
+ msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_rmtcallres;
readfds = mask;
switch (select(32, (fd_set *)&readfds, (fd_set *)NULL, (fd_set *)NULL,
t)) {
@@ -409,7 +410,7 @@ recv_again:
try_again:
fromlen = sizeof(struct sockaddr);
inlen = recvfrom(sock, inbuf, MAX_BROADCAST_SIZE, 0,
- (struct sockaddr *)&raddr, &fromlen);
+ (struct sockaddr *)&raddr, (socklen_t *)&fromlen);
if (inlen < 0) {
if (errno == EINTR)
goto try_again;
@@ -447,7 +448,7 @@ try_again:
/* otherwise, just random garbage */
}
xdrs->x_op = XDR_FREE;
- msg.acpted_rply.ar_results.proc = xdr_void;
+ msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;
(void)xdr_replymsg(xdrs, &msg);
(void)(*xresults)(xdrs, resultsp);
xdr_destroy(xdrs);
@@ -55,7 +55,7 @@ main(argc, argv)
while(1) {
fprintf(stderr, "%s awaiting accept\n", argv[0]);
addrlen = sizeof(struct sockaddr_in);
- if ((ns = accept(s, (struct sockaddr *)&addr, &addrlen)) < 0)
+ if ((ns = accept(s, (struct sockaddr *)&addr, (socklen_t *)&addrlen)) < 0)
xxit("accept");
#ifdef __STDC__
if (hp = gethostbyaddr((const char *)&addr.sin_addr,
@@ -62,7 +62,7 @@ main(argc, argv)
ret = sendto(s, buf, len, 0, (struct sockaddr *)&addr, addrlen);
fprintf(stderr, " sendto ret %d (len %d)\n", ret, len);
- ret = recvfrom(s, buf, BUFSIZ, 0, (struct sockaddr *)&addr, &addrlen);
+ ret = recvfrom(s, buf, BUFSIZ, 0, (struct sockaddr *)&addr, (socklen_t *)&addrlen);
fprintf(stderr, " recvfrom ret %d\n", ret);
if (ret != len || *buf != *msg + 1 || strcmp(buf+1, msg+1))
@@ -52,7 +52,7 @@ main(argc, argv)
fprintf(stderr, "%s awaiting request\n", argv[0]);
addrlen = sizeof(struct sockaddr_in);
ret = recvfrom(s, buf, BUFSIZ, 0, (struct sockaddr *)&addr,
- &addrlen);
+ (socklen_t *)&addrlen);
if (ret < 0)
xxit("recvfrom");
#ifdef __STDC__
Signed-off-by: Tom Haynes <tdh@excfb.com> --- basic/subr.c | 5 ++++- basic/test1.c | 1 + basic/test2.c | 1 + basic/test3.c | 1 + basic/test4.c | 1 + basic/test4a.c | 1 + basic/test5.c | 1 + basic/test5a.c | 1 + basic/test5b.c | 1 + basic/test6.c | 1 + basic/test7.c | 1 + basic/test7a.c | 1 + basic/test7b.c | 1 + basic/test8.c | 1 + basic/test9.c | 1 + domount.c | 3 +++ general/large.c | 1 + general/stat.c | 1 + getopt.c | 3 +++ special/dupreq.c | 1 + special/negseek.c | 1 + special/nfsidem.c | 1 + special/nstat.c | 1 + special/rename.c | 1 + special/rewind.c | 6 +++++- special/stat.c | 1 + special/touchn.c | 6 ++++-- special/truncate.c | 6 +++++- tools/dirdmp.c | 1 + tools/dirprt.c | 1 + tools/pmapbrd.c | 15 ++++++++------- tools/tcpd.c | 2 +- tools/udp.c | 2 +- tools/udpd.c | 2 +- 34 files changed, 59 insertions(+), 15 deletions(-)