mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 20:30:28 +02:00
(scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in POSIX spec examples, the latter are not available on for instance NetBSD.
This commit is contained in:
parent
0460c6e10f
commit
8fae2bf483
1 changed files with 14 additions and 7 deletions
|
@ -1341,18 +1341,25 @@ scm_init_socket ()
|
||||||
scm_c_define ("SOCK_RDM", scm_from_int (SOCK_RDM));
|
scm_c_define ("SOCK_RDM", scm_from_int (SOCK_RDM));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* setsockopt level. */
|
/* setsockopt level.
|
||||||
|
|
||||||
|
SOL_IP, SOL_TCP and SOL_UDP are defined on gnu/linux, but not on for
|
||||||
|
instance NetBSD. We define IPPROTOs because that's what the posix spec
|
||||||
|
shows in its example at
|
||||||
|
|
||||||
|
http://www.opengroup.org/onlinepubs/007904975/functions/getsockopt.html
|
||||||
|
*/
|
||||||
#ifdef SOL_SOCKET
|
#ifdef SOL_SOCKET
|
||||||
scm_c_define ("SOL_SOCKET", scm_from_int (SOL_SOCKET));
|
scm_c_define ("SOL_SOCKET", scm_from_int (SOL_SOCKET));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOL_IP
|
#ifdef IPPROTO_IP
|
||||||
scm_c_define ("SOL_IP", scm_from_int (SOL_IP));
|
scm_c_define ("IPPROTO_IP", scm_from_int (IPPROTO_IP));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOL_TCP
|
#ifdef IPPROTO_TCP
|
||||||
scm_c_define ("SOL_TCP", scm_from_int (SOL_TCP));
|
scm_c_define ("IPPROTO_TCP", scm_from_int (IPPROTO_TCP));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOL_UDP
|
#ifdef IPPROTO_UDP
|
||||||
scm_c_define ("SOL_UDP", scm_from_int (SOL_UDP));
|
scm_c_define ("IPPROTO_UDP", scm_from_int (IPPROTO_UDP));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* setsockopt names. */
|
/* setsockopt names. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue