From 2427e28358c1dfbe837b5b6430bb664a6e746d81 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Thu, 10 May 2012 02:45:33 +0000 Subject: [PATCH] Correcoes para compilacao no mingw64 --- src/lib3270/XtGlue.c | 2 +- src/lib3270/telnet.c | 4 ++-- src/lib3270/util.c | 2 +- src/pw3270/common/config.c | 4 ++-- src/pw3270/v3270/accessible.c | 5 +++++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/lib3270/XtGlue.c b/src/lib3270/XtGlue.c index 028d4d5..9cc1e7c 100644 --- a/src/lib3270/XtGlue.c +++ b/src/lib3270/XtGlue.c @@ -55,8 +55,8 @@ #if defined(_WIN32) /*[*/ - #include #include + #include #include #else /*][*/ diff --git a/src/lib3270/telnet.c b/src/lib3270/telnet.c index a9e5416..2397e8b 100644 --- a/src/lib3270/telnet.c +++ b/src/lib3270/telnet.c @@ -656,9 +656,9 @@ int net_connect(H3270 *session, const char *host, char *portname, Boolean ls, Bo case SE_EINPROGRESS: *pending = True; trace_dsn("Connection pending.\n"); -// #if !defined(_WIN32) +#if !defined(_WIN32) output_id = AddOutput(session->sock, session, output_possible); -// #endif +#endif break; default: diff --git a/src/lib3270/util.c b/src/lib3270/util.c index 788f6c3..791bfda 100644 --- a/src/lib3270/util.c +++ b/src/lib3270/util.c @@ -76,7 +76,7 @@ int get_version_info(void) info.dwOSVersionInfoSize = sizeof(info); if(GetVersionEx(&info) == 0) { - lib3270_write_log("lib3270","%s","Can't get Windows version"); + lib3270_write_log(NULL,"lib3270","%s","Can't get Windows version"); return -1; } diff --git a/src/pw3270/common/config.c b/src/pw3270/common/config.c index fd60a61..150a87d 100644 --- a/src/pw3270/common/config.c +++ b/src/pw3270/common/config.c @@ -489,7 +489,7 @@ void set_integer_to_config(const gchar *group, const gchar *key, gint val) if(rc != ERROR_SUCCESS) { - gchar *msg = get_last_error_msg(); + gchar *msg = g_win32_error_message(GetLastError()); g_warning("Error \"%s\" when setting key HKCU\\%s\\%s",msg,path,key); g_free(msg); } @@ -497,7 +497,7 @@ void set_integer_to_config(const gchar *group, const gchar *key, gint val) } else { - gchar *msg = get_last_error_msg(); + gchar *msg = g_win32_error_message(GetLastError()); g_warning("Error \"%s\" when creating key HKCU\\%s",msg,path); g_free(msg); } diff --git a/src/pw3270/v3270/accessible.c b/src/pw3270/v3270/accessible.c index 7ab3d4c..85316a8 100644 --- a/src/pw3270/v3270/accessible.c +++ b/src/pw3270/v3270/accessible.c @@ -727,8 +727,13 @@ static void v3270_accessible_get_size(AtkComponent *component,gint *width, gint if (widget == NULL) return; +#if GTK_CHECK_VERSION(3,0,0) *width = gtk_widget_get_allocated_width (widget); *height = gtk_widget_get_allocated_height (widget); +#else + *width = widget->allocation.width; + *height = widget->allocation.height; +#endif // GTK(3,0,0) } static gboolean v3270_accessible_grab_focus(AtkComponent *component) -- libgit2 0.21.2