From 046069e4491987af37326d4563e55fcb0698b88c Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 24 Apr 2000 15:44:11 +0000 Subject: [PATCH] * net.cc (cygwin_inet_network): new function. * cygwin.din (inet_network): new export --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/cygwin.din | 1 + winsup/cygwin/net.cc | 12 ++++++++++++ 3 files changed, 18 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 12df069d9..edb3796b5 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2000-04-24 Vadim Egorov + + * net.cc (cygwin_inet_network): new function. + * cygwin.din (inet_network): new export + Fri Apr 21 10:37:08 2000 Christopher Faylor * path.cc (normalize_posix_path): Previous two patches were still diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din index b36e05b27..29346609e 100644 --- a/winsup/cygwin/cygwin.din +++ b/winsup/cygwin/cygwin.din @@ -919,6 +919,7 @@ bind = cygwin_bind connect = cygwin_connect herror = cygwin_herror inet_addr = cygwin_inet_addr +inet_network = cygwin_inet_network inet_netof inet_makeaddr listen = cygwin_listen diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index a42b3d38e..fe2eb31be 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -127,6 +127,17 @@ cygwin_inet_addr (const char *cp) return res; } +/* undocumented in wsock32.dll */ +extern "C" unsigned int inet_network (const char *); + +extern "C" +unsigned int +cygwin_inet_network (const char *cp) +{ + unsigned int res = inet_network (cp); + return res; +} + /* inet_netof is in the standard BSD sockets library. It is useless for modern networks, since it assumes network values which are no longer meaningful, but some existing code calls it. */ @@ -1811,6 +1822,7 @@ LoadDLLfunc (getservbyport, getservbyport@8, wsock32) LoadDLLfunc (getsockname, getsockname@12, wsock32) LoadDLLfunc (getsockopt, getsockopt@20, wsock32) LoadDLLfunc (inet_addr, inet_addr@4, wsock32) +LoadDLLfunc (inet_network, inet_network@4, wsock32) LoadDLLfunc (inet_ntoa, inet_ntoa@4, wsock32) LoadDLLfunc (ioctlsocket, ioctlsocket@12, wsock32) LoadDLLfunc (listen, listen@8, wsock32)