Diff for /embedaddon/sudo/compat/strsignal.c between versions 1.1.1.1 and 1.1.1.4

version 1.1.1.1, 2012/02/21 16:23:02 version 1.1.1.4, 2014/06/15 16:12:54
Line 1 Line 1
 /*  /*
 * Copyright (c) 2009-2011 Todd C. Miller <Todd.Miller@courtesan.com> * Copyright (c) 2009-2013 Todd C. Miller <Todd.Miller@courtesan.com>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 16 Line 16
   
 #include <config.h>  #include <config.h>
   
   #ifndef HAVE_STRSIGNAL
   
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <stdio.h>  #include <stdio.h>
 #include <signal.h>  #include <signal.h>
   
 #include "missing.h"  
   
 #define DEFAULT_TEXT_DOMAIN     "sudo"  #define DEFAULT_TEXT_DOMAIN     "sudo"
#include "gettext.h"#include "gettext.h"            /* must be included before missing.h */
   
   #include "missing.h"
   
 #if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1  #if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1
# define my_sys_siglist    sys_siglist# define sudo_sys_siglist    sys_siglist
 #elif defined(HAVE_DECL__SYS_SIGLIST) && HAVE_DECL__SYS_SIGLIST == 1  #elif defined(HAVE_DECL__SYS_SIGLIST) && HAVE_DECL__SYS_SIGLIST == 1
# define my_sys_siglist    _sys_siglist# define sudo_sys_siglist    _sys_siglist
 #elif defined(HAVE_DECL___SYS_SIGLIST) && HAVE_DECL___SYS_SIGLIST == 1  #elif defined(HAVE_DECL___SYS_SIGLIST) && HAVE_DECL___SYS_SIGLIST == 1
# define my_sys_siglist    __sys_siglist# define sudo_sys_siglist    __sys_siglist
 #else  #else
extern const char *const my_sys_siglist[NSIG];extern const char *const sudo_sys_siglist[NSIG];
 #endif  #endif
   
 /*  /*
Line 42  extern const char *const my_sys_siglist[NSIG]; Line 44  extern const char *const my_sys_siglist[NSIG];
 char *  char *
 strsignal(int signo)  strsignal(int signo)
 {  {
    if (signo > 0 && signo < NSIG)    if (signo > 0 && signo < NSIG && sudo_sys_siglist[signo] != NULL)
        return (char *)my_sys_siglist[signo];        return (char *)sudo_sys_siglist[signo];
     /* XXX - should be "Unknown signal: %d" */
     return _("Unknown signal");      return _("Unknown signal");
 }  }
   #endif /* HAVE_STRSIGNAL */

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>