summaryrefslogtreecommitdiff
path: root/NetWare/nw5sck.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-26 11:54:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-26 11:54:32 +0000
commit8dbfbba0c55b52c9acc258d9a3522ce8b76c3497 (patch)
tree4da4711c19f35c6a32742eb0d8b2bf2d90feb06f /NetWare/nw5sck.c
parent7237d65751f248e676243bc1e148084f323f4838 (diff)
downloadperl-8dbfbba0c55b52c9acc258d9a3522ce8b76c3497.tar.gz
Netware patches from Ananth Kesari.
p4raw-id: //depot/perl@10950
Diffstat (limited to 'NetWare/nw5sck.c')
-rw-r--r--NetWare/nw5sck.c55
1 files changed, 8 insertions, 47 deletions
diff --git a/NetWare/nw5sck.c b/NetWare/nw5sck.c
index 0f6c7369bf..5a9ce47f6d 100644
--- a/NetWare/nw5sck.c
+++ b/NetWare/nw5sck.c
@@ -8,11 +8,11 @@
*/
/*
- * FILENAME : nw5sck.c
- * DESCRIPTION : Socket related functions.
- * Author : SGP
- * Date : January 2001.
- *
+ * FILENAME : nw5sck.c
+ * DESCRIPTION : Socket related functions.
+ * Author : SGP
+ * Date : January 2001.
+ * Date Modified: June 26th 2001.
*/
@@ -30,11 +30,6 @@
#include <fcntl.h>
#include <sys/stat.h>
-static struct servent* nw_savecopyservent(struct servent*d,
- struct servent*s,
- const char *proto);
-
-
u_long
nw_htonl(u_long hostlong)
{
@@ -171,28 +166,14 @@ nw_getprotobynumber(int num)
struct servent *
nw_getservbyname(const char *name, const char *proto)
{
- dTHXo;
- struct servent *r;
-
- r = getservbyname((char*)name, (char*)proto);
- if (r) {
- /*r = nw_savecopyservent(&nw_servent, r, proto);*/
- }
- return r;
+ return (struct servent *)getservbyname((char*)name, (char*)proto);
}
struct servent *
nw_getservbyport(int port, const char *proto)
{
- dTHXo;
- struct servent *r;
-
- r = getservbyport(port, (char*)proto);
- if (r) {
- //r = nw_savecopyservent(&nw_servent, r, proto);
- }
- return r;
+ return (struct servent *)getservbyport(port, (char*)proto);
}
struct servent *
@@ -228,7 +209,7 @@ nw_setservent(int stayopen)
int
nw_setsockopt(SOCKET s, int level, int optname, const char* optval, int optlen)
{
- return setsockopt(s, level, optname, optval, optlen);
+ return setsockopt(s, level, optname, (char*)optval, optlen);
}
int
@@ -249,25 +230,6 @@ nw_inet_addr(const char *cp)
return inet_addr((char*)cp);
}
-static struct servent*
-nw_savecopyservent(struct servent*d, struct servent*s, const char *proto)
-{
- d->s_name = s->s_name;
- d->s_aliases = s->s_aliases;
- d->s_port = s->s_port;
-#ifndef __BORLANDC__ /* Buggy on Win95 and WinNT-with-Borland-WSOCK */
- if (/*!IsWin95() && */s->s_proto && strlen(s->s_proto))
- d->s_proto = s->s_proto;
- else
-#endif
- if (proto && strlen(proto))
- d->s_proto = (char *)proto;
- else
- d->s_proto = "tcp";
-
- return d;
-}
-
SOCKET
nw_socket(int af, int type, int protocol)
{
@@ -276,7 +238,6 @@ nw_socket(int af, int type, int protocol)
#ifndef USE_SOCKETS_AS_HANDLES
s = socket(af, type, protocol);
#else
- //StartSockets();
if((s = socket(af, type, protocol)) == INVALID_SOCKET)
//errno = WSAGetLastError();
else