+2008-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * emacs.c (main_thread): Conditionalize on
+ FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
+ (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it.
+
+ * syssignal.h (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.
+
2008-05-10 Eli Zaretskii <eliz@gnu.org>
* dired.c (Fdirectory_files_and_attributes, Ffile_attributes):
Likewise.
* mactoolbox.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: Add extern.
- (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range):
+ (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range)
(mac_ax_number_of_characters): Add externs.
(mac_get_selected_range, mac_store_buffer_text_to_unicode_chars)
[USE_MAC_TSM]: Likewise.
(create_apple_event, mac_event_parameters_to_lisp)
[TARGET_API_MAC_CARBON]: Add externs.
- * mactoolbox.c: (Vmac_ts_script_language_on_focus)
+ * mactoolbox.c (Vmac_ts_script_language_on_focus)
(saved_ts_script_language_on_focus) [USE_MAC_TSM]: Remove externs.
(XTread_socket) [USE_MAC_TOOLBAR]: Select window if its structure part
is clicked.
(syms_of_macselect) <Vmac_dnd_known_types>:
Use mac_dnd_default_known_types.
- * macterm.c (mac_end_cg_clip): Add argument F. All uses changed.
+ * macterm.c (mac_end_clip): Add argument F. All uses changed.
(mac_begin_cg_clip, mac_end_cg_clip): Allow null GC.
(mac_invert_rectangle, mac_compute_glyph_string_overhangs)
(mac_load_query_font): Use them instead of SetPortWindowPort.
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 <pthread.h>
+/* 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
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)) \
} \
} 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) */