Commit 5a2739812dc545d064abc318b401d32ed76e822a
1 parent
fef61d68
Exists in
master
and in
3 other branches
Corrigindo problemas encontrados ao compilar para windows depois da última atualização do MinGW
Showing
8 changed files
with
40 additions
and
2 deletions
Show diff stats
| @@ -32,6 +32,11 @@ | @@ -32,6 +32,11 @@ | ||
| 32 | 32 | ||
| 33 | #ifndef LIB3270_API_INCLUDED | 33 | #ifndef LIB3270_API_INCLUDED |
| 34 | 34 | ||
| 35 | +#ifdef WIN32 | ||
| 36 | + #include <winsock2.h> | ||
| 37 | + #include <windows.h> | ||
| 38 | +#endif // WIN32 | ||
| 39 | + | ||
| 35 | #ifdef __cplusplus | 40 | #ifdef __cplusplus |
| 36 | extern "C" { | 41 | extern "C" { |
| 37 | #endif | 42 | #endif |
| @@ -29,6 +29,11 @@ | @@ -29,6 +29,11 @@ | ||
| 29 | * | 29 | * |
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | +#ifdef WIN32 | ||
| 33 | + #include <winsock2.h> | ||
| 34 | + #include <windows.h> | ||
| 35 | +#endif // WIN32 | ||
| 36 | + | ||
| 32 | #include <lib3270/config.h> | 37 | #include <lib3270/config.h> |
| 33 | #include <lib3270.h> | 38 | #include <lib3270.h> |
| 34 | #include <lib3270/filetransfer.h> | 39 | #include <lib3270/filetransfer.h> |
ft_dft.c
| @@ -34,6 +34,11 @@ | @@ -34,6 +34,11 @@ | ||
| 34 | * File transfer: DFT-style data processing functions | 34 | * File transfer: DFT-style data processing functions |
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | +#ifdef WIN32 | ||
| 38 | + #include <winsock2.h> | ||
| 39 | + #include <windows.h> | ||
| 40 | +#endif // WIN32 | ||
| 41 | + | ||
| 37 | #include <lib3270.h> | 42 | #include <lib3270.h> |
| 38 | #include "private.h" | 43 | #include "private.h" |
| 39 | 44 |
html.c
| @@ -25,12 +25,16 @@ | @@ -25,12 +25,16 @@ | ||
| 25 | * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | 25 | * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) |
| 26 | * | 26 | * |
| 27 | */ | 27 | */ |
| 28 | +#ifdef WIN32 | ||
| 29 | + #include <winsock2.h> | ||
| 30 | + #include <windows.h> | ||
| 31 | +#endif // WIN32 | ||
| 28 | 32 | ||
| 29 | #include <string.h> | 33 | #include <string.h> |
| 30 | #include <stdlib.h> | 34 | #include <stdlib.h> |
| 31 | #include <lib3270.h> | 35 | #include <lib3270.h> |
| 32 | #include <lib3270/session.h> | 36 | #include <lib3270/session.h> |
| 33 | -#include "3270ds.h" | 37 | + #include "3270ds.h" |
| 34 | #include <lib3270/html.h> | 38 | #include <lib3270/html.h> |
| 35 | 39 | ||
| 36 | #include "private.h" | 40 | #include "private.h" |
| @@ -30,6 +30,11 @@ | @@ -30,6 +30,11 @@ | ||
| 30 | * | 30 | * |
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | +#ifdef WIN32 | ||
| 34 | + #include <winsock2.h> | ||
| 35 | + #include <windows.h> | ||
| 36 | +#endif // WIN32 | ||
| 37 | + | ||
| 33 | #include <stdio.h> | 38 | #include <stdio.h> |
| 34 | #include <stdarg.h> | 39 | #include <stdarg.h> |
| 35 | #include <lib3270/config.h> | 40 | #include <lib3270/config.h> |
macros.c
private.h
| @@ -27,6 +27,11 @@ | @@ -27,6 +27,11 @@ | ||
| 27 | * | 27 | * |
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | +#ifdef WIN32 | ||
| 31 | + #include <winsock2.h> | ||
| 32 | + #include <windows.h> | ||
| 33 | +#endif // WIN32 | ||
| 34 | + | ||
| 30 | /* Autoconf settings. */ | 35 | /* Autoconf settings. */ |
| 31 | #include <lib3270/config.h> /* autoconf settings */ | 36 | #include <lib3270/config.h> /* autoconf settings */ |
| 32 | #include <lib3270.h> /* lib3270 API calls and defs */ | 37 | #include <lib3270.h> /* lib3270 API calls and defs */ |
toggles.c
| @@ -39,7 +39,11 @@ | @@ -39,7 +39,11 @@ | ||
| 39 | #include <errno.h> | 39 | #include <errno.h> |
| 40 | #include <sys/types.h> | 40 | #include <sys/types.h> |
| 41 | 41 | ||
| 42 | -#ifndef WIN32 | 42 | +#ifdef WIN32 |
| 43 | + #include <winsock2.h> | ||
| 44 | + #include <windows.h> | ||
| 45 | + #include <ws2tcpip.h> | ||
| 46 | +#else | ||
| 43 | #include <sys/socket.h> | 47 | #include <sys/socket.h> |
| 44 | #endif // !WIN32 | 48 | #endif // !WIN32 |
| 45 | 49 |