From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24359 invoked from network); 18 Jan 2001 13:17:15 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jan 2001 13:17:15 -0000 Received: (qmail 26302 invoked by alias); 18 Jan 2001 13:17:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13373 Received: (qmail 26291 invoked from network); 18 Jan 2001 13:17:09 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: Cc: "Zsh hackers list" Subject: RE: Some general problems with exporting cariables (Was: TERMCAP problem. ) Date: Thu, 18 Jan 2001 16:16:55 +0300 Message-ID: <001e01c08150$ee0dc320$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <3A66E2CC.4D890D59@alcatel.be> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal > > I made a new executable from the current CVS, and even without the > patch it did not > crash anymore. That is exactly what I was afraid of :-) > For some reason, it how uses '-lcurses' instead of '-ltermcap'. > Yes, it is here but I have no idea what was the reason behind: * 12239: Fr. Br. George (George V Kouryachy), adapted: configure.in: prefer curses to termcap on solaris. You may look in zsh-workes archive. > I did some tests with the debugger. > The crash happened because getenv("TERM") returned 0 during the > call to tgetent from > the termcap library. Well, I am surpsised that it worked at all then, screen or no screen. May be, the lack of `=' confused getenv. > Whithout the patch, getenv("TERM") still returns 0, but now tgetent > from libcursus.a > is used. > With the patch, getenv("TERM") returns "dumb" before tgetent is > called, so I guess it > will also be fine for tgetent from the termcap library What do you mean "before""? Zsh itself never calls getenv("TERM"). Anyway, if this -lcurses is terminfo-based, you loose TERMCAP hack that screen is using (unless newer screen version can cope with TERMINFO as well). I was about to suggest adding LIBS=-ltermcap, but realised, that zsh is usiing AC_CHECK_LIB. This macro stinks and should never be used - it does not check, if function is already available, but blindly adds lib(s) even if not needed. To all developers - shuld not we better consistenly use AC_SEARCH_LIBS instead? This has major advantage - it checks first, if function is already available, so you can easily override library list. Koen, you can look in configure for a case "$host_os" in aix*|hpux10.*|hpux11.*|solaris*) termcap_curses_order="curses ncurses termcap" ;; *) termcap_curses_order="termcap curses ncurses" ;; esac remove solaris, and reconfigure zsh (probably, make distclean first). It should give you old behaviour. Then we see if patch really helps :-))) I'll change configure to use AC_SERCH_LIBS instead to be able to override library selection. -andrej