2 @section @code{gethostname}
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html}
7 Gnulib module: gethostname
9 Portability problems fixed by Gnulib:
12 This function is declared in a different header file (namely,
13 @code{<winsock2.h>}) on some platforms:
16 On mingw and MSVC 14, this function has a prototype that differs from that
17 specified by POSIX, and it is defined only in the ws2_32 library.
20 Portability problems not fixed by Gnulib:
23 This function's second argument type is @code{int} instead of @code{size_t}
27 If the given buffer is too small for the host name, some implementations
28 fail with @code{EINVAL}, instead of returning a truncated host name.