we save our handlers in these two variables and set SIGINT and SIGQUIT
to SIG_IGN. */
-static void (*sigint_ours) ();
-static void (*sigquit_ours) ();
+static sighandler_t sigint_ours;
+static sighandler_t sigquit_ours;
/* The name of the tty (from the `tty' command) that we're giving to
the inferior when starting it up. This is only (and should only
if (!job_control)
{
- sigint_ours = (void (*)()) signal (SIGINT, SIG_IGN);
+ sigint_ours = signal (SIGINT, SIG_IGN);
#ifdef SIGQUIT
- sigquit_ours = (void (*)()) signal (SIGQUIT, SIG_IGN);
+ sigquit_ours = signal (SIGQUIT, SIG_IGN);
#endif
}
#ifdef SIGTTOU
/* Ignore this signal since it will happen when we try to set the
pgrp. */
- void (*osigttou) () = NULL;
+ sighandler_t osigttou = NULL;
#endif
int result;
#ifdef SIGTTOU
if (job_control)
- osigttou = (void (*)()) signal (SIGTTOU, SIG_IGN);
+ osigttou = signal (SIGTTOU, SIG_IGN);
#endif
xfree (tinfo->ttystate);
static void
inflow_inferior_data_cleanup (struct inferior *inf, void *arg)
{
- struct terminal_info *info = arg;
+ struct terminal_info *info = (struct terminal_info *) arg;
xfree (info->run_terminal);
xfree (info->ttystate);
{
struct terminal_info *info;
- info = inferior_data (inf, inflow_inferior_data);
+ info = (struct terminal_info *) inferior_data (inf, inflow_inferior_data);
if (info == NULL)
{
info = XCNEW (struct terminal_info);
{
struct terminal_info *info;
- info = inferior_data (inf, inflow_inferior_data);
+ info = (struct terminal_info *) inferior_data (inf, inflow_inferior_data);
if (info != NULL)
{
xfree (info->run_terminal);
tty = open ("/dev/tty", O_RDWR);
if (tty > 0)
{
- void (*osigttou) ();
+ sighandler_t osigttou;
- osigttou = (void (*)()) signal (SIGTTOU, SIG_IGN);
+ osigttou = signal (SIGTTOU, SIG_IGN);
ioctl (tty, TIOCNOTTY, 0);
close (tty);
signal (SIGTTOU, osigttou);
#endif
}
-static void (*osig) ();
+static sighandler_t osig;
static int osig_set;
void
if (inf->attach_flag || tinfo->run_terminal)
{
- osig = (void (*)()) signal (SIGINT, pass_signal);
+ osig = signal (SIGINT, pass_signal);
osig_set = 1;
}
else