Commit 2427e28358c1dfbe837b5b6430bb664a6e746d81

Authored by perry.werneck@gmail.com
1 parent 9921a408

Correcoes para compilacao no mingw64

src/lib3270/XtGlue.c
@@ -55,8 +55,8 @@ @@ -55,8 +55,8 @@
55 55
56 #if defined(_WIN32) /*[*/ 56 #if defined(_WIN32) /*[*/
57 57
58 - #include <windows.h>  
59 #include <winsock2.h> 58 #include <winsock2.h>
  59 + #include <windows.h>
60 #include <ws2tcpip.h> 60 #include <ws2tcpip.h>
61 61
62 #else /*][*/ 62 #else /*][*/
src/lib3270/telnet.c
@@ -656,9 +656,9 @@ int net_connect(H3270 *session, const char *host, char *portname, Boolean ls, Bo @@ -656,9 +656,9 @@ int net_connect(H3270 *session, const char *host, char *portname, Boolean ls, Bo
656 case SE_EINPROGRESS: 656 case SE_EINPROGRESS:
657 *pending = True; 657 *pending = True;
658 trace_dsn("Connection pending.\n"); 658 trace_dsn("Connection pending.\n");
659 -// #if !defined(_WIN32) 659 +#if !defined(_WIN32)
660 output_id = AddOutput(session->sock, session, output_possible); 660 output_id = AddOutput(session->sock, session, output_possible);
661 -// #endif 661 +#endif
662 break; 662 break;
663 663
664 default: 664 default:
src/lib3270/util.c
@@ -76,7 +76,7 @@ int get_version_info(void) @@ -76,7 +76,7 @@ int get_version_info(void)
76 info.dwOSVersionInfoSize = sizeof(info); 76 info.dwOSVersionInfoSize = sizeof(info);
77 if(GetVersionEx(&info) == 0) 77 if(GetVersionEx(&info) == 0)
78 { 78 {
79 - lib3270_write_log("lib3270","%s","Can't get Windows version"); 79 + lib3270_write_log(NULL,"lib3270","%s","Can't get Windows version");
80 return -1; 80 return -1;
81 } 81 }
82 82
src/pw3270/common/config.c
@@ -489,7 +489,7 @@ void set_integer_to_config(const gchar *group, const gchar *key, gint val) @@ -489,7 +489,7 @@ void set_integer_to_config(const gchar *group, const gchar *key, gint val)
489 489
490 if(rc != ERROR_SUCCESS) 490 if(rc != ERROR_SUCCESS)
491 { 491 {
492 - gchar *msg = get_last_error_msg(); 492 + gchar *msg = g_win32_error_message(GetLastError());
493 g_warning("Error \"%s\" when setting key HKCU\\%s\\%s",msg,path,key); 493 g_warning("Error \"%s\" when setting key HKCU\\%s\\%s",msg,path,key);
494 g_free(msg); 494 g_free(msg);
495 } 495 }
@@ -497,7 +497,7 @@ void set_integer_to_config(const gchar *group, const gchar *key, gint val) @@ -497,7 +497,7 @@ void set_integer_to_config(const gchar *group, const gchar *key, gint val)
497 } 497 }
498 else 498 else
499 { 499 {
500 - gchar *msg = get_last_error_msg(); 500 + gchar *msg = g_win32_error_message(GetLastError());
501 g_warning("Error \"%s\" when creating key HKCU\\%s",msg,path); 501 g_warning("Error \"%s\" when creating key HKCU\\%s",msg,path);
502 g_free(msg); 502 g_free(msg);
503 } 503 }
src/pw3270/v3270/accessible.c
@@ -727,8 +727,13 @@ static void v3270_accessible_get_size(AtkComponent *component,gint *width, gint @@ -727,8 +727,13 @@ static void v3270_accessible_get_size(AtkComponent *component,gint *width, gint
727 if (widget == NULL) 727 if (widget == NULL)
728 return; 728 return;
729 729
  730 +#if GTK_CHECK_VERSION(3,0,0)
730 *width = gtk_widget_get_allocated_width (widget); 731 *width = gtk_widget_get_allocated_width (widget);
731 *height = gtk_widget_get_allocated_height (widget); 732 *height = gtk_widget_get_allocated_height (widget);
  733 +#else
  734 + *width = widget->allocation.width;
  735 + *height = widget->allocation.height;
  736 +#endif // GTK(3,0,0)
732 } 737 }
733 738
734 static gboolean v3270_accessible_grab_focus(AtkComponent *component) 739 static gboolean v3270_accessible_grab_focus(AtkComponent *component)