On 2012-08-20 11:35 am, kallisti5 wrote:
Attached is a patch to fix the kmk compile under Haiku
(http://haiku-os.org)
Attached is a slightly updated fix which should result in a kBuild that
compiles on Haiku.
The one outstanding bug is the fact that the fairly old version of sed
included in kBuild
seems to crash at first run. (aka kmk_sed)
Am I correct to assume sed is stock plus the --append option? (and the
kBuild makefiles)
Thanks!
-- Alex
Index: src/kmk/glob/fnmatch.c
===================================================================
--- src/kmk/glob/fnmatch.c (revision 2627)
+++ src/kmk/glob/fnmatch.c (working copy)
@@ -27,7 +27,7 @@
#endif
#include <errno.h>
-#include <fnmatch.h>
+#include "fnmatch.h"
#include <ctype.h>
#if HAVE_STRING_H || defined _LIBC
Index: src/kmk/kmkbuiltin/osdep.c
===================================================================
--- src/kmk/kmkbuiltin/osdep.c (revision 2627)
+++ src/kmk/kmkbuiltin/osdep.c (working copy)
@@ -41,5 +41,8 @@
#elif defined(__OpenBSD__)
# include "openbsd.c"
+#elif defined(__HAIKU__)
+# include "haikufakes.c"
+
#endif
Index: src/kmk/kmkbuiltin/haikufakes.h
===================================================================
--- src/kmk/kmkbuiltin/haikufakes.h (revision 2627)
+++ src/kmk/kmkbuiltin/haikufakes.h (working copy)
@@ -36,5 +36,7 @@
#define lutimes(path, tvs) utimes(path, tvs)
#define lchmod haiku_lchmod
+int haiku_lchmod(const char *pszPath, mode_t mode);
+
#endif
Index: src/kmk/main.c
===================================================================
--- src/kmk/main.c (revision 2627)
+++ src/kmk/main.c (working copy)
@@ -888,7 +888,7 @@
error = set_thread_priority (find_thread (NULL), iNewPriority);
if (error != B_OK)
fprintf (stderr, "warning: set_thread_priority (,%d) failed: %s\n",
- newPriority, strerror (error));
+ iNewPriority, strerror (error));
# else /*#elif HAVE_NICE */
int nice_level = 0;
Index: src/kash/jobs.c
===================================================================
--- src/kash/jobs.c (revision 2627)
+++ src/kash/jobs.c (working copy)
@@ -400,10 +400,12 @@
scopyn(sys_siglist[st], s + col, 32);
else
fmtstr(s + col, 16, "Signal %d", st);
+#ifndef __HAIKU__
if (WCOREDUMP(ps->status)) {
col += strlen(s + col);
scopyn(" (core dumped)", s + col, 64 - col);
}
+#endif
}
col += strlen(s + col);
outstr(s, out);
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev