]> sjero.net Git - wget/blobdiff - src/mswindows.h
mass change: update copyright years.
[wget] / src / mswindows.h
index 8fe9a3446ecdfefeaafccd2dfca412972dc03607..b042189249115b40491a5550f39ad07e59076a75 100644 (file)
@@ -1,6 +1,7 @@
 /* Declarations for windows
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+   Inc.
 
 This file is part of GNU Wget.
 
@@ -42,15 +43,8 @@ as that of the covered work.  */
 
 #include <windows.h>
 
-/* We need winsock2.h for IPv6 and ws2tcpip.h for getaddrinfo, so
-  include both in ENABLE_IPV6 case.  (ws2tcpip.h includes winsock2.h
-  only on MinGW.) */
-#ifdef ENABLE_IPV6
-# include <winsock2.h>
-# include <ws2tcpip.h>
-#else
-# include <winsock.h>
-#endif
+#include <winsock2.h>
+#include <ws2tcpip.h>
 
 #ifndef EAI_SYSTEM
 # define EAI_SYSTEM -1   /* value doesn't matter */
@@ -78,6 +72,8 @@ as that of the covered work.  */
 # define strncasecmp strnicmp
 #endif
 
+#include <stdio.h>
+
 /* The same for snprintf() and vsnprintf().  */
 #define snprintf _snprintf
 #define vsnprintf _vsnprintf
@@ -123,85 +119,8 @@ const char *inet_ntop (int, const void *, char *, socklen_t);
 
 #ifdef NEED_GAI_STRERROR
 # undef gai_strerror
-# define gai_strerror windows_strerror
-#endif
-
-#ifndef INHIBIT_WRAP
-
-/* Winsock functions don't set errno, so we provide wrappers that do. */
-
-#define socket wrapped_socket
-#define bind wrapped_bind
-#define connect wrapped_connect
-#define listen wrapped_listen
-#define accept wrapped_accept
-#define recv wrapped_recv
-#define send wrapped_send
-#define select wrapped_select
-#define getsockname wrapped_getsockname
-#define getpeername wrapped_getpeername
-#define setsockopt wrapped_setsockopt
-#define closesocket wrapped_closesocket
-
-#endif /* not INHIBIT_WRAP */
-
-int wrapped_socket (int, int, int);
-int wrapped_bind (int, struct sockaddr *, int);
-int wrapped_connect (int, const struct sockaddr *, int);
-int wrapped_listen (int s, int backlog);
-int wrapped_accept (int s, struct sockaddr *a, int *alen);
-int wrapped_recv (int, void *, int, int);
-int wrapped_send (int, const void *, int, int);
-int wrapped_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *);
-int wrapped_getsockname (int, struct sockaddr *, int *);
-int wrapped_getpeername (int, struct sockaddr *, int *);
-int wrapped_setsockopt (int, int, int, const void *, int);
-int wrapped_closesocket (int);
-
-/* Finally, provide a private version of strerror that does the
-   right thing with Winsock errors. */
-#ifndef INHIBIT_WRAP
-# define strerror windows_strerror
+# define gai_strerror strerror
 #endif
-const char *windows_strerror (int);
-
-/* Declarations of various socket errors:  */
-
-#define EWOULDBLOCK             WSAEWOULDBLOCK
-#define EINPROGRESS             WSAEINPROGRESS
-#define EALREADY                WSAEALREADY
-#define ENOTSOCK                WSAENOTSOCK
-#define EDESTADDRREQ            WSAEDESTADDRREQ
-#define EMSGSIZE                WSAEMSGSIZE
-#define EPROTOTYPE              WSAEPROTOTYPE
-#define ENOPROTOOPT             WSAENOPROTOOPT
-#define EPROTONOSUPPORT         WSAEPROTONOSUPPORT
-#define ESOCKTNOSUPPORT         WSAESOCKTNOSUPPORT
-#define EOPNOTSUPP              WSAEOPNOTSUPP
-#define EPFNOSUPPORT            WSAEPFNOSUPPORT
-#define EAFNOSUPPORT            WSAEAFNOSUPPORT
-#define EADDRINUSE              WSAEADDRINUSE
-#define EADDRNOTAVAIL           WSAEADDRNOTAVAIL
-#define ENETDOWN                WSAENETDOWN
-#define ENETUNREACH             WSAENETUNREACH
-#define ENETRESET               WSAENETRESET
-#define ECONNABORTED            WSAECONNABORTED
-#define ECONNRESET              WSAECONNRESET
-#define ENOBUFS                 WSAENOBUFS
-#define EISCONN                 WSAEISCONN
-#define ENOTCONN                WSAENOTCONN
-#define ESHUTDOWN               WSAESHUTDOWN
-#define ETOOMANYREFS            WSAETOOMANYREFS
-#define ETIMEDOUT               WSAETIMEDOUT
-#define ECONNREFUSED            WSAECONNREFUSED
-#define ELOOP                   WSAELOOP
-#define EHOSTDOWN               WSAEHOSTDOWN
-#define EHOSTUNREACH            WSAEHOSTUNREACH
-#define EPROCLIM                WSAEPROCLIM
-#define EUSERS                  WSAEUSERS
-#define EDQUOT                  WSAEDQUOT
-#define ESTALE                  WSAESTALE
-#define EREMOTE                 WSAEREMOTE
 
 /* Public functions.  */
 
@@ -209,6 +128,6 @@ void ws_startup (void);
 void ws_changetitle (const char *);
 void ws_percenttitle (double);
 char *ws_mypath (void);
-void windows_main (int *, char **, char **);
+void windows_main (char **);
 
 #endif /* MSWINDOWS_H */