diff options
author | Kevin Ryde <user42@zip.com.au> | 2005-10-23 21:35:01 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2005-10-23 21:35:01 +0000 |
commit | 8fae2bf483d801d7fcc7bb918e27868b0d31a035 (patch) | |
tree | 341e0a853c7c72b1704d722026d8b62ccb9b16fe /libguile/socket.c | |
parent | 0460c6e10f503bcfaadcc315efc5a5142b3d73a7 (diff) | |
download | guile-8fae2bf483d801d7fcc7bb918e27868b0d31a035.tar.gz |
(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.
Diffstat (limited to 'libguile/socket.c')
-rw-r--r-- | libguile/socket.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/libguile/socket.c b/libguile/socket.c index 28833df8f..6dfc80035 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -1341,18 +1341,25 @@ scm_init_socket () scm_c_define ("SOCK_RDM", scm_from_int (SOCK_RDM)); #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 scm_c_define ("SOL_SOCKET", scm_from_int (SOL_SOCKET)); #endif -#ifdef SOL_IP - scm_c_define ("SOL_IP", scm_from_int (SOL_IP)); +#ifdef IPPROTO_IP + scm_c_define ("IPPROTO_IP", scm_from_int (IPPROTO_IP)); #endif -#ifdef SOL_TCP - scm_c_define ("SOL_TCP", scm_from_int (SOL_TCP)); +#ifdef IPPROTO_TCP + scm_c_define ("IPPROTO_TCP", scm_from_int (IPPROTO_TCP)); #endif -#ifdef SOL_UDP - scm_c_define ("SOL_UDP", scm_from_int (SOL_UDP)); +#ifdef IPPROTO_UDP + scm_c_define ("IPPROTO_UDP", scm_from_int (IPPROTO_UDP)); #endif /* setsockopt names. */ |