From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29756 invoked from network); 3 Jul 2000 17:51:12 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Jul 2000 17:51:12 -0000 Received: (qmail 8759 invoked by alias); 3 Jul 2000 17:50:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12149 Received: (qmail 8727 invoked from network); 3 Jul 2000 17:50:56 -0000 Date: Mon, 03 Jul 2000 18:49:54 +0100 From: Peter Stephenson Subject: Re: Problem compiling 3.1.9 under HP-UX 10.20 In-reply-to: "Your message of Thu, 15 Jun 2000 09:17:08 MDT." <14664.62324.943668.637973@hatchet.fc.hp.com> To: zsh-workers@sunsite.auc.dk (Zsh hackers list), Matthew Lovell Message-id: <0FX4007G6UV5CT@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT > 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 ], 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 Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070