poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / getsockopt.texi
blob5ec2ad8c95c516dea259442c657fba94de13d0fa
1 @node getsockopt
2 @section @code{getsockopt}
3 @findex getsockopt
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsockopt.html}
7 LSB specification:@* @url{https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib-getsockopt-1.html}
9 Gnulib module: getsockopt
11 Portability problems fixed by Gnulib:
12 @itemize
13 @item
14 On Windows platforms (excluding Cygwin), error codes from this function
15 are not placed in @code{errno}, and @code{WSAGetLastError} must be used
16 instead.
17 @item
18 On HP-UX 11, in 64-bit mode, when the macro @code{_HPUX_ALT_XOPEN_SOCKET_API}
19 is not defined, this function behaves incorrectly because it is declared
20 to take a pointer to a 64-bit wide @code{socklen_t} entity but in fact
21 considers it as a pointer to a 32-bit wide @code{unsigned int} entity.
22 @end itemize
24 Portability problems not fixed by Gnulib:
25 @itemize
26 @item
27 Some platforms don't have a @code{socklen_t} type; in this case this function's
28 fifth argument type is @samp{int *}.
29 @item
30 Many socket options are not available on all platforms.
31 @end itemize