diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-11-17 23:40:51 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-11-17 23:42:22 +0100 |
commit | 56a3dcd4311d26ef2e9d14ef01021947562c5f17 (patch) | |
tree | 8fdaa74c4b29438b09b36d6573d2e843b5c70abc /libguile/socket.c | |
parent | c32b39b9cb69dda94fdd2c3d0f13b4de1b2fd2c9 (diff) |
Remove references to undefined macros.
The intent is to allow compilation with `-Wundef', which in turn should
make it easier to catch erroneous uses of nonexistent macros.
* libguile/__scm.h: Don't assume `BUILDING_LIBGUILE' is defined.
* libguile/conv-uinteger.i.c (SCM_TO_TYPE_PROTO): Remove unneeded CPP
conditional on `TYPE_MIN == 0'.
* libguile/fports.c: Check for the definition of `HAVE_CHSIZE' and
`HAVE_FTRUNCATE', not for their value.
* libguile/ports.c: Likewise.
* libguile/numbers.c (guile_ieee_init): Likewise with `HAVE_DINFINITY'
and `HAVE_DQNAN'.
* test-suite/standalone/test-conversion.c (ieee_init): Likewise.
* libguile/strings.c: Likewise with `SCM_STRING_LENGTH_HISTOGRAM'.
* libguile/strings.h: Likewise.
* libguile/tags.h: Likewise with `HAVE_INTTYPES_H' and `HAVE_STDINT_H'.
* libguile/threads.c: Likewise with `HAVE_PTHREAD_GET_STACKADDR_NP'.
* libguile/vm-engine.c (VM_NAME): Likewise with `VM_CHECK_IP'.
* libguile/gen-scmconfig.c (main): Use "#ifdef HAVE_", not "#if HAVE_".
* libguile/socket.c (scm_setsockopt): Likewise.
Diffstat (limited to 'libguile/socket.c')
-rw-r--r-- | libguile/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libguile/socket.c b/libguile/socket.c index cd313190e..092f6eb00 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -624,7 +624,7 @@ SCM_DEFINE (scm_setsockopt, "setsockopt", 4, 0, 0, struct linger opt_linger; #endif -#if HAVE_STRUCT_IP_MREQ +#ifdef HAVE_STRUCT_IP_MREQ struct ip_mreq opt_mreq; #endif @@ -678,7 +678,7 @@ SCM_DEFINE (scm_setsockopt, "setsockopt", 4, 0, 0, } } -#if HAVE_STRUCT_IP_MREQ +#ifdef HAVE_STRUCT_IP_MREQ if (ilevel == IPPROTO_IP && (ioptname == IP_ADD_MEMBERSHIP || ioptname == IP_DROP_MEMBERSHIP)) { @@ -760,7 +760,7 @@ scm_fill_sockaddr (int fam, SCM address, SCM *args, int which_arg, *args = SCM_CDR (*args); soka = (struct sockaddr_in *) scm_malloc (sizeof (struct sockaddr_in)); -#if HAVE_STRUCT_SOCKADDR_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_SIN_LEN soka->sin_len = sizeof (struct sockaddr_in); #endif soka->sin_family = AF_INET; @@ -794,7 +794,7 @@ scm_fill_sockaddr (int fam, SCM address, SCM *args, int which_arg, } soka = (struct sockaddr_in6 *) scm_malloc (sizeof (struct sockaddr_in6)); -#if HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN soka->sin6_len = sizeof (struct sockaddr_in6); #endif soka->sin6_family = AF_INET6; |