-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* Workable version of <sys/socket.h> based on winsock.h */
#define timeval ws_timeval
#endif
-#include <winsock.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+/* process.c uses uint16_t (from C99) for IPv6, but
+ apparently it is not defined in some versions of mingw and msvc. */
+#ifndef UINT16_C
+typedef unsigned short uint16_t;
+#endif
/* redefine select to reference our version */
#ifdef MUST_REDEF_SELECT
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_setsockopt (int s, int level, int oname, const void * oval, int olen);
int sys_listen (int s, int backlog);
int sys_getsockname (int s, struct sockaddr * name, int * namelen);
int sys_accept (int s, struct sockaddr *addr, int *addrlen);