diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-11-25 08:44:06 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-11-25 08:44:06 +0100 |
commit | ce940e173167d0e8beb1a3f6974b1da43c78905c (patch) | |
tree | 0e54cb5f851e80cba384962fd20268c054aa2ac5 | |
parent | d1779d07691ea722d5c39e010434c6f20405fcdc (diff) | |
download | fbida-ce940e173167d0e8beb1a3f6974b1da43c78905c.tar.gz |
use strsignal
-rw-r--r-- | GNUmakefile | 3 | ||||
-rw-r--r-- | fbtools.c | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile index c9d3599..5d35341 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -42,6 +42,7 @@ HAVE_LINUX_FB_H := $(call ac_header,linux/fb.h) HAVE_NEW_EXIF := $(call ac_header,libexif/exif-log.h) HAVE_GLIBC := $(call ac_func,fopencookie) HAVE_STRCASESTR := $(call ac_func,strcasestr) +HAVE_STRSIGNAL := $(call ac_func,strsignal) HAVE_LIBPCD := $(call ac_lib,pcd_open,pcd) HAVE_LIBUNGIF := $(call ac_lib,DGifOpenFileName,ungif) HAVE_LIBPNG := $(call ac_lib,png_read_info,png,-lz) @@ -74,7 +75,7 @@ PKG_CONFIG = pkg-config ######################################################################## # conditional stuff -includes = ENDIAN_H STRCASESTR NEW_EXIF +includes = ENDIAN_H STRCASESTR STRSIGNAL NEW_EXIF libraries = PCD UNGIF PNG TIFF WEBP CURL SANE LIRC ida_libs = PCD UNGIF PNG TIFF WEBP CURL SANE fbi_libs = PCD UNGIF PNG TIFF WEBP CURL LIRC @@ -23,6 +23,13 @@ #include "fbtools.h" +#ifndef HAVE_STRSIGNAL +static const char *strsignal(int signr) +{ + return sys_siglist[signr]; +} +#endif + /* -------------------------------------------------------------------- */ /* exported stuff */ @@ -519,6 +526,6 @@ fb_catch_exit_signals(void) /* cleanup */ fb_cleanup(); - fprintf(stderr,"Oops: %s\n",sys_siglist[termsig]); + fprintf(stderr,"Oops: %s\n",strsignal(termsig)); exit(42); } |