diff -rc telnet/Makefile telnet-freebsd45/Makefile *** telnet/Makefile Tue Jul 4 10:04:55 2000 --- telnet-freebsd45/Makefile Fri May 3 15:42:42 2002 *************** *** 41,54 **** CFLAGS+=-DSKEY CFLAGS+=-I${.CURDIR}/../../lib CFLAGS+=-DINET6 DPADD= ${LIBTERMCAP} ${LIBTELNET} ! LDADD= -ltermcap -ltelnet .if !defined(RELEASE_CRUNCH) ! CFLAGS+=-DIPSEC ! DPADD+= ${LIBIPSEC} ! LDADD+= -lipsec .endif SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \ --- 41,56 ---- CFLAGS+=-DSKEY CFLAGS+=-I${.CURDIR}/../../lib CFLAGS+=-DINET6 + CFLAGS+=-D__MacOSX__ -Dunix -DTERMCAP -I/usr/pkg/include/bind -g #Isao SEKI DPADD= ${LIBTERMCAP} ${LIBTELNET} ! ###SEKI###LDADD= -ltermcap -ltelnet ! LDADD= -ltelnet -L/usr/pkg/lib -lbind -L/usr/local/v6/lib -linet6 .if !defined(RELEASE_CRUNCH) ! ##SEKI##CFLAGS+=-DIPSEC ! ##SEKI##DPADD+= ${LIBIPSEC} ! ##SEKI##LDADD+= -lipsec .endif SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \ diff -rc telnet/commands.c telnet-freebsd45/commands.c *** telnet/commands.c Mon May 28 04:44:48 2001 --- telnet-freebsd45/commands.c Fri May 3 17:44:20 2002 *************** *** 58,64 **** --- 58,68 ---- #include #include #include + #ifdef __STDC__ /* Isao SEKI */ + #include + #else #include + #endif #include #include *************** *** 100,106 **** --- 104,115 ---- static int switch_af(struct addrinfo **aip); + typedef int (*intrtn_t)(); /* SEKI */ + #if __STDC__ /* SEKI */ + static call(intrtn_t routine, ...); + #else static call(); + #endif typedef struct { char *name; /* command name */ *************** *** 2099,2104 **** --- 2108,2116 ---- } #endif + #if __MacOSX__ /* SEKI */ + #include + #endif static const char * sockaddr_ntop(sa) struct sockaddr *sa; *************** *** 2320,2325 **** --- 2332,2344 ---- hints.ai_socktype = SOCK_STREAM; error = getaddrinfo(hostname, portp, &hints, &res); if (error) { + #if 1 /* Isao SEKI */ + if (res) freeaddrinfo(res); + memset(&hints, 0, sizeof(hints)); + hints.ai_family = family; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = 0; + #endif hints.ai_flags = AI_CANONNAME; error = getaddrinfo(hostname, portp, &hints, &res); } *************** *** 2594,2610 **** /*VARARGS1*/ static call(va_alist) va_dcl { va_list ap; ! typedef int (*intrtn_t)(); ! intrtn_t routine; char *args[100]; int argno = 0; va_start(ap); routine = (va_arg(ap, intrtn_t)); while ((args[argno++] = va_arg(ap, char *)) != 0) { ; } --- 2613,2639 ---- /*VARARGS1*/ static + #if __STDC__ /* SEKI */ + call(intrtn_t routine, ...) + { + #else call(va_alist) va_dcl { + intrtn_t routine; /* SEKI */ + #endif va_list ap; ! /* typedef int (*intrtn_t)(); SEKI */ ! /* intrtn_t routine; SEKI */ char *args[100]; int argno = 0; + #if __STDC__ + va_start(ap, routine); + #else va_start(ap); routine = (va_arg(ap, intrtn_t)); + #endif while ((args[argno++] = va_arg(ap, char *)) != 0) { ; }