Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: configure.in: tgetent test does not work on Cygwin



> >
> > This particular problem was due to tgetent() problem. Zsh tests, if
> > tgetent() accepts null pointer for buffer. Unfortunately, test always
> > succeeded, but running under gdb showed, that Zsh crashed in
> > tgetent(0,"cygwin").
> >


Test succeeded because after program crashes with STATUS_ACCESS_VIOLATION (as
our test program correctly did) we still get exit code 0. Here is the patch
that tries a workaround - it creates temporary file and tests for it after
program run. Any system without creat() ? I did not want to blindly check for
Cygwin because ncurses does not have this problem.

Tomislav, Mike - could you test it? It is O.K. here on both Unix and Cygwin
with the current unmodified CVS (I just got Sven's patch, so it is not current
anymore :-)

-andrej

Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.13
diff -r1.13 configure.in
581a582,583
> dnl  Under Cygwin test program crashes but exit code is still 0. So,
> dnl  we test for a file that porgram should create
591a594
>       creat("conftest.tgetent", 0640);
596c599,603
<   zsh_cv_func_tgetent_accepts_null=yes,
---
>   if test -f conftest.tgetent; then
>      zsh_cv_func_tgetent_accepts_null=yes
>   else
>      zsh_cv_func_tgetent_accepts_null=no
>   fi,



Messages sorted by: Reverse Date, Date, Thread, Author