Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions opcodes/i386-gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@

/* Build-time checks are preferrable over runtime ones. Use this construct
in preference where possible. */
#ifndef static_assert
#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
#endif

static const char *program_name = NULL;
static int debug = 0;
Expand Down
6 changes: 3 additions & 3 deletions opcodes/mips-formats.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#define MAPPED_INT(SIZE, LSB, MAP, PRINT_HEX) \
{ \
typedef char ATTRIBUTE_UNUSED \
static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_mapped_int_operand op = { \
{ OP_MAPPED_INT, SIZE, LSB }, MAP, PRINT_HEX \
}; \
Expand Down Expand Up @@ -83,7 +83,7 @@
#define MAPPED_REG(SIZE, LSB, BANK, MAP) \
{ \
typedef char ATTRIBUTE_UNUSED \
static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_reg_operand op = { \
{ OP_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
}; \
Expand All @@ -93,7 +93,7 @@
#define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \
{ \
typedef char ATTRIBUTE_UNUSED \
static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_reg_operand op = { \
{ OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
}; \
Expand Down
34 changes: 11 additions & 23 deletions readline/readline/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,11 @@

#if defined (HANDLE_SIGNALS)

#if !defined (RETSIGTYPE)
# if defined (VOID_SIGHANDLER)
# define RETSIGTYPE void
# else
# define RETSIGTYPE int
# endif /* !VOID_SIGHANDLER */
#endif /* !RETSIGTYPE */

#if defined (VOID_SIGHANDLER)
# define SIGHANDLER_RETURN return
#else
# define SIGHANDLER_RETURN return (0)
#endif
#define SIGHANDLER_RETURN return

/* This typedef is equivalent to the one for Function; it allows us
to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */
typedef RETSIGTYPE SigHandler ();
typedef void SigHandler (int);

#if defined (HAVE_POSIX_SIGNALS)
typedef struct sigaction sighandler_cxt;
Expand All @@ -78,12 +66,12 @@ typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt
# define SA_RESTART 0
#endif

static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *));
static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *));
static void rl_maybe_restore_sighandler PARAMS((int, sighandler_cxt *));
static SigHandler *rl_set_sighandler (int, SigHandler *, sighandler_cxt *);
static void rl_maybe_set_sighandler (int, SigHandler *, sighandler_cxt *);
static void rl_maybe_restore_sighandler (int, sighandler_cxt *);

static RETSIGTYPE rl_signal_handler PARAMS((int));
static RETSIGTYPE _rl_handle_signal PARAMS((int));
static void rl_signal_handler (int);
static void _rl_handle_signal (int);

/* Exported variables for use by applications. */

Expand Down Expand Up @@ -136,7 +124,7 @@ void *_rl_sigcleanarg;
/* Readline signal handler functions. */

/* Called from RL_CHECK_SIGNALS() macro to run signal handling code. */
RETSIGTYPE
void
_rl_signal_handler (int sig)
{
_rl_caught_signal = 0; /* XXX */
Expand All @@ -163,7 +151,7 @@ _rl_signal_handler (int sig)
SIGHANDLER_RETURN;
}

static RETSIGTYPE
static void
rl_signal_handler (int sig)
{
_rl_caught_signal = sig;
Expand All @@ -173,7 +161,7 @@ rl_signal_handler (int sig)
/* This is called to handle a signal when it is safe to do so (out of the
signal handler execution path). Called by _rl_signal_handler for all the
signals readline catches except SIGWINCH. */
static RETSIGTYPE
static void
_rl_handle_signal (int sig)
{
int block_sig;
Expand Down Expand Up @@ -330,7 +318,7 @@ _rl_handle_signal (int sig)
}

#if defined (SIGWINCH)
static RETSIGTYPE
static void
rl_sigwinch_handler (int sig)
{
SigHandler *oh;
Expand Down
12 changes: 6 additions & 6 deletions readline/readline/tcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ extern char *UP, *BC;

extern short ospeed;

extern int tgetent ();
extern int tgetflag ();
extern int tgetnum ();
extern char *tgetstr ();
extern int tgetent (char *bp, const char *name);
extern int tgetflag (char *id);
extern int tgetnum (char *id);
extern char *tgetstr (char *id, char **area);

extern int tputs ();
extern int tputs (const char *str, int affcnt, int (*putc)(int));

extern char *tgoto ();
extern char *tgoto (const char *cap, int col, int row);

#endif /* HAVE_TERMCAP_H */

Expand Down
2 changes: 1 addition & 1 deletion sim/common/dv-sockser.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ dv_sockser_init (SIM_DESC sd)
??? Need a central signal management module. */
#ifdef SIGPIPE
{
RETSIGTYPE (*orig) ();
RETSIGTYPE (*orig) (int);
orig = signal (SIGPIPE, SIG_IGN);
/* If a handler is already set up, don't mess with it. */
if (orig != SIG_DFL && orig != SIG_IGN)
Expand Down
2 changes: 1 addition & 1 deletion sim/common/nrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ main (int argc, char **argv)
enum sim_stop reason;
int sigrc = 0;
int single_step = 0;
RETSIGTYPE (*prev_sigint) ();
RETSIGTYPE (*prev_sigint) (int);

myname = lbasename (argv[0]);

Expand Down