Patch #: 5 Type: bug fix Priority: low Reported: Eric P. Scott Modification: various casting changes for future NeXT support Archived: munnari.OZ.AU mac/cap.patches/arns.patch005 Application: 'cd arns; patch -p < arns.patch005' *** arns.h.orig Tue Mar 9 20:39:24 1993 --- arns.h Tue Mar 9 20:40:21 1993 *************** *** 16,22 **** * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.6 $ * */ --- 16,22 ---- * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.7 $ * */ *************** *** 42,47 **** --- 42,50 ---- #include #include #include + #ifdef NeXT + #include + #endif /* NeXT */ /* misc numbers */ *** arnsrd.c.orig Mon Sep 21 17:09:11 1992 --- arnsrd.c Tue Mar 9 19:29:01 1993 *************** *** 21,27 **** * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.1 $ * */ --- 21,27 ---- * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.2 $ * */ *************** *** 109,115 **** */ fromLen = sizeof(from); ! if(getpeername(tcpfd, &from, &fromLen) < 0) { fprintf(stderr, "%s: ", argv[0]); perror("getsockname"); exit(1); --- 109,115 ---- */ fromLen = sizeof(from); ! if (getpeername(tcpfd, (struct sockaddr *)&from, &fromLen) < 0) { fprintf(stderr, "%s: ", argv[0]); perror("getsockname"); exit(1); *************** *** 166,172 **** min.sin_addr.s_addr = htonl(0x7f000001); for (i = PORTBEGIN; i < PORTEND; i++) { min.sin_port = htons(i); ! if (bind(udpfd, &min, sizeof(min)) == 0) break; } if (i == PORTEND) --- 166,172 ---- min.sin_addr.s_addr = htonl(0x7f000001); for (i = PORTBEGIN; i < PORTEND; i++) { min.sin_port = htons(i); ! if (bind(udpfd, (struct sockaddr *)&min, sizeof(min)) == 0) break; } if (i == PORTEND) *************** *** 242,248 **** if (dataLen == 0) { /* packet complete */ ! sendto(udpfd, (char *)ibuf, pktLen, 0, &sin, sizeof(sin)); pktsin++; } } --- 242,249 ---- if (dataLen == 0) { /* packet complete */ ! sendto(udpfd, (char *)ibuf, pktLen, 0, ! (struct sockaddr *)&sin, sizeof(sin)); pktsin++; } } *************** *** 360,366 **** buf[5] = CONN_REDIRADDR; /* get name binding & send sockaddr_in */ ! if (getsockname(udpfd, buf+6, &fromLen) == 0) write(tcpfd, buf, fromLen+6); } --- 361,367 ---- buf[5] = CONN_REDIRADDR; /* get name binding & send sockaddr_in */ ! if (getsockname(udpfd, (struct sockaddr *)(buf+6), &fromLen) == 0) write(tcpfd, buf, fromLen+6); } *************** *** 382,388 **** buf[2] = clntNode; buf[3] = CONN_DISCONN; ! return(sendto(udpfd, buf, 4, 0, &sin, sizeof(sin))); } /* --- 383,389 ---- buf[2] = clntNode; buf[3] = CONN_DISCONN; ! return(sendto(udpfd, buf, 4, 0, (struct sockaddr *)&sin, sizeof(sin))); } /* *** ddp.c.orig Tue Mar 9 14:06:26 1993 --- ddp.c Tue Mar 9 19:29:21 1993 *************** *** 16,22 **** * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.5 $ * */ --- 16,22 ---- * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.6 $ * */ *************** *** 311,316 **** --- 311,317 ---- u_short dstNet; u_short TID; int atp_ctrl; + void nbp(); if (debug & ROUTEDEBUG) fprintf(stderr, "DDP%d: in route (type %d)\n", phase, lapType); *** Makefile.orig Tue Mar 9 18:24:02 1993 --- Makefile Tue Mar 9 18:25:14 1993 *************** *** 21,26 **** --- 21,29 ---- # # For SUN Solaris 2.N, Phase 1 or Phase 2 # CFLAGS=-DSOLARIS + # + # For NeXT + # CFLAGS=-bsd -O # CFLAGS= *** clients/async.c.orig Tue Mar 9 18:50:29 1993 --- clients/async.c Tue Mar 9 19:19:38 1993 *************** *** 14,20 **** * started on the ARNS server host by inetd(8)) * * $Author: djh $ ! * $Revision: 1.4 $ * * */ --- 14,20 ---- * started on the ARNS server host by inetd(8)) * * $Author: djh $ ! * $Revision: 1.5 $ * * */ *************** *** 112,118 **** long len; int i, res; fd_set readfds; ! #ifdef SYSTYPE_SYSV void cleanup(); void linkerr(); #else /* SYSTYPE_SYSV */ --- 112,118 ---- long len; int i, res; fd_set readfds; ! #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) void cleanup(); void linkerr(); #else /* SYSTYPE_SYSV */ *************** *** 754,760 **** } /* otherwise send via UDP directly to server */ ! if (sendto(udpfd, pkt+2, len, 0, &sin, sizeof(sin)) != len) { if (debug) fprintf(dbg, "Server UDP write failed\n"); return; /* drop it, do nothing */ } --- 754,761 ---- } /* otherwise send via UDP directly to server */ ! if (sendto(udpfd, pkt+2, len, 0, (struct sockaddr *)&sin, ! sizeof(sin)) != len) { if (debug) fprintf(dbg, "Server UDP write failed\n"); return; /* drop it, do nothing */ } *************** *** 790,796 **** dumppacket(pkt, len); } ! if (sendto(udpfd, pkt, len, 0, &sin, sizeof(sin)) != len) { if (debug) fprintf(dbg, "Server UDP write failed\n"); return; /* drop it, do nothing */ } --- 791,798 ---- dumppacket(pkt, len); } ! if (sendto(udpfd, pkt, len, 0, (struct sockaddr *)&sin, ! sizeof(sin)) != len) { if (debug) fprintf(dbg, "Server UDP write failed\n"); return; /* drop it, do nothing */ } *************** *** 1038,1044 **** { int on = 1; int pid, i; ! #ifdef SYSTYPE_SYSV void funeral(); #else /* SYSTYPE_SYSV */ int funeral(); --- 1040,1046 ---- { int on = 1; int pid, i; ! #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) void funeral(); #else /* SYSTYPE_SYSV */ int funeral(); *************** *** 1347,1353 **** tcpfd = -1; return; } ! if (connect(tcpfd, &tin, sizeof(tin)) < 0) { close(tcpfd); tcpfd = -1; return; --- 1349,1355 ---- tcpfd = -1; return; } ! if (connect(tcpfd, (struct sockaddr *)&tin, sizeof(tin)) < 0) { close(tcpfd); tcpfd = -1; return; *************** *** 1360,1366 **** * */ ! #ifdef SYSTYPE_SYSV /*ARGSUSED*/ void cleanup(num) --- 1362,1368 ---- * */ ! #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) /*ARGSUSED*/ void cleanup(num) *************** *** 1411,1417 **** exit(1); } ! #ifdef SYSTYPE_SYSV /*ARGSUSED*/ void linkerr(num) --- 1413,1419 ---- exit(1); } ! #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) /*ARGSUSED*/ void linkerr(num) *************** *** 1428,1434 **** cleanup(); } ! #ifdef SYSTYPE_SYSV /*ARGSUSED*/ void funeral(num) --- 1430,1436 ---- cleanup(); } ! #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) /*ARGSUSED*/ void funeral(num) *************** *** 1438,1444 **** funeral() #endif /* SYSTYPE_SYSV */ { ! #ifdef SYSTYPE_SYSV union wait junk; #else /* SYSTYPE_SYSV */ int junk; --- 1440,1446 ---- funeral() #endif /* SYSTYPE_SYSV */ { ! #if defined(SYSTYPE_SYSV) || defined(NeXT) union wait junk; #else /* SYSTYPE_SYSV */ int junk; *** clients/Makefile.orig Tue Mar 9 18:51:28 1993 --- clients/Makefile Tue Mar 9 18:53:29 1993 *************** *** 8,13 **** --- 8,16 ---- # # For IBM RS6000 AIX # CFLAGS=-DAIX + # + # For NeXT + # CFLAGS=-bsd -O # CFLAGS= *** README.orig Tue Mar 9 18:14:38 1993 --- README Tue Mar 9 18:14:48 1993 *************** *** 5,11 **** The University of Melbourne djh@munnari.OZ.AU January, 1992 ! version 1.4 ARNS is 'A Remote Network Server' package for AppleTalk that allows a --- 5,11 ---- The University of Melbourne djh@munnari.OZ.AU January, 1992 ! version 1.5 ARNS is 'A Remote Network Server' package for AppleTalk that allows a