* net.cc (cygwin_inet_aton): New function.
* cygwin.din: Export cygwin_inet_aton as inet_aton.
This commit is contained in:
parent
a76857b272
commit
0bec01198b
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Nov 25 11:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* net.cc (cygwin_inet_aton): New function.
|
||||||
|
* cygwin.din: Export cygwin_inet_aton as inet_aton.
|
||||||
|
|
||||||
Sat Nov 25 01:57:42 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
|
Sat Nov 25 01:57:42 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
|
||||||
|
|
||||||
* path.cc (mount_info::read_cygdrive_info_from_registry): Read system
|
* path.cc (mount_info::read_cygdrive_info_from_registry): Read system
|
||||||
|
|
|
@ -949,6 +949,7 @@ _select = cygwin_select
|
||||||
send = cygwin_send
|
send = cygwin_send
|
||||||
socket = cygwin_socket
|
socket = cygwin_socket
|
||||||
setsockopt = cygwin_setsockopt
|
setsockopt = cygwin_setsockopt
|
||||||
|
inet_aton = cygwin_inet_aton
|
||||||
inet_ntoa = cygwin_inet_ntoa
|
inet_ntoa = cygwin_inet_ntoa
|
||||||
recvfrom = cygwin_recvfrom
|
recvfrom = cygwin_recvfrom
|
||||||
sendto = cygwin_sendto
|
sendto = cygwin_sendto
|
||||||
|
|
|
@ -106,7 +106,7 @@ dump_protoent (struct protoent *p)
|
||||||
debug_printf ("protoent %s %x %x", p->p_name, p->p_aliases, p->p_proto);
|
debug_printf ("protoent %s %x %x", p->p_name, p->p_aliases, p->p_proto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* exported as inet_ntoa: standards? */
|
/* exported as inet_ntoa: BSD 4.3 */
|
||||||
extern "C" char *
|
extern "C" char *
|
||||||
cygwin_inet_ntoa (struct in_addr in)
|
cygwin_inet_ntoa (struct in_addr in)
|
||||||
{
|
{
|
||||||
|
@ -114,7 +114,7 @@ cygwin_inet_ntoa (struct in_addr in)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* exported as inet_addr: standards? */
|
/* exported as inet_addr: BSD 4.3 */
|
||||||
extern "C" unsigned long
|
extern "C" unsigned long
|
||||||
cygwin_inet_addr (const char *cp)
|
cygwin_inet_addr (const char *cp)
|
||||||
{
|
{
|
||||||
|
@ -122,6 +122,20 @@ cygwin_inet_addr (const char *cp)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* exported as inet_aton: BSD 4.3
|
||||||
|
inet_aton is not exported by wsock32 and ws2_32,
|
||||||
|
so it has to be implemented here. */
|
||||||
|
extern "C" int
|
||||||
|
cygwin_inet_aton (const char *cp, struct in_addr *inp)
|
||||||
|
{
|
||||||
|
unsigned long res = inet_addr (cp);
|
||||||
|
if (res == INADDR_NONE && strcmp (cp, "255.255.255.255"))
|
||||||
|
return -1;
|
||||||
|
if (inp)
|
||||||
|
inp->s_addr = res;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* undocumented in wsock32.dll */
|
/* undocumented in wsock32.dll */
|
||||||
extern "C" unsigned int WINAPI inet_network (const char *);
|
extern "C" unsigned int WINAPI inet_network (const char *);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue