# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1210581026 0 # Node ID 32bd922619ad973a516f481acd89a12e57354665 # Parent 2143d86d5d7c1bbd8f514824d88f7516c0e8c1c6 (FORWARD_SIGNAL_TO_MAIN_THREAD): New define. (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD. diff -r 2143d86d5d7c -r 32bd922619ad src/syssignal.h --- a/src/syssignal.h Mon May 12 08:30:13 2008 +0000 +++ b/src/syssignal.h Mon May 12 08:30:26 2008 +0000 @@ -21,8 +21,14 @@ extern void init_signals P_ ((void)); -#ifdef HAVE_GTK_AND_PTHREAD +#if defined (HAVE_GTK_AND_PTHREAD) || (defined (HAVE_CARBON) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020) #include +/* If defined, asynchronous signals delivered to a non-main thread are + forwarded to the main thread. */ +#define FORWARD_SIGNAL_TO_MAIN_THREAD +#endif + +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD extern pthread_t main_thread; #endif @@ -207,7 +213,7 @@ char *strsignal (); #endif -#ifdef HAVE_GTK_AND_PTHREAD +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD #define SIGNAL_THREAD_CHECK(signo) \ do { \ if (!pthread_equal (pthread_self (), main_thread)) \ @@ -226,8 +232,8 @@ } \ } while (0) -#else /* not HAVE_GTK_AND_PTHREAD */ +#else /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ #define SIGNAL_THREAD_CHECK(signo) -#endif /* not HAVE_GTK_AND_PTHREAD */ +#endif /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 (do not change this comment) */