Advertisement
Guest User

Untitled

a guest
Sep 12th, 2011
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.17 KB | None | 0 0
  1. Index: Config.kmk
  2. ===================================================================
  3. --- Config.kmk (revision 2436)
  4. +++ Config.kmk (working copy)
  5. @@ -99,7 +99,7 @@
  6. #
  7. # Various platform specific hacks.
  8. #
  9. -ifn1of ($(KBUILD_TARGET), openbsd)
  10. +ifn1of ($(KBUILD_TARGET), haiku openbsd)
  11. GCC_Wextra = -Wextra
  12. endif
  13. if1of ($(KBUILD_TARGET), openbsd)
  14. Index: src/kmk/glob/fnmatch.c
  15. ===================================================================
  16. --- src/kmk/glob/fnmatch.c (revision 2436)
  17. +++ src/kmk/glob/fnmatch.c (working copy)
  18. @@ -27,7 +27,7 @@
  19. #endif
  20.  
  21. #include <errno.h>
  22. -#include <fnmatch.h>
  23. +#include "fnmatch.h"
  24. #include <ctype.h>
  25.  
  26. #if HAVE_STRING_H || defined _LIBC
  27. Index: src/kmk/arscan.c
  28. ===================================================================
  29. --- src/kmk/arscan.c (revision 2436)
  30. +++ src/kmk/arscan.c (working copy)
  31. @@ -231,7 +231,7 @@
  32. #endif
  33.  
  34. #ifndef WINDOWS32
  35. -# ifndef __BEOS__
  36. +# if !defined(__BEOS__) && !defined(__HAIKU__)
  37. # include <ar.h>
  38. # else
  39. /* BeOS 5 doesn't have <ar.h> but has archives in the same format
  40. Index: src/kmk/dir.c
  41. ===================================================================
  42. --- src/kmk/dir.c (revision 2436)
  43. +++ src/kmk/dir.c (working copy)
  44. @@ -1273,10 +1273,10 @@
  45. };
  46.  
  47. /* Forward declarations. */
  48. -static __ptr_t open_dirstream (const char *);
  49. -static struct dirent *read_dirstream (__ptr_t);
  50. +static void *open_dirstream (const char *);
  51. +static struct dirent *read_dirstream (void *);
  52.  
  53. -static __ptr_t
  54. +static void *
  55. open_dirstream (const char *directory)
  56. {
  57. struct dirstream *new;
  58. @@ -1296,11 +1296,11 @@
  59. new->contents = dir->contents;
  60. new->dirfile_slot = (struct dirfile **) new->contents->dirfiles.ht_vec;
  61.  
  62. - return (__ptr_t) new;
  63. + return (void *) new;
  64. }
  65.  
  66. static struct dirent *
  67. -read_dirstream (__ptr_t stream)
  68. +read_dirstream (void *stream)
  69. {
  70. static char *buf;
  71. static unsigned int bufsz;
  72. Index: src/kmk/main.c
  73. ===================================================================
  74. --- src/kmk/main.c (revision 2436)
  75. +++ src/kmk/main.c (working copy)
  76. @@ -55,6 +55,9 @@
  77. # define INCL_BASE
  78. # include <os2.h>
  79. # endif
  80. +# ifdef __HAIKU__
  81. +# include <OS.h>
  82. +# endif
  83. #endif /* KMK*/
  84.  
  85. #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
  86. @@ -850,7 +853,24 @@
  87. if (!SetPriorityClass (GetCurrentProcess (), dwPriority))
  88. fprintf (stderr, "warning: SetPriorityClass (,%#x) failed with last error %d\n",
  89. dwPriority, GetLastError ());
  90. +#elif __HAIKU__
  91. + int32 newPriority;
  92. + status_t error;
  93.  
  94. + switch (process_priority)
  95. + {
  96. + case 0: return;
  97. + case 1: newPriority = B_LOWEST_ACTIVE_PRIORITY; break;
  98. + case 2: newPriority = B_LOW_PRIORITY; break;
  99. + case 3: newPriority = B_NORMAL_PRIORITY; break;
  100. + case 4: newPriority = B_URGENT_DISPLAY_PRIORITY; break;
  101. + case 5: newPriority = B_REAL_TIME_DISPLAY_PRIORITY; break;
  102. + default: fatal(NILF, _("invalid priority %d\n"), process_priority);
  103. + }
  104. + error = set_thread_priority (find_thread (NULL), newPriority);
  105. + if (error != B_OK)
  106. + fprintf (stderr, "warning: set_thread_priority (,%d) failed: %s\n",
  107. + newPriority, strerror (error));
  108. # else /*#elif HAVE_NICE */
  109. int nice_level = 0;
  110. switch (process_priority)
  111. Index: src/kmk/config.h.haiku
  112. ===================================================================
  113. --- src/kmk/config.h.haiku (revision 0)
  114. +++ src/kmk/config.h.haiku (revision 0)
  115. @@ -0,0 +1,438 @@
  116. +/* config.h. Generated from config.h.in by configure. */
  117. +/* config.h.in. Generated from configure.in by autoheader. */
  118. +
  119. +/* Define to 1 if the `closedir' function returns void instead of `int'. */
  120. +/* #undef CLOSEDIR_VOID */
  121. +
  122. +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
  123. + systems. This function is required for `alloca.c' support on those systems.
  124. + */
  125. +/* #undef CRAY_STACKSEG_END */
  126. +
  127. +/* Define to 1 if using `alloca.c'. */
  128. +/* #undef C_ALLOCA */
  129. +
  130. +/* Define to 1 if using `getloadavg.c'. */
  131. +#define C_GETLOADAVG 1
  132. +
  133. +/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
  134. +/* #undef DGUX */
  135. +
  136. +/* Use high resolution file timestamps if nonzero. */
  137. +#define FILE_TIMESTAMP_HI_RES 1
  138. +
  139. +/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid.
  140. + */
  141. +/* #undef GETLOADAVG_PRIVILEGED */
  142. +
  143. +/* Define to 1 if you have `alloca', as a function or macro. */
  144. +#define HAVE_ALLOCA 1
  145. +
  146. +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
  147. + */
  148. +#define HAVE_ALLOCA_H 1
  149. +
  150. +/* Define to 1 if your compiler conforms to the ANSI C standard. */
  151. +#define HAVE_ANSI_COMPILER 1
  152. +
  153. +/* Define to 1 if you have the `atexit' function. */
  154. +#define HAVE_ATEXIT 1
  155. +
  156. +/* Define to 1 if you have the `bsd_signal' function. */
  157. +/* #undef HAVE_BSD_SIGNAL */
  158. +
  159. +/* Use case insensitive file names */
  160. +/* #undef HAVE_CASE_INSENSITIVE_FS */
  161. +
  162. +/* Define to 1 if you have the clock_gettime function. */
  163. +/* #undef HAVE_CLOCK_GETTIME */
  164. +
  165. +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
  166. + don't. */
  167. +#define HAVE_DECL_SYS_SIGLIST 1
  168. +
  169. +/* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you
  170. + don't. */
  171. +#define HAVE_DECL__SYS_SIGLIST 0
  172. +
  173. +/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you
  174. + don't. */
  175. +#define HAVE_DECL___SYS_SIGLIST 0
  176. +
  177. +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
  178. + */
  179. +#define HAVE_DIRENT_H 1
  180. +
  181. +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
  182. +/* #undef HAVE_DOPRNT */
  183. +
  184. +/* Use platform specific coding */
  185. +/* #undef HAVE_DOS_PATHS */
  186. +
  187. +/* Define to 1 if you have the `dup2' function. */
  188. +#define HAVE_DUP2 1
  189. +
  190. +/* Define to 1 if you have the <fcntl.h> header file. */
  191. +#define HAVE_FCNTL_H 1
  192. +
  193. +/* Define to 1 if you have the `fdopen' function. */
  194. +#define HAVE_FDOPEN 1
  195. +
  196. +/* Define to 1 if you have the `fork' function. */
  197. +#define HAVE_FORK 1
  198. +
  199. +/* Define to 1 if you have the `getcwd' function. */
  200. +#define HAVE_GETCWD 1
  201. +
  202. +/* Define to 1 if you have the `getgroups' function. */
  203. +#define HAVE_GETGROUPS 1
  204. +
  205. +/* Define to 1 if you have the `gethostbyname' function. */
  206. +/* #undef HAVE_GETHOSTBYNAME */
  207. +
  208. +/* Define to 1 if you have the `gethostname' function. */
  209. +/* #undef HAVE_GETHOSTNAME */
  210. +
  211. +/* Define to 1 if you have the `getloadavg' function. */
  212. +/* #undef HAVE_GETLOADAVG */
  213. +
  214. +/* Define to 1 if you have the `getrlimit' function. */
  215. +#define HAVE_GETRLIMIT 1
  216. +
  217. +/* Define to 1 if you have a standard gettimeofday function */
  218. +#define HAVE_GETTIMEOFDAY 1
  219. +
  220. +/* Define to 1 if you have the <inttypes.h> header file. */
  221. +#define HAVE_INTTYPES_H 1
  222. +
  223. +/* Define to 1 if you have the `dgc' library (-ldgc). */
  224. +/* #undef HAVE_LIBDGC */
  225. +
  226. +/* Define to 1 if you have the `kstat' library (-lkstat). */
  227. +/* #undef HAVE_LIBKSTAT */
  228. +
  229. +/* Define to 1 if you have the <limits.h> header file. */
  230. +#define HAVE_LIMITS_H 1
  231. +
  232. +/* Define to 1 if you have the <locale.h> header file. */
  233. +#define HAVE_LOCALE_H 1
  234. +
  235. +/* Define to 1 if you have the `lstat' function. */
  236. +#define HAVE_LSTAT 1
  237. +
  238. +/* Define to 1 if you have the <mach/mach.h> header file. */
  239. +/* #undef HAVE_MACH_MACH_H */
  240. +
  241. +/* Define to 1 if you have the <memory.h> header file. */
  242. +#define HAVE_MEMORY_H 1
  243. +
  244. +/* Define to 1 if you have the `mkstemp' function. */
  245. +#define HAVE_MKSTEMP 1
  246. +
  247. +/* Define to 1 if you have the `mktemp' function. */
  248. +#define HAVE_MKTEMP 1
  249. +
  250. +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
  251. +/* #undef HAVE_NDIR_H */
  252. +
  253. +/* Define to 1 if you have the <nlist.h> header file. */
  254. +/* #undef HAVE_NLIST_H */
  255. +
  256. +/* Define to 1 if you have the `pipe' function. */
  257. +#define HAVE_PIPE 1
  258. +
  259. +/* Define to 1 if you have the `pstat_getdynamic' function. */
  260. +/* #undef HAVE_PSTAT_GETDYNAMIC */
  261. +
  262. +/* Define to 1 if you have the `readlink' function. */
  263. +#define HAVE_READLINK 1
  264. +
  265. +/* Define to 1 if you have the `realpath' function. */
  266. +#define HAVE_REALPATH 1
  267. +
  268. +/* Define to 1 if <signal.h> defines the SA_RESTART constant. */
  269. +#define HAVE_SA_RESTART 1
  270. +
  271. +/* Define to 1 if you have the `setegid' function. */
  272. +#define HAVE_SETEGID 1
  273. +
  274. +/* Define to 1 if you have the `seteuid' function. */
  275. +#define HAVE_SETEUID 1
  276. +
  277. +/* Define to 1 if you have the `setlinebuf' function. */
  278. +#define HAVE_SETLINEBUF 1
  279. +
  280. +/* Define to 1 if you have the `setlocale' function. */
  281. +#define HAVE_SETLOCALE 1
  282. +
  283. +/* Define to 1 if you have the `setregid' function. */
  284. +#define HAVE_SETREGID 1
  285. +
  286. +/* Define to 1 if you have the `setreuid' function. */
  287. +#define HAVE_SETREUID 1
  288. +
  289. +/* Define to 1 if you have the `setrlimit' function. */
  290. +#define HAVE_SETRLIMIT 1
  291. +
  292. +/* Define to 1 if you have the `setvbuf' function. */
  293. +#define HAVE_SETVBUF 1
  294. +
  295. +/* Define to 1 if you have the `sigaction' function. */
  296. +#define HAVE_SIGACTION 1
  297. +
  298. +/* Define to 1 if you have the `sigsetmask' function. */
  299. +/* #undef HAVE_SIGSETMASK */
  300. +
  301. +/* Define to 1 if you have the `socket' function. */
  302. +/* #undef HAVE_SOCKET */
  303. +
  304. +/* Define to 1 if you have the <stdarg.h> header file. */
  305. +#define HAVE_STDARG_H 1
  306. +
  307. +/* Define to 1 if you have the <stdint.h> header file. */
  308. +#define HAVE_STDINT_H 1
  309. +
  310. +/* Define to 1 if you have the <stdlib.h> header file. */
  311. +#define HAVE_STDLIB_H 1
  312. +
  313. +/* Define to 1 if you have the `strcasecmp' function. */
  314. +#define HAVE_STRCASECMP 1
  315. +
  316. +/* Define to 1 if you have the `strcmpi' function. */
  317. +/* #undef HAVE_STRCMPI */
  318. +
  319. +/* Define to 1 if you have the `strcoll' function and it is properly defined.
  320. + */
  321. +#define HAVE_STRCOLL 1
  322. +
  323. +/* Define to 1 if you have the `strdup' function. */
  324. +#define HAVE_STRDUP 1
  325. +
  326. +/* Define to 1 if you have the `strerror' function. */
  327. +#define HAVE_STRERROR 1
  328. +
  329. +/* Define to 1 if you have the `stricmp' function. */
  330. +/* #undef HAVE_STRICMP */
  331. +
  332. +/* Define to 1 if you have the <strings.h> header file. */
  333. +#define HAVE_STRINGS_H 1
  334. +
  335. +/* Define to 1 if you have the <string.h> header file. */
  336. +#define HAVE_STRING_H 1
  337. +
  338. +/* Define to 1 if you have the `strsignal' function. */
  339. +#define HAVE_STRSIGNAL 1
  340. +
  341. +/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */
  342. +/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
  343. +
  344. +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
  345. + */
  346. +/* #undef HAVE_SYS_DIR_H */
  347. +
  348. +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
  349. + */
  350. +/* #undef HAVE_SYS_NDIR_H */
  351. +
  352. +/* Define to 1 if you have the <sys/param.h> header file. */
  353. +#define HAVE_SYS_PARAM_H 1
  354. +
  355. +/* Define to 1 if you have the <sys/resource.h> header file. */
  356. +#define HAVE_SYS_RESOURCE_H 1
  357. +
  358. +/* Define to 1 if you have the <sys/stat.h> header file. */
  359. +#define HAVE_SYS_STAT_H 1
  360. +
  361. +/* Define to 1 if you have the <sys/timeb.h> header file. */
  362. +#define HAVE_SYS_TIMEB_H 1
  363. +
  364. +/* Define to 1 if you have the <sys/time.h> header file. */
  365. +#define HAVE_SYS_TIME_H 1
  366. +
  367. +/* Define to 1 if you have the <sys/types.h> header file. */
  368. +#define HAVE_SYS_TYPES_H 1
  369. +
  370. +/* Define to 1 if you have the <sys/wait.h> header file. */
  371. +#define HAVE_SYS_WAIT_H 1
  372. +
  373. +/* Define to 1 if you have the \`union wait' type in <sys/wait.h>. */
  374. +/* #undef HAVE_UNION_WAIT */
  375. +
  376. +/* Define to 1 if you have the <unistd.h> header file. */
  377. +#define HAVE_UNISTD_H 1
  378. +
  379. +/* Define to 1 if you have the <varargs.h> header file. */
  380. +/* #undef HAVE_VARARGS_H */
  381. +
  382. +/* Define to 1 if you have the `vfork' function. */
  383. +#define HAVE_VFORK 1
  384. +
  385. +/* Define to 1 if you have the <vfork.h> header file. */
  386. +/* #undef HAVE_VFORK_H */
  387. +
  388. +/* Define to 1 if you have the `vprintf' function. */
  389. +#define HAVE_VPRINTF 1
  390. +
  391. +/* Define to 1 if you have the `wait3' function. */
  392. +/* #undef HAVE_WAIT3 */
  393. +
  394. +/* Define to 1 if you have the `waitpid' function. */
  395. +#define HAVE_WAITPID 1
  396. +
  397. +/* Define to 1 if `fork' works. */
  398. +#define HAVE_WORKING_FORK 1
  399. +
  400. +/* Define to 1 if `vfork' works. */
  401. +#define HAVE_WORKING_VFORK 1
  402. +
  403. +/* Build host information. (not used by kmk) */
  404. +#define MAKE_HOST "i586-pc-haiku"
  405. +
  406. +/* Define to 1 to enable job server support in GNU make. */
  407. +#define MAKE_JOBSERVER 1
  408. +
  409. +/* Define to 1 to enable symbolic link timestamp checking. */
  410. +#define MAKE_SYMLINKS 1
  411. +
  412. +/* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend
  413. + on `HAVE_STRUCT_NLIST_N_UN_N_NAME */
  414. +/* #undef NLIST_NAME_UNION */
  415. +
  416. +/* Define to 1 if struct nlist.n_name is a pointer rather than an array. */
  417. +/* #undef NLIST_STRUCT */
  418. +
  419. +/* Define to 1 if your C compiler doesn't accept -c and -o together. */
  420. +/* #undef NO_MINUS_C_MINUS_O */
  421. +
  422. +/* Name of package */
  423. +#define PACKAGE "make"
  424. +
  425. +/* Define to the address where bug reports for this package should be sent. */
  426. +#define PACKAGE_BUGREPORT "bug-make@gnu.org"
  427. +
  428. +/* Define to the full name of this package. */
  429. +#define PACKAGE_NAME "GNU make"
  430. +
  431. +/* Define to the full name and version of this package. */
  432. +#define PACKAGE_STRING "GNU make 3.81.90"
  433. +
  434. +/* Define to the one symbol short name of this package. */
  435. +#define PACKAGE_TARNAME "make"
  436. +
  437. +/* Define to the home page for this package. */
  438. +#define PACKAGE_URL "http://www.gnu.org/software/make/"
  439. +
  440. +/* Define to the version of this package. */
  441. +#define PACKAGE_VERSION "3.81.90"
  442. +
  443. +/* Define to the character that separates directories in PATH. */
  444. +#define PATH_SEPARATOR_CHAR ':'
  445. +
  446. +/* Define as the return type of signal handlers (`int' or `void'). */
  447. +#define RETSIGTYPE void
  448. +
  449. +/* Define to the name of the SCCS 'get' command. */
  450. +#define SCCS_GET "get"
  451. +
  452. +/* Define to 1 if the SCCS 'get' command understands the '-G<file>' option. */
  453. +/* #undef SCCS_GET_MINUS_G */
  454. +
  455. +/* If using the C implementation of alloca, define if you know the
  456. + direction of stack growth for your system; otherwise it will be
  457. + automatically deduced at runtime.
  458. + STACK_DIRECTION > 0 => grows toward higher addresses
  459. + STACK_DIRECTION < 0 => grows toward lower addresses
  460. + STACK_DIRECTION = 0 => direction of growth unknown */
  461. +/* #undef STACK_DIRECTION */
  462. +
  463. +/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
  464. +/* #undef STAT_MACROS_BROKEN */
  465. +
  466. +/* Define to 1 if you have the ANSI C header files. */
  467. +#define STDC_HEADERS 1
  468. +
  469. +/* Define if struct stat contains a nanoseconds field */
  470. +#define ST_MTIM_NSEC tv_nsec
  471. +
  472. +/* Define to 1 on System V Release 4. */
  473. +/* #undef SVR4 */
  474. +
  475. +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
  476. +#define TIME_WITH_SYS_TIME 1
  477. +
  478. +/* Define to 1 for Encore UMAX. */
  479. +/* #undef UMAX */
  480. +
  481. +/* Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h> instead of
  482. + <sys/cpustats.h>. */
  483. +/* #undef UMAX4_3 */
  484. +
  485. +/* Enable extensions on AIX 3, Interix. */
  486. +#ifndef _ALL_SOURCE
  487. +# define _ALL_SOURCE 1
  488. +#endif
  489. +/* Enable GNU extensions on systems that have them. */
  490. +#ifndef _GNU_SOURCE
  491. +# define _GNU_SOURCE 1
  492. +#endif
  493. +/* Enable threading extensions on Solaris. */
  494. +#ifndef _POSIX_PTHREAD_SEMANTICS
  495. +# define _POSIX_PTHREAD_SEMANTICS 1
  496. +#endif
  497. +/* Enable extensions on HP NonStop. */
  498. +#ifndef _TANDEM_SOURCE
  499. +# define _TANDEM_SOURCE 1
  500. +#endif
  501. +/* Enable general extensions on Solaris. */
  502. +#ifndef __EXTENSIONS__
  503. +# define __EXTENSIONS__ 1
  504. +#endif
  505. +
  506. +
  507. +/* Version number of package */
  508. +#define VERSION "3.81.90"
  509. +
  510. +/* Use platform specific coding */
  511. +/* #undef WINDOWS32 */
  512. +
  513. +/* Define if using the dmalloc debugging malloc package */
  514. +/* #undef WITH_DMALLOC */
  515. +
  516. +/* Number of bits in a file offset, on hosts where this is settable. */
  517. +/* #undef _FILE_OFFSET_BITS */
  518. +
  519. +/* Define for large files, on AIX-style hosts. */
  520. +/* #undef _LARGE_FILES */
  521. +
  522. +/* Define to 1 if on MINIX. */
  523. +/* #undef _MINIX */
  524. +
  525. +/* Define to 2 if the system does not provide POSIX.1 features except with
  526. + this defined. */
  527. +/* #undef _POSIX_1_SOURCE */
  528. +
  529. +/* Define to 1 if you need to in order for `stat' and other things to work. */
  530. +/* #undef _POSIX_SOURCE */
  531. +
  532. +/* Define to empty if `const' does not conform to ANSI C. */
  533. +/* #undef const */
  534. +
  535. +/* Define to `int' if <sys/types.h> doesn't define. */
  536. +/* #undef gid_t */
  537. +
  538. +/* Define to `int' if <sys/types.h> does not define. */
  539. +/* #undef pid_t */
  540. +
  541. +/* Define to `unsigned int' if <sys/types.h> does not define. */
  542. +/* #undef size_t */
  543. +
  544. +/* Define to `int' if <sys/types.h> doesn't define. */
  545. +/* #undef uid_t */
  546. +
  547. +/* Define uintmax_t if not defined in <stdint.h> or <inttypes.h>. */
  548. +/* #undef uintmax_t */
  549. +
  550. +/* Define as `fork' if `vfork' does not work. */
  551. +/* #undef vfork */
  552. +
  553. +#include "inlined_memchr.h"
  554. Index: src/kmk/job.c
  555. ===================================================================
  556. --- src/kmk/job.c (revision 2436)
  557. +++ src/kmk/job.c (working copy)
  558. @@ -2050,7 +2050,7 @@
  559. static int
  560. load_too_high (void)
  561. {
  562. -#if defined(__MSDOS__) || defined(VMS) || defined(_AMIGA) || defined(__riscos__)
  563. +#if defined(__MSDOS__) || defined(VMS) || defined(_AMIGA) || defined(__riscos__) || defined(__HAIKU__)
  564. return 1;
  565. #else
  566. static double last_sec;
  567. Index: src/kmk/Makefile.kmk
  568. ===================================================================
  569. --- src/kmk/Makefile.kmk (revision 2436)
  570. +++ src/kmk/Makefile.kmk (working copy)
  571. @@ -57,6 +57,7 @@
  572. TEMPLATE_BIN-KMK_INCS.darwin = glob
  573. TEMPLATE_BIN-KMK_INCS.dragonfly = glob
  574. TEMPLATE_BIN-KMK_INCS.freebsd = glob
  575. +TEMPLATE_BIN-KMK_INCS.haiku = glob
  576. TEMPLATE_BIN-KMK_INCS.openbsd = glob
  577. TEMPLATE_BIN-KMK_INCS.solaris = glob
  578. TEMPLATE_BIN-KMK_LIBS = $(TEMPLATE_BIN-THREADED_LIBS) $(TARGET_kmkmissing) $(LIB_KUTIL)
  579. @@ -101,6 +102,11 @@
  580. glob/glob.c \
  581. glob/fnmatch.c
  582.  
  583. +kmkmissing_SOURCES.haiku = \
  584. + kmkbuiltin/haikufakes.c \
  585. + glob/glob.c \
  586. + glob/fnmatch.c
  587. +
  588. kmkmissing_SOURCES.linux += \
  589. kmkbuiltin/strlcpy.c
  590.  
  591. Index: src/kmk/incdep.c
  592. ===================================================================
  593. --- src/kmk/incdep.c (revision 2436)
  594. +++ src/kmk/incdep.c (working copy)
  595. @@ -635,7 +635,8 @@
  596.  
  597. #elif defined(__APPLE__) \
  598. || defined(__sun__) || defined(__SunOS__) || defined(__sun) || defined(__SunOS) \
  599. - || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
  600. + || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) \
  601. + || defined(__HAIKU__)
  602. /* No broken preload libraries known to be in common use on these platforms... */
  603.  
  604. #elif defined(_MSC_VER) || defined(_WIN32) || defined(__OS2__)
  605. Index: src/kmk/kmkbuiltin/install.c
  606. ===================================================================
  607. --- src/kmk/kmkbuiltin/install.c (revision 2436)
  608. +++ src/kmk/kmkbuiltin/install.c (working copy)
  609. @@ -52,7 +52,9 @@
  610. # ifdef USE_MMAP
  611. # include <sys/mman.h>
  612. # endif
  613. -# include <sys/mount.h>
  614. +# ifndef __HAIKU__
  615. +# include <sys/mount.h>
  616. +# endif
  617. # include <sys/wait.h>
  618. # include <sys/time.h>
  619. #endif /* !_MSC_VER */
  620. @@ -68,7 +70,9 @@
  621. #include <stdio.h>
  622. #include <stdlib.h>
  623. #include <string.h>
  624. -#include <sysexits.h>
  625. +#ifndef __HAIKU__
  626. +# include <sysexits.h>
  627. +#endif
  628. #include <unistd.h>
  629. #if defined(__EMX__) || defined(_MSC_VER)
  630. # include <process.h>
  631. @@ -80,6 +84,9 @@
  632. #ifdef _MSC_VER
  633. # include "mscfakes.h"
  634. #endif
  635. +#ifdef __HAIKU__
  636. +# include "haikufakes.h"
  637. +#endif
  638. #include "kmkbuiltin.h"
  639.  
  640.  
  641. Index: src/kmk/kmkbuiltin/mv.c
  642. ===================================================================
  643. --- src/kmk/kmkbuiltin/mv.c (revision 2436)
  644. +++ src/kmk/kmkbuiltin/mv.c (working copy)
  645. @@ -55,7 +55,9 @@
  646. # include <sys/param.h>
  647. # include <sys/time.h>
  648. # include <sys/wait.h>
  649. -# include <sys/mount.h>
  650. +# ifndef __HAIKU__
  651. +# include <sys/mount.h>
  652. +# endif
  653. #endif
  654. #include <sys/stat.h>
  655.  
  656. @@ -69,12 +71,17 @@
  657. #include <stdio.h>
  658. #include <stdlib.h>
  659. #include <string.h>
  660. -#include <sysexits.h>
  661. +#ifndef __HAIKU__
  662. +# include <sysexits.h>
  663. +#endif
  664. #include <unistd.h>
  665. #include "getopt.h"
  666. #ifdef __sun__
  667. # include "solfakes.h"
  668. #endif
  669. +#ifdef __HAIKU__
  670. +# include "haikufakes.h"
  671. +#endif
  672. #ifdef _MSC_VER
  673. # include "mscfakes.h"
  674. #endif
  675. Index: src/kmk/kmkbuiltin/fts.c
  676. ===================================================================
  677. --- src/kmk/kmkbuiltin/fts.c (revision 2436)
  678. +++ src/kmk/kmkbuiltin/fts.c (working copy)
  679. @@ -75,7 +75,7 @@
  680. #endif
  681.  
  682. #if ! HAVE_NBTOOL_CONFIG_H
  683. -# if !defined(__sun__) && !defined(__gnu_linux__)
  684. +# if !defined(__sun__) && !defined(__gnu_linux__) && !defined(__HAIKU__)
  685. # define HAVE_STRUCT_DIRENT_D_NAMLEN 1
  686. # endif
  687. #endif
  688. Index: src/kmk/kmkbuiltin/mkdir.c
  689. ===================================================================
  690. --- src/kmk/kmkbuiltin/mkdir.c (revision 2436)
  691. +++ src/kmk/kmkbuiltin/mkdir.c (working copy)
  692. @@ -53,12 +53,17 @@
  693. #include <stdio.h>
  694. #include <stdlib.h>
  695. #include <string.h>
  696. -#include <sysexits.h>
  697. +#ifndef __HAIKU__
  698. +# include <sysexits.h>
  699. +#endif
  700. #include <unistd.h>
  701. #ifdef HAVE_ALLOCA_H
  702. # include <alloca.h>
  703. #endif
  704. #include "getopt.h"
  705. +#ifdef __HAIKU__
  706. +# include "haikufakes.h"
  707. +#endif
  708. #ifdef _MSC_VER
  709. # include <malloc.h>
  710. # include "mscfakes.h"
  711. Index: src/kmk/kmkbuiltin/haikufakes.c
  712. ===================================================================
  713. --- src/kmk/kmkbuiltin/haikufakes.c (revision 0)
  714. +++ src/kmk/kmkbuiltin/haikufakes.c (revision 0)
  715. @@ -0,0 +1,53 @@
  716. +/* $Id: haikufakes.c 2413 2010-09-11 17:43:04Z bird $ */
  717. +/** @file
  718. + * Fake Unix stuff for Haiku.
  719. + */
  720. +
  721. +/*
  722. + * Copyright (c) 2005-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
  723. + *
  724. + * This file is part of kBuild.
  725. + *
  726. + * kBuild is free software; you can redistribute it and/or modify
  727. + * it under the terms of the GNU General Public License as published by
  728. + * the Free Software Foundation; either version 3 of the License, or
  729. + * (at your option) any later version.
  730. + *
  731. + * kBuild is distributed in the hope that it will be useful,
  732. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  733. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  734. + * GNU General Public License for more details.
  735. + *
  736. + * You should have received a copy of the GNU General Public License
  737. + * along with kBuild. If not, see <http://www.gnu.org/licenses/>
  738. + *
  739. + */
  740. +
  741. +/*******************************************************************************
  742. +* Header Files *
  743. +*******************************************************************************/
  744. +#include "config.h"
  745. +#include <errno.h>
  746. +#include <stdio.h>
  747. +#include <stdarg.h>
  748. +#include <stdlib.h>
  749. +#include <sys/stat.h>
  750. +#include "haikufakes.h"
  751. +
  752. +
  753. +int haiku_lchmod(const char *pszPath, mode_t mode)
  754. +{
  755. + /*
  756. + * Weed out symbolic links.
  757. + */
  758. + struct stat s;
  759. + if ( !lstat(pszPath, &s)
  760. + && S_ISLNK(s.st_mode))
  761. + {
  762. + errno = -ENOSYS;
  763. + return -1;
  764. + }
  765. +
  766. + return chmod(pszPath, mode);
  767. +}
  768. +
  769. Index: src/kmk/kmkbuiltin/rm.c
  770. ===================================================================
  771. --- src/kmk/kmkbuiltin/rm.c (revision 2436)
  772. +++ src/kmk/kmkbuiltin/rm.c (working copy)
  773. @@ -43,7 +43,7 @@
  774.  
  775. #include "config.h"
  776. #include <sys/stat.h>
  777. -#ifndef _MSC_VER
  778. +#if !defined(_MSC_VER) && !defined(__HAIKU__)
  779. # include <sys/param.h>
  780. # include <sys/mount.h>
  781. #endif
  782. @@ -57,10 +57,15 @@
  783. #include <stdio.h>
  784. #include <stdlib.h>
  785. #include <string.h>
  786. -#include <sysexits.h>
  787. +#ifndef __HAIKU__
  788. +# include <sysexits.h>
  789. +#endif
  790. #include <unistd.h>
  791. #include <ctype.h>
  792. #include "getopt.h"
  793. +#ifdef __HAIKU__
  794. +# include "haikufakes.h"
  795. +#endif
  796. #ifdef _MSC_VER
  797. # include "mscfakes.h"
  798. #endif
  799. Index: src/kmk/kmkbuiltin/haikufakes.h
  800. ===================================================================
  801. --- src/kmk/kmkbuiltin/haikufakes.h (revision 0)
  802. +++ src/kmk/kmkbuiltin/haikufakes.h (revision 0)
  803. @@ -0,0 +1,40 @@
  804. +/* $Id: mscfakes.h 2413 2010-09-11 17:43:04Z bird $ */
  805. +/** @file
  806. + * Unix fakes for MSC.
  807. + */
  808. +
  809. +/*
  810. + * Copyright (c) 2005-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
  811. + *
  812. + * This file is part of kBuild.
  813. + *
  814. + * kBuild is free software; you can redistribute it and/or modify
  815. + * it under the terms of the GNU General Public License as published by
  816. + * the Free Software Foundation; either version 3 of the License, or
  817. + * (at your option) any later version.
  818. + *
  819. + * kBuild is distributed in the hope that it will be useful,
  820. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  821. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  822. + * GNU General Public License for more details.
  823. + *
  824. + * You should have received a copy of the GNU General Public License
  825. + * along with kBuild. If not, see <http://www.gnu.org/licenses/>
  826. + *
  827. + */
  828. +
  829. +#ifndef ___haikufakes_h
  830. +#define ___haikufakes_h
  831. +
  832. +#define EX_OK 0
  833. +#define EX_OSERR 1
  834. +#define EX_NOUSER 1
  835. +#define EX_USAGE 1
  836. +#define EX_TEMPFAIL 1
  837. +#define EX_SOFTWARE 1
  838. +
  839. +#define lutimes(path, tvs) utimes(path, tvs)
  840. +#define lchmod chmod
  841. +
  842. +#endif
  843. +
  844. Index: src/kmk/kmkbuiltin/cp_utils.c
  845. ===================================================================
  846. --- src/kmk/kmkbuiltin/cp_utils.c (revision 2436)
  847. +++ src/kmk/kmkbuiltin/cp_utils.c (working copy)
  848. @@ -52,11 +52,16 @@
  849. #include <stdio.h>
  850. #include <stdlib.h>
  851. #include <signal.h>
  852. +#ifndef __HAIKU__
  853. #include <sysexits.h>
  854. +#endif
  855. #include <unistd.h>
  856. #ifdef __sun__
  857. # include "solfakes.h"
  858. #endif
  859. +#ifdef __HAIKU__
  860. +# include "haikufakes.h"
  861. +#endif
  862. #ifdef _MSC_VER
  863. # define MSC_DO_64_BIT_IO
  864. # include "mscfakes.h"
  865. Index: src/kmk/kmkbuiltin/chmod.c
  866. ===================================================================
  867. --- src/kmk/kmkbuiltin/chmod.c (revision 2436)
  868. +++ src/kmk/kmkbuiltin/chmod.c (working copy)
  869. @@ -60,6 +60,9 @@
  870. #ifdef __sun__
  871. # include "solfakes.h"
  872. #endif
  873. +#ifdef __HAIKU__
  874. +# include "haikufakes.h"
  875. +#endif
  876. #include "getopt.h"
  877. #include "kmkbuiltin.h"
  878.  
  879. Index: src/kash/error.h
  880. ===================================================================
  881. --- src/kash/error.h (revision 2436)
  882. +++ src/kash/error.h (working copy)
  883. @@ -58,9 +58,12 @@
  884. * to an inner scope, set handler to point to a jmploc structure for the
  885. * inner scope, and restore handler on exit from the scope.
  886. */
  887. +#ifndef __HAIKU__
  888. +# include <setjmp.h>
  889. +#else
  890. +# include <posix/setjmp.h>
  891. +#endif
  892.  
  893. -#include <setjmp.h>
  894. -
  895. struct jmploc {
  896. jmp_buf loc;
  897. };
  898. @@ -120,7 +123,7 @@
  899. * so we use _setjmp instead.
  900. */
  901.  
  902. -#if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__) && !defined(__KLIBC__) && !defined(_MSC_VER)
  903. +#if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__) && !defined(__KLIBC__) && !defined(_MSC_VER) && !defined(__HAIKU__)
  904. #define setjmp(jmploc) _setjmp(jmploc)
  905. #define longjmp(jmploc, val) _longjmp(jmploc, val)
  906. #endif
  907. Index: src/kash/shtypes.h
  908. ===================================================================
  909. --- src/kash/shtypes.h (revision 2436)
  910. +++ src/kash/shtypes.h (working copy)
  911. @@ -31,8 +31,10 @@
  912.  
  913. #include <sys/types.h>
  914. #include <stdlib.h>
  915. -#ifndef _MSC_VER
  916. +#if !defined(_MSC_VER) && !defined(__HAIKU__)
  917. # include <sys/signal.h>
  918. +#elif defined(__HAIKU__)
  919. +# include <posix/signal.h>
  920. #endif
  921.  
  922. #ifdef _MSC_VER
  923. @@ -103,7 +105,7 @@
  924. struct shinstance;
  925. typedef struct shinstance shinstance;
  926.  
  927. -#ifdef _MSC_VER
  928. +#if defined(_MSC_VER)
  929. typedef uint32_t shsigset_t;
  930. #else
  931. typedef sigset_t shsigset_t;
  932. Index: src/kash/Makefile.kmk
  933. ===================================================================
  934. --- src/kash/Makefile.kmk (revision 2436)
  935. +++ src/kash/Makefile.kmk (working copy)
  936. @@ -38,6 +38,7 @@
  937. kash_DEFS.debug = DEBUG=2
  938. kash_DEFS.linux = BSD
  939. kash_DEFS.solaris = BSD
  940. +kash_DEFS.haiku = BSD
  941. ## @todo bring over PC_SLASHES?
  942. kash_DEFS.win = \
  943. BSD PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS YY_NO_UNISTD_H SH_DEAL_WITH_CRLF
  944. @@ -106,6 +107,9 @@
  945. shforkA-win.asm
  946. kash_SOURCES.solaris = \
  947. sys_signame.c \
  948. + strlcpy.c
  949. +kash_SOURCES.haiku = \
  950. + sys_signame.c \
  951. strlcpy.c
  952.  
  953. kash_INTERMEDIATES = \
  954. Index: src/kash/jobs.c
  955. ===================================================================
  956. --- src/kash/jobs.c (revision 2436)
  957. +++ src/kash/jobs.c (working copy)
  958. @@ -400,10 +400,12 @@
  959. scopyn(sys_siglist[st], s + col, 32);
  960. else
  961. fmtstr(s + col, 16, "Signal %d", st);
  962. +#ifndef __HAIKU__
  963. if (WCOREDUMP(ps->status)) {
  964. col += strlen(s + col);
  965. scopyn(" (core dumped)", s + col, 64 - col);
  966. }
  967. +#endif
  968. }
  969. col += strlen(s + col);
  970. outstr(s, out);
  971. Index: src/kash/shinstance.c
  972. ===================================================================
  973. --- src/kash/shinstance.c (revision 2436)
  974. +++ src/kash/shinstance.c (working copy)
  975. @@ -889,7 +889,11 @@
  976. (void)hChild;
  977. return 0;
  978. }
  979. -#include <setjmp.h>
  980. +#ifdef K_OS == K_OS_HAIKU
  981. +# include <posix/setjmp.h>
  982. +#else
  983. +# include <setjmp.h>
  984. +#endif
  985.  
  986. pid_t sh_fork(shinstance *psh)
  987. {
  988. Index: src/kash/shfile.h
  989. ===================================================================
  990. --- src/kash/shfile.h (revision 2436)
  991. +++ src/kash/shfile.h (working copy)
  992. @@ -45,8 +45,10 @@
  993. # define _PATH_DEFPATH "/bin:/usr/bin:/sbin:/usr/sbin"
  994. # endif
  995. #endif
  996. -#ifndef _MSC_VER
  997. -# include <sys/fcntl.h>
  998. +#if !defined(_MSC_VER)
  999. +# ifndef __HAIKU__
  1000. +# include <sys/fcntl.h>
  1001. +# endif
  1002. # include <unistd.h>
  1003. # ifndef O_BINARY
  1004. # define O_BINARY 0
  1005. Index: src/lib/k/kDefs.h
  1006. ===================================================================
  1007. --- src/lib/k/kDefs.h (revision 2436)
  1008. +++ src/lib/k/kDefs.h (working copy)
  1009. @@ -56,8 +56,10 @@
  1010. #define K_OS_SOLARIS 9
  1011. /** Windows. */
  1012. #define K_OS_WINDOWS 10
  1013. +/** Haiku. */
  1014. +#define K_OS_HAIKU 11
  1015. /** The max K_OS_* value (exclusive). */
  1016. -#define K_OS_MAX 11
  1017. +#define K_OS_MAX 12
  1018. /** @} */
  1019.  
  1020. /** @def K_OS
  1021. @@ -90,6 +92,8 @@
  1022. # define K_OS K_OS_SOLARIS
  1023. # elif defined(_WIN32) || defined(_WIN64)
  1024. # define K_OS K_OS_WINDOWS
  1025. +# elif defined(__HAIKU__)
  1026. +# define K_OS K_OS_HAIKU
  1027. # else
  1028. # error "Port Me"
  1029. # endif
  1030. Index: src/kObjCache/kObjCache.c
  1031. ===================================================================
  1032. --- src/kObjCache/kObjCache.c (revision 2436)
  1033. +++ src/kObjCache/kObjCache.c (working copy)
  1034. @@ -71,6 +71,9 @@
  1035. # include <Windows.h>
  1036. # include "quoted_spawn.h"
  1037. #endif
  1038. +#if defined(__HAIKU__)
  1039. +# include <posix/sys/file.h>
  1040. +#endif
  1041.  
  1042. #include "crc32.h"
  1043. #include "md5.h"
  1044. Index: src/misc/kmk_time.c
  1045. ===================================================================
  1046. --- src/misc/kmk_time.c (revision 2436)
  1047. +++ src/misc/kmk_time.c (working copy)
  1048. @@ -363,11 +363,13 @@
  1049. printf(" - normal exit: %d\n", WEXITSTATUS(rc));
  1050. rc = WEXITSTATUS(rc);
  1051. }
  1052. +#ifndef __HAIKU__
  1053. else if (WIFSIGNALED(rc) && WCOREDUMP(rc))
  1054. {
  1055. printf(" - dumped core: %s (%d)\n", my_strsignal(WTERMSIG(rc)), WTERMSIG(rc));
  1056. rc = 10;
  1057. }
  1058. +#endif
  1059. else if (WIFSIGNALED(rc))
  1060. {
  1061. printf(" - killed by: %s (%d)\n", my_strsignal(WTERMSIG(rc)), WTERMSIG(rc));
  1062. Index: src/sed/config.h.haiku
  1063. ===================================================================
  1064. --- src/sed/config.h.haiku (revision 0)
  1065. +++ src/sed/config.h.haiku (revision 0)
  1066. @@ -0,0 +1,466 @@
  1067. +/* config.h. Generated from config_h.in by configure. */
  1068. +/* config_h.in. Generated from configure.ac by autoheader. */
  1069. +
  1070. +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
  1071. + systems. This function is required for `alloca.c' support on those systems.
  1072. + */
  1073. +/* #undef CRAY_STACKSEG_END */
  1074. +
  1075. +/* Define to 1 if using `alloca.c'. */
  1076. +/* #undef C_ALLOCA */
  1077. +
  1078. +/* Define to 1 if translation of program messages to the user's native
  1079. + language is requested. */
  1080. +/* #undef ENABLE_NLS */
  1081. +
  1082. +/* Define to 1 if you have `alloca', as a function or macro. */
  1083. +#define HAVE_ALLOCA 1
  1084. +
  1085. +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
  1086. + */
  1087. +#define HAVE_ALLOCA_H 1
  1088. +
  1089. +/* Define to 1 if you have the <argz.h> header file. */
  1090. +/* #undef HAVE_ARGZ_H */
  1091. +
  1092. +/* Define to 1 if you have the `asprintf' function. */
  1093. +#define HAVE_ASPRINTF 1
  1094. +
  1095. +/* Define to 1 if you have the `bcopy' function. */
  1096. +#define HAVE_BCOPY 1
  1097. +
  1098. +/* Define to 1 if you have the `btowc' function. */
  1099. +#define HAVE_BTOWC 1
  1100. +
  1101. +/* Define to 1 if you have the `bzero' function. */
  1102. +#define HAVE_BZERO 1
  1103. +
  1104. +/* Define if the GNU dcgettext() function is already present or preinstalled.
  1105. + */
  1106. +/* #undef HAVE_DCGETTEXT */
  1107. +
  1108. +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
  1109. + don't. */
  1110. +#define HAVE_DECL_FEOF_UNLOCKED 1
  1111. +
  1112. +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
  1113. + you don't. */
  1114. +#define HAVE_DECL_FGETS_UNLOCKED 0
  1115. +
  1116. +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
  1117. + don't. */
  1118. +#define HAVE_DECL_GETC_UNLOCKED 1
  1119. +
  1120. +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
  1121. + don't. */
  1122. +#define HAVE_DECL__SNPRINTF 0
  1123. +
  1124. +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
  1125. + don't. */
  1126. +#define HAVE_DECL__SNWPRINTF 0
  1127. +
  1128. +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
  1129. + */
  1130. +#define HAVE_DIRENT_H 1
  1131. +
  1132. +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
  1133. +/* #undef HAVE_DOPRNT */
  1134. +
  1135. +/* Define to 1 if you have the <errno.h> header file. */
  1136. +#define HAVE_ERRNO_H 1
  1137. +
  1138. +/* Define to 1 if you have the `fchmod' function. */
  1139. +#define HAVE_FCHMOD 1
  1140. +
  1141. +/* Define to 1 if you have the `fchown' function. */
  1142. +#define HAVE_FCHOWN 1
  1143. +
  1144. +/* Define to 1 if you have the `fwprintf' function. */
  1145. +#define HAVE_FWPRINTF 1
  1146. +
  1147. +/* Define to 1 if you have the `getcwd' function. */
  1148. +#define HAVE_GETCWD 1
  1149. +
  1150. +/* Define to 1 if you have the `getegid' function. */
  1151. +#define HAVE_GETEGID 1
  1152. +
  1153. +/* Define to 1 if you have the `geteuid' function. */
  1154. +#define HAVE_GETEUID 1
  1155. +
  1156. +/* Define to 1 if you have the `getgid' function. */
  1157. +#define HAVE_GETGID 1
  1158. +
  1159. +/* Define to 1 if you have the `getpagesize' function. */
  1160. +#define HAVE_GETPAGESIZE 1
  1161. +
  1162. +/* Define if the GNU gettext() function is already present or preinstalled. */
  1163. +/* #undef HAVE_GETTEXT */
  1164. +
  1165. +/* Define to 1 if you have the `getuid' function. */
  1166. +#define HAVE_GETUID 1
  1167. +
  1168. +/* Define if you have the iconv() function. */
  1169. +#define HAVE_ICONV 1
  1170. +
  1171. +/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
  1172. +#define HAVE_INTMAX_T 1
  1173. +
  1174. +/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
  1175. +#define HAVE_INTTYPES_H 1
  1176. +
  1177. +/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
  1178. + declares uintmax_t. */
  1179. +#define HAVE_INTTYPES_H_WITH_UINTMAX 1
  1180. +
  1181. +/* Define to 1 if you have the <io.h> header file. */
  1182. +/* #undef HAVE_IO_H */
  1183. +
  1184. +/* Define to 1 if you have the `isascii' function. */
  1185. +#define HAVE_ISASCII 1
  1186. +
  1187. +/* Define to 1 if you have the `isatty' function. */
  1188. +#define HAVE_ISATTY 1
  1189. +
  1190. +/* Define to 1 if you have the `isblank' function. */
  1191. +#define HAVE_ISBLANK 1
  1192. +
  1193. +/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
  1194. +#define HAVE_LANGINFO_CODESET 1
  1195. +
  1196. +/* Define if your <locale.h> file defines LC_MESSAGES. */
  1197. +#define HAVE_LC_MESSAGES 1
  1198. +
  1199. +/* Define to 1 if you have the `regex' library (-lregex). */
  1200. +/* #undef HAVE_LIBREGEX */
  1201. +
  1202. +/* Define to 1 if you have the <limits.h> header file. */
  1203. +#define HAVE_LIMITS_H 1
  1204. +
  1205. +/* Define to 1 if you have the <locale.h> header file. */
  1206. +#define HAVE_LOCALE_H 1
  1207. +
  1208. +/* Define if you have the 'long double' type. */
  1209. +#define HAVE_LONG_DOUBLE 1
  1210. +
  1211. +/* Define to 1 if you support file names longer than 14 characters. */
  1212. +#define HAVE_LONG_FILE_NAMES 1
  1213. +
  1214. +/* Define if you have the 'long long' type. */
  1215. +#define HAVE_LONG_LONG 1
  1216. +
  1217. +/* Define to 1 if you have the <malloc.h> header file. */
  1218. +#define HAVE_MALLOC_H 1
  1219. +
  1220. +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
  1221. +#define HAVE_MBRTOWC 1
  1222. +
  1223. +/* Define to 1 if <wchar.h> declares mbstate_t. */
  1224. +#define HAVE_MBSTATE_T 1
  1225. +
  1226. +/* Define to 1 if you have the <mcheck.h> header file. */
  1227. +/* #undef HAVE_MCHECK_H */
  1228. +
  1229. +/* Define to 1 if you have the `memchr' function. */
  1230. +#define HAVE_MEMCHR 1
  1231. +
  1232. +/* Define to 1 if you have the `memcmp' function. */
  1233. +#define HAVE_MEMCMP 1
  1234. +
  1235. +/* Define to 1 if you have the `memcpy' function. */
  1236. +#define HAVE_MEMCPY 1
  1237. +
  1238. +/* Define to 1 if you have the `memmove' function. */
  1239. +#define HAVE_MEMMOVE 1
  1240. +
  1241. +/* Define to 1 if you have the <memory.h> header file. */
  1242. +#define HAVE_MEMORY_H 1
  1243. +
  1244. +/* Define to 1 if you have the `mempcpy' function. */
  1245. +/* #undef HAVE_MEMPCPY */
  1246. +
  1247. +/* Define to 1 if you have the `memset' function. */
  1248. +#define HAVE_MEMSET 1
  1249. +
  1250. +/* Define to 1 if you have the `mkstemp' function. */
  1251. +#define HAVE_MKSTEMP 1
  1252. +
  1253. +/* Define to 1 if you have a working `mmap' system call. */
  1254. +#define HAVE_MMAP 1
  1255. +
  1256. +/* Define to 1 if you have the `munmap' function. */
  1257. +#define HAVE_MUNMAP 1
  1258. +
  1259. +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
  1260. +/* #undef HAVE_NDIR_H */
  1261. +
  1262. +/* Define to 1 if you have the <nl_types.h> header file. */
  1263. +#define HAVE_NL_TYPES_H 1
  1264. +
  1265. +/* Define to 1 if libc includes obstacks. */
  1266. +/* #undef HAVE_OBSTACK */
  1267. +
  1268. +/* Define to 1 if you have the `pathconf' function. */
  1269. +#define HAVE_PATHCONF 1
  1270. +
  1271. +/* Define to 1 if you have the `popen' function. */
  1272. +#define HAVE_POPEN 1
  1273. +
  1274. +/* Define if your printf() function supports format strings with positions. */
  1275. +#define HAVE_POSIX_PRINTF 1
  1276. +
  1277. +/* Define to 1 if you have the `putenv' function. */
  1278. +#define HAVE_PUTENV 1
  1279. +
  1280. +/* Define to 1 if you have the <regex.h> header file. */
  1281. +/* #undef HAVE_REGEX_H */
  1282. +
  1283. +/* Define to 1 if you have the `setenv' function. */
  1284. +#define HAVE_SETENV 1
  1285. +
  1286. +/* Define to 1 if you have the `setlocale' function. */
  1287. +#define HAVE_SETLOCALE 1
  1288. +
  1289. +/* Define to 1 if you have the `snprintf' function. */
  1290. +#define HAVE_SNPRINTF 1
  1291. +
  1292. +/* Define to 1 if you have the <stdarg.h> header file. */
  1293. +#define HAVE_STDARG_H 1
  1294. +
  1295. +/* Define to 1 if stdbool.h conforms to C99. */
  1296. +#define HAVE_STDBOOL_H 1
  1297. +
  1298. +/* Define to 1 if you have the <stddef.h> header file. */
  1299. +#define HAVE_STDDEF_H 1
  1300. +
  1301. +/* Define to 1 if you have the <stdint.h> header file. */
  1302. +#define HAVE_STDINT_H 1
  1303. +
  1304. +/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
  1305. + uintmax_t. */
  1306. +#define HAVE_STDINT_H_WITH_UINTMAX 1
  1307. +
  1308. +/* Define to 1 if you have the <stdlib.h> header file. */
  1309. +#define HAVE_STDLIB_H 1
  1310. +
  1311. +/* Define to 1 if you have the `stpcpy' function. */
  1312. +#define HAVE_STPCPY 1
  1313. +
  1314. +/* Define to 1 if you have the `strcasecmp' function. */
  1315. +#define HAVE_STRCASECMP 1
  1316. +
  1317. +/* Define to 1 if you have the `strchr' function. */
  1318. +#define HAVE_STRCHR 1
  1319. +
  1320. +/* Define to 1 if you have the `strdup' function. */
  1321. +#define HAVE_STRDUP 1
  1322. +
  1323. +/* Define to 1 if you have the `strerror' function. */
  1324. +#define HAVE_STRERROR 1
  1325. +
  1326. +/* Define to 1 if you have the <strings.h> header file. */
  1327. +#define HAVE_STRINGS_H 1
  1328. +
  1329. +/* Define to 1 if you have the <string.h> header file. */
  1330. +#define HAVE_STRING_H 1
  1331. +
  1332. +/* Define to 1 if you have the `strtoul' function. */
  1333. +#define HAVE_STRTOUL 1
  1334. +
  1335. +/* Define to 1 if you have the `strverscmp' function. */
  1336. +/* #undef HAVE_STRVERSCMP */
  1337. +
  1338. +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
  1339. + */
  1340. +/* #undef HAVE_SYS_DIR_H */
  1341. +
  1342. +/* Define to 1 if you have the <sys/file.h> header file. */
  1343. +#define HAVE_SYS_FILE_H 1
  1344. +
  1345. +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
  1346. + */
  1347. +/* #undef HAVE_SYS_NDIR_H */
  1348. +
  1349. +/* Define to 1 if you have the <sys/param.h> header file. */
  1350. +#define HAVE_SYS_PARAM_H 1
  1351. +
  1352. +/* Define to 1 if you have the <sys/stat.h> header file. */
  1353. +#define HAVE_SYS_STAT_H 1
  1354. +
  1355. +/* Define to 1 if you have the <sys/types.h> header file. */
  1356. +#define HAVE_SYS_TYPES_H 1
  1357. +
  1358. +/* Define to 1 if you have the `tsearch' function. */
  1359. +#define HAVE_TSEARCH 1
  1360. +
  1361. +/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
  1362. +#define HAVE_UINTMAX_T 1
  1363. +
  1364. +/* Define to 1 if you have the <unistd.h> header file. */
  1365. +#define HAVE_UNISTD_H 1
  1366. +
  1367. +/* Define if you have the 'unsigned long long' type. */
  1368. +#define HAVE_UNSIGNED_LONG_LONG 1
  1369. +
  1370. +/* Define to 1 if you have the `vprintf' function. */
  1371. +#define HAVE_VPRINTF 1
  1372. +
  1373. +/* Define to 1 if you have the <wchar.h> header file. */
  1374. +#define HAVE_WCHAR_H 1
  1375. +
  1376. +/* Define if you have the 'wchar_t' type. */
  1377. +#define HAVE_WCHAR_T 1
  1378. +
  1379. +/* Define to 1 if you have the `wcrtomb' function. */
  1380. +#define HAVE_WCRTOMB 1
  1381. +
  1382. +/* Define to 1 if you have the `wcscoll' function. */
  1383. +#define HAVE_WCSCOLL 1
  1384. +
  1385. +/* Define to 1 if you have the `wcslen' function. */
  1386. +#define HAVE_WCSLEN 1
  1387. +
  1388. +/* Define to 1 if you have the <wctype.h> header file. */
  1389. +#define HAVE_WCTYPE_H 1
  1390. +
  1391. +/* Define if you have the 'wint_t' type. */
  1392. +#define HAVE_WINT_T 1
  1393. +
  1394. +/* Define to 1 if the system has the type `_Bool'. */
  1395. +#define HAVE__BOOL 1
  1396. +
  1397. +/* Define to 1 if you have the `__argz_count' function. */
  1398. +/* #undef HAVE___ARGZ_COUNT */
  1399. +
  1400. +/* Define to 1 if you have the `__argz_next' function. */
  1401. +/* #undef HAVE___ARGZ_NEXT */
  1402. +
  1403. +/* Define to 1 if you have the `__argz_stringify' function. */
  1404. +/* #undef HAVE___ARGZ_STRINGIFY */
  1405. +
  1406. +/* Define to 1 if you have the `__fsetlocking' function. */
  1407. +#define HAVE___FSETLOCKING 1
  1408. +
  1409. +/* Define as const if the declaration of iconv() needs const. */
  1410. +#define ICONV_CONST
  1411. +
  1412. +/* Define if integer division by zero raises signal SIGFPE. */
  1413. +#define INTDIV0_RAISES_SIGFPE 1
  1414. +
  1415. +/* Name of package */
  1416. +#define PACKAGE "sed"
  1417. +
  1418. +/* Define to the address where bug reports for this package should be sent. */
  1419. +#define PACKAGE_BUGREPORT "bonzini@gnu.org"
  1420. +
  1421. +/* Define to the full name of this package. */
  1422. +#define PACKAGE_NAME "sed"
  1423. +
  1424. +/* Define to the full name and version of this package. */
  1425. +#define PACKAGE_STRING "sed 4.1.5"
  1426. +
  1427. +/* Define to the one symbol short name of this package. */
  1428. +#define PACKAGE_TARNAME "sed"
  1429. +
  1430. +/* Define to the home page for this package. */
  1431. +#define PACKAGE_URL ""
  1432. +
  1433. +/* Define to the version of this package. */
  1434. +#define PACKAGE_VERSION "4.1.5"
  1435. +
  1436. +/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
  1437. +/* #undef PRI_MACROS_BROKEN */
  1438. +
  1439. +/* Define to the version of GNU sed whose features are supported by this sed.
  1440. + */
  1441. +#define SED_FEATURE_VERSION "4.1"
  1442. +
  1443. +/* Define as the maximum value of type 'size_t', if the system doesn't define
  1444. + it. */
  1445. +/* #undef SIZE_MAX */
  1446. +
  1447. +/* If using the C implementation of alloca, define if you know the
  1448. + direction of stack growth for your system; otherwise it will be
  1449. + automatically deduced at runtime.
  1450. + STACK_DIRECTION > 0 => grows toward higher addresses
  1451. + STACK_DIRECTION < 0 => grows toward lower addresses
  1452. + STACK_DIRECTION = 0 => direction of growth unknown */
  1453. +/* #undef STACK_DIRECTION */
  1454. +
  1455. +/* Define to 1 if you have the ANSI C header files. */
  1456. +#define STDC_HEADERS 1
  1457. +
  1458. +/* Enable extensions on AIX 3, Interix. */
  1459. +#ifndef _ALL_SOURCE
  1460. +# define _ALL_SOURCE 1
  1461. +#endif
  1462. +/* Enable GNU extensions on systems that have them. */
  1463. +#ifndef _GNU_SOURCE
  1464. +# define _GNU_SOURCE 1
  1465. +#endif
  1466. +/* Enable threading extensions on Solaris. */
  1467. +#ifndef _POSIX_PTHREAD_SEMANTICS
  1468. +# define _POSIX_PTHREAD_SEMANTICS 1
  1469. +#endif
  1470. +/* Enable extensions on HP NonStop. */
  1471. +#ifndef _TANDEM_SOURCE
  1472. +# define _TANDEM_SOURCE 1
  1473. +#endif
  1474. +/* Enable general extensions on Solaris. */
  1475. +#ifndef __EXTENSIONS__
  1476. +# define __EXTENSIONS__ 1
  1477. +#endif
  1478. +
  1479. +
  1480. +/* Version number of package */
  1481. +#define VERSION "4.1.5"
  1482. +
  1483. +/* Number of bits in a file offset, on hosts where this is settable. */
  1484. +/* #undef _FILE_OFFSET_BITS */
  1485. +
  1486. +/* Define for large files, on AIX-style hosts. */
  1487. +/* #undef _LARGE_FILES */
  1488. +
  1489. +/* Define to 1 if on MINIX. */
  1490. +/* #undef _MINIX */
  1491. +
  1492. +/* Define to 2 if the system does not provide POSIX.1 features except with
  1493. + this defined. */
  1494. +/* #undef _POSIX_1_SOURCE */
  1495. +
  1496. +/* Define to 1 if you need to in order for `stat' and other things to work. */
  1497. +/* #undef _POSIX_SOURCE */
  1498. +
  1499. +/* Include BSD functions in regex, used by the testsuite */
  1500. +#define _REGEX_RE_COMP 1
  1501. +
  1502. +/* Define to empty if `const' does not conform to ANSI C. */
  1503. +/* #undef const */
  1504. +
  1505. +/* Define to `__inline__' or `__inline' if that's what the C compiler
  1506. + calls it, or to nothing if 'inline' is not supported under any name. */
  1507. +#ifndef __cplusplus
  1508. +/* #undef inline */
  1509. +#endif
  1510. +
  1511. +/* Define to a type if <wchar.h> does not define. */
  1512. +/* #undef mbstate_t */
  1513. +
  1514. +/* Define to `long int' if <sys/types.h> does not define. */
  1515. +/* #undef off_t */
  1516. +
  1517. +/* Define as the type of the result of subtracting two pointers, if the system
  1518. + doesn't define it. */
  1519. +/* #undef ptrdiff_t */
  1520. +
  1521. +/* Define to empty if the C compiler doesn't support this keyword. */
  1522. +/* #undef signed */
  1523. +
  1524. +/* Define to `unsigned int' if <sys/types.h> does not define. */
  1525. +/* #undef size_t */
  1526. +
  1527. +/* Define to `int' if <sys/types.h> does not define. */
  1528. +/* #undef ssize_t */
  1529. +
  1530. +/* Define to unsigned long or unsigned long long if <stdint.h> and
  1531. + <inttypes.h> don't define. */
  1532. +/* #undef uintmax_t */
  1533. Index: src/sed/Makefile.kmk
  1534. ===================================================================
  1535. --- src/sed/Makefile.kmk (revision 2436)
  1536. +++ src/sed/Makefile.kmk (working copy)
  1537. @@ -80,6 +80,9 @@
  1538. lib/mkstemp.c \
  1539. lib/getline.c \
  1540. ../lib/startuphacks-win.c
  1541. +kmk_sed_SOURCES.haiku = \
  1542. + lib/strverscmp.c \
  1543. + lib/obstack.c
  1544.  
  1545. include $(FILE_KBUILD_SUB_FOOTER)
  1546.  
  1547. Index: src/sed/config/help2man
  1548. ===================================================================
  1549. --- src/sed/config/help2man (revision 2436)
  1550. +++ src/sed/config/help2man (working copy)
  1551. @@ -1,4 +1,4 @@
  1552. -#!/usr/bin/env perl
  1553. +#!/bin/env perl
  1554.  
  1555. # Generate a short man page from --help and --version output.
  1556. # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software
  1557. Index: kBuild/env.sh
  1558. ===================================================================
  1559. --- kBuild/env.sh (revision 2436)
  1560. +++ kBuild/env.sh (working copy)
  1561. @@ -288,6 +288,9 @@
  1562. KBUILD_HOST=win
  1563. ;;
  1564.  
  1565. + Haiku)
  1566. + KBUILD_HOST=haiku
  1567. + ;;
  1568. *)
  1569. echo "$0: unknown os $KBUILD_HOST" 1>&${ERR_REDIR}
  1570. sleep 1
  1571. @@ -322,7 +325,7 @@
  1572. x86_64|AMD64|amd64|k8|k8l|k9|k10)
  1573. KBUILD_HOST_ARCH='amd64'
  1574. ;;
  1575. - x86|i86pc|ia32|i[3456789]86)
  1576. + x86|i86pc|ia32|i[3456789]86|BePC)
  1577. KBUILD_HOST_ARCH='x86'
  1578. ;;
  1579. sparc32|sparc|sparcv8|sparcv7|sparcv8e)
  1580. @@ -364,7 +367,6 @@
  1581. alpha)
  1582. KBUILD_HOST_ARCH='alpha'
  1583. ;;
  1584. -
  1585. *) echo "$0: unknown cpu/arch - $KBUILD_HOST_ARCH" 1>&${ERR_REDIR}
  1586. sleep 1
  1587. exit 1
  1588. Index: kBuild/header.kmk
  1589. ===================================================================
  1590. --- kBuild/header.kmk (revision 2436)
  1591. +++ kBuild/header.kmk (working copy)
  1592. @@ -176,7 +176,7 @@
  1593. # this keyword namespace is shared between OSes, architectures, cpus and
  1594. # build types. (PORTME)
  1595. #
  1596. -KBUILD_OSES := darwin dos dragonfly freebsd l4 linux netbsd nt openbsd os2 solaris win os-agnostic
  1597. +KBUILD_OSES := darwin dos dragonfly freebsd l4 linux netbsd nt openbsd os2 solaris win os-agnostic haiku
  1598. 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