"message.")); \
}
+#ifdef G_OS_WIN32
+#define INVALID_PID INVALID_HANDLE_VALUE
+#else
+#define INVALID_PID -1
+#endif
+
static GdkColor default_header_bgcolor = {
(gulong)0,
(gushort)0,
compose->sig_str = NULL;
compose->exteditor_file = NULL;
- compose->exteditor_pid = -1;
+ compose->exteditor_pid = INVALID_PID;
compose->exteditor_tag = -1;
compose->exteditor_socket = NULL;
compose->draft_timeout_tag = COMPOSE_DRAFT_TIMEOUT_FORBIDDEN; /* inhibit auto-drafting while loading */
g_free(compose->exteditor_file);
compose->exteditor_file = NULL;
- compose->exteditor_pid = -1;
+ compose->exteditor_pid = INVALID_PID;
compose->exteditor_tag = -1;
if (compose->exteditor_socket) {
gtk_widget_destroy(compose->exteditor_socket);
msg = g_strdup_printf
(_("The external editor is still working.\n"
"Force terminating the process?\n"
- "process id: %d"), pid);
+ "process id: %" G_PID_FORMAT), pid);
val = alertpanel_full(_("Notice"), msg, GTK_STOCK_NO,
GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST,
FALSE, NULL, ALERT_WARNING);
waitpid(compose->exteditor_pid, NULL, 0);
#endif /* G_OS_WIN32 */
- g_warning("terminated process id: %d, "
+ g_warning("terminated process id: %" G_PID_FORMAT ", "
"temporary file: %s", pid, compose->exteditor_file);
g_spawn_close_pid(compose->exteditor_pid);
g_free(compose->exteditor_file);
compose->exteditor_file = NULL;
- compose->exteditor_pid = -1;
+ compose->exteditor_pid = INVALID_PID;
compose->exteditor_tag = -1;
} else
return FALSE;