From: Micah Cowan Date: Fri, 12 Jun 2009 08:32:44 +0000 (-0700) Subject: Declare h_errno if no declaration provided (HP-UX). X-Git-Tag: v1.13~349 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=e265ef92429e09fe298f5ac628dc77061df130b5 Declare h_errno if no declaration provided (HP-UX). --- diff --git a/ChangeLog b/ChangeLog index 3c976238..e7b0060b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-06-12 Micah Cowan + + * configure.ac: Check for h_errno declaration. Idea thanks to + Maciej W. Rozycki. + 2009-03-03 Steven Schubiger * src/ftp.c, src/http.c, src/main.c, src/recur.h, diff --git a/configure.ac b/configure.ac index 2ccc703d..78fd5e14 100644 --- a/configure.ac +++ b/configure.ac @@ -163,6 +163,8 @@ AC_CHECK_HEADERS(unistd.h sys/time.h) AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h utime.h sys/utime.h) AC_CHECK_HEADERS(stdint.h inttypes.h pwd.h wchar.h) +AC_CHECK_DECLS(h_errno,,,[#include ]) + dnl dnl Check sizes of integer types. These are used to find n-bit dnl integral types on older systems that fail to provide intN_t and diff --git a/src/ChangeLog b/src/ChangeLog index 464e8a91..33362331 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-06-12 Micah Cowan + + * host.c: Declare h_errno if no declaration is provided. Idea + thanks to Maciej W. Rozycki. + 2009-06-11 Xin Zou * http.c (gethttp): Fix some memory leaks. diff --git a/src/host.c b/src/host.c index fdb35b1c..e65a23aa 100644 --- a/src/host.c +++ b/src/host.c @@ -58,6 +58,11 @@ as that of the covered work. */ # define NO_ADDRESS NO_DATA #endif +#if !HAVE_DECL_H_ERRNO +extern int h_errno; +#endif + + /* Lists of IP addresses that result from running DNS queries. See lookup_host for details. */