diff options
| author | YAMAMOTO Mitsuharu | 2008-05-12 08:30:56 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2008-05-12 08:30:56 +0000 |
| commit | f8240abdb871f9e75bf61a6c4eb4864090bd87ad (patch) | |
| tree | cce66ca39856a1fb438e54acf04c076cf3c3f0b8 /src | |
| parent | 3e9de9f617057201c453fe4febb5e4097eaf0200 (diff) | |
| download | emacs-f8240abdb871f9e75bf61a6c4eb4864090bd87ad.tar.gz emacs-f8240abdb871f9e75bf61a6c4eb4864090bd87ad.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 16 | ||||
| -rw-r--r-- | src/syssignal.h | 14 |
2 files changed, 23 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0cb3994844b..dc4198045b8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2008-05-12 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-10 Eli Zaretskii <eliz@gnu.org> | 11 | 2008-05-10 Eli Zaretskii <eliz@gnu.org> |
| 2 | 12 | ||
| 3 | * dired.c (Fdirectory_files_and_attributes, Ffile_attributes): | 13 | * dired.c (Fdirectory_files_and_attributes, Ffile_attributes): |
| @@ -77,7 +87,7 @@ | |||
| 77 | Likewise. | 87 | Likewise. |
| 78 | 88 | ||
| 79 | * mactoolbox.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: Add extern. | 89 | * mactoolbox.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: Add extern. |
| 80 | (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range): | 90 | (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range) |
| 81 | (mac_ax_number_of_characters): Add externs. | 91 | (mac_ax_number_of_characters): Add externs. |
| 82 | (mac_get_selected_range, mac_store_buffer_text_to_unicode_chars) | 92 | (mac_get_selected_range, mac_store_buffer_text_to_unicode_chars) |
| 83 | [USE_MAC_TSM]: Likewise. | 93 | [USE_MAC_TSM]: Likewise. |
| @@ -139,7 +149,7 @@ | |||
| 139 | (create_apple_event, mac_event_parameters_to_lisp) | 149 | (create_apple_event, mac_event_parameters_to_lisp) |
| 140 | [TARGET_API_MAC_CARBON]: Add externs. | 150 | [TARGET_API_MAC_CARBON]: Add externs. |
| 141 | 151 | ||
| 142 | * mactoolbox.c: (Vmac_ts_script_language_on_focus) | 152 | * mactoolbox.c (Vmac_ts_script_language_on_focus) |
| 143 | (saved_ts_script_language_on_focus) [USE_MAC_TSM]: Remove externs. | 153 | (saved_ts_script_language_on_focus) [USE_MAC_TSM]: Remove externs. |
| 144 | (XTread_socket) [USE_MAC_TOOLBAR]: Select window if its structure part | 154 | (XTread_socket) [USE_MAC_TOOLBAR]: Select window if its structure part |
| 145 | is clicked. | 155 | is clicked. |
| @@ -295,7 +305,7 @@ | |||
| 295 | (syms_of_macselect) <Vmac_dnd_known_types>: | 305 | (syms_of_macselect) <Vmac_dnd_known_types>: |
| 296 | Use mac_dnd_default_known_types. | 306 | Use mac_dnd_default_known_types. |
| 297 | 307 | ||
| 298 | * macterm.c (mac_end_cg_clip): Add argument F. All uses changed. | 308 | * macterm.c (mac_end_clip): Add argument F. All uses changed. |
| 299 | (mac_begin_cg_clip, mac_end_cg_clip): Allow null GC. | 309 | (mac_begin_cg_clip, mac_end_cg_clip): Allow null GC. |
| 300 | (mac_invert_rectangle, mac_compute_glyph_string_overhangs) | 310 | (mac_invert_rectangle, mac_compute_glyph_string_overhangs) |
| 301 | (mac_load_query_font): Use them instead of SetPortWindowPort. | 311 | (mac_load_query_font): Use them instead of SetPortWindowPort. |
diff --git a/src/syssignal.h b/src/syssignal.h index a01d5bff302..13710d3104b 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 | ||
| @@ -207,7 +213,7 @@ extern SIGMASKTYPE sigprocmask_set; | |||
| 207 | char *strsignal (); | 213 | char *strsignal (); |
| 208 | #endif | 214 | #endif |
| 209 | 215 | ||
| 210 | #ifdef HAVE_GTK_AND_PTHREAD | 216 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD |
| 211 | #define SIGNAL_THREAD_CHECK(signo) \ | 217 | #define SIGNAL_THREAD_CHECK(signo) \ |
| 212 | do { \ | 218 | do { \ |
| 213 | if (!pthread_equal (pthread_self (), main_thread)) \ | 219 | if (!pthread_equal (pthread_self (), main_thread)) \ |
| @@ -226,8 +232,8 @@ char *strsignal (); | |||
| 226 | } \ | 232 | } \ |
| 227 | } while (0) | 233 | } while (0) |
| 228 | 234 | ||
| 229 | #else /* not HAVE_GTK_AND_PTHREAD */ | 235 | #else /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ |
| 230 | #define SIGNAL_THREAD_CHECK(signo) | 236 | #define SIGNAL_THREAD_CHECK(signo) |
| 231 | #endif /* not HAVE_GTK_AND_PTHREAD */ | 237 | #endif /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ |
| 232 | /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 | 238 | /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 |
| 233 | (do not change this comment) */ | 239 | (do not change this comment) */ |