diff options
author | Martin Grabmüller <mgrabmue@cs.tu-berlin.de> | 2001-06-26 17:53:09 +0000 |
---|---|---|
committer | Martin Grabmüller <mgrabmue@cs.tu-berlin.de> | 2001-06-26 17:53:09 +0000 |
commit | 82893676f43d32d217d264ad5bef50f0952b6460 (patch) | |
tree | 5aa0b8c88d64bd0e310749a2f049ed2b4d985401 /libguile/guile.c | |
parent | dd0e04edd65cdcb71517f1f079676cb04d3bafc4 (diff) | |
download | guile-82893676f43d32d217d264ad5bef50f0952b6460.tar.gz |
Make compilation under Windows easier.
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 |