diff options
| author | Miles Bader | 2008-05-14 04:28:51 +0000 |
|---|---|---|
| committer | Miles Bader | 2008-05-14 04:28:51 +0000 |
| commit | ecae6af979abcbb5b45c33ee05ceb297678ec9a0 (patch) | |
| tree | 44e29aca29b1f5bc76cf9f856df0286596cc5184 /src | |
| parent | 131b3b112ad5405132ad5db55e0562b50477a94c (diff) | |
| parent | bb16531656a1daf7deec8a14e3a8a5fdb2c87818 (diff) | |
| download | emacs-ecae6af979abcbb5b45c33ee05ceb297678ec9a0.tar.gz emacs-ecae6af979abcbb5b45c33ee05ceb297678ec9a0.zip | |
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1159
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/emacs.c | 12 | ||||
| -rw-r--r-- | src/syssignal.h | 14 |
3 files changed, 26 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 41f2467664b..ed2059ebd37 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2008-05-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * emacs.c (main_thread): Conditionalize on | ||
| 4 | FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD. | ||
| 5 | (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it. | ||
| 6 | |||
| 7 | * syssignal.h (FORWARD_SIGNAL_TO_MAIN_THREAD): New define. | ||
| 8 | (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on | ||
| 9 | FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD. | ||
| 10 | |||
| 1 | 2008-05-14 Kenichi Handa <handa@m17n.org> | 11 | 2008-05-14 Kenichi Handa <handa@m17n.org> |
| 2 | 12 | ||
| 3 | * coding.c (detect_coding_iso_2022): Ignore a coding category that | 13 | * coding.c (detect_coding_iso_2022): Ignore a coding category that |
diff --git a/src/emacs.c b/src/emacs.c index 7074076cf66..c401afafbd7 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -355,10 +355,10 @@ int fatal_error_in_progress; | |||
| 355 | 355 | ||
| 356 | void (*fatal_error_signal_hook) P_ ((void)); | 356 | void (*fatal_error_signal_hook) P_ ((void)); |
| 357 | 357 | ||
| 358 | #ifdef HAVE_GTK_AND_PTHREAD | 358 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD |
| 359 | /* When compiled with GTK and running under Gnome, multiple threads may be | 359 | /* When compiled with GTK and running under Gnome, or Carbon under Mac |
| 360 | created. Keep track of our main thread to make sure signals are delivered | 360 | OS X, multiple threads may be created. Keep track of our main |
| 361 | to it (see syssignal.h). */ | 361 | thread to make sure signals are delivered to it (see syssignal.h). */ |
| 362 | 362 | ||
| 363 | pthread_t main_thread; | 363 | pthread_t main_thread; |
| 364 | #endif | 364 | #endif |
| @@ -1035,9 +1035,9 @@ main (argc, argv | |||
| 1035 | # endif /* not SYNC_INPUT */ | 1035 | # endif /* not SYNC_INPUT */ |
| 1036 | #endif /* not SYSTEM_MALLOC */ | 1036 | #endif /* not SYSTEM_MALLOC */ |
| 1037 | 1037 | ||
| 1038 | #ifdef HAVE_GTK_AND_PTHREAD | 1038 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD |
| 1039 | main_thread = pthread_self (); | 1039 | main_thread = pthread_self (); |
| 1040 | #endif /* HAVE_GTK_AND_PTHREAD */ | 1040 | #endif /* FORWARD_SIGNAL_TO_MAIN_THREAD */ |
| 1041 | 1041 | ||
| 1042 | #if defined (MSDOS) || defined (WINDOWSNT) | 1042 | #if defined (MSDOS) || defined (WINDOWSNT) |
| 1043 | /* We do all file input/output as binary files. When we need to translate | 1043 | /* We do all file input/output as binary files. When we need to translate |
diff --git a/src/syssignal.h b/src/syssignal.h index 53877ca107d..0ab4598b507 100644 --- a/src/syssignal.h +++ b/src/syssignal.h | |||
| @@ -21,8 +21,14 @@ Boston, MA 02110-1301, USA. */ | |||
| 21 | 21 | ||
| 22 | extern void init_signals P_ ((void)); | 22 | extern void init_signals P_ ((void)); |
| 23 | 23 | ||
| 24 | #ifdef HAVE_GTK_AND_PTHREAD | 24 | #if defined (HAVE_GTK_AND_PTHREAD) || (defined (HAVE_CARBON) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020) |
| 25 | #include <pthread.h> | 25 | #include <pthread.h> |
| 26 | /* If defined, asynchronous signals delivered to a non-main thread are | ||
| 27 | forwarded to the main thread. */ | ||
| 28 | #define FORWARD_SIGNAL_TO_MAIN_THREAD | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD | ||
| 26 | extern pthread_t main_thread; | 32 | extern pthread_t main_thread; |
| 27 | #endif | 33 | #endif |
| 28 | 34 | ||
| @@ -208,7 +214,7 @@ extern SIGMASKTYPE sigprocmask_set; | |||
| 208 | char *strsignal (); | 214 | char *strsignal (); |
| 209 | #endif | 215 | #endif |
| 210 | 216 | ||
| 211 | #ifdef HAVE_GTK_AND_PTHREAD | 217 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD |
| 212 | #define SIGNAL_THREAD_CHECK(signo) \ | 218 | #define SIGNAL_THREAD_CHECK(signo) \ |
| 213 | do { \ | 219 | do { \ |
| 214 | if (!pthread_equal (pthread_self (), main_thread)) \ | 220 | if (!pthread_equal (pthread_self (), main_thread)) \ |
| @@ -227,8 +233,8 @@ char *strsignal (); | |||
| 227 | } \ | 233 | } \ |
| 228 | } while (0) | 234 | } while (0) |
| 229 | 235 | ||
| 230 | #else /* not HAVE_GTK_AND_PTHREAD */ | 236 | #else /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ |
| 231 | #define SIGNAL_THREAD_CHECK(signo) | 237 | #define SIGNAL_THREAD_CHECK(signo) |
| 232 | #endif /* not HAVE_GTK_AND_PTHREAD */ | 238 | #endif /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ |
| 233 | /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 | 239 | /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 |
| 234 | (do not change this comment) */ | 240 | (do not change this comment) */ |