>From a597cd2edd0ebe3341e435ad08af4450b43beb31 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 29 Jan 2011 19:52:39 +0100 Subject: [PATCH 4/4] Mingw compile fixes. --- libguile/bdw-gc.h | 2 ++ libguile/deprecated.c | 4 ++-- libguile/filesys.c | 2 +- libguile/net_db.c | 3 +++ libguile/ports.h | 1 + libguile/socket.c | 1 + 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libguile/bdw-gc.h b/libguile/bdw-gc.h index 3adf99e..09e0662 100644 --- a/libguile/bdw-gc.h +++ b/libguile/bdw-gc.h @@ -30,7 +30,9 @@ allocation. */ # define GC_THREADS 1 +#ifndef __MINGW32__ # define GC_REDIRECT_TO_LOCAL 1 +#endif /* __MINGW32__ */ #endif diff --git a/libguile/deprecated.c b/libguile/deprecated.c index e11d353..12a61f6 100644 --- a/libguile/deprecated.c +++ b/libguile/deprecated.c @@ -1639,7 +1639,7 @@ scm_i_fluidp (SCM x) /* Networking. */ -#ifdef HAVE_NETWORKING +#ifdef HAVE_IPV6 SCM_DEFINE (scm_inet_aton, "inet-aton", 1, 0, 0, (SCM address), @@ -1674,7 +1674,7 @@ SCM_DEFINE (scm_inet_ntoa, "inet-ntoa", 1, 0, 0, } #undef FUNC_NAME -#endif /* HAVE_NETWORKING */ +#endif /* HAVE_IPV6 */ void diff --git a/libguile/filesys.c b/libguile/filesys.c index 68d90d9..d6251a0 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -523,7 +523,7 @@ static int fstat_Win32 (int fdes, struct stat *buf) /* Is this a socket ? */ if (getsockopt (fdes, SOL_SOCKET, SO_ERROR, (void *) &error, &optlen) >= 0) { - buf->st_mode = _S_IFSOCK | _S_IREAD | _S_IWRITE | _S_IEXEC; + buf->st_mode = _S_IREAD | _S_IWRITE | _S_IEXEC; buf->st_nlink = 1; buf->st_atime = buf->st_ctime = buf->st_mtime = time (NULL); return 0; diff --git a/libguile/net_db.c b/libguile/net_db.c index 14722d5..a017921 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -456,6 +456,7 @@ SCM_DEFINE (scm_setserv, "setserv", 0, 1, 0, SCM_SYMBOL (sym_getaddrinfo_error, "getaddrinfo-error"); +#ifndef __MINGW32__ /* Make sure the `AI_*' flags can be stored as INUMs. */ verify (SCM_I_INUM (SCM_I_MAKINUM (AI_ALL)) == AI_ALL); @@ -745,6 +746,8 @@ SCM_DEFINE (scm_gai_strerror, "gai-strerror", 1, 0, 0, } #undef FUNC_NAME +#endif /* __MINGW32__ */ + /* TODO: Add a getnameinfo(3) wrapper. */ diff --git a/libguile/ports.h b/libguile/ports.h index 36289ef..7408b9b 100644 --- a/libguile/ports.h +++ b/libguile/ports.h @@ -26,6 +26,7 @@ #include "libguile/__scm.h" +#include #include "libguile/print.h" #include "libguile/struct.h" #include "libguile/threads.h" diff --git a/libguile/socket.c b/libguile/socket.c index 9b1618f..301854e 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -40,6 +40,7 @@ #ifdef __MINGW32__ #include "win32-socket.h" +#include #endif #ifdef HAVE_STDINT_H -- 1.7.1