Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: Config.kmk
- ===================================================================
- --- Config.kmk (revision 2436)
- +++ Config.kmk (working copy)
- @@ -99,7 +99,7 @@
- #
- # Various platform specific hacks.
- #
- -ifn1of ($(KBUILD_TARGET), openbsd)
- +ifn1of ($(KBUILD_TARGET), haiku openbsd)
- GCC_Wextra = -Wextra
- endif
- if1of ($(KBUILD_TARGET), openbsd)
- Index: src/kmk/glob/fnmatch.c
- ===================================================================
- --- src/kmk/glob/fnmatch.c (revision 2436)
- +++ 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/arscan.c
- ===================================================================
- --- src/kmk/arscan.c (revision 2436)
- +++ src/kmk/arscan.c (working copy)
- @@ -231,7 +231,7 @@
- #endif
- #ifndef WINDOWS32
- -# ifndef __BEOS__
- +# if !defined(__BEOS__) && !defined(__HAIKU__)
- # include <ar.h>
- # else
- /* BeOS 5 doesn't have <ar.h> but has archives in the same format
- Index: src/kmk/dir.c
- ===================================================================
- --- src/kmk/dir.c (revision 2436)
- +++ src/kmk/dir.c (working copy)
- @@ -1273,10 +1273,10 @@
- };
- /* Forward declarations. */
- -static __ptr_t open_dirstream (const char *);
- -static struct dirent *read_dirstream (__ptr_t);
- +static void *open_dirstream (const char *);
- +static struct dirent *read_dirstream (void *);
- -static __ptr_t
- +static void *
- open_dirstream (const char *directory)
- {
- struct dirstream *new;
- @@ -1296,11 +1296,11 @@
- new->contents = dir->contents;
- new->dirfile_slot = (struct dirfile **) new->contents->dirfiles.ht_vec;
- - return (__ptr_t) new;
- + return (void *) new;
- }
- static struct dirent *
- -read_dirstream (__ptr_t stream)
- +read_dirstream (void *stream)
- {
- static char *buf;
- static unsigned int bufsz;
- Index: src/kmk/main.c
- ===================================================================
- --- src/kmk/main.c (revision 2436)
- +++ src/kmk/main.c (working copy)
- @@ -55,6 +55,9 @@
- # define INCL_BASE
- # include <os2.h>
- # endif
- +# ifdef __HAIKU__
- +# include <OS.h>
- +# endif
- #endif /* KMK*/
- #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
- @@ -850,7 +853,24 @@
- if (!SetPriorityClass (GetCurrentProcess (), dwPriority))
- fprintf (stderr, "warning: SetPriorityClass (,%#x) failed with last error %d\n",
- dwPriority, GetLastError ());
- +#elif __HAIKU__
- + int32 newPriority;
- + status_t error;
- + switch (process_priority)
- + {
- + case 0: return;
- + case 1: newPriority = B_LOWEST_ACTIVE_PRIORITY; break;
- + case 2: newPriority = B_LOW_PRIORITY; break;
- + case 3: newPriority = B_NORMAL_PRIORITY; break;
- + case 4: newPriority = B_URGENT_DISPLAY_PRIORITY; break;
- + case 5: newPriority = B_REAL_TIME_DISPLAY_PRIORITY; break;
- + default: fatal(NILF, _("invalid priority %d\n"), process_priority);
- + }
- + error = set_thread_priority (find_thread (NULL), newPriority);
- + if (error != B_OK)
- + fprintf (stderr, "warning: set_thread_priority (,%d) failed: %s\n",
- + newPriority, strerror (error));
- # else /*#elif HAVE_NICE */
- int nice_level = 0;
- switch (process_priority)
- Index: src/kmk/config.h.haiku
- ===================================================================
- --- src/kmk/config.h.haiku (revision 0)
- +++ src/kmk/config.h.haiku (revision 0)
- @@ -0,0 +1,438 @@
- +/* config.h. Generated from config.h.in by configure. */
- +/* config.h.in. Generated from configure.in by autoheader. */
- +
- +/* Define to 1 if the `closedir' function returns void instead of `int'. */
- +/* #undef CLOSEDIR_VOID */
- +
- +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- + systems. This function is required for `alloca.c' support on those systems.
- + */
- +/* #undef CRAY_STACKSEG_END */
- +
- +/* Define to 1 if using `alloca.c'. */
- +/* #undef C_ALLOCA */
- +
- +/* Define to 1 if using `getloadavg.c'. */
- +#define C_GETLOADAVG 1
- +
- +/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
- +/* #undef DGUX */
- +
- +/* Use high resolution file timestamps if nonzero. */
- +#define FILE_TIMESTAMP_HI_RES 1
- +
- +/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid.
- + */
- +/* #undef GETLOADAVG_PRIVILEGED */
- +
- +/* Define to 1 if you have `alloca', as a function or macro. */
- +#define HAVE_ALLOCA 1
- +
- +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- + */
- +#define HAVE_ALLOCA_H 1
- +
- +/* Define to 1 if your compiler conforms to the ANSI C standard. */
- +#define HAVE_ANSI_COMPILER 1
- +
- +/* Define to 1 if you have the `atexit' function. */
- +#define HAVE_ATEXIT 1
- +
- +/* Define to 1 if you have the `bsd_signal' function. */
- +/* #undef HAVE_BSD_SIGNAL */
- +
- +/* Use case insensitive file names */
- +/* #undef HAVE_CASE_INSENSITIVE_FS */
- +
- +/* Define to 1 if you have the clock_gettime function. */
- +/* #undef HAVE_CLOCK_GETTIME */
- +
- +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
- + don't. */
- +#define HAVE_DECL_SYS_SIGLIST 1
- +
- +/* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you
- + don't. */
- +#define HAVE_DECL__SYS_SIGLIST 0
- +
- +/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you
- + don't. */
- +#define HAVE_DECL___SYS_SIGLIST 0
- +
- +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- + */
- +#define HAVE_DIRENT_H 1
- +
- +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
- +/* #undef HAVE_DOPRNT */
- +
- +/* Use platform specific coding */
- +/* #undef HAVE_DOS_PATHS */
- +
- +/* Define to 1 if you have the `dup2' function. */
- +#define HAVE_DUP2 1
- +
- +/* Define to 1 if you have the <fcntl.h> header file. */
- +#define HAVE_FCNTL_H 1
- +
- +/* Define to 1 if you have the `fdopen' function. */
- +#define HAVE_FDOPEN 1
- +
- +/* Define to 1 if you have the `fork' function. */
- +#define HAVE_FORK 1
- +
- +/* Define to 1 if you have the `getcwd' function. */
- +#define HAVE_GETCWD 1
- +
- +/* Define to 1 if you have the `getgroups' function. */
- +#define HAVE_GETGROUPS 1
- +
- +/* Define to 1 if you have the `gethostbyname' function. */
- +/* #undef HAVE_GETHOSTBYNAME */
- +
- +/* Define to 1 if you have the `gethostname' function. */
- +/* #undef HAVE_GETHOSTNAME */
- +
- +/* Define to 1 if you have the `getloadavg' function. */
- +/* #undef HAVE_GETLOADAVG */
- +
- +/* Define to 1 if you have the `getrlimit' function. */
- +#define HAVE_GETRLIMIT 1
- +
- +/* Define to 1 if you have a standard gettimeofday function */
- +#define HAVE_GETTIMEOFDAY 1
- +
- +/* Define to 1 if you have the <inttypes.h> header file. */
- +#define HAVE_INTTYPES_H 1
- +
- +/* Define to 1 if you have the `dgc' library (-ldgc). */
- +/* #undef HAVE_LIBDGC */
- +
- +/* Define to 1 if you have the `kstat' library (-lkstat). */
- +/* #undef HAVE_LIBKSTAT */
- +
- +/* Define to 1 if you have the <limits.h> header file. */
- +#define HAVE_LIMITS_H 1
- +
- +/* Define to 1 if you have the <locale.h> header file. */
- +#define HAVE_LOCALE_H 1
- +
- +/* Define to 1 if you have the `lstat' function. */
- +#define HAVE_LSTAT 1
- +
- +/* Define to 1 if you have the <mach/mach.h> header file. */
- +/* #undef HAVE_MACH_MACH_H */
- +
- +/* Define to 1 if you have the <memory.h> header file. */
- +#define HAVE_MEMORY_H 1
- +
- +/* Define to 1 if you have the `mkstemp' function. */
- +#define HAVE_MKSTEMP 1
- +
- +/* Define to 1 if you have the `mktemp' function. */
- +#define HAVE_MKTEMP 1
- +
- +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
- +/* #undef HAVE_NDIR_H */
- +
- +/* Define to 1 if you have the <nlist.h> header file. */
- +/* #undef HAVE_NLIST_H */
- +
- +/* Define to 1 if you have the `pipe' function. */
- +#define HAVE_PIPE 1
- +
- +/* Define to 1 if you have the `pstat_getdynamic' function. */
- +/* #undef HAVE_PSTAT_GETDYNAMIC */
- +
- +/* Define to 1 if you have the `readlink' function. */
- +#define HAVE_READLINK 1
- +
- +/* Define to 1 if you have the `realpath' function. */
- +#define HAVE_REALPATH 1
- +
- +/* Define to 1 if <signal.h> defines the SA_RESTART constant. */
- +#define HAVE_SA_RESTART 1
- +
- +/* Define to 1 if you have the `setegid' function. */
- +#define HAVE_SETEGID 1
- +
- +/* Define to 1 if you have the `seteuid' function. */
- +#define HAVE_SETEUID 1
- +
- +/* Define to 1 if you have the `setlinebuf' function. */
- +#define HAVE_SETLINEBUF 1
- +
- +/* Define to 1 if you have the `setlocale' function. */
- +#define HAVE_SETLOCALE 1
- +
- +/* Define to 1 if you have the `setregid' function. */
- +#define HAVE_SETREGID 1
- +
- +/* Define to 1 if you have the `setreuid' function. */
- +#define HAVE_SETREUID 1
- +
- +/* Define to 1 if you have the `setrlimit' function. */
- +#define HAVE_SETRLIMIT 1
- +
- +/* Define to 1 if you have the `setvbuf' function. */
- +#define HAVE_SETVBUF 1
- +
- +/* Define to 1 if you have the `sigaction' function. */
- +#define HAVE_SIGACTION 1
- +
- +/* Define to 1 if you have the `sigsetmask' function. */
- +/* #undef HAVE_SIGSETMASK */
- +
- +/* Define to 1 if you have the `socket' function. */
- +/* #undef HAVE_SOCKET */
- +
- +/* Define to 1 if you have the <stdarg.h> header file. */
- +#define HAVE_STDARG_H 1
- +
- +/* Define to 1 if you have the <stdint.h> header file. */
- +#define HAVE_STDINT_H 1
- +
- +/* Define to 1 if you have the <stdlib.h> header file. */
- +#define HAVE_STDLIB_H 1
- +
- +/* Define to 1 if you have the `strcasecmp' function. */
- +#define HAVE_STRCASECMP 1
- +
- +/* Define to 1 if you have the `strcmpi' function. */
- +/* #undef HAVE_STRCMPI */
- +
- +/* Define to 1 if you have the `strcoll' function and it is properly defined.
- + */
- +#define HAVE_STRCOLL 1
- +
- +/* Define to 1 if you have the `strdup' function. */
- +#define HAVE_STRDUP 1
- +
- +/* Define to 1 if you have the `strerror' function. */
- +#define HAVE_STRERROR 1
- +
- +/* Define to 1 if you have the `stricmp' function. */
- +/* #undef HAVE_STRICMP */
- +
- +/* Define to 1 if you have the <strings.h> header file. */
- +#define HAVE_STRINGS_H 1
- +
- +/* Define to 1 if you have the <string.h> header file. */
- +#define HAVE_STRING_H 1
- +
- +/* Define to 1 if you have the `strsignal' function. */
- +#define HAVE_STRSIGNAL 1
- +
- +/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */
- +/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
- +
- +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- + */
- +/* #undef HAVE_SYS_DIR_H */
- +
- +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- + */
- +/* #undef HAVE_SYS_NDIR_H */
- +
- +/* Define to 1 if you have the <sys/param.h> header file. */
- +#define HAVE_SYS_PARAM_H 1
- +
- +/* Define to 1 if you have the <sys/resource.h> header file. */
- +#define HAVE_SYS_RESOURCE_H 1
- +
- +/* Define to 1 if you have the <sys/stat.h> header file. */
- +#define HAVE_SYS_STAT_H 1
- +
- +/* Define to 1 if you have the <sys/timeb.h> header file. */
- +#define HAVE_SYS_TIMEB_H 1
- +
- +/* Define to 1 if you have the <sys/time.h> header file. */
- +#define HAVE_SYS_TIME_H 1
- +
- +/* Define to 1 if you have the <sys/types.h> header file. */
- +#define HAVE_SYS_TYPES_H 1
- +
- +/* Define to 1 if you have the <sys/wait.h> header file. */
- +#define HAVE_SYS_WAIT_H 1
- +
- +/* Define to 1 if you have the \`union wait' type in <sys/wait.h>. */
- +/* #undef HAVE_UNION_WAIT */
- +
- +/* Define to 1 if you have the <unistd.h> header file. */
- +#define HAVE_UNISTD_H 1
- +
- +/* Define to 1 if you have the <varargs.h> header file. */
- +/* #undef HAVE_VARARGS_H */
- +
- +/* Define to 1 if you have the `vfork' function. */
- +#define HAVE_VFORK 1
- +
- +/* Define to 1 if you have the <vfork.h> header file. */
- +/* #undef HAVE_VFORK_H */
- +
- +/* Define to 1 if you have the `vprintf' function. */
- +#define HAVE_VPRINTF 1
- +
- +/* Define to 1 if you have the `wait3' function. */
- +/* #undef HAVE_WAIT3 */
- +
- +/* Define to 1 if you have the `waitpid' function. */
- +#define HAVE_WAITPID 1
- +
- +/* Define to 1 if `fork' works. */
- +#define HAVE_WORKING_FORK 1
- +
- +/* Define to 1 if `vfork' works. */
- +#define HAVE_WORKING_VFORK 1
- +
- +/* Build host information. (not used by kmk) */
- +#define MAKE_HOST "i586-pc-haiku"
- +
- +/* Define to 1 to enable job server support in GNU make. */
- +#define MAKE_JOBSERVER 1
- +
- +/* Define to 1 to enable symbolic link timestamp checking. */
- +#define MAKE_SYMLINKS 1
- +
- +/* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend
- + on `HAVE_STRUCT_NLIST_N_UN_N_NAME */
- +/* #undef NLIST_NAME_UNION */
- +
- +/* Define to 1 if struct nlist.n_name is a pointer rather than an array. */
- +/* #undef NLIST_STRUCT */
- +
- +/* Define to 1 if your C compiler doesn't accept -c and -o together. */
- +/* #undef NO_MINUS_C_MINUS_O */
- +
- +/* Name of package */
- +#define PACKAGE "make"
- +
- +/* Define to the address where bug reports for this package should be sent. */
- +#define PACKAGE_BUGREPORT "bug-make@gnu.org"
- +
- +/* Define to the full name of this package. */
- +#define PACKAGE_NAME "GNU make"
- +
- +/* Define to the full name and version of this package. */
- +#define PACKAGE_STRING "GNU make 3.81.90"
- +
- +/* Define to the one symbol short name of this package. */
- +#define PACKAGE_TARNAME "make"
- +
- +/* Define to the home page for this package. */
- +#define PACKAGE_URL "http://www.gnu.org/software/make/"
- +
- +/* Define to the version of this package. */
- +#define PACKAGE_VERSION "3.81.90"
- +
- +/* Define to the character that separates directories in PATH. */
- +#define PATH_SEPARATOR_CHAR ':'
- +
- +/* Define as the return type of signal handlers (`int' or `void'). */
- +#define RETSIGTYPE void
- +
- +/* Define to the name of the SCCS 'get' command. */
- +#define SCCS_GET "get"
- +
- +/* Define to 1 if the SCCS 'get' command understands the '-G<file>' option. */
- +/* #undef SCCS_GET_MINUS_G */
- +
- +/* If using the C implementation of alloca, define if you know the
- + direction of stack growth for your system; otherwise it will be
- + automatically deduced at runtime.
- + STACK_DIRECTION > 0 => grows toward higher addresses
- + STACK_DIRECTION < 0 => grows toward lower addresses
- + STACK_DIRECTION = 0 => direction of growth unknown */
- +/* #undef STACK_DIRECTION */
- +
- +/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
- +/* #undef STAT_MACROS_BROKEN */
- +
- +/* Define to 1 if you have the ANSI C header files. */
- +#define STDC_HEADERS 1
- +
- +/* Define if struct stat contains a nanoseconds field */
- +#define ST_MTIM_NSEC tv_nsec
- +
- +/* Define to 1 on System V Release 4. */
- +/* #undef SVR4 */
- +
- +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
- +#define TIME_WITH_SYS_TIME 1
- +
- +/* Define to 1 for Encore UMAX. */
- +/* #undef UMAX */
- +
- +/* Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h> instead of
- + <sys/cpustats.h>. */
- +/* #undef UMAX4_3 */
- +
- +/* Enable extensions on AIX 3, Interix. */
- +#ifndef _ALL_SOURCE
- +# define _ALL_SOURCE 1
- +#endif
- +/* Enable GNU extensions on systems that have them. */
- +#ifndef _GNU_SOURCE
- +# define _GNU_SOURCE 1
- +#endif
- +/* Enable threading extensions on Solaris. */
- +#ifndef _POSIX_PTHREAD_SEMANTICS
- +# define _POSIX_PTHREAD_SEMANTICS 1
- +#endif
- +/* Enable extensions on HP NonStop. */
- +#ifndef _TANDEM_SOURCE
- +# define _TANDEM_SOURCE 1
- +#endif
- +/* Enable general extensions on Solaris. */
- +#ifndef __EXTENSIONS__
- +# define __EXTENSIONS__ 1
- +#endif
- +
- +
- +/* Version number of package */
- +#define VERSION "3.81.90"
- +
- +/* Use platform specific coding */
- +/* #undef WINDOWS32 */
- +
- +/* Define if using the dmalloc debugging malloc package */
- +/* #undef WITH_DMALLOC */
- +
- +/* Number of bits in a file offset, on hosts where this is settable. */
- +/* #undef _FILE_OFFSET_BITS */
- +
- +/* Define for large files, on AIX-style hosts. */
- +/* #undef _LARGE_FILES */
- +
- +/* Define to 1 if on MINIX. */
- +/* #undef _MINIX */
- +
- +/* Define to 2 if the system does not provide POSIX.1 features except with
- + this defined. */
- +/* #undef _POSIX_1_SOURCE */
- +
- +/* Define to 1 if you need to in order for `stat' and other things to work. */
- +/* #undef _POSIX_SOURCE */
- +
- +/* Define to empty if `const' does not conform to ANSI C. */
- +/* #undef const */
- +
- +/* Define to `int' if <sys/types.h> doesn't define. */
- +/* #undef gid_t */
- +
- +/* Define to `int' if <sys/types.h> does not define. */
- +/* #undef pid_t */
- +
- +/* Define to `unsigned int' if <sys/types.h> does not define. */
- +/* #undef size_t */
- +
- +/* Define to `int' if <sys/types.h> doesn't define. */
- +/* #undef uid_t */
- +
- +/* Define uintmax_t if not defined in <stdint.h> or <inttypes.h>. */
- +/* #undef uintmax_t */
- +
- +/* Define as `fork' if `vfork' does not work. */
- +/* #undef vfork */
- +
- +#include "inlined_memchr.h"
- Index: src/kmk/job.c
- ===================================================================
- --- src/kmk/job.c (revision 2436)
- +++ src/kmk/job.c (working copy)
- @@ -2050,7 +2050,7 @@
- static int
- load_too_high (void)
- {
- -#if defined(__MSDOS__) || defined(VMS) || defined(_AMIGA) || defined(__riscos__)
- +#if defined(__MSDOS__) || defined(VMS) || defined(_AMIGA) || defined(__riscos__) || defined(__HAIKU__)
- return 1;
- #else
- static double last_sec;
- Index: src/kmk/Makefile.kmk
- ===================================================================
- --- src/kmk/Makefile.kmk (revision 2436)
- +++ src/kmk/Makefile.kmk (working copy)
- @@ -57,6 +57,7 @@
- TEMPLATE_BIN-KMK_INCS.darwin = glob
- TEMPLATE_BIN-KMK_INCS.dragonfly = glob
- TEMPLATE_BIN-KMK_INCS.freebsd = glob
- +TEMPLATE_BIN-KMK_INCS.haiku = glob
- TEMPLATE_BIN-KMK_INCS.openbsd = glob
- TEMPLATE_BIN-KMK_INCS.solaris = glob
- TEMPLATE_BIN-KMK_LIBS = $(TEMPLATE_BIN-THREADED_LIBS) $(TARGET_kmkmissing) $(LIB_KUTIL)
- @@ -101,6 +102,11 @@
- glob/glob.c \
- glob/fnmatch.c
- +kmkmissing_SOURCES.haiku = \
- + kmkbuiltin/haikufakes.c \
- + glob/glob.c \
- + glob/fnmatch.c
- +
- kmkmissing_SOURCES.linux += \
- kmkbuiltin/strlcpy.c
- Index: src/kmk/incdep.c
- ===================================================================
- --- src/kmk/incdep.c (revision 2436)
- +++ src/kmk/incdep.c (working copy)
- @@ -635,7 +635,8 @@
- #elif defined(__APPLE__) \
- || defined(__sun__) || defined(__SunOS__) || defined(__sun) || defined(__SunOS) \
- - || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- + || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) \
- + || defined(__HAIKU__)
- /* No broken preload libraries known to be in common use on these platforms... */
- #elif defined(_MSC_VER) || defined(_WIN32) || defined(__OS2__)
- Index: src/kmk/kmkbuiltin/install.c
- ===================================================================
- --- src/kmk/kmkbuiltin/install.c (revision 2436)
- +++ src/kmk/kmkbuiltin/install.c (working copy)
- @@ -52,7 +52,9 @@
- # ifdef USE_MMAP
- # include <sys/mman.h>
- # endif
- -# include <sys/mount.h>
- +# ifndef __HAIKU__
- +# include <sys/mount.h>
- +# endif
- # include <sys/wait.h>
- # include <sys/time.h>
- #endif /* !_MSC_VER */
- @@ -68,7 +70,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- -#include <sysexits.h>
- +#ifndef __HAIKU__
- +# include <sysexits.h>
- +#endif
- #include <unistd.h>
- #if defined(__EMX__) || defined(_MSC_VER)
- # include <process.h>
- @@ -80,6 +84,9 @@
- #ifdef _MSC_VER
- # include "mscfakes.h"
- #endif
- +#ifdef __HAIKU__
- +# include "haikufakes.h"
- +#endif
- #include "kmkbuiltin.h"
- Index: src/kmk/kmkbuiltin/mv.c
- ===================================================================
- --- src/kmk/kmkbuiltin/mv.c (revision 2436)
- +++ src/kmk/kmkbuiltin/mv.c (working copy)
- @@ -55,7 +55,9 @@
- # include <sys/param.h>
- # include <sys/time.h>
- # include <sys/wait.h>
- -# include <sys/mount.h>
- +# ifndef __HAIKU__
- +# include <sys/mount.h>
- +# endif
- #endif
- #include <sys/stat.h>
- @@ -69,12 +71,17 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- -#include <sysexits.h>
- +#ifndef __HAIKU__
- +# include <sysexits.h>
- +#endif
- #include <unistd.h>
- #include "getopt.h"
- #ifdef __sun__
- # include "solfakes.h"
- #endif
- +#ifdef __HAIKU__
- +# include "haikufakes.h"
- +#endif
- #ifdef _MSC_VER
- # include "mscfakes.h"
- #endif
- Index: src/kmk/kmkbuiltin/fts.c
- ===================================================================
- --- src/kmk/kmkbuiltin/fts.c (revision 2436)
- +++ src/kmk/kmkbuiltin/fts.c (working copy)
- @@ -75,7 +75,7 @@
- #endif
- #if ! HAVE_NBTOOL_CONFIG_H
- -# if !defined(__sun__) && !defined(__gnu_linux__)
- +# if !defined(__sun__) && !defined(__gnu_linux__) && !defined(__HAIKU__)
- # define HAVE_STRUCT_DIRENT_D_NAMLEN 1
- # endif
- #endif
- Index: src/kmk/kmkbuiltin/mkdir.c
- ===================================================================
- --- src/kmk/kmkbuiltin/mkdir.c (revision 2436)
- +++ src/kmk/kmkbuiltin/mkdir.c (working copy)
- @@ -53,12 +53,17 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- -#include <sysexits.h>
- +#ifndef __HAIKU__
- +# include <sysexits.h>
- +#endif
- #include <unistd.h>
- #ifdef HAVE_ALLOCA_H
- # include <alloca.h>
- #endif
- #include "getopt.h"
- +#ifdef __HAIKU__
- +# include "haikufakes.h"
- +#endif
- #ifdef _MSC_VER
- # include <malloc.h>
- # include "mscfakes.h"
- Index: src/kmk/kmkbuiltin/haikufakes.c
- ===================================================================
- --- src/kmk/kmkbuiltin/haikufakes.c (revision 0)
- +++ src/kmk/kmkbuiltin/haikufakes.c (revision 0)
- @@ -0,0 +1,53 @@
- +/* $Id: haikufakes.c 2413 2010-09-11 17:43:04Z bird $ */
- +/** @file
- + * Fake Unix stuff for Haiku.
- + */
- +
- +/*
- + * Copyright (c) 2005-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
- + *
- + * This file is part of kBuild.
- + *
- + * kBuild 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.
- + *
- + * kBuild 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 kBuild. If not, see <http://www.gnu.org/licenses/>
- + *
- + */
- +
- +/*******************************************************************************
- +* Header Files *
- +*******************************************************************************/
- +#include "config.h"
- +#include <errno.h>
- +#include <stdio.h>
- +#include <stdarg.h>
- +#include <stdlib.h>
- +#include <sys/stat.h>
- +#include "haikufakes.h"
- +
- +
- +int haiku_lchmod(const char *pszPath, mode_t mode)
- +{
- + /*
- + * Weed out symbolic links.
- + */
- + struct stat s;
- + if ( !lstat(pszPath, &s)
- + && S_ISLNK(s.st_mode))
- + {
- + errno = -ENOSYS;
- + return -1;
- + }
- +
- + return chmod(pszPath, mode);
- +}
- +
- Index: src/kmk/kmkbuiltin/rm.c
- ===================================================================
- --- src/kmk/kmkbuiltin/rm.c (revision 2436)
- +++ src/kmk/kmkbuiltin/rm.c (working copy)
- @@ -43,7 +43,7 @@
- #include "config.h"
- #include <sys/stat.h>
- -#ifndef _MSC_VER
- +#if !defined(_MSC_VER) && !defined(__HAIKU__)
- # include <sys/param.h>
- # include <sys/mount.h>
- #endif
- @@ -57,10 +57,15 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- -#include <sysexits.h>
- +#ifndef __HAIKU__
- +# include <sysexits.h>
- +#endif
- #include <unistd.h>
- #include <ctype.h>
- #include "getopt.h"
- +#ifdef __HAIKU__
- +# include "haikufakes.h"
- +#endif
- #ifdef _MSC_VER
- # include "mscfakes.h"
- #endif
- Index: src/kmk/kmkbuiltin/haikufakes.h
- ===================================================================
- --- src/kmk/kmkbuiltin/haikufakes.h (revision 0)
- +++ src/kmk/kmkbuiltin/haikufakes.h (revision 0)
- @@ -0,0 +1,40 @@
- +/* $Id: mscfakes.h 2413 2010-09-11 17:43:04Z bird $ */
- +/** @file
- + * Unix fakes for MSC.
- + */
- +
- +/*
- + * Copyright (c) 2005-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
- + *
- + * This file is part of kBuild.
- + *
- + * kBuild 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.
- + *
- + * kBuild 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 kBuild. If not, see <http://www.gnu.org/licenses/>
- + *
- + */
- +
- +#ifndef ___haikufakes_h
- +#define ___haikufakes_h
- +
- +#define EX_OK 0
- +#define EX_OSERR 1
- +#define EX_NOUSER 1
- +#define EX_USAGE 1
- +#define EX_TEMPFAIL 1
- +#define EX_SOFTWARE 1
- +
- +#define lutimes(path, tvs) utimes(path, tvs)
- +#define lchmod chmod
- +
- +#endif
- +
- Index: src/kmk/kmkbuiltin/cp_utils.c
- ===================================================================
- --- src/kmk/kmkbuiltin/cp_utils.c (revision 2436)
- +++ src/kmk/kmkbuiltin/cp_utils.c (working copy)
- @@ -52,11 +52,16 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <signal.h>
- +#ifndef __HAIKU__
- #include <sysexits.h>
- +#endif
- #include <unistd.h>
- #ifdef __sun__
- # include "solfakes.h"
- #endif
- +#ifdef __HAIKU__
- +# include "haikufakes.h"
- +#endif
- #ifdef _MSC_VER
- # define MSC_DO_64_BIT_IO
- # include "mscfakes.h"
- Index: src/kmk/kmkbuiltin/chmod.c
- ===================================================================
- --- src/kmk/kmkbuiltin/chmod.c (revision 2436)
- +++ src/kmk/kmkbuiltin/chmod.c (working copy)
- @@ -60,6 +60,9 @@
- #ifdef __sun__
- # include "solfakes.h"
- #endif
- +#ifdef __HAIKU__
- +# include "haikufakes.h"
- +#endif
- #include "getopt.h"
- #include "kmkbuiltin.h"
- Index: src/kash/error.h
- ===================================================================
- --- src/kash/error.h (revision 2436)
- +++ src/kash/error.h (working copy)
- @@ -58,9 +58,12 @@
- * to an inner scope, set handler to point to a jmploc structure for the
- * inner scope, and restore handler on exit from the scope.
- */
- +#ifndef __HAIKU__
- +# include <setjmp.h>
- +#else
- +# include <posix/setjmp.h>
- +#endif
- -#include <setjmp.h>
- -
- struct jmploc {
- jmp_buf loc;
- };
- @@ -120,7 +123,7 @@
- * so we use _setjmp instead.
- */
- -#if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__) && !defined(__KLIBC__) && !defined(_MSC_VER)
- +#if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__) && !defined(__KLIBC__) && !defined(_MSC_VER) && !defined(__HAIKU__)
- #define setjmp(jmploc) _setjmp(jmploc)
- #define longjmp(jmploc, val) _longjmp(jmploc, val)
- #endif
- Index: src/kash/shtypes.h
- ===================================================================
- --- src/kash/shtypes.h (revision 2436)
- +++ src/kash/shtypes.h (working copy)
- @@ -31,8 +31,10 @@
- #include <sys/types.h>
- #include <stdlib.h>
- -#ifndef _MSC_VER
- +#if !defined(_MSC_VER) && !defined(__HAIKU__)
- # include <sys/signal.h>
- +#elif defined(__HAIKU__)
- +# include <posix/signal.h>
- #endif
- #ifdef _MSC_VER
- @@ -103,7 +105,7 @@
- struct shinstance;
- typedef struct shinstance shinstance;
- -#ifdef _MSC_VER
- +#if defined(_MSC_VER)
- typedef uint32_t shsigset_t;
- #else
- typedef sigset_t shsigset_t;
- Index: src/kash/Makefile.kmk
- ===================================================================
- --- src/kash/Makefile.kmk (revision 2436)
- +++ src/kash/Makefile.kmk (working copy)
- @@ -38,6 +38,7 @@
- kash_DEFS.debug = DEBUG=2
- kash_DEFS.linux = BSD
- kash_DEFS.solaris = BSD
- +kash_DEFS.haiku = BSD
- ## @todo bring over PC_SLASHES?
- kash_DEFS.win = \
- BSD PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS YY_NO_UNISTD_H SH_DEAL_WITH_CRLF
- @@ -106,6 +107,9 @@
- shforkA-win.asm
- kash_SOURCES.solaris = \
- sys_signame.c \
- + strlcpy.c
- +kash_SOURCES.haiku = \
- + sys_signame.c \
- strlcpy.c
- kash_INTERMEDIATES = \
- Index: src/kash/jobs.c
- ===================================================================
- --- src/kash/jobs.c (revision 2436)
- +++ 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);
- Index: src/kash/shinstance.c
- ===================================================================
- --- src/kash/shinstance.c (revision 2436)
- +++ src/kash/shinstance.c (working copy)
- @@ -889,7 +889,11 @@
- (void)hChild;
- return 0;
- }
- -#include <setjmp.h>
- +#ifdef K_OS == K_OS_HAIKU
- +# include <posix/setjmp.h>
- +#else
- +# include <setjmp.h>
- +#endif
- pid_t sh_fork(shinstance *psh)
- {
- Index: src/kash/shfile.h
- ===================================================================
- --- src/kash/shfile.h (revision 2436)
- +++ src/kash/shfile.h (working copy)
- @@ -45,8 +45,10 @@
- # define _PATH_DEFPATH "/bin:/usr/bin:/sbin:/usr/sbin"
- # endif
- #endif
- -#ifndef _MSC_VER
- -# include <sys/fcntl.h>
- +#if !defined(_MSC_VER)
- +# ifndef __HAIKU__
- +# include <sys/fcntl.h>
- +# endif
- # include <unistd.h>
- # ifndef O_BINARY
- # define O_BINARY 0
- Index: src/lib/k/kDefs.h
- ===================================================================
- --- src/lib/k/kDefs.h (revision 2436)
- +++ src/lib/k/kDefs.h (working copy)
- @@ -56,8 +56,10 @@
- #define K_OS_SOLARIS 9
- /** Windows. */
- #define K_OS_WINDOWS 10
- +/** Haiku. */
- +#define K_OS_HAIKU 11
- /** The max K_OS_* value (exclusive). */
- -#define K_OS_MAX 11
- +#define K_OS_MAX 12
- /** @} */
- /** @def K_OS
- @@ -90,6 +92,8 @@
- # define K_OS K_OS_SOLARIS
- # elif defined(_WIN32) || defined(_WIN64)
- # define K_OS K_OS_WINDOWS
- +# elif defined(__HAIKU__)
- +# define K_OS K_OS_HAIKU
- # else
- # error "Port Me"
- # endif
- Index: src/kObjCache/kObjCache.c
- ===================================================================
- --- src/kObjCache/kObjCache.c (revision 2436)
- +++ src/kObjCache/kObjCache.c (working copy)
- @@ -71,6 +71,9 @@
- # include <Windows.h>
- # include "quoted_spawn.h"
- #endif
- +#if defined(__HAIKU__)
- +# include <posix/sys/file.h>
- +#endif
- #include "crc32.h"
- #include "md5.h"
- Index: src/misc/kmk_time.c
- ===================================================================
- --- src/misc/kmk_time.c (revision 2436)
- +++ src/misc/kmk_time.c (working copy)
- @@ -363,11 +363,13 @@
- printf(" - normal exit: %d\n", WEXITSTATUS(rc));
- rc = WEXITSTATUS(rc);
- }
- +#ifndef __HAIKU__
- else if (WIFSIGNALED(rc) && WCOREDUMP(rc))
- {
- printf(" - dumped core: %s (%d)\n", my_strsignal(WTERMSIG(rc)), WTERMSIG(rc));
- rc = 10;
- }
- +#endif
- else if (WIFSIGNALED(rc))
- {
- printf(" - killed by: %s (%d)\n", my_strsignal(WTERMSIG(rc)), WTERMSIG(rc));
- Index: src/sed/config.h.haiku
- ===================================================================
- --- src/sed/config.h.haiku (revision 0)
- +++ src/sed/config.h.haiku (revision 0)
- @@ -0,0 +1,466 @@
- +/* config.h. Generated from config_h.in by configure. */
- +/* config_h.in. Generated from configure.ac by autoheader. */
- +
- +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- + systems. This function is required for `alloca.c' support on those systems.
- + */
- +/* #undef CRAY_STACKSEG_END */
- +
- +/* Define to 1 if using `alloca.c'. */
- +/* #undef C_ALLOCA */
- +
- +/* Define to 1 if translation of program messages to the user's native
- + language is requested. */
- +/* #undef ENABLE_NLS */
- +
- +/* Define to 1 if you have `alloca', as a function or macro. */
- +#define HAVE_ALLOCA 1
- +
- +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- + */
- +#define HAVE_ALLOCA_H 1
- +
- +/* Define to 1 if you have the <argz.h> header file. */
- +/* #undef HAVE_ARGZ_H */
- +
- +/* Define to 1 if you have the `asprintf' function. */
- +#define HAVE_ASPRINTF 1
- +
- +/* Define to 1 if you have the `bcopy' function. */
- +#define HAVE_BCOPY 1
- +
- +/* Define to 1 if you have the `btowc' function. */
- +#define HAVE_BTOWC 1
- +
- +/* Define to 1 if you have the `bzero' function. */
- +#define HAVE_BZERO 1
- +
- +/* Define if the GNU dcgettext() function is already present or preinstalled.
- + */
- +/* #undef HAVE_DCGETTEXT */
- +
- +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
- + don't. */
- +#define HAVE_DECL_FEOF_UNLOCKED 1
- +
- +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
- + you don't. */
- +#define HAVE_DECL_FGETS_UNLOCKED 0
- +
- +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
- + don't. */
- +#define HAVE_DECL_GETC_UNLOCKED 1
- +
- +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
- + don't. */
- +#define HAVE_DECL__SNPRINTF 0
- +
- +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
- + don't. */
- +#define HAVE_DECL__SNWPRINTF 0
- +
- +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- + */
- +#define HAVE_DIRENT_H 1
- +
- +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
- +/* #undef HAVE_DOPRNT */
- +
- +/* Define to 1 if you have the <errno.h> header file. */
- +#define HAVE_ERRNO_H 1
- +
- +/* Define to 1 if you have the `fchmod' function. */
- +#define HAVE_FCHMOD 1
- +
- +/* Define to 1 if you have the `fchown' function. */
- +#define HAVE_FCHOWN 1
- +
- +/* Define to 1 if you have the `fwprintf' function. */
- +#define HAVE_FWPRINTF 1
- +
- +/* Define to 1 if you have the `getcwd' function. */
- +#define HAVE_GETCWD 1
- +
- +/* Define to 1 if you have the `getegid' function. */
- +#define HAVE_GETEGID 1
- +
- +/* Define to 1 if you have the `geteuid' function. */
- +#define HAVE_GETEUID 1
- +
- +/* Define to 1 if you have the `getgid' function. */
- +#define HAVE_GETGID 1
- +
- +/* Define to 1 if you have the `getpagesize' function. */
- +#define HAVE_GETPAGESIZE 1
- +
- +/* Define if the GNU gettext() function is already present or preinstalled. */
- +/* #undef HAVE_GETTEXT */
- +
- +/* Define to 1 if you have the `getuid' function. */
- +#define HAVE_GETUID 1
- +
- +/* Define if you have the iconv() function. */
- +#define HAVE_ICONV 1
- +
- +/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
- +#define HAVE_INTMAX_T 1
- +
- +/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
- +#define HAVE_INTTYPES_H 1
- +
- +/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
- + declares uintmax_t. */
- +#define HAVE_INTTYPES_H_WITH_UINTMAX 1
- +
- +/* Define to 1 if you have the <io.h> header file. */
- +/* #undef HAVE_IO_H */
- +
- +/* Define to 1 if you have the `isascii' function. */
- +#define HAVE_ISASCII 1
- +
- +/* Define to 1 if you have the `isatty' function. */
- +#define HAVE_ISATTY 1
- +
- +/* Define to 1 if you have the `isblank' function. */
- +#define HAVE_ISBLANK 1
- +
- +/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
- +#define HAVE_LANGINFO_CODESET 1
- +
- +/* Define if your <locale.h> file defines LC_MESSAGES. */
- +#define HAVE_LC_MESSAGES 1
- +
- +/* Define to 1 if you have the `regex' library (-lregex). */
- +/* #undef HAVE_LIBREGEX */
- +
- +/* Define to 1 if you have the <limits.h> header file. */
- +#define HAVE_LIMITS_H 1
- +
- +/* Define to 1 if you have the <locale.h> header file. */
- +#define HAVE_LOCALE_H 1
- +
- +/* Define if you have the 'long double' type. */
- +#define HAVE_LONG_DOUBLE 1
- +
- +/* Define to 1 if you support file names longer than 14 characters. */
- +#define HAVE_LONG_FILE_NAMES 1
- +
- +/* Define if you have the 'long long' type. */
- +#define HAVE_LONG_LONG 1
- +
- +/* Define to 1 if you have the <malloc.h> header file. */
- +#define HAVE_MALLOC_H 1
- +
- +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
- +#define HAVE_MBRTOWC 1
- +
- +/* Define to 1 if <wchar.h> declares mbstate_t. */
- +#define HAVE_MBSTATE_T 1
- +
- +/* Define to 1 if you have the <mcheck.h> header file. */
- +/* #undef HAVE_MCHECK_H */
- +
- +/* Define to 1 if you have the `memchr' function. */
- +#define HAVE_MEMCHR 1
- +
- +/* Define to 1 if you have the `memcmp' function. */
- +#define HAVE_MEMCMP 1
- +
- +/* Define to 1 if you have the `memcpy' function. */
- +#define HAVE_MEMCPY 1
- +
- +/* Define to 1 if you have the `memmove' function. */
- +#define HAVE_MEMMOVE 1
- +
- +/* Define to 1 if you have the <memory.h> header file. */
- +#define HAVE_MEMORY_H 1
- +
- +/* Define to 1 if you have the `mempcpy' function. */
- +/* #undef HAVE_MEMPCPY */
- +
- +/* Define to 1 if you have the `memset' function. */
- +#define HAVE_MEMSET 1
- +
- +/* Define to 1 if you have the `mkstemp' function. */
- +#define HAVE_MKSTEMP 1
- +
- +/* Define to 1 if you have a working `mmap' system call. */
- +#define HAVE_MMAP 1
- +
- +/* Define to 1 if you have the `munmap' function. */
- +#define HAVE_MUNMAP 1
- +
- +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
- +/* #undef HAVE_NDIR_H */
- +
- +/* Define to 1 if you have the <nl_types.h> header file. */
- +#define HAVE_NL_TYPES_H 1
- +
- +/* Define to 1 if libc includes obstacks. */
- +/* #undef HAVE_OBSTACK */
- +
- +/* Define to 1 if you have the `pathconf' function. */
- +#define HAVE_PATHCONF 1
- +
- +/* Define to 1 if you have the `popen' function. */
- +#define HAVE_POPEN 1
- +
- +/* Define if your printf() function supports format strings with positions. */
- +#define HAVE_POSIX_PRINTF 1
- +
- +/* Define to 1 if you have the `putenv' function. */
- +#define HAVE_PUTENV 1
- +
- +/* Define to 1 if you have the <regex.h> header file. */
- +/* #undef HAVE_REGEX_H */
- +
- +/* Define to 1 if you have the `setenv' function. */
- +#define HAVE_SETENV 1
- +
- +/* Define to 1 if you have the `setlocale' function. */
- +#define HAVE_SETLOCALE 1
- +
- +/* Define to 1 if you have the `snprintf' function. */
- +#define HAVE_SNPRINTF 1
- +
- +/* Define to 1 if you have the <stdarg.h> header file. */
- +#define HAVE_STDARG_H 1
- +
- +/* Define to 1 if stdbool.h conforms to C99. */
- +#define HAVE_STDBOOL_H 1
- +
- +/* Define to 1 if you have the <stddef.h> header file. */
- +#define HAVE_STDDEF_H 1
- +
- +/* Define to 1 if you have the <stdint.h> header file. */
- +#define HAVE_STDINT_H 1
- +
- +/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
- + uintmax_t. */
- +#define HAVE_STDINT_H_WITH_UINTMAX 1
- +
- +/* Define to 1 if you have the <stdlib.h> header file. */
- +#define HAVE_STDLIB_H 1
- +
- +/* Define to 1 if you have the `stpcpy' function. */
- +#define HAVE_STPCPY 1
- +
- +/* Define to 1 if you have the `strcasecmp' function. */
- +#define HAVE_STRCASECMP 1
- +
- +/* Define to 1 if you have the `strchr' function. */
- +#define HAVE_STRCHR 1
- +
- +/* Define to 1 if you have the `strdup' function. */
- +#define HAVE_STRDUP 1
- +
- +/* Define to 1 if you have the `strerror' function. */
- +#define HAVE_STRERROR 1
- +
- +/* Define to 1 if you have the <strings.h> header file. */
- +#define HAVE_STRINGS_H 1
- +
- +/* Define to 1 if you have the <string.h> header file. */
- +#define HAVE_STRING_H 1
- +
- +/* Define to 1 if you have the `strtoul' function. */
- +#define HAVE_STRTOUL 1
- +
- +/* Define to 1 if you have the `strverscmp' function. */
- +/* #undef HAVE_STRVERSCMP */
- +
- +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- + */
- +/* #undef HAVE_SYS_DIR_H */
- +
- +/* Define to 1 if you have the <sys/file.h> header file. */
- +#define HAVE_SYS_FILE_H 1
- +
- +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- + */
- +/* #undef HAVE_SYS_NDIR_H */
- +
- +/* Define to 1 if you have the <sys/param.h> header file. */
- +#define HAVE_SYS_PARAM_H 1
- +
- +/* Define to 1 if you have the <sys/stat.h> header file. */
- +#define HAVE_SYS_STAT_H 1
- +
- +/* Define to 1 if you have the <sys/types.h> header file. */
- +#define HAVE_SYS_TYPES_H 1
- +
- +/* Define to 1 if you have the `tsearch' function. */
- +#define HAVE_TSEARCH 1
- +
- +/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
- +#define HAVE_UINTMAX_T 1
- +
- +/* Define to 1 if you have the <unistd.h> header file. */
- +#define HAVE_UNISTD_H 1
- +
- +/* Define if you have the 'unsigned long long' type. */
- +#define HAVE_UNSIGNED_LONG_LONG 1
- +
- +/* Define to 1 if you have the `vprintf' function. */
- +#define HAVE_VPRINTF 1
- +
- +/* Define to 1 if you have the <wchar.h> header file. */
- +#define HAVE_WCHAR_H 1
- +
- +/* Define if you have the 'wchar_t' type. */
- +#define HAVE_WCHAR_T 1
- +
- +/* Define to 1 if you have the `wcrtomb' function. */
- +#define HAVE_WCRTOMB 1
- +
- +/* Define to 1 if you have the `wcscoll' function. */
- +#define HAVE_WCSCOLL 1
- +
- +/* Define to 1 if you have the `wcslen' function. */
- +#define HAVE_WCSLEN 1
- +
- +/* Define to 1 if you have the <wctype.h> header file. */
- +#define HAVE_WCTYPE_H 1
- +
- +/* Define if you have the 'wint_t' type. */
- +#define HAVE_WINT_T 1
- +
- +/* Define to 1 if the system has the type `_Bool'. */
- +#define HAVE__BOOL 1
- +
- +/* Define to 1 if you have the `__argz_count' function. */
- +/* #undef HAVE___ARGZ_COUNT */
- +
- +/* Define to 1 if you have the `__argz_next' function. */
- +/* #undef HAVE___ARGZ_NEXT */
- +
- +/* Define to 1 if you have the `__argz_stringify' function. */
- +/* #undef HAVE___ARGZ_STRINGIFY */
- +
- +/* Define to 1 if you have the `__fsetlocking' function. */
- +#define HAVE___FSETLOCKING 1
- +
- +/* Define as const if the declaration of iconv() needs const. */
- +#define ICONV_CONST
- +
- +/* Define if integer division by zero raises signal SIGFPE. */
- +#define INTDIV0_RAISES_SIGFPE 1
- +
- +/* Name of package */
- +#define PACKAGE "sed"
- +
- +/* Define to the address where bug reports for this package should be sent. */
- +#define PACKAGE_BUGREPORT "bonzini@gnu.org"
- +
- +/* Define to the full name of this package. */
- +#define PACKAGE_NAME "sed"
- +
- +/* Define to the full name and version of this package. */
- +#define PACKAGE_STRING "sed 4.1.5"
- +
- +/* Define to the one symbol short name of this package. */
- +#define PACKAGE_TARNAME "sed"
- +
- +/* Define to the home page for this package. */
- +#define PACKAGE_URL ""
- +
- +/* Define to the version of this package. */
- +#define PACKAGE_VERSION "4.1.5"
- +
- +/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
- +/* #undef PRI_MACROS_BROKEN */
- +
- +/* Define to the version of GNU sed whose features are supported by this sed.
- + */
- +#define SED_FEATURE_VERSION "4.1"
- +
- +/* Define as the maximum value of type 'size_t', if the system doesn't define
- + it. */
- +/* #undef SIZE_MAX */
- +
- +/* If using the C implementation of alloca, define if you know the
- + direction of stack growth for your system; otherwise it will be
- + automatically deduced at runtime.
- + STACK_DIRECTION > 0 => grows toward higher addresses
- + STACK_DIRECTION < 0 => grows toward lower addresses
- + STACK_DIRECTION = 0 => direction of growth unknown */
- +/* #undef STACK_DIRECTION */
- +
- +/* Define to 1 if you have the ANSI C header files. */
- +#define STDC_HEADERS 1
- +
- +/* Enable extensions on AIX 3, Interix. */
- +#ifndef _ALL_SOURCE
- +# define _ALL_SOURCE 1
- +#endif
- +/* Enable GNU extensions on systems that have them. */
- +#ifndef _GNU_SOURCE
- +# define _GNU_SOURCE 1
- +#endif
- +/* Enable threading extensions on Solaris. */
- +#ifndef _POSIX_PTHREAD_SEMANTICS
- +# define _POSIX_PTHREAD_SEMANTICS 1
- +#endif
- +/* Enable extensions on HP NonStop. */
- +#ifndef _TANDEM_SOURCE
- +# define _TANDEM_SOURCE 1
- +#endif
- +/* Enable general extensions on Solaris. */
- +#ifndef __EXTENSIONS__
- +# define __EXTENSIONS__ 1
- +#endif
- +
- +
- +/* Version number of package */
- +#define VERSION "4.1.5"
- +
- +/* Number of bits in a file offset, on hosts where this is settable. */
- +/* #undef _FILE_OFFSET_BITS */
- +
- +/* Define for large files, on AIX-style hosts. */
- +/* #undef _LARGE_FILES */
- +
- +/* Define to 1 if on MINIX. */
- +/* #undef _MINIX */
- +
- +/* Define to 2 if the system does not provide POSIX.1 features except with
- + this defined. */
- +/* #undef _POSIX_1_SOURCE */
- +
- +/* Define to 1 if you need to in order for `stat' and other things to work. */
- +/* #undef _POSIX_SOURCE */
- +
- +/* Include BSD functions in regex, used by the testsuite */
- +#define _REGEX_RE_COMP 1
- +
- +/* Define to empty if `const' does not conform to ANSI C. */
- +/* #undef const */
- +
- +/* Define to `__inline__' or `__inline' if that's what the C compiler
- + calls it, or to nothing if 'inline' is not supported under any name. */
- +#ifndef __cplusplus
- +/* #undef inline */
- +#endif
- +
- +/* Define to a type if <wchar.h> does not define. */
- +/* #undef mbstate_t */
- +
- +/* Define to `long int' if <sys/types.h> does not define. */
- +/* #undef off_t */
- +
- +/* Define as the type of the result of subtracting two pointers, if the system
- + doesn't define it. */
- +/* #undef ptrdiff_t */
- +
- +/* Define to empty if the C compiler doesn't support this keyword. */
- +/* #undef signed */
- +
- +/* Define to `unsigned int' if <sys/types.h> does not define. */
- +/* #undef size_t */
- +
- +/* Define to `int' if <sys/types.h> does not define. */
- +/* #undef ssize_t */
- +
- +/* Define to unsigned long or unsigned long long if <stdint.h> and
- + <inttypes.h> don't define. */
- +/* #undef uintmax_t */
- Index: src/sed/Makefile.kmk
- ===================================================================
- --- src/sed/Makefile.kmk (revision 2436)
- +++ src/sed/Makefile.kmk (working copy)
- @@ -80,6 +80,9 @@
- lib/mkstemp.c \
- lib/getline.c \
- ../lib/startuphacks-win.c
- +kmk_sed_SOURCES.haiku = \
- + lib/strverscmp.c \
- + lib/obstack.c
- include $(FILE_KBUILD_SUB_FOOTER)
- Index: src/sed/config/help2man
- ===================================================================
- --- src/sed/config/help2man (revision 2436)
- +++ src/sed/config/help2man (working copy)
- @@ -1,4 +1,4 @@
- -#!/usr/bin/env perl
- +#!/bin/env perl
- # Generate a short man page from --help and --version output.
- # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software
- Index: kBuild/env.sh
- ===================================================================
- --- kBuild/env.sh (revision 2436)
- +++ kBuild/env.sh (working copy)
- @@ -288,6 +288,9 @@
- KBUILD_HOST=win
- ;;
- + Haiku)
- + KBUILD_HOST=haiku
- + ;;
- *)
- echo "$0: unknown os $KBUILD_HOST" 1>&${ERR_REDIR}
- sleep 1
- @@ -322,7 +325,7 @@
- x86_64|AMD64|amd64|k8|k8l|k9|k10)
- KBUILD_HOST_ARCH='amd64'
- ;;
- - x86|i86pc|ia32|i[3456789]86)
- + x86|i86pc|ia32|i[3456789]86|BePC)
- KBUILD_HOST_ARCH='x86'
- ;;
- sparc32|sparc|sparcv8|sparcv7|sparcv8e)
- @@ -364,7 +367,6 @@
- alpha)
- KBUILD_HOST_ARCH='alpha'
- ;;
- -
- *) echo "$0: unknown cpu/arch - $KBUILD_HOST_ARCH" 1>&${ERR_REDIR}
- sleep 1
- exit 1
- Index: kBuild/header.kmk
- ===================================================================
- --- kBuild/header.kmk (revision 2436)
- +++ kBuild/header.kmk (working copy)
- @@ -176,7 +176,7 @@
- # this keyword namespace is shared between OSes, architectures, cpus and
- # build types. (PORTME)
- #
- -KBUILD_OSES := darwin dos dragonfly freebsd l4 linux netbsd nt openbsd os2 solaris win os-agnostic
- +KBUILD_OSES := darwin dos dragonfly freebsd l4 linux netbsd nt openbsd os2 solaris win os-agnostic haiku
- KBUILD_ARCHES := x86 amd64 sparc32 sparc64 s390 s390x ppc32 ppc64 mips32 mips64 ia64 hppa32 hppa64 arm alpha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement