Commit 1dc317d49e3aa849f6c93100fffeb6ca86f8b5e8
1 parent
c8ca0c4c
Exists in
master
and in
3 other branches
Fixing windows executable format.
Showing
2 changed files
with
19 additions
and
7 deletions
Show diff stats
configure.ac
... | ... | @@ -206,7 +206,13 @@ AC_ARG_ENABLE([pie], |
206 | 206 | [ |
207 | 207 | app_cv_pie="$enableval" |
208 | 208 | ],[ |
209 | - app_cv_pie="yes" | |
209 | + | |
210 | + if test "$app_cv_osname" == "linux"; then | |
211 | + app_cv_pie="yes" | |
212 | + else | |
213 | + app_cv_pie="no" | |
214 | + fi | |
215 | + | |
210 | 216 | ]) |
211 | 217 | |
212 | 218 | if test "$app_cv_pie" == "yes"; then | ... | ... |
src/main/main.c
... | ... | @@ -71,13 +71,17 @@ static gboolean quit_signal(GtkApplication *app) { |
71 | 71 | #endif // G_OS_UNIX |
72 | 72 | |
73 | 73 | static void g_log_to_lib3270(const gchar *log_domain,GLogLevelFlags G_GNUC_UNUSED(log_level),const gchar *message,gpointer G_GNUC_UNUSED(user_data)) { |
74 | + debug("%s",message); | |
74 | 75 | lib3270_write_log(NULL,log_domain ? log_domain : G_STRINGIFY(PRODUCT_NAME),"%s",message); |
75 | 76 | } |
76 | 77 | |
77 | 78 | int main (int argc, char **argv) { |
78 | 79 | |
80 | + int status = -1; | |
81 | + | |
82 | + debug("Process %s running on pid %u\n",argv[0],(unsigned int) GetCurrentProcessId()); | |
83 | + | |
79 | 84 | GtkApplication *app; |
80 | - int status; | |
81 | 85 | |
82 | 86 | // Setup locale |
83 | 87 | #ifdef LC_ALL |
... | ... | @@ -92,24 +96,26 @@ int main (int argc, char **argv) { |
92 | 96 | } |
93 | 97 | #endif // _WIN32 |
94 | 98 | |
99 | +#ifndef DEBUG | |
95 | 100 | g_log_set_default_handler(g_log_to_lib3270,NULL); |
101 | +#endif // !DEBUG | |
96 | 102 | |
97 | 103 | bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); |
98 | 104 | textdomain(PACKAGE_NAME); |
99 | 105 | |
106 | +#ifdef G_OS_UNIX | |
107 | + g_unix_signal_add(SIGTERM, (GSourceFunc) quit_signal, app); | |
108 | +#endif // G_OS_UNIX | |
109 | + | |
100 | 110 | // Setup and start application. |
101 | 111 | |
102 | 112 | g_set_application_name(G_STRINGIFY(PRODUCT_NAME)); |
103 | 113 | app = pw3270_application_new("br.com.bb." G_STRINGIFY(PRODUCT_NAME),G_APPLICATION_HANDLES_OPEN); |
104 | 114 | |
105 | -#ifdef G_OS_UNIX | |
106 | - // Termination | |
107 | - g_unix_signal_add(SIGTERM, (GSourceFunc) quit_signal, app); | |
108 | -#endif // G_OS_UNIX | |
109 | - | |
110 | 115 | status = g_application_run(G_APPLICATION (app), argc, argv); |
111 | 116 | g_object_unref (app); |
112 | 117 | |
118 | + debug("%s ends with RC=%d",__FUNCTION__,status); | |
113 | 119 | return status; |
114 | 120 | |
115 | 121 | } | ... | ... |