the beginnings of signal support in libroot
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1977 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+6
-4
@@ -34,13 +34,14 @@ KernelLd kernel :
|
|||||||
|
|
||||||
kernel_os_arch_$(OBOS_ARCH).o
|
kernel_os_arch_$(OBOS_ARCH).o
|
||||||
|
|
||||||
kernel_posix_main.o
|
|
||||||
kernel_posix_locale.o
|
kernel_posix_locale.o
|
||||||
|
kernel_posix_main.o
|
||||||
|
kernel_posix_signal.o
|
||||||
kernel_posix_stdio.o
|
kernel_posix_stdio.o
|
||||||
kernel_posix_stdlib.o
|
kernel_posix_stdlib.o
|
||||||
kernel_posix_sys.o
|
kernel_posix_sys.o
|
||||||
kernel_posix_unistd.o
|
|
||||||
kernel_posix_time.o
|
kernel_posix_time.o
|
||||||
|
kernel_posix_unistd.o
|
||||||
posix_string.o
|
posix_string.o
|
||||||
:
|
:
|
||||||
$(SUBDIR)/core/arch/$(OBOS_ARCH)/kernel.ld
|
$(SUBDIR)/core/arch/$(OBOS_ARCH)/kernel.ld
|
||||||
@@ -66,13 +67,14 @@ KernelLd kernel.so :
|
|||||||
|
|
||||||
kernel_os_arch_$(OBOS_ARCH).o
|
kernel_os_arch_$(OBOS_ARCH).o
|
||||||
|
|
||||||
kernel_posix_main.o
|
|
||||||
kernel_posix_locale.o
|
kernel_posix_locale.o
|
||||||
|
kernel_posix_main.o
|
||||||
|
kernel_posix_signal.o
|
||||||
kernel_posix_stdio.o
|
kernel_posix_stdio.o
|
||||||
kernel_posix_stdlib.o
|
kernel_posix_stdlib.o
|
||||||
kernel_posix_sys.o
|
kernel_posix_sys.o
|
||||||
kernel_posix_unistd.o
|
|
||||||
kernel_posix_time.o
|
kernel_posix_time.o
|
||||||
|
kernel_posix_unistd.o
|
||||||
posix_string.o
|
posix_string.o
|
||||||
:
|
:
|
||||||
$(SUBDIR)/core/arch/$(OBOS_ARCH)/kernel.ld
|
$(SUBDIR)/core/arch/$(OBOS_ARCH)/kernel.ld
|
||||||
|
|||||||
@@ -19,12 +19,13 @@ MergeObjectFromObjects kernel_posix_main.o :
|
|||||||
<$(SOURCE_GRIST)>utime.o
|
<$(SOURCE_GRIST)>utime.o
|
||||||
;
|
;
|
||||||
|
|
||||||
SubInclude OBOS_TOP src kernel libroot posix malloc ;
|
|
||||||
SubInclude OBOS_TOP src kernel libroot posix locale ;
|
SubInclude OBOS_TOP src kernel libroot posix locale ;
|
||||||
SubInclude OBOS_TOP src kernel libroot posix stdio ;
|
SubInclude OBOS_TOP src kernel libroot posix malloc ;
|
||||||
SubInclude OBOS_TOP src kernel libroot posix string ;
|
|
||||||
SubInclude OBOS_TOP src kernel libroot posix stdlib ;
|
|
||||||
SubInclude OBOS_TOP src kernel libroot posix unistd ;
|
|
||||||
SubInclude OBOS_TOP src kernel libroot posix sys ;
|
|
||||||
SubInclude OBOS_TOP src kernel libroot posix math ;
|
SubInclude OBOS_TOP src kernel libroot posix math ;
|
||||||
|
SubInclude OBOS_TOP src kernel libroot posix signal ;
|
||||||
|
SubInclude OBOS_TOP src kernel libroot posix stdio ;
|
||||||
|
SubInclude OBOS_TOP src kernel libroot posix stdlib ;
|
||||||
|
SubInclude OBOS_TOP src kernel libroot posix string ;
|
||||||
|
SubInclude OBOS_TOP src kernel libroot posix sys ;
|
||||||
SubInclude OBOS_TOP src kernel libroot posix time ;
|
SubInclude OBOS_TOP src kernel libroot posix time ;
|
||||||
|
SubInclude OBOS_TOP src kernel libroot posix unistd ;
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
SubDir OBOS_TOP src kernel libroot posix signal ;
|
||||||
|
|
||||||
|
KernelMergeObject posix_signal.o :
|
||||||
|
<$(SOURCE_GRIST)>strsignal.c
|
||||||
|
:
|
||||||
|
-fPIC -DPIC
|
||||||
|
;
|
||||||
|
|
||||||
|
MergeObjectFromObjects kernel_posix_signal.o :
|
||||||
|
<$(SOURCE_GRIST)>strsignal.o
|
||||||
|
:
|
||||||
|
-fPIC -DPIC
|
||||||
|
;
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2002, OpenBeOS Project. All rights reserved.
|
||||||
|
* Distributed under the terms of the OpenBeOS license.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* strsignal.c:
|
||||||
|
* implements the signal function strsignal()
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Author(s):
|
||||||
|
* Daniel Reinhold ([email protected])
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
const char *
|
||||||
|
strsignal(int sig)
|
||||||
|
{
|
||||||
|
const char *s = NULL;
|
||||||
|
|
||||||
|
if (sig < 0 || sig > MAX_SIGNO)
|
||||||
|
return "Bogus signal number";
|
||||||
|
|
||||||
|
if (sig < NSIG)
|
||||||
|
s = sys_siglist[sig];
|
||||||
|
|
||||||
|
if (s)
|
||||||
|
return s;
|
||||||
|
else {
|
||||||
|
static char buf[40];
|
||||||
|
sprintf(buf, "Unknown Signal %d", sig);
|
||||||
|
return (const char *) buf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user