summaryrefslogtreecommitdiff
path: root/libguile/socket.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2005-06-05 18:27:53 +0000
committerMarius Vollmer <mvo@zagadka.de>2005-06-05 18:27:53 +0000
commitecc9f40fe57d5c484564d90e930f519521731b0a (patch)
tree441df911a725cb99c8f1da3abf203fd20758f86f /libguile/socket.c
parent875a58aa81cd6f204140bd1579cfa400dfce6b55 (diff)
downloadguile-ecc9f40fe57d5c484564d90e930f519521731b0a.tar.gz
* hashtab.h: Bugfix: use SCM_API (WAS: extern).
* socket.c: Remove obsolete comment about socklen_t. (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code. * numbers.h (isnan)[__MINGW32__]: Remove. * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add DEFAULT_INCLUDES when cross compiling. * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines. * stime.c (s_scm_strftime)[!HAVE_TM_ZONE]: Use SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly from Jan's patch.)
Diffstat (limited to 'libguile/socket.c')
-rw-r--r--libguile/socket.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libguile/socket.c b/libguile/socket.c
index 0d2ccbdc1..c268d5e4e 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -67,10 +67,6 @@
+ strlen ((ptr)->sun_path))
#endif
-/* we are not currently using socklen_t. it's not defined on all systems,
- so would need to be checked by configure. in the meantime, plain
- int is the best alternative. */
-
SCM_DEFINE (scm_htons, "htons", 1, 0, 0,
@@ -550,7 +546,10 @@ SCM_DEFINE (scm_setsockopt, "setsockopt", 4, 0, 0,
#ifdef HAVE_STRUCT_LINGER
struct linger opt_linger;
#endif
+
+#if HAVE_STRUCT_IP_MREQ
struct ip_mreq opt_mreq;
+#endif
const void *optval = NULL;
socklen_t optlen = 0;
@@ -602,6 +601,7 @@ SCM_DEFINE (scm_setsockopt, "setsockopt", 4, 0, 0,
}
}
+#if HAVE_STRUCT_IP_MREQ
if (ilevel == IPPROTO_IP &&
(ioptname == IP_ADD_MEMBERSHIP || ioptname == IP_DROP_MEMBERSHIP))
{
@@ -612,6 +612,7 @@ SCM_DEFINE (scm_setsockopt, "setsockopt", 4, 0, 0,
optlen = sizeof (opt_mreq);
optval = &opt_mreq;
}
+#endif
if (optval == NULL)
{