1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Allow ksh to compile on Haiku; implement SIGKILLTHR support (#408)

This commit implements the build fixes required to get ksh running on
Haiku. Note that while ksh does compile, it has a ton of regression test
failures on Haiku.

src/cmd/ksh93/data/signals.c,
src/lib/libast/features/signal.c:
- Add support for the SIGKILLTHR signal, which is supported by BeOS and
  Haiku.
- SIGINFO was missing an entry in the libast feature test, so add one
  (re: 658bba74).

src/cmd/ksh93/RELEASE:
- Add an entry noting that ksh now compiles on Haiku, albeit with many
  regression test failures.

src/cmd/ksh93/{include/terminal.h,sh/path.c}:
- Silence compiler warnings on Haiku.

src/lib/libast/features/mmap:
- The mmap feature test freezes on Haiku, so modify the test to fail
  immediately on that OS.

src/lib/libast/misc/signal.c:
- Avoid redefining the signal definition on Haiku to fix a compiler
  error.

src/lib/libast/features/nl_types:
- For some reason the nl_item typedef on Haiku doesn't work correctly.
  Work around that by creating the nl_item type in the libast nl_types
  feature test.
This commit is contained in:
Johnothan King 2022-01-06 12:35:44 -08:00 committed by Martijn Dekker
parent b590a9f155
commit d347ec0fc9
10 changed files with 29 additions and 2 deletions

View file

@ -19,6 +19,9 @@ tst lib_mmap note{ standard mmap interface that works }end execute{
int
main(int argc, char** argv)
{
#ifdef __HAIKU__
return 1; /* don't even bother, on Haiku it freezes the system */
#endif
caddr_t mm;
char *t, *u, *f;
int i, fd, okfixed;

View file

@ -19,6 +19,9 @@ tst output{
printf("#include <%s> /* the native nl_types.h */\n", _nxt_nl_types_str);
#endif
printf("\n");
printf("#ifdef __HAIKU__\n");
printf("typedef int nl_item; /* workaround system header bug */\n");
printf("#endif\n");
#ifndef NL_SETMAX
printf("#undef NL_SETMAX\n");
printf("#define NL_SETMAX 1023\n");

View file

@ -120,6 +120,10 @@ static struct _m_ map[] =
#define HAD_SIGILL 1
"Illegal instruction", "ILL", SIGILL,
#endif
#ifdef SIGINFO
#define HAD_SIGINFO 1
"Information request", "INFO", SIGINFO,
#endif
#ifdef SIGINT
#define HAD_SIGINT 1
"Interrupt", "INT", SIGINT,
@ -136,6 +140,10 @@ static struct _m_ map[] =
#define HAD_SIGKILL 1
"Killed", "KILL", SIGKILL,
#endif
#ifdef SIGKILLTHR
#define HAD_SIGKILLTHR 1
"Kill Thread", "KILLTHR", SIGKILLTHR,
#endif
#ifdef SIGLAB
#define HAD_SIGLAB 1
"Security label changed", "LAB", SIGLAB,

View file

@ -26,7 +26,7 @@
* fun==SIG_DFL also unblocks signal
*/
#if !_UWIN
#if !_UWIN && !__HAIKU__
#undef signal
#define signal ______signal