summaryrefslogtreecommitdiff
path: root/libguile/socket.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-11-15 20:50:08 +0100
committerLudovic Courtès <ludo@gnu.org>2009-11-16 09:23:47 +0100
commit3452e6667f9c9a83004a38ed146d26aed8c17754 (patch)
treec70e3f92dc4d2d1ec3cc979c65a9443335378e51 /libguile/socket.c
parent8912421cf3829a4fd65877fd1255125c191f6f89 (diff)
downloadguile-3452e6667f9c9a83004a38ed146d26aed8c17754.tar.gz
Deprecate `inet-ntoa' and `inet-aton'.
Suggested by Bruno Haible. * libguile/inet_aton.c: Remove. * libguile/Makefile.am (EXTRA_libguile_la_SOURCES): Remove `inet_aton.c'. * libguile/deprecated.c (scm_inet_aton, scm_inet_ntoa): New functions. * libguile/deprecated.h: Update accordingly. * libguile/socket.c (scm_inet_aton, scm_inet_ntoa): Remove. * doc/ref/posix.texi (Network Address Conversion): Mark `inet-ntoa' and `inet-aton' as deprecated.
Diffstat (limited to 'libguile/socket.c')
-rw-r--r--libguile/socket.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/libguile/socket.c b/libguile/socket.c
index 4f4d392e2..cd313190e 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -137,53 +137,6 @@ SCM_DEFINE (scm_ntohl, "ntohl", 1, 0, 0,
}
#undef FUNC_NAME
-#ifndef HAVE_INET_ATON
-/* for our definition in inet_aton.c, not usually needed. */
-extern int inet_aton ();
-#endif
-
-SCM_DEFINE (scm_inet_aton, "inet-aton", 1, 0, 0,
- (SCM address),
- "Convert an IPv4 Internet address from printable string\n"
- "(dotted decimal notation) to an integer. E.g.,\n\n"
- "@lisp\n"
- "(inet-aton \"127.0.0.1\") @result{} 2130706433\n"
- "@end lisp")
-#define FUNC_NAME s_scm_inet_aton
-{
- struct in_addr soka;
- char *c_address;
- int rv;
-
- c_address = scm_to_locale_string (address);
- rv = inet_aton (c_address, &soka);
- free (c_address);
- if (rv == 0)
- SCM_MISC_ERROR ("bad address", SCM_EOL);
- return scm_from_ulong (ntohl (soka.s_addr));
-}
-#undef FUNC_NAME
-
-
-SCM_DEFINE (scm_inet_ntoa, "inet-ntoa", 1, 0, 0,
- (SCM inetid),
- "Convert an IPv4 Internet address to a printable\n"
- "(dotted decimal notation) string. E.g.,\n\n"
- "@lisp\n"
- "(inet-ntoa 2130706433) @result{} \"127.0.0.1\"\n"
- "@end lisp")
-#define FUNC_NAME s_scm_inet_ntoa
-{
- struct in_addr addr;
- char *s;
- SCM answer;
- addr.s_addr = htonl (SCM_NUM2ULONG (1, inetid));
- s = inet_ntoa (addr);
- answer = scm_from_locale_string (s);
- return answer;
-}
-#undef FUNC_NAME
-
#ifdef HAVE_INET_NETOF
SCM_DEFINE (scm_inet_netof, "inet-netof", 1, 0, 0,
(SCM address),