Branch
Hash :
e936bfd8
Author :
Date :
2025-07-23T19:55:41
sethostname tests: Avoid test failure on Haiku. * tests/test-sethostname2.c (main): On Haiku, skip the "too long hostname" test. * doc/glibc-functions/sethostname.texi: Mention the Haiku problem.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
@node sethostname
@subsection @code{sethostname}
@findex sethostname
LSB specification:@* @url{https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib-sethostname-2.html}
Documentation:
@itemize
@item
@ifinfo
@ref{Host Identification,,Host Identification,libc},
@end ifinfo
@ifnotinfo
@url{https://www.gnu.org/software/libc/manual/html_node/Host-Identification.html},
@end ifnotinfo
@item
@uref{https://www.kernel.org/doc/man-pages/online/pages/man2/sethostname.2.html,,man sethostname}.
@end itemize
Gnulib module: sethostname
@mindex sethostname
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
Minix 3.1.8, Cygwin 1.7.x, mingw, MSVC 14, Android 5.1.
Note that the Gnulib replacement may fail with @code{ENOSYS} on some platforms.
@item
This function is not declared on some platforms:
AIX 7.1, Solaris 10.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
The first parameter is @code{char *} instead of @code{const char *}
on some platforms:
Solaris 11 2010-11.
@item
The second parameter is @code{int} instead of @code{size_t}
on some platforms:
macOS 14, FreeBSD 14.0, MidnightBSD 3.0, Solaris 11 2010-11, Solaris 11 OpenIndiana, Solaris 11 OmniOS.
@item
This function does not reject a too long host name on some platforms:
@c https://cygwin.com/pipermail/cygwin/2024-May/255986.html
@c https://dev.haiku-os.org/ticket/19692
Cygwin 3.5.3, Haiku.
@end itemize