diff options
author | Stefan Jahn <stefan@lkcc.org> | 2001-11-21 07:59:53 +0000 |
---|---|---|
committer | Stefan Jahn <stefan@lkcc.org> | 2001-11-21 07:59:53 +0000 |
commit | 6063dc1ddd76d0d4bc74f86faae9462d855ceff5 (patch) | |
tree | 41e38b5acebf6f3068a6149e6a4c5935dc727d09 /libguile/net_db.c | |
parent | 351982f656ad8b0e9754b368fb89e751ad226500 (diff) | |
download | guile-6063dc1ddd76d0d4bc74f86faae9462d855ceff5.tar.gz |
2001-11-21 Stefan Jahn <stefan@lkcc.org>
* win32-socket.c (getservent, setservent, endservent,
getprotoent, setprotoent, endprotoent): New functions.
Appropriate replacements for M$-Windows.
* numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
these definitions for GUILE_DEBUG.
* net_db.c: Include "win32-socket.h" if compiling with a native
M$-Windows compiler. Include some pieces of code (protoent and
servent interface) protected by HAVE_* macros when using a
native M$-Windows compiler.
Diffstat (limited to 'libguile/net_db.c')
-rw-r--r-- | libguile/net_db.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libguile/net_db.c b/libguile/net_db.c index d32819ee8..fd00a0497 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -74,6 +74,10 @@ #include <arpa/inet.h> #endif +#ifdef __MINGW32__ +#include "win32-socket.h" +#endif + #if !defined (HAVE_H_ERRNO) && !defined (__MINGW32__) && !defined (__CYGWIN__) /* h_errno not found in netdb.h, maybe this will help. */ extern int h_errno; @@ -266,7 +270,7 @@ SCM_DEFINE (scm_getnet, "getnet", 0, 1, 0, #undef FUNC_NAME #endif -#ifdef HAVE_GETPROTOENT +#if defined (HAVE_GETPROTOENT) || defined (__MINGW32__) SCM_DEFINE (scm_getproto, "getproto", 0, 1, 0, (SCM protocol), "@deffnx {Scheme Procedure} getprotobyname name\n" @@ -314,7 +318,7 @@ SCM_DEFINE (scm_getproto, "getproto", 0, 1, 0, #undef FUNC_NAME #endif -#ifdef HAVE_GETSERVENT +#if defined (HAVE_GETSERVENT) || defined (__MINGW32__) static SCM scm_return_entry (struct servent *entry) { @@ -405,7 +409,7 @@ SCM_DEFINE (scm_setnet, "setnet", 0, 1, 0, #undef FUNC_NAME #endif -#if defined(HAVE_SETPROTOENT) && defined(HAVE_ENDPROTOENT) +#if defined (HAVE_SETPROTOENT) && defined (HAVE_ENDPROTOENT) || defined (__MINGW32__) SCM_DEFINE (scm_setproto, "setproto", 0, 1, 0, (SCM stayopen), "If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}.\n" @@ -421,7 +425,7 @@ SCM_DEFINE (scm_setproto, "setproto", 0, 1, 0, #undef FUNC_NAME #endif -#if defined(HAVE_SETSERVENT) && defined(HAVE_ENDSERVENT) +#if defined (HAVE_SETSERVENT) && defined (HAVE_ENDSERVENT) || defined (__MINGW32__) SCM_DEFINE (scm_setserv, "setserv", 0, 1, 0, (SCM stayopen), "If @var{stayopen} is omitted, this is equivalent to @code{endservent}.\n" |