| 1 |
/* Declarations for windows |
| 2 |
Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, |
| 3 |
Inc. |
| 4 |
|
| 5 |
This file is part of GNU Wget. |
| 6 |
|
| 7 |
GNU Wget is free software; you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License as published by |
| 9 |
the Free Software Foundation; either version 3 of the License, or |
| 10 |
(at your option) any later version. |
| 11 |
|
| 12 |
GNU Wget is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with Wget. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
Additional permission under GNU GPL version 3 section 7 |
| 21 |
|
| 22 |
If you modify this program, or any covered work, by linking or |
| 23 |
combining it with the OpenSSL project's OpenSSL library (or a |
| 24 |
modified version of that library), containing parts covered by the |
| 25 |
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation |
| 26 |
grants you additional permission to convey the resulting work. |
| 27 |
Corresponding Source for a non-source form of such a combination |
| 28 |
shall include the source code for the parts of OpenSSL used as well |
| 29 |
as that of the covered work. */ |
| 30 |
|
| 31 |
#ifndef MSWINDOWS_H |
| 32 |
#define MSWINDOWS_H |
| 33 |
|
| 34 |
#ifndef WGET_H |
| 35 |
# error This file should not be included directly. |
| 36 |
#endif |
| 37 |
|
| 38 |
/* Prevent inclusion of <winsock*.h> in <windows.h>. */ |
| 39 |
#ifndef WIN32_LEAN_AND_MEAN |
| 40 |
# define WIN32_LEAN_AND_MEAN |
| 41 |
#endif |
| 42 |
|
| 43 |
#include <windows.h> |
| 44 |
|
| 45 |
#include <winsock2.h> |
| 46 |
#include <ws2tcpip.h> |
| 47 |
|
| 48 |
#ifndef EAI_SYSTEM |
| 49 |
# define EAI_SYSTEM -1 /* value doesn't matter */ |
| 50 |
#endif |
| 51 |
|
| 52 |
/* Declares file access functions, such as open, create, access, and |
| 53 |
chmod. Unix declares these in unistd.h and fcntl.h. */ |
| 54 |
#include <io.h> |
| 55 |
|
| 56 |
/* Declares getpid(). */ |
| 57 |
#include <process.h> |
| 58 |
|
| 59 |
/* Declares inet_ntop() and inet_pton(). */ |
| 60 |
#include <arpa/inet.h> |
| 61 |
|
| 62 |
#include <stdio.h> |
| 63 |
|
| 64 |
#define PATH_SEPARATOR '\\' |
| 65 |
|
| 66 |
/* ioctl needed by set_windows_fd_as_blocking_socket() */ |
| 67 |
#include <sys/ioctl.h> |
| 68 |
|
| 69 |
/* Public functions. */ |
| 70 |
|
| 71 |
void ws_startup (void); |
| 72 |
void ws_changetitle (const char *); |
| 73 |
void ws_percenttitle (double); |
| 74 |
char *ws_mypath (void); |
| 75 |
void windows_main (char **); |
| 76 |
void set_windows_fd_as_blocking_socket (int); |
| 77 |
void set_fd_nonblocking(const int); |
| 78 |
|
| 79 |
#endif /* MSWINDOWS_H */ |