summaryrefslogtreecommitdiff
path: root/nt/inc
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2002-05-03 20:22:00 +0000
committerJason Rumney <jasonr@gnu.org>2002-05-03 20:22:00 +0000
commit78f5593158831a14b988abfc4f5d28e281fec9ab (patch)
treee357c9dca4d9ee21d8f72445901915e3a1458049 /nt/inc
parent6715bd2903cbbcff90b9ec1c10aed25187dd62b0 (diff)
downloademacs-78f5593158831a14b988abfc4f5d28e281fec9ab.tar.gz
(F_SETFL, O_NDELAY): Define.
(sys_getpeername, fcntl): Declare as wrappers.
Diffstat (limited to 'nt/inc')
-rw-r--r--nt/inc/sys/socket.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h
index 3c9c4d4de8c..f5a17eafba4 100644
--- a/nt/inc/sys/socket.h
+++ b/nt/inc/sys/socket.h
@@ -81,6 +81,7 @@ Boston, MA 02111-1307, USA. */
#define inet_addr sys_inet_addr
#define gethostname sys_gethostname
#define gethostbyname sys_gethostbyname
+#define getpeername sys_getpeername
#define getservbyname sys_getservbyname
#define shutdown sys_shutdown
#define setsockopt sys_setsockopt
@@ -97,8 +98,9 @@ u_short sys_htons (u_short hostshort);
u_short sys_ntohs (u_short netshort);
unsigned long sys_inet_addr (const char * cp);
int sys_gethostname (char * name, int namelen);
-struct hostent * sys_gethostbyname(const char * name);
-struct servent * sys_getservbyname(const char * name, const char * proto);
+struct hostent * sys_gethostbyname (const char * name);
+struct servent * sys_getservbyname (const char * name, const char * proto);
+int sys_getpeername (int s, struct sockaddr *addr, int * namelen);
int sys_shutdown (int socket, int how);
int sys_setsockopt (int s, int level, int oname, const char * oval, int olen);
int sys_listen (int s, int backlog);
@@ -109,6 +111,12 @@ int sys_recvfrom (int s, char *buf, int len, int flags,
int sys_sendto (int s, const char * buf, int len, int flags,
const struct sockaddr *to, int tolen);
+/* In addition to wrappers for the winsock functions, we also provide
+ an fcntl function, for setting sockets to non-blocking mode. */
+int fcntl (int s, int cmd, int options);
+#define F_SETFL 4
+#define O_NDELAY 04000
+
/* we are providing a real h_errno variable */
#undef h_errno
extern int h_errno;