1 /* Declarations for windows
2 Copyright (C) 1995, 1997, 1997, 1998 Free Software Foundation, Inc.
4 This file is part of Wget.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24 # define S_ISDIR(m) (((m) & (_S_IFMT)) == (_S_IFDIR))
30 /* We have strcasecmp and strncasecmp, just under a different name. */
31 #define strcasecmp stricmp
32 #define strncasecmp strnicmp
34 /* No stat on Windows. */
37 #define PATH_SEPARATOR '\\'
39 /* Microsoft says stat is _stat, Borland doesn't */
44 #define REALCLOSE(x) closesocket (x)
46 /* read & write don't work with sockets on Windows 95. */
47 #define READ(fd, buf, cnt) recv ((fd), (buf), (cnt), 0)
48 #define WRITE(fd, buf, cnt) send ((fd), (buf), (cnt), 0)
50 /* #### Do we need this? */
53 /* Windows compilers accept only one arg to mkdir. */
55 # define mkdir(a, b) _mkdir(a)
56 #else /* __BORLANDC__ */
57 # define mkdir(a, b) mkdir(a)
58 #endif /* __BORLANDC__ */
62 /* Declarations of various socket errors: */
64 #define EWOULDBLOCK WSAEWOULDBLOCK
65 #define EINPROGRESS WSAEINPROGRESS
66 #define EALREADY WSAEALREADY
67 #define ENOTSOCK WSAENOTSOCK
68 #define EDESTADDRREQ WSAEDESTADDRREQ
69 #define EMSGSIZE WSAEMSGSIZE
70 #define EPROTOTYPE WSAEPROTOTYPE
71 #define ENOPROTOOPT WSAENOPROTOOPT
72 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
73 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
74 #define EOPNOTSUPP WSAEOPNOTSUPP
75 #define EPFNOSUPPORT WSAEPFNOSUPPORT
76 #define EAFNOSUPPORT WSAEAFNOSUPPORT
77 #define EADDRINUSE WSAEADDRINUSE
78 #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
79 #define ENETDOWN WSAENETDOWN
80 #define ENETUNREACH WSAENETUNREACH
81 #define ENETRESET WSAENETRESET
82 #define ECONNABORTED WSAECONNABORTED
83 #define ECONNRESET WSAECONNRESET
84 #define ENOBUFS WSAENOBUFS
85 #define EISCONN WSAEISCONN
86 #define ENOTCONN WSAENOTCONN
87 #define ESHUTDOWN WSAESHUTDOWN
88 #define ETOOMANYREFS WSAETOOMANYREFS
89 #define ETIMEDOUT WSAETIMEDOUT
90 #define ECONNREFUSED WSAECONNREFUSED
91 #define ELOOP WSAELOOP
92 #define EHOSTDOWN WSAEHOSTDOWN
93 #define EHOSTUNREACH WSAEHOSTUNREACH
94 #define EPROCLIM WSAEPROCLIM
95 #define EUSERS WSAEUSERS
96 #define EDQUOT WSAEDQUOT
97 #define ESTALE WSAESTALE
98 #define EREMOTE WSAEREMOTE
100 /* Public functions. */
102 unsigned int sleep (unsigned);
103 void ws_startup (void);
104 void ws_changetitle (char*, int);
105 char *ws_mypath (void);
106 void ws_help (const char *);
107 void windows_main_junk (int *, char **, char **);
109 #endif /* MSWINDOWS_H */