From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17932 invoked from network); 26 Jul 2000 08:24:29 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jul 2000 08:24:29 -0000 Received: (qmail 14702 invoked by alias); 26 Jul 2000 08:24:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12376 Received: (qmail 14694 invoked from network); 26 Jul 2000 08:24:19 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Cc: , "Mike Boilen" Subject: PATCH: configure.in: tgetent test does not work on Cygwin Date: Wed, 26 Jul 2000 12:23:20 +0400 Message-ID: <000301bff6da$c198e730$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: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > > > > 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,