zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@cambridgesiliconradio.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: PATCH: configure.in: tgetent test does not work on Cygwin
Date: Wed, 26 Jul 2000 10:07:47 +0100	[thread overview]
Message-ID: <0FYA00LHQS0YW3@la-la.cambridgesiliconradio.com> (raw)
In-Reply-To: "Your message of Wed, 26 Jul 2000 12:23:20 +0400." <000301bff6da$c198e730$21c9ca95@mow.siemens.ru>

> > > This particular problem was due to tgetent() problem.
> 
> 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.

Here's a context diff.  I've moved the test for the file up, because
configure removes conftest* before the final test for the cache variable.
It seems to work on solaris, where the answer is `yes'.  The old version
was working on cygwin for Windows NT 4 sp 5, however, where the answer was
`no'.  How does Windows 2000 manage to arrange for a status 0?

Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.13
diff -u -r1.13 configure.in
--- configure.in	2000/07/20 16:17:57	1.13
+++ configure.in	2000/07/26 09:03:23
@@ -579,6 +579,8 @@
 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().
+dnl  Under Cygwin test program crashes but exit code is still 0. So,
+dnl  we test for a file that porgram should create
 AC_CACHE_CHECK(if tgetent accepts NULL,
 zsh_cv_func_tgetent_accepts_null,
 [AC_TRY_RUN([
@@ -589,11 +591,16 @@
 	char tbuf[1024], *u;
     	u = tbuf;
     	tgetstr("cl", &u);
+	creat("conftest.tgetent", 0640);
     }
     exit(!i || i == -1);
 }
 ],
-  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,
   zsh_cv_func_tgetent_accepts_null=no,
   zsh_cv_func_tgetent_accepts_null=no)])
 if test $zsh_cv_func_tgetent_accepts_null = yes; then

-- 
Peter Stephenson <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


  reply	other threads:[~2000-07-26  9:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1D4512C91A0E044FBF24DDB221C94C53826756@red-msg-29.redmond.corp.microsoft.com>
2000-07-25 12:30 ` Problems with zsh 3.1.9 and cygwin Andrej Borsenkow
2000-07-25 17:07   ` Problems under domain account on Win2k " Andrej Borsenkow
2000-07-25 18:35     ` Tomislav Goles
2000-07-26  8:23       ` PATCH: configure.in: tgetent test does not work on Cygwin Andrej Borsenkow
2000-07-26  9:07         ` Peter Stephenson [this message]
2000-07-26 10:15           ` Andrej Borsenkow
2000-07-26 10:50             ` Peter Stephenson
2000-07-26 11:26               ` Peter Stephenson
2000-07-26 11:43                 ` Andrej Borsenkow
2000-07-26 15:06                   ` Peter Stephenson
2000-07-26 18:03             ` Chmouel Boudjnah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0FYA00LHQS0YW3@la-la.cambridgesiliconradio.com \
    --to=pws@cambridgesiliconradio.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).