* zsh-3.0.6 on BSD/OS
@ 1999-08-09 10:25 Jos Backus
1999-08-09 14:34 ` Jos Backus
0 siblings, 1 reply; 3+ messages in thread
From: Jos Backus @ 1999-08-09 10:25 UTC (permalink / raw)
To: zsh-workers
Fyi:
1) On both BSD/OS 3.1 and 4.0.1, configure erroneously #defines
TGETENT_ACCEPTS_NULL, leading to a coredump later on in tgetstr() in
init.c:489:
Starting program: /home/jos/src/zsh-3.0.6/Src/zsh
Program received signal SIGSEGV, Segmentation fault.
0x280c8824 in cgetcap ()
(gdb) where
#0 0x280c8824 in cgetcap ()
#1 0x280c94b2 in cgetstr ()
#2 0x2809b899 in tgetstr ()
#3 0x8062194 in init_term ()
#4 0x806d485 in termsetfn ()
#5 0x806c34b in setstrvalue ()
#6 0x806c927 in setsparam ()
#7 0x806aa8a in createparamtable ()
#8 0x80626fd in setupvals ()
#9 0x80616c7 in main ()
#10 0x8049ff4 in __start ()
(gdb)
Undefining TGETENT_ACCEPTS_NULL in config.h fixes the problem.
2) On 4.0.1 (but not 3.1), I am seeing the following for every sourcefile:
gcc -c -I.. -I. -I. -DHAVE_CONFIG_H -Wall -Wno-implicit -Wmissing-prototypes -O2 builtin.c
In file included from system.h:58,
from zsh.h:59,
from builtin.c:30:
/usr/include/stdio.h:378: warning: no previous prototype for `__sputaux'
gcc is the system-supplied version 2.7.2.1 in both cases.
The shell built seems to work fine though.
Cheers,
--
Jos Backus _/ _/_/_/ "Reliability means never
_/ _/ _/ having to say you're sorry."
_/ _/_/_/ -- D. J. Bernstein
_/ _/ _/ _/
Jos.Backus@nl.origin-it.com _/_/ _/_/_/ use Std::Disclaimer;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: zsh-3.0.6 on BSD/OS
1999-08-09 10:25 zsh-3.0.6 on BSD/OS Jos Backus
@ 1999-08-09 14:34 ` Jos Backus
1999-08-09 17:36 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Jos Backus @ 1999-08-09 14:34 UTC (permalink / raw)
To: zsh-workers
On Mon, Aug 09, 1999 at 12:25:57PM +0200, Jos Backus wrote:
> 1) On both BSD/OS 3.1 and 4.0.1, configure erroneously #defines
> TGETENT_ACCEPTS_NULL, leading to a coredump later on in tgetstr() in
> init.c:489:
The problem lies in the way configure tests this flag:
3.0.6 does
#include "confdefs.h"
main(){int i = tgetent((char*)0,"vt100");exit(!i || i == -1);}
whereas 3.1.6 does
#include "confdefs.h"
main()
{
int i = tgetent((char*)0,"vt100");
if (i > 0) {
char tbuf[1024], *u;
u = tbuf;
tgetstr("cl", &u);
}
exit(!i || i == -1);
}
The latter test yields the correct result, and 3.1.6 works out of the box.
Maybe 3.0.6 should be changed?
Regarding problem 2: compiling 3.1.6 gives the same warning on 4.0.1 (hardly
surprising in my view).
Cheers,
--
Jos Backus _/ _/_/_/ "Reliability means never
_/ _/ _/ having to say you're sorry."
_/ _/_/_/ -- D. J. Bernstein
_/ _/ _/ _/
Jos.Backus@nl.origin-it.com _/_/ _/_/_/ use Std::Disclaimer;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: zsh-3.0.6 on BSD/OS
1999-08-09 14:34 ` Jos Backus
@ 1999-08-09 17:36 ` Bart Schaefer
0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1999-08-09 17:36 UTC (permalink / raw)
To: zsh-workers
On Aug 9, 4:34pm, Jos Backus wrote:
} Subject: Re: zsh-3.0.6 on BSD/OS
}
} On Mon, Aug 09, 1999 at 12:25:57PM +0200, Jos Backus wrote:
} > 1) On both BSD/OS 3.1 and 4.0.1, configure erroneously #defines
} > TGETENT_ACCEPTS_NULL, leading to a coredump later on in tgetstr() in
} > init.c:489:
}
} 3.1.6 works out of the box.
} Maybe 3.0.6 should be changed?
Thanks, I've copied the configure.in test from 3.1.6 to 3.0.6. Here's
the patch:
Index: configure.in
===================================================================
@@ -416,9 +416,22 @@
fi
dnl Check if tgetent accepts NULL (and will allocate its own termcap buffer)
+dnl Some termcaps reportedly accept a zero buffer, but then dump core
+dnl in tgetstr().
AC_CACHE_CHECK(if tgetent accepts NULL,
zsh_cv_func_tgetent_accepts_null,
-[AC_TRY_RUN([main(){int i = tgetent((char*)0,"vt100");exit(!i || i == -1);}],
+[AC_TRY_RUN([
+main()
+{
+ int i = tgetent((char*)0,"vt100");
+ if (i > 0) {
+ char tbuf[1024], *u;
+ u = tbuf;
+ tgetstr("cl", &u);
+ }
+ exit(!i || i == -1);
+}
+],
zsh_cv_func_tgetent_accepts_null=yes,
zsh_cv_func_tgetent_accepts_null=no,
zsh_cv_func_tgetent_accepts_null=no)])
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-08-09 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-09 10:25 zsh-3.0.6 on BSD/OS Jos Backus
1999-08-09 14:34 ` Jos Backus
1999-08-09 17:36 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).