[Top][All Lists]
[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: |
Thu, 23 Dec 2010 15:07:10 +0100 |
Mine was:
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
+
#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
#define _GL_UNISTD_H
Fixes the HOST_NAME_MAX problem too...
-----Original Message-----
From: Joachim Schmitz [mailto:address@hidden
Sent: Thursday, December 23, 2010 1:55 PM
To: 'Bruno Haible'
Cc: 'address@hidden'
Subject: RE: gethostname on HP-NonStop
Oh well, it is not here. So some kind of workaround is needed.
-----Original Message-----
From: Bruno Haible [mailto:address@hidden
Sent: Thursday, December 23, 2010 1:43 PM
To: Joachim Schmitz
Cc: address@hidden
Subject: Re: gethostname on HP-NonStop
Joachim Schmitz wrote:
> gethostname missing (resp. not found, it is available and declared in
> <netdb.h>), in various places. I added it to gllib/unistd.in.h
> source='test-fcntl-h-c++.cc' object='test-fcntl-h-c++.o' libtool=no
> DEPDIR=.deps depmode=none /bin/sh ./../build-aux/depcomp c++
> -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./..
> -I../gllib -I./../gllib -I/usr/local/include -Wnowarn -c -o
> test-fcntl-h-c++.o test-fcntl-h-c++.cc
> _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
> ^
> "/usr/local/Floss/gnulib/testdir-posix/gltests/./../gllib/unistd.h", line
> 972: error(363):
> the global scope has no "gethostname"
gethostname ought to be declared in <unistd.h>, not in <netdb.h>.
Reference:
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html>
Bruno
- Re: alphasort on HP-NonStop, (continued)
- Re: alphasort on HP-NonStop, Bruno Haible, 2010/12/23
- RE: alphasort on HP-NonStop, Joachim Schmitz, 2010/12/23
- RE: alphasort on HP-NonStop, Joachim Schmitz, 2010/12/24
- Re: alphasort on HP-NonStop, Bruno Haible, 2010/12/24
- RE: alphasort on HP-NonStop, Joachim Schmitz, 2010/12/24
- RE: alphasort on HP-NonStop, Joachim Schmitz, 2010/12/28
- Re: alphasort on HP-NonStop, Paul Eggert, 2010/12/28
- RE: alphasort on HP-NonStop, Joachim Schmitz, 2010/12/28
- Re: gethostname on HP-NonStop, Bruno Haible, 2010/12/23
- RE: gethostname on HP-NonStop, Joachim Schmitz, 2010/12/23
- RE: gethostname on HP-NonStop,
Joachim Schmitz <=
- Re: gethostname on HP-NonStop, Bruno Haible, 2010/12/24
- RE: gethostname on HP-NonStop, Joachim Schmitz, 2010/12/25
- Re: HOST_NAME_MAX on HP-NonStop, Bruno Haible, 2010/12/23
- RE: HOST_NAME_MAX on HP-NonStop, Joachim Schmitz, 2010/12/23
- Re: HOST_NAME_MAX on HP-NonStop, Bruno Haible, 2010/12/24
- RE: HOST_NAME_MAX on HP-NonStop, Joachim Schmitz, 2010/12/25
- Re: HOST_NAME_MAX on HP-NonStop, Bruno Haible, 2010/12/25
- Re: porting stdioext to HP-NonStop, Bruno Haible, 2010/12/23
- RE: porting stdioext to HP-NonStop, Joachim Schmitz, 2010/12/23
- Re: <sys/select.h> HP-NonStop, Bruno Haible, 2010/12/24