diff options
Diffstat (limited to 'libguile/guile.c')
-rw-r--r-- | libguile/guile.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libguile/guile.c b/libguile/guile.c index 21be17871..d25a70d07 100644 --- a/libguile/guile.c +++ b/libguile/guile.c @@ -55,6 +55,10 @@ #include <libltdl/ltdl.h> #endif +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> +#endif + /* Debugger interface (don't change the order of the following lines) */ #define GDB_TYPE SCM #include <libguile/gdb_interface.h> @@ -63,8 +67,19 @@ GDB_INTERFACE; static void inner_main (void *closure SCM_UNUSED, int argc, char **argv) { +#ifdef __MINGW32__ + /* This is necessary to startup the Winsock API under Win32. */ + WSADATA WSAData; + WSAStartup (0x0202, &WSAData); + GDB_INTERFACE_INIT; +#endif /* __MINGW32__ */ + /* module initializations would go here */ scm_shell (argc, argv); + +#ifdef __MINGW32__ + WSACleanup (); +#endif /* __MINGW32__ */ } int |