> 2009-08-02 Simon Josefsson <si...@josefsson.org> > Bruno Haible <br...@clisp.org> > > 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>