bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: gethostname on HP-NonStop


From: Joachim Schmitz
Subject: RE: gethostname on HP-NonStop
Date: Sat, 25 Dec 2010 12:18:48 +0100

Thanks, that should do, I'll test

-----Original Message-----
From: Bruno Haible [mailto:address@hidden 
Sent: Friday, December 24, 2010 4:41 PM
To: Joachim Schmitz
Cc: address@hidden
Subject: Re: gethostname on HP-NonStop

Joachim Schmitz wrote:
> diff -u ./gllib/unistd.in.h.orig ./gllib/unistd.in.h
> --- ./gllib/unistd.in.h.orig    2010-12-20 19:57:37.000000000 -0600
> +++ ./gllib/unistd.in.h 2010-12-23 07:57:13.000000000 -0600
> @@ -51,6 +51,14 @@
>  # undef _GL_INCLUDING_WINSOCK2_H
>  #endif
> 
> +#ifdef __TANDEM /* HP-Nonstop has gethostname() in <netdb.h> */ 
> +#include <netdb.h>
> +/* and MAXHOSTNAMELEN in <arpa/namser.h> */ #include <arpa/nameser.h> 
> +#undef HOST_NAME_MAX #define HOST_NAME_MAX MAXHOSTNAMELEN #endif

This goes in the right direction. HOST_NAME_MAX already being dealt with, this 
is what I'm committing:


2010-12-24  Bruno Haible  <address@hidden>

        gethostname: Ensure declaration on NonStop Kernel.
        * lib/unistd.in.h: Include <netdb.h> also on NonStop Kernel systems.
        Reported by Joachim Schmitz <address@hidden>.

--- lib/unistd.in.h.orig        Fri Dec 24 16:37:08 2010
+++ lib/unistd.in.h     Fri Dec 24 16:36:38 2010
@@ -88,9 +88,11 @@
 # include <io.h>
 #endif
 
-/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.  */
+/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.
+   NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>.  
+*/
 /* But avoid namespace pollution on glibc systems.  */ -#if 
@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__) \
+#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \
+     || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \
     && !defined __GLIBC__
 # include <netdb.h>
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]