From: Pedro Alves Date: Sun, 10 Aug 2008 19:17:42 +0000 (+0000) Subject: Build fixes for DJGPP. X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=230335c43abb50996fa8755bce454c96b10c397a;p=deliverable%2Fbinutils-gdb.git Build fixes for DJGPP. * signals.c (rl_set_sighandler): Guard access to SIGWINCH. * wcwidth.c [__GO32__]: Include wctype.h before wchar.h. --- diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb index 1a1dfc9807..be626e56d1 100644 --- a/readline/ChangeLog.gdb +++ b/readline/ChangeLog.gdb @@ -1,3 +1,10 @@ +2008-08-10 Pedro Alves + + Build fixes for DJGPP. + + * signals.c (rl_set_sighandler): Guard access to SIGWINCH. + * wcwidth.c [__GO32__]: Include wctype.h before wchar.h. + 2008-03-24 Jan Kratochvil PR gdb/544 diff --git a/readline/signals.c b/readline/signals.c index f344ed8349..2dca03f35b 100644 --- a/readline/signals.c +++ b/readline/signals.c @@ -251,7 +251,11 @@ rl_set_sighandler (sig, handler, ohandler) struct sigaction act; act.sa_handler = handler; +#if defined (SIGWINCH) act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0; +#else + act.sa_flags = 0; +#endif sigemptyset (&act.sa_mask); sigemptyset (&ohandler->sa_mask); sigaction (sig, &act, &old_handler); diff --git a/readline/support/wcwidth.c b/readline/support/wcwidth.c index ace9a3ab92..36433d7935 100644 --- a/readline/support/wcwidth.c +++ b/readline/support/wcwidth.c @@ -6,6 +6,11 @@ * Markus Kuhn -- 2001-09-08 -- public domain */ +#ifdef __GO32__ +/* DJGPP needs to include this before including wchar.h. */ +# include +#endif + #include struct interval {