Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!att!pacbell!varian!kinetics!minshall From: minshall@kinetics.UUCP (Greg Minshall) Newsgroups: comp.protocols.tcp-ip Subject: Re: tn3270 on SUNos 4.0 Message-ID: <626@kinetics.UUCP> Date: 14 Sep 88 17:53:54 GMT References: <57@dftsrv.gsfc.nasa.gov> Organization: Kintics, Inc., Walnut Creek, CA Lines: 44 From article <57@dftsrv.gsfc.nasa.gov>, by tomc@dftsrv.gsfc.nasa.gov (Tom Corsetti): > Hi! > I'm posting this article for a friend here who has no access to 'news'. > He has a sun4 running sunos 4.0 (all the 4.3 bsd stuff). He's trying > to get tn3270 (the telnet for emulating ibm 3270 type terminals) to > work. He says that it compiles ok using the makefile for 4.3 bsd. But > when he tries to run it, he gets a segmentation fault when the software > appears to be trying to make a connection. Has anyone out there got > any suggestions, or run into this problem before? Thanks in advance! > - Tom Corsetti This fix goes in telnet.c (or maybe tn3270.c, if you are using an older version). tn3270 (and telnet, for that matter) were using a "varargs" routine without using the "varargs" mechanism. Replace the routine "call()" with the code below. Sorry, about that. Greg Minshall ---- /* * Call routine with argc, argv set from args (terminated by 0). */ #include 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 *)) ; va_end(ap); return (*routine)(argno, args); }