poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / gethostname.texi
blobd162cea73835f3616e5c36a085c90e97d91f1400
1 @node gethostname
2 @section @code{gethostname}
3 @findex gethostname
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html}
7 Gnulib module: gethostname
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function is declared in a different header file (namely,
13 @code{<winsock2.h>}) on some platforms:
14 MSVC 14.
15 @item
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.
18 @end itemize
20 Portability problems not fixed by Gnulib:
21 @itemize
22 @item
23 This function's second argument type is @code{int} instead of @code{size_t}
24 on some platforms:
25 Solaris 10.
26 @item
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.
29 @end itemize