void
start_sockets(void)
{
- dTHX;
unsigned short version;
WSADATA retdata;
int ret;
wsock_started = 1;
}
+/* in no sockets Win32 builds, these use the inline functions defined in
+ * perl.h
+ */
u_long
win32_htonl(u_long hostlong)
{
+#ifndef WIN32_NO_SOCKETS
StartSockets();
+#endif
return htonl(hostlong);
}
u_short
win32_htons(u_short hostshort)
{
+#ifndef WIN32_NO_SOCKETS
StartSockets();
+#endif
return htons(hostshort);
}
u_long
win32_ntohl(u_long netlong)
{
+#ifndef WIN32_NO_SOCKETS
StartSockets();
+#endif
return ntohl(netlong);
}
u_short
win32_ntohs(u_short netshort)
{
+#ifndef WIN32_NO_SOCKETS
StartSockets();
+#endif
return ntohs(netshort);
}
struct servent *
win32_getservbyname(const char *name, const char *proto)
{
- dTHX;
+ dTHXa(NULL);
struct servent *r;
SOCKET_TEST(r = getservbyname(name, proto), NULL);
if (r) {
+ aTHXa(PERL_GET_THX);
r = win32_savecopyservent(&w32_servent, r, proto);
}
return r;
struct servent *
win32_getservbyport(int port, const char *proto)
{
- dTHX;
+ dTHXa(NULL);
struct servent *r;
SOCKET_TEST(r = getservbyport(port, proto), NULL);
if (r) {
+ aTHXa(PERL_GET_THX);
r = win32_savecopyservent(&w32_servent, r, proto);
}
return r;
int
win32_ioctl(int i, unsigned int u, char *data)
{
- dTHX;
u_long u_long_arg;
int retval;
void
win32_endhostent()
{
- dTHX;
- Perl_croak_nocontext("endhostent not implemented!\n");
+ win32_croak_not_implemented("endhostent");
}
void
win32_endnetent()
{
- dTHX;
- Perl_croak_nocontext("endnetent not implemented!\n");
+ win32_croak_not_implemented("endnetent");
}
void
win32_endprotoent()
{
- dTHX;
- Perl_croak_nocontext("endprotoent not implemented!\n");
+ win32_croak_not_implemented("endprotoent");
}
void
win32_endservent()
{
- dTHX;
- Perl_croak_nocontext("endservent not implemented!\n");
+ win32_croak_not_implemented("endservent");
}
struct netent *
win32_getnetent(void)
{
- dTHX;
- Perl_croak_nocontext("getnetent not implemented!\n");
+ win32_croak_not_implemented("getnetent");
return (struct netent *) NULL;
}
struct netent *
win32_getnetbyname(char *name)
{
- dTHX;
- Perl_croak_nocontext("getnetbyname not implemented!\n");
+ win32_croak_not_implemented("getnetbyname");
return (struct netent *)NULL;
}
struct netent *
win32_getnetbyaddr(long net, int type)
{
- dTHX;
- Perl_croak_nocontext("getnetbyaddr not implemented!\n");
+ win32_croak_not_implemented("getnetbyaddr");
return (struct netent *)NULL;
}
struct protoent *
win32_getprotoent(void)
{
- dTHX;
- Perl_croak_nocontext("getprotoent not implemented!\n");
+ win32_croak_not_implemented("getprotoent");
return (struct protoent *) NULL;
}
struct servent *
win32_getservent(void)
{
- dTHX;
- Perl_croak_nocontext("getservent not implemented!\n");
+ win32_croak_not_implemented("getservent");
return (struct servent *) NULL;
}
void
win32_sethostent(int stayopen)
{
- dTHX;
- Perl_croak_nocontext("sethostent not implemented!\n");
+ win32_croak_not_implemented("sethostent");
}
void
win32_setnetent(int stayopen)
{
- dTHX;
- Perl_croak_nocontext("setnetent not implemented!\n");
+ win32_croak_not_implemented("setnetent");
}
void
win32_setprotoent(int stayopen)
{
- dTHX;
- Perl_croak_nocontext("setprotoent not implemented!\n");
+ win32_croak_not_implemented("setprotoent");
}
void
win32_setservent(int stayopen)
{
- dTHX;
- Perl_croak_nocontext("setservent not implemented!\n");
+ win32_croak_not_implemented("setservent");
}
static struct servent*