OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [libiberty/] [strsignal.c] - Diff between revs 157 and 225

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 157 Rev 225
Line 402... Line 402...
 
 
*/
*/
 
 
#ifndef HAVE_STRSIGNAL
#ifndef HAVE_STRSIGNAL
 
 
const char *
char *
strsignal (int signo)
strsignal (int signo)
{
{
  const char *msg;
  char *msg;
  static char buf[32];
  static char buf[32];
 
 
#ifndef HAVE_SYS_SIGLIST
#ifndef HAVE_SYS_SIGLIST
 
 
  if (signal_names == NULL)
  if (signal_names == NULL)
Line 426... Line 426...
    }
    }
  else if ((sys_siglist == NULL) || (sys_siglist[signo] == NULL))
  else if ((sys_siglist == NULL) || (sys_siglist[signo] == NULL))
    {
    {
      /* In range, but no sys_siglist or no entry at this index. */
      /* In range, but no sys_siglist or no entry at this index. */
      sprintf (buf, "Signal %d", signo);
      sprintf (buf, "Signal %d", signo);
      msg = (const char *) buf;
      msg = buf;
    }
    }
  else
  else
    {
    {
      /* In range, and a valid message.  Just return the message. */
      /* In range, and a valid message.  Just return the message.  We
      msg = (const char *) sys_siglist[signo];
         can safely cast away const, since POSIX says the user must
 
         not modify the result.  */
 
      msg = (char *) sys_siglist[signo];
    }
    }
 
 
  return (msg);
  return (msg);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.