From owner-freebsd-stable Tue Sep 19 6: 9:39 2000 Delivered-To: freebsd-stable@freebsd.org Received: from smtp1.vnet.net (smtp1.vnet.net [166.82.1.31]) by hub.freebsd.org (Postfix) with ESMTP id 873A837B422; Tue, 19 Sep 2000 06:09:34 -0700 (PDT) Received: from dignus.com (ponds.vnet.net [166.82.177.48]) by smtp1.vnet.net (8.10.1/8.10.1) with ESMTP id e8JD9VE07191; Tue, 19 Sep 2000 09:09:32 -0400 (EDT) Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3]) by dignus.com (8.9.2/8.8.5) with ESMTP id JAA05364; Tue, 19 Sep 2000 09:09:30 -0400 (EDT) Received: (from rivers@localhost) by lakes.dignus.com (8.9.3/8.6.9) id JAA09215; Tue, 19 Sep 2000 09:09:29 -0400 (EDT) Date: Tue, 19 Sep 2000 09:09:29 -0400 (EDT) From: Thomas David Rivers Message-Id: <200009191309.JAA09215@lakes.dignus.com> To: freebsd-gnats-submit@freebsd.org, freebsd-stable@freebsd.org, jacobsm@gate.net Subject: Re: ports/21264: tn3270 port receives segmentation fault Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Just investigating this further... There is a setupterm() function in the tn3270 sources (see line 741 of telnet.c) However, this is included only if TERMCAP is defined. If you remove the TERMCAP definition from the CFLAGS in Makefile.inc, tn3270 will "run" again. But, it is really ugly; each field is highlighted, and the highlights seem to "hang around" (possibly an ncurses issue?) However, as to the particular bug - removing -DTERMCAP from the CFLAGs will fix it. Alternatively, renaming the setupterm() function in telnet.c also corrects the problem (again, giving the weird curses issues...) For example, I simply renamed setupterm() to Setupterm() as in the following diff and things "worked" (this might be simpler to add as a patch): *** telnet.c.ori Tue Sep 19 09:07:55 2000 --- telnet.c Tue Sep 19 09:07:47 2000 *************** *** 738,744 **** /*ARGSUSED*/ int ! setupterm(tname, fd, errp) char *tname; int fd, *errp; { --- 738,744 ---- /*ARGSUSED*/ int ! Setupterm(tname, fd, errp) char *tname; int fd, *errp; { *************** *** 772,778 **** if (tnamep && tnamep != unknown) free(tnamep); if ((tname = (char *)env_getvalue((unsigned char *)"TERM")) && ! (setupterm(tname, 1, &err) == 0)) { tnamep = mklist(termbuf, tname); } else { if (tname && (strlen(tname) <= 40)) { --- 772,778 ---- if (tnamep && tnamep != unknown) free(tnamep); if ((tname = (char *)env_getvalue((unsigned char *)"TERM")) && ! (Setupterm(tname, 1, &err) == 0)) { tnamep = mklist(termbuf, tname); } else { if (tname && (strlen(tname) <= 40)) { - Dave Rivers - -- rivers@dignus.com Work: (919) 676-0847 Get your mainframe (370) `C' compiler at http://www.dignus.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message