Change type of cpsr in arm_sigreturn_next_pc
[deliverable/binutils-gdb.git] / gdb / inflow.c
index 3c121a39f2ad022c99c3607c1dcbd4433a29b765..4c80dbd896b54238cb0d3a1e4afc0e60dfa78892 100644 (file)
@@ -1,5 +1,5 @@
 /* Low level interface to ptrace, for GDB when running under Unix.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -79,8 +79,8 @@ struct terminal_info
    unimportant.  */
 static struct terminal_info our_terminal_info;
 
-/* The initial tty state given to each new inferior.  It is a snapshot of our
-   own tty state taken during initialization of GDB.  */
+/* Snapshot of our own tty state taken during initialization of GDB.
+   This is used as the initial tty state given to each new inferior.  */
 static serial_ttystate initial_gdb_ttystate;
 
 static struct terminal_info *get_inflow_inferior_data (struct inferior *);
@@ -101,8 +101,8 @@ inferior_process_group (void)
    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
@@ -136,7 +136,7 @@ gdb_getpgrp (void)
 }
 #endif
 
-enum
+enum gdb_has_a_terminal_flag_enum
   {
     yes, no, have_not_checked
   }
@@ -161,6 +161,7 @@ show_interactive_mode (struct ui_file *file, int from_tty,
 }
 
 /* Set the initial tty state that is to be inherited by new inferiors.  */
+
 void
 set_initial_gdb_ttystate (void)
 {
@@ -318,9 +319,9 @@ child_terminal_inferior (struct target_ops *self)
 
       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
        }
 
@@ -411,18 +412,18 @@ child_terminal_ours_1 (int output_only)
 
   if (tinfo->run_terminal != NULL || gdb_has_a_terminal () == 0)
     return;
-
+  else
     {
 #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);
@@ -505,7 +506,7 @@ static const struct inferior_data *inflow_inferior_data;
 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);
@@ -520,7 +521,7 @@ get_inflow_inferior_data (struct inferior *inf)
 {
   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);
@@ -541,7 +542,7 @@ inflow_inferior_exit (struct inferior *inf)
 {
   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);
@@ -710,9 +711,9 @@ new_tty (void)
   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);
@@ -787,7 +788,7 @@ pass_signal (int signo)
 #endif
 }
 
-static void (*osig) ();
+static sighandler_t osig;
 static int osig_set;
 
 void
@@ -798,7 +799,7 @@ set_sigint_trap (void)
 
   if (inf->attach_flag || tinfo->run_terminal)
     {
-      osig = (void (*)()) signal (SIGINT, pass_signal);
+      osig = signal (SIGINT, pass_signal);
       osig_set = 1;
     }
   else
This page took 0.048255 seconds and 4 git commands to generate.