bug-gnulib
[Top][All Lists]
Advanced

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

Re: HOST_NAME_MAX


From: Bruno Haible
Subject: Re: HOST_NAME_MAX
Date: Sun, 2 Aug 2009 15:31:24 +0200
User-agent: KMail/1.9.9

> 2009-08-02  Simon Josefsson  <address@hidden>
>             Bruno Haible  <address@hidden>
> 
>       Ensure HOST_NAME_MAX as part of the gethostname module.
>       * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms,
>       define also HOST_NAME_MAX.
>       * tests/test-gethostname.c (main): Check also HOST_NAME_MAX.
>       * doc/posix-headers/limits.texi: Document the mingw problem.

Well, that led to a compilation error on Linux:

test-gethostname.c: In function ‘main’:
test-gethostname.c:31: error: ‘HOST_NAME_MAX’ undeclared (first use in this 
function)
test-gethostname.c:31: error: (Each undeclared identifier is reported only once
test-gethostname.c:31: error: for each function it appears in.)

Fixed as follows:

*** tests/test-gethostname.c.orig       2009-08-02 15:28:53.000000000 +0200
--- tests/test-gethostname.c    2009-08-02 15:26:10.000000000 +0200
***************
*** 17,23 ****
--- 17,26 ----
  
  #include <config.h>
  
+ /* Get gethostname() declaration.  */
  #include <unistd.h>
+ /* Get HOST_NAME_MAX definition.  */
+ #include <limits.h>
  
  #include <stdio.h>
  #include <string.h>




reply via email to

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