diff -Nu ../make/arch.c ./arch.c --- ../make/arch.c 2010-09-17 12:56:04.000000000 +0200 +++ ./arch.c 2010-09-17 12:28:59.000000000 +0200 @@ -38,6 +38,7 @@ * @(#)arch.c 8.2 (Berkeley) 1/2/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/buf.c ./buf.c --- ../make/buf.c 2010-09-17 12:56:04.000000000 +0200 +++ ./buf.c 2010-09-17 12:30:01.000000000 +0200 @@ -40,6 +40,7 @@ * @(#)buf.c 8.1 (Berkeley) 6/6/93 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/cond.c ./cond.c --- ../make/cond.c 2010-09-17 12:56:04.000000000 +0200 +++ ./cond.c 2010-09-17 12:30:25.000000000 +0200 @@ -39,6 +39,7 @@ * @(#)cond.c 8.2 (Berkeley) 1/2/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/dir.c ./dir.c --- ../make/dir.c 2010-09-17 12:56:04.000000000 +0200 +++ ./dir.c 2010-09-17 12:30:56.000000000 +0200 @@ -39,6 +39,7 @@ * @(#)dir.c 8.2 (Berkeley) 1/2/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/for.c ./for.c --- ../make/for.c 2010-09-17 12:56:04.000000000 +0200 +++ ./for.c 2010-09-17 12:31:32.000000000 +0200 @@ -32,6 +32,7 @@ * @(#)for.c 8.1 (Berkeley) 6/6/93 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/hash.c ./hash.c --- ../make/hash.c 2010-09-17 12:56:04.000000000 +0200 +++ ./hash.c 2010-09-17 12:37:44.000000000 +0200 @@ -39,6 +39,7 @@ * @(#)hash.c 8.1 (Berkeley) 6/6/93 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/hash_tables.c ./hash_tables.c --- ../make/hash_tables.c 2010-09-17 12:56:04.000000000 +0200 +++ ./hash_tables.c 2010-09-17 12:37:58.000000000 +0200 @@ -4,6 +4,7 @@ * auto-generated from FreeBSD: src/usr.bin/make/parse.c,v 1.114 2008/03/12 14:50:58 obrien Exp * DO NOT EDIT */ +#include "lc.h" #include #include "hash_tables.h" diff -Nu ../make/job.c ./job.c --- ../make/job.c 2010-09-17 12:56:04.000000000 +0200 +++ ./job.c 2010-09-17 12:38:12.000000000 +0200 @@ -39,6 +39,7 @@ * @(#)job.c 8.2 (Berkeley) 3/19/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/lc.h ./lc.h --- ../make/lc.h 1970-01-01 01:00:00.000000000 +0100 +++ ./lc.h 2010-09-17 12:52:22.000000000 +0200 @@ -0,0 +1,14 @@ +#ifndef _LC_H_ +#define _LC_H_ + +#define __FBSDID(x); +#define __dead2 +#define __unused + +#define strlcpy(dest,src,size); strncpy(dest,src,size-1); dest[size] = '\0'; +#define arc4random random +#define errc(a,b,c,...) err(a,c,__VA_ARGS__) + +#include + +#endif Binary files ../make/.lc.h.swp and ./.lc.h.swp differ diff -Nu ../make/lst.c ./lst.c --- ../make/lst.c 2010-09-17 12:56:04.000000000 +0200 +++ ./lst.c 2010-09-17 12:38:23.000000000 +0200 @@ -36,7 +36,7 @@ * lst.c -- * Routines to maintain a linked list of objects. */ - +#include "lc.h" #include #include diff -Nu ../make/main.c ./main.c --- ../make/main.c 2010-09-17 12:56:04.000000000 +0200 +++ ./main.c 2010-09-17 12:55:03.000000000 +0200 @@ -37,6 +37,8 @@ * * @(#)main.c 8.3 (Berkeley) 3/19/94 */ +#include "lc.h" +#undef __unused #ifndef lint #if 0 @@ -372,7 +374,7 @@ rearg: optind = 1; /* since we're called more than once */ - optreset = 1; +/* optreset = 1;*/ #define OPTFLAGS "ABC:D:d:E:ef:I:ij:km:nPpQqrSstV:vXx:" for (;;) { if ((optind < argc) && strcmp(argv[optind], "--") == 0) { @@ -529,7 +531,7 @@ MFLAGS_append("-q", NULL); break; case 'r': - noBuiltins = TRUE; + noBuiltins = !noBuiltins; MFLAGS_append("-r", NULL); break; case 'S': @@ -892,7 +894,7 @@ * Initialize file global variables. */ expandVars = TRUE; - noBuiltins = FALSE; /* Read the built-in rules */ + noBuiltins = TRUE; /* Read the built-in rules */ forceJobs = FALSE; /* No -j flag */ curdir = cdpath; @@ -941,6 +943,7 @@ * to compile new make binary on old FreeBSD/pc98 systems, and * have the MACHINE variable set properly. */ +#ifdef __FreeBSD__ if ((machine = getenv("MACHINE")) == NULL) { int ispc98; size_t len; @@ -951,7 +954,7 @@ machine = "pc98"; } } - +#endif /* * Get the name of this type of MACHINE from utsname * so we can share an executable for similar machines. diff -Nu ../make/make.c ./make.c --- ../make/make.c 2010-09-17 12:56:04.000000000 +0200 +++ ./make.c 2010-09-17 12:38:32.000000000 +0200 @@ -38,6 +38,7 @@ * @(#)make.c 8.1 (Berkeley) 6/6/93 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/parse.c ./parse.c --- ../make/parse.c 2010-09-17 12:56:04.000000000 +0200 +++ ./parse.c 2010-09-17 12:38:48.000000000 +0200 @@ -38,6 +38,7 @@ * @(#)parse.c 8.3 (Berkeley) 3/19/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/proc.c ./proc.c --- ../make/proc.c 2010-09-17 12:56:04.000000000 +0200 +++ ./proc.c 2010-09-17 12:38:58.000000000 +0200 @@ -24,6 +24,7 @@ * SUCH DAMAGE. */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); Common subdirectories: ../make/PSD.doc and ./PSD.doc diff -Nu ../make/shell.c ./shell.c --- ../make/shell.c 2010-09-17 12:56:04.000000000 +0200 +++ ./shell.c 2010-09-17 12:39:06.000000000 +0200 @@ -37,6 +37,7 @@ * SUCH DAMAGE. */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/str.c ./str.c --- ../make/str.c 2010-09-17 12:56:04.000000000 +0200 +++ ./str.c 2010-09-17 12:39:16.000000000 +0200 @@ -38,6 +38,7 @@ * @(#)str.c 5.8 (Berkeley) 6/1/90 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/suff.c ./suff.c --- ../make/suff.c 2010-09-17 12:56:04.000000000 +0200 +++ ./suff.c 2010-09-17 12:39:24.000000000 +0200 @@ -38,6 +38,7 @@ * @(#)suff.c 8.4 (Berkeley) 3/21/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); Common subdirectories: ../make/.svn and ./.svn diff -Nu ../make/targ.c ./targ.c --- ../make/targ.c 2010-09-17 12:56:04.000000000 +0200 +++ ./targ.c 2010-09-17 12:39:35.000000000 +0200 @@ -38,6 +38,7 @@ * @(#)targ.c 8.2 (Berkeley) 3/19/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/util.c ./util.c --- ../make/util.c 2010-09-17 12:56:04.000000000 +0200 +++ ./util.c 2010-09-17 12:39:45.000000000 +0200 @@ -39,6 +39,7 @@ * @(#)main.c 8.3 (Berkeley) 3/19/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$"); diff -Nu ../make/var.c ./var.c --- ../make/var.c 2010-09-17 12:56:04.000000000 +0200 +++ ./var.c 2010-09-17 12:39:54.000000000 +0200 @@ -39,6 +39,7 @@ * @(#)var.c 8.3 (Berkeley) 3/19/94 */ +#include "lc.h" #include __FBSDID("$FreeBSD$");