From 671e236d5fd2cae169c2a31d0a35e66c4fcc5556 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 12 Feb 2014 19:04:27 -0800 Subject: [PATCH] Restore sys_signame for LP64. mksh is using this, and we probably build as much BSD source as glibc source. Change-Id: I400d255a67f9614ca9e57090e3a2e49d2b10cba4 --- libc/bionic/sys_signame.c | 4 ---- libc/include/signal.h | 4 +--- tests/signal_test.cpp | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/libc/bionic/sys_signame.c b/libc/bionic/sys_signame.c index 41d34af83..e1286f2d2 100644 --- a/libc/bionic/sys_signame.c +++ b/libc/bionic/sys_signame.c @@ -28,11 +28,7 @@ #include -#if !defined(__LP64__) - const char* const sys_signame[NSIG] = { #define __BIONIC_SIGDEF(signal_number, unused) [ signal_number ] = #signal_number + 3, #include }; - -#endif diff --git a/libc/include/signal.h b/libc/include/signal.h index 58288a103..29bef573c 100644 --- a/libc/include/signal.h +++ b/libc/include/signal.h @@ -61,9 +61,7 @@ typedef int sig_atomic_t; #define NSIG _NSIG extern const char* const sys_siglist[]; -#if !defined(__LP64__) -extern const char* const sys_signame[]; -#endif +extern const char* const sys_signame[]; /* BSD compatibility. */ typedef __sighandler_t sig_t; /* BSD compatibility. */ typedef __sighandler_t sighandler_t; /* glibc compatibility. */ diff --git a/tests/signal_test.cpp b/tests/signal_test.cpp index ea3096a5d..6d55bef24 100644 --- a/tests/signal_test.cpp +++ b/tests/signal_test.cpp @@ -240,7 +240,7 @@ TEST(signal, sigaction) { } TEST(signal, sys_signame) { -#if defined(__BIONIC__) && !defined(__LP64__) +#if defined(__BIONIC__) ASSERT_TRUE(sys_signame[0] == NULL); ASSERT_STREQ("HUP", sys_signame[SIGHUP]); #else