bug-gnulib
[Top][All Lists]
Advanced

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

RE: HOST_NAME_MAX on HP-NonStop


From: Joachim Schmitz
Subject: RE: HOST_NAME_MAX on HP-NonStop
Date: Sat, 25 Dec 2010 13:03:25 +0100

This would mean I'd need a new testdir, right? It did not work with manually 
applying that patch alone.
 I'll try getting a new testdir now.

Problem: I seem to need automake 1.11 but only have 1.8, and autoconf 2.62 but 
only have 2.59...
I'll try to upgrade to 1.11.1 and 2.68 respectively.

Oh well, autconf needs M4 1.4.6  and I have 1.4o, so need to upgrade this as 
well (I'll try 1.4.15)

Meanwhile it'd be great if you could create me a new testdir

Bye, Jojo

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

Joachim Schmitz wrote:
> Good question. In config.h I can only see:
> 
> #define HOST_NAME_MAX
> 
> So it gets #define'd but with no value ...
> Possibly because it does not #include <arpa/nameser.h>

<arpa/nameser.h> is such a rarely included header file that we can ignore it 
here, and simply use a fallback of 256 (which is the maximum value of 
MAXHOSTNAMELEN on any platform). I'm applying this:


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

        gethostname: Provide a fallback for HOST_NAME_MAX.
        * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): When neither HOST_NAME_MAX
        nor MAXHOSTNAMELEN is found in the usual system headers, use 256
        instead.
        Reported by Joachim Schmitz <address@hidden>.

--- m4/gethostname.m4.orig      Fri Dec 24 13:51:48 2010
+++ m4/gethostname.m4   Fri Dec 24 13:50:52 2010
@@ -1,5 +1,5 @@
-# gethostname.m4 serial 9
-dnl Copyright (C) 2002, 2008, 2009, 2010 Free Software Foundation, Inc.
+# gethostname.m4 serial 10
+dnl Copyright (C) 2002, 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation  dnl gives 
unlimited permission to copy and/or distribute it,  dnl with or without 
modifications, as long as this notice is preserved.
@@ -83,7 +83,11 @@
 #if HAVE_NETDB_H
 # include <netdb.h>
 #endif
-])
+],
+          [dnl The system does not define MAXHOSTNAMELEN in any of the common
+           dnl headers. Use a safe fallback.
+           gl_cv_decl_HOST_NAME_MAX=256
+          ])
       fi
     fi
   ])




reply via email to

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