diff options
author | Thorsten Glaser <tg@mirbsd.org> | 2009-10-02 15:39:00 +0200 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-05 15:50:05 -0800 |
commit | 92b10af793da235659198cf38ff2e0237c181058 (patch) | |
tree | 66d35bbe34224575dfbf0fde15ec29e424a87ccc /libc/unistd | |
parent | 10093276e98d26428875480c502a278dffe550c7 (diff) | |
download | bionic-92b10af793da235659198cf38ff2e0237c181058.zip bionic-92b10af793da235659198cf38ff2e0237c181058.tar.gz bionic-92b10af793da235659198cf38ff2e0237c181058.tar.bz2 |
Add the BSD sys_signame array.
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Diffstat (limited to 'libc/unistd')
-rw-r--r-- | libc/unistd/siglist.c | 2 | ||||
-rw-r--r-- | libc/unistd/signame.c | 33 |
2 files changed, 34 insertions, 1 deletions
diff --git a/libc/unistd/siglist.c b/libc/unistd/siglist.c index a2ac9fe..f1c3377 100644 --- a/libc/unistd/siglist.c +++ b/libc/unistd/siglist.c @@ -28,6 +28,6 @@ #include <signal.h> const char * const sys_siglist[NSIG] = { -#define __BIONIC_SIGDEF(x,y,z) [ x ] = z, +#define __BIONIC_SIGDEF(x,y,z) [ SIG##x ] = z, #include <sys/_sigdefs.h> }; diff --git a/libc/unistd/signame.c b/libc/unistd/signame.c new file mode 100644 index 0000000..4611e44 --- /dev/null +++ b/libc/unistd/signame.c @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include <signal.h> + +const char * const sys_signame[NSIG] = { +#define __BIONIC_SIGDEF(x,y,z) [ SIG##x ] = #x, +#include <sys/_sigdefs.h> +}; |