DRAFT lib: Add strsignal stub.
* lib/stub/strsignal.c: New file. * build-aux/configure-lib.sh (libc_gnu_SOURCES): Add it. * include/string.h (strsignal): Add prototype.
This commit is contained in:
parent
8424108027
commit
d2fdf59bf9
|
@ -400,6 +400,7 @@ lib/stub/sigsetmask.c
|
|||
lib/stub/sin.c
|
||||
lib/stub/sqrt.c
|
||||
lib/stub/strftime.c
|
||||
lib/stub/strsignal.c
|
||||
lib/stub/sys_siglist.c
|
||||
lib/stub/sysconf.c
|
||||
lib/stub/system.c
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ size_t strlen (char const *);
|
|||
char *strncpy (char *to, char const *from, size_t size);
|
||||
int strncmp (char const *, char const *, size_t);
|
||||
char *strrchr (char const *s, int c);
|
||||
char *strsignal (int signum);
|
||||
char *strstr (char const *haystack, char const *needle);
|
||||
char *strtok (char *new_string, char const *delimiters);
|
||||
char *strlwr (char *string);
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <mes/lib.h>
|
||||
#include <string.h>
|
||||
|
||||
char *
|
||||
strsignal (int signum)
|
||||
{
|
||||
static int stub = 0;
|
||||
if (__mes_debug () && !stub)
|
||||
eputs ("strsignal stub\n");
|
||||
stub = 1;
|
||||
static char buf[30] = "Unknown signal: ";
|
||||
strcat (buf, itoa (signum));
|
||||
return buf;
|
||||
}
|
Loading…
Reference in New Issue