about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/zftp.c4
-rw-r--r--acconfig.h3
-rw-r--r--configure.in11
4 files changed, 23 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 41c782ce8..1f8fe0c3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-03  Peter Stephenson  <pws@cambridgesiliconradio.com>
+
+	* 12149: acconfig.h, configure.in, Src/Modules/zftp.c:
+	h_errno wasn't found on HPUX 10.20.  Maybe in some library.
+
 2000-07-04  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 12156: Completion/Core/_expand, Completion/Core/_path_files: add
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index b1aac07b8..e39994733 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -111,6 +111,10 @@ union zftp_sockaddr {
 #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. */
 
diff --git a/acconfig.h b/acconfig.h
index 2f553d1b3..5b4dd4041 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -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
diff --git a/configure.in b/configure.in
index f4de01060..31903ea4d 100644
--- a/configure.in
+++ b/configure.in
@@ -816,6 +816,17 @@ zsh_STRUCT_MEMBER([
 #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 ---------------