[gedit] Use specific check for sigaction.



commit fbfc5d694be9c453a051c7218996f5af6d985551
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sun Nov 22 12:34:53 2009 +0100

    Use specific check for sigaction.

 configure.ac                                       |    1 +
 plugin-loaders/python/gedit-plugin-loader-python.c |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4f47a1f..56c5f21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,7 @@ AC_PROG_OBJC
 AC_SYS_LARGEFILE
 
 AC_CHECK_FUNCS(fsync)
+AC_CHECK_FUNC(sigaction)
 
 dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
diff --git a/plugin-loaders/python/gedit-plugin-loader-python.c b/plugin-loaders/python/gedit-plugin-loader-python.c
index e02c12e..49af579 100644
--- a/plugin-loaders/python/gedit-plugin-loader-python.c
+++ b/plugin-loaders/python/gedit-plugin-loader-python.c
@@ -487,7 +487,7 @@ gedit_python_init (GeditPluginLoaderPython *loader)
 	PyObject *gedit, *geditutils, *geditcommands, *geditplugins;
 	PyObject *gettext, *install, *gettext_args;
 	char *argv[] = { "gedit", NULL };
-#ifndef G_OS_WIN32
+#ifdef HAVE_SIGACTION
 	gint res;
 	struct sigaction old_sigint;
 #endif
@@ -516,7 +516,7 @@ gedit_python_init (GeditPluginLoaderPython *loader)
 	/* CHECK: can't we use Py_InitializeEx instead of Py_Initialize in order
           to avoid to manage signal handlers ? - Paolo (Dec. 31, 2006) */
 
-#ifndef G_OS_WIN32
+#ifdef HAVE_SIGACTION
 	/* Save old handler */
 	res = sigaction (SIGINT, NULL, &old_sigint);  
 	if (res != 0)
@@ -532,7 +532,7 @@ gedit_python_init (GeditPluginLoaderPython *loader)
 	/* Python initialization */
 	Py_Initialize ();
 
-#ifndef G_OS_WIN32
+#ifdef HAVE_SIGACTION
 	/* Restore old handler */
 	res = sigaction (SIGINT, &old_sigint, NULL);
 	if (res != 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]