zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@cambridgesiliconradio.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list),
	Matthew Lovell <lovell@fc.hp.com>
Subject: Re: Problem compiling 3.1.9 under HP-UX 10.20
Date: Mon, 03 Jul 2000 18:49:54 +0100	[thread overview]
Message-ID: <0FX4007G6UV5CT@la-la.cambridgesiliconradio.com> (raw)
In-Reply-To: "Your message of Thu, 15 Jun 2000 09:17:08 MDT." <14664.62324.943668.637973@hatchet.fc.hp.com>

> Hi,
> 
> I've gotten zsh-3.1.9 to compile on my workstation, but only by
> excluding zftp.  The etc/MACHINES file doesn't state anything special
> about HP-UX.
> zftp.c:211: `h_errno' undeclared (first use in this function)

Finally I made some time to look at this.  From the information above,
this is the best I can do.  It's possible that h_errno is actually declared
in some library we haven't linked in (its libnsl on Solaris but there are
plenty of other possibilities), and we should simply search for that
-- it's a little fishy that there are no other errors associated with error
handling for gethostname.  At least this will get it to compile OK.

You'll need autoconf and autoheader for this, otherwise just wait for the
next development version.

Index: acconfig.h
===================================================================
RCS file: /cvsroot/zsh/zsh/acconfig.h,v
retrieving revision 1.3
diff -u -r1.3 acconfig.h
--- acconfig.h	2000/04/13 22:25:04	1.3
+++ acconfig.h	2000/07/03 17:45:22
@@ -296,3 +296,6 @@
 
 /* Define to 1 if ino_t is 64 bit (for large file support) */
 #undef INO_T_IS_64_BIT
+
+/* Define to 1 if h_errno is not defined by the system */
+#undef USE_LOCAL_H_ERRNO
Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.10
diff -u -r1.10 configure.in
--- configure.in	2000/05/26 09:47:27	1.10
+++ configure.in	2000/07/03 17:45:22
@@ -816,6 +816,17 @@
 #include <netinet/in.h>
 ], struct sockaddr_in6, sin6_scope_id)
 
+dnl Check for h_errno external variable
+AC_CACHE_CHECK(if we need our own h_errno,
+  zsh_cv_decl_h_errno_use_local,
+  [AC_TRY_LINK( ,[extern int h_errno; h_errno = 0;],
+  zsh_cv_decl_h_errno_use_local=no,
+  zsh_cv_decl_h_errno_use_local=yes)])
+
+if test $zsh_cv_decl_h_errno_use_local = yes; then
+  AC_DEFINE(USE_LOCAL_H_ERRNO)
+fi
+
 dnl ---------------
 dnl CHECK FUNCTIONS
 dnl ---------------
Index: Src/Modules/zftp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
retrieving revision 1.6
diff -u -r1.6 zftp.c
--- Src/Modules/zftp.c	2000/05/28 20:59:16	1.6
+++ Src/Modules/zftp.c	2000/07/03 17:45:23
@@ -111,6 +111,10 @@
 #endif
 };
 
+#ifdef USE_LOCAL_H_ERRNO
+int h_errno;
+#endif
+
 /* We use the RFC 2553 interfaces.  If the functions don't exist in the library,
    simulate them. */
 

-- 
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-03 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-15 15:17 Matthew Lovell
2000-07-03 17:49 ` Peter Stephenson [this message]
2000-07-07  5:38   ` Bart Schaefer
2000-07-07 13:28     ` Gene Cohler

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=0FX4007G6UV5CT@la-la.cambridgesiliconradio.com \
    --to=pws@cambridgesiliconradio.com \
    --cc=lovell@fc.hp.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).