summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-11-03 15:48:33 +0200
committerEli Zaretskii <eliz@gnu.org>2012-11-03 15:48:33 +0200
commitb3cf17f69548c28d21942cc92a7b65e258857f85 (patch)
tree2b4a5cc13241933632da0b26395c6785eeb797cb /src
parent67b50ba47bcf46bd8a699fa0c1f2af1cce3f2338 (diff)
downloademacs-b3cf17f69548c28d21942cc92a7b65e258857f85.tar.gz
Adapt the MSDOS build to the latest changes on mainline.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/conf_post.h9
-rw-r--r--src/msdos.c15
3 files changed, 30 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8b7c1d9113d..72e3d8ea741 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
2012-11-03 Eli Zaretskii <eliz@gnu.org>
+ * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
+ (msdos_fatal_signal): New function.
+ (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
+ its argument list.
+
+ * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
+ for GCC versions before 4.
+ (emacs_raise): Define to call msdos_fatal_signal.
+
* xdisp.c (init_from_display_pos): Fix initialization of the bidi
iterator when starting in the middle of a display or overlay
string. (Bug#12745)
diff --git a/src/conf_post.h b/src/conf_post.h
index 6056821d4a7..da3c3bd58b0 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -110,8 +110,17 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#else
# define lstat stat
#endif
+/* The "portable" definition of _GL_INLINE on config.h does not work
+ with DJGPP GCC 3.4.4: it causes unresolved externals in sysdep.c,
+ although lib/execinfo.h is included and the inline functions there
+ are visible. */
+#if __GNUC__ < 4
+# define _GL_EXECINFO_INLINE inline
+#endif
/* End of gnulib-related stuff. */
+#define emacs_raise(sig) msdos_fatal_signal (sig)
+
#ifndef HAVE_SETPGID
# ifdef USG
# define setpgid(pid, pgid) setpgrp ()
diff --git a/src/msdos.c b/src/msdos.c
index bac6b977fdf..79f0be48892 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -3305,7 +3305,7 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx,
Emacs will process them after we return and surprise the user. */
discard_mouse_events ();
mouse_clear_clicks ();
- if (!kbd_buffer_events_waiting (1))
+ if (!kbd_buffer_events_waiting ())
clear_input_pending ();
/* Allow mouse events generation by dos_rawgetc. */
mouse_preempted--;
@@ -4214,8 +4214,8 @@ init_gettimeofday (void)
}
#endif
-void
-emacs_abort (void)
+static void
+msdos_abort (void)
{
dos_ttcooked ();
ScreenSetCursor (10, 0);
@@ -4233,6 +4233,15 @@ emacs_abort (void)
}
void
+msdos_fatal_signal (int sig)
+{
+ if (sig == SIGABRT)
+ msdos_abort ();
+ else
+ raise (sig);
+}
+
+void
syms_of_msdos (void)
{
recent_doskeys = Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil);