zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: PATCH: fix configure warning.
Date: Tue, 17 Feb 2004 11:37:39 +0000	[thread overview]
Message-ID: <18953.1077017859@csr.com> (raw)

This fixes a warning from configure 2.59 about trying to compile
sys/ptem.h.  The header is present but won't compile.  This causes
configure to execute AC_SOMETHING_ROTTEN_IN_THE_STATE_OF_DENMARK (or
equivalent).

The corresponding section of system.h uses the test to #include both
sys/stream.h and sys/ptem.h.  According to the name, we are looking
for struct winsize.  So a better test would seem to be to #include both
files and see if we can compile a reference to struct winsize.  This
passes without a grumble both with and without streams support.
(Actually, at least on Solaris 8, winsize isn't defined inside ptem.h,
so the old message was fallacious.)

Next stop is curses.

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.4
diff -u -r1.4 configure.ac
--- configure.ac	14 Feb 2004 18:50:16 -0000	1.4
+++ configure.ac	17 Feb 2004 11:17:53 -0000
@@ -562,8 +562,17 @@
 fi
  
 AH_TEMPLATE([WINSIZE_IN_PTEM],
-[Define if your system defines `struct winsize' in sys/ptem.h.])
-AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM))
+[Define if your should include sys/stream.h and sys/ptem.h.])
+AC_CACHE_CHECK(for streams headers including struct winsize,
+ac_cv_winsize_in_ptem,
+[AC_TRY_COMPILE([#include <sys/stream.h>
+#include <sys/ptem.h>],
+[struct winsize wsz],
+ac_cv_winsize_in_ptem=yes,
+ac_cv_winsize_in_ptem=no)])
+if test $ac_cv_winsize_in_ptem = yes; then
+  AC_DEFINE(WINSIZE_IN_PTEM)
+fi
 
 dnl -------------------
 dnl CHECK FOR LIBRARIES

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


                 reply	other threads:[~2004-02-17 11:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=18953.1077017859@csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.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).