Commit 0912371bf0a938a02e0120ed0a1f981a5e2adfb1
1 parent
8363ad93
Exists in
master
and in
5 other branches
Corrigindo problemas encontrados ao compilar para windows depois da última atualização do MinGW
Showing
14 changed files
with
74 additions
and
5 deletions
Show diff stats
src/include/lib3270/session.h
@@ -31,7 +31,14 @@ | @@ -31,7 +31,14 @@ | ||
31 | 31 | ||
32 | #define LIB3270_SESSION_H_INCLUDED 1 | 32 | #define LIB3270_SESSION_H_INCLUDED 1 |
33 | 33 | ||
34 | - #include <sys/socket.h> | 34 | + #ifdef WIN32 |
35 | + #include <winsock2.h> | ||
36 | + #include <windows.h> | ||
37 | + #include <ws2tcpip.h> | ||
38 | + #else | ||
39 | + #include <sys/socket.h> | ||
40 | + #endif // WIN32 | ||
41 | + | ||
35 | #include <lib3270/popup.h> | 42 | #include <lib3270/popup.h> |
36 | 43 | ||
37 | struct lib3270_session_callbacks | 44 | struct lib3270_session_callbacks |
src/lib3270/api.h
@@ -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 |
src/lib3270/ft.c
@@ -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> |
src/lib3270/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 |
src/lib3270/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" |
src/lib3270/log.c
@@ -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> |
src/lib3270/macros.c
src/lib3270/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 */ |
src/lib3270/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 |
src/pw3270/v3270/draw.c
@@ -27,6 +27,12 @@ | @@ -27,6 +27,12 @@ | ||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | +#ifdef WIN32 | ||
31 | + #include <winsock2.h> | ||
32 | + #include <windows.h> | ||
33 | + #include <ws2tcpip.h> | ||
34 | +#endif // WIN32 | ||
35 | + | ||
30 | #include <gtk/gtk.h> | 36 | #include <gtk/gtk.h> |
31 | #include <math.h> | 37 | #include <math.h> |
32 | #include <pw3270.h> | 38 | #include <pw3270.h> |
src/pw3270/v3270/mouse.c
@@ -98,7 +98,7 @@ static void button_1_press(GtkWidget *widget, GdkEventType type, int baddr) | @@ -98,7 +98,7 @@ static void button_1_press(GtkWidget *widget, GdkEventType type, int baddr) | ||
98 | break; | 98 | break; |
99 | 99 | ||
100 | case GDK_2BUTTON_PRESS: // Double click - Select word | 100 | case GDK_2BUTTON_PRESS: // Double click - Select word |
101 | - if(lib3270_select_word_at(GTK_V3270(widget)->host,baddr)); | 101 | + if(lib3270_select_word_at(GTK_V3270(widget)->host,baddr)) |
102 | lib3270_ring_bell(GTK_V3270(widget)->host); | 102 | lib3270_ring_bell(GTK_V3270(widget)->host); |
103 | break; | 103 | break; |
104 | 104 |
src/pw3270/v3270/oia.c
@@ -27,6 +27,12 @@ | @@ -27,6 +27,12 @@ | ||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | +#ifdef WIN32 | ||
31 | + #include <winsock2.h> | ||
32 | + #include <windows.h> | ||
33 | + #include <ws2tcpip.h> | ||
34 | +#endif // WIN32 | ||
35 | + | ||
30 | #include <pw3270.h> | 36 | #include <pw3270.h> |
31 | #include <lib3270.h> | 37 | #include <lib3270.h> |
32 | #include <lib3270/session.h> | 38 | #include <lib3270/session.h> |
src/pw3270/v3270/properties.c
@@ -27,6 +27,12 @@ | @@ -27,6 +27,12 @@ | ||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | +#ifdef WIN32 | ||
31 | + #include <winsock2.h> | ||
32 | + #include <windows.h> | ||
33 | + #include <ws2tcpip.h> | ||
34 | +#endif // WIN32 | ||
35 | + | ||
30 | #include <gtk/gtk.h> | 36 | #include <gtk/gtk.h> |
31 | #include <lib3270.h> | 37 | #include <lib3270.h> |
32 | #include <lib3270/session.h> | 38 | #include <lib3270/session.h> |
src/pw3270/v3270/widget.c
@@ -27,6 +27,12 @@ | @@ -27,6 +27,12 @@ | ||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | +#ifdef WIN32 | ||
31 | + #include <winsock2.h> | ||
32 | + #include <windows.h> | ||
33 | + #include <ws2tcpip.h> | ||
34 | +#endif // WIN32 | ||
35 | + | ||
30 | #include <gtk/gtk.h> | 36 | #include <gtk/gtk.h> |
31 | #include <pw3270.h> | 37 | #include <pw3270.h> |
32 | #include <lib3270.h> | 38 | #include <lib3270.h> |
@@ -336,7 +342,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -336,7 +342,7 @@ static void v3270_class_init(v3270Class *klass) | ||
336 | #ifdef WIN32 | 342 | #ifdef WIN32 |
337 | // http://git.gnome.org/browse/gtk+/tree/gdk/win32/gdkcursor-win32.c | 343 | // http://git.gnome.org/browse/gtk+/tree/gdk/win32/gdkcursor-win32.c |
338 | // http://www.functionx.com/win32/Lesson02b.htm | 344 | // http://www.functionx.com/win32/Lesson02b.htm |
339 | - static const gchar * cr[V3270_CURSOR_COUNT] = | 345 | + static const gchar * cr[LIB3270_POINTER_COUNT] = |
340 | { | 346 | { |
341 | "ibeam", // V3270_CURSOR_UNPROTECTED | 347 | "ibeam", // V3270_CURSOR_UNPROTECTED |
342 | "wait", // V3270_CURSOR_WAITING | 348 | "wait", // V3270_CURSOR_WAITING |