mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
12149: guard against undefined h_errno in zftp
This commit is contained in:
parent
41404fb6c7
commit
7f5828f0fb
4 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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. */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
11
configure.in
11
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 ---------------
|
||||
|
|
Loading…
Reference in a new issue