am fadc8a77: Merge "Restore sys_signame for LP64."
* commit 'fadc8a7777ca304c8a7de066a94effd3a5471ee6': Restore sys_signame for LP64.
This commit is contained in:
commit
93a0c03463
@ -28,11 +28,7 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#if !defined(__LP64__)
|
|
||||||
|
|
||||||
const char* const sys_signame[NSIG] = {
|
const char* const sys_signame[NSIG] = {
|
||||||
#define __BIONIC_SIGDEF(signal_number, unused) [ signal_number ] = #signal_number + 3,
|
#define __BIONIC_SIGDEF(signal_number, unused) [ signal_number ] = #signal_number + 3,
|
||||||
#include <sys/_sigdefs.h>
|
#include <sys/_sigdefs.h>
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -61,9 +61,7 @@ typedef int sig_atomic_t;
|
|||||||
#define NSIG _NSIG
|
#define NSIG _NSIG
|
||||||
|
|
||||||
extern const char* const sys_siglist[];
|
extern const char* const sys_siglist[];
|
||||||
#if !defined(__LP64__)
|
extern const char* const sys_signame[]; /* BSD compatibility. */
|
||||||
extern const char* const sys_signame[];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef __sighandler_t sig_t; /* BSD compatibility. */
|
typedef __sighandler_t sig_t; /* BSD compatibility. */
|
||||||
typedef __sighandler_t sighandler_t; /* glibc compatibility. */
|
typedef __sighandler_t sighandler_t; /* glibc compatibility. */
|
||||||
|
@ -240,7 +240,7 @@ TEST(signal, sigaction) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(signal, sys_signame) {
|
TEST(signal, sys_signame) {
|
||||||
#if defined(__BIONIC__) && !defined(__LP64__)
|
#if defined(__BIONIC__)
|
||||||
ASSERT_TRUE(sys_signame[0] == NULL);
|
ASSERT_TRUE(sys_signame[0] == NULL);
|
||||||
ASSERT_STREQ("HUP", sys_signame[SIGHUP]);
|
ASSERT_STREQ("HUP", sys_signame[SIGHUP]);
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user