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: Thu, 23 Dec 2010 14:02:40 +0100

Good question. In config.h I can only see:

#define HOST_NAME_MAX

So it gets #define'd but with no value

>From config.log:

configure:33394: checking for HOST_NAME_MAX
configure:33420: cc -o conftest -g -I/usr/local/include  conftest.c  >&5
  static long int longval () { return MAXHOSTNAMELEN; }
                                      ^
"/usr/local/Floss/gnulib/testdir-posix/conftest.c", line 382: error(114):
          identifier "MAXHOSTNAMELEN" is undefined


  static unsigned long int ulongval () { return MAXHOSTNAMELEN; }
                                                ^
"/usr/local/Floss/gnulib/testdir-posix/conftest.c", line 383: error(114):
          identifier "MAXHOSTNAMELEN" is undefined


    if ((MAXHOSTNAMELEN) < 0)
         ^
"/usr/local/Floss/gnulib/testdir-posix/conftest.c", line 393: error(114):
          identifier "MAXHOSTNAMELEN" is undefined


    return 0;
    ^
"/usr/local/Floss/gnulib/testdir-posix/conftest.c", line 412: warning(203):
          statement is unreachable


3 errors detected in the compilation of "conftest.c".
c89: /usr/cmplr/ccombe exited, returning 2.


Possibly because it does not #include <arpa/nameser.h>

Bye, Jojo
-----Original Message-----
From: Bruno Haible [mailto:address@hidden 
Sent: Thursday, December 23, 2010 1:48 PM
To: Joachim Schmitz
Cc: address@hidden
Subject: Re: HOST_NAME_MAX on HP-NonStop

Joachim Schmitz wrote:
> Problem with HOST_NAME_MAX (MAXHOSTNAMELEN is set to 64 in <arpa/nameser.h>, 
> added this to gllib/unistd.in.h, but don't think it belongs there):
>     char buf[HOST_NAME_MAX];
>          ^
> "/usr/local/Floss/gnulib/testdir-posix/gltests/test-gethostname.c", line 38: 
> error(163):
>           incomplete type is not allowed
> 
> 
>     if (strlen (NOHOSTNAME) >= HOST_NAME_MAX)
>                                             ^ 
> "/usr/local/Floss/gnulib/testdir-posix/gltests/test-gethostname.c", line 41: 
> error(123):
>           expected an expression

What's going on here? If HOST_NAME_MAX is not defined in <limits.h>, 
HOST_NAME_MAX ought to be defined in config.h, after the code from
m4/gethostname.m4 has been executed. A look in config.log should tell you what 
went on here (check out for "checking for HOST_NAME_MAX").

Bruno




reply via email to

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