Commit Graph

10824 Commits

Author SHA1 Message Date
christos d61830c284 pass LDSTATIC to recursive makes. 2010-04-24 17:58:40 +00:00
joerg 210d7a16de \\ -> \e
Drop redundant .Ic.
Add explicit empty argument for intentionally empty bracket and
parenthesis.
2010-04-23 22:04:37 +00:00
sjg 83fb10e649 PR: 42850
Reviewed by:

Reduced the "expected to exist" dirs in path to just
/ /bin and /tmp
and change the "not expected to exist" dir to something
even less likely.
Add a comment to suggest why.
2010-04-23 15:43:28 +00:00
sjg 24157036cd On darwin at least, vfork() fails in child of vfork().
It probably shouldn't work anyway, so avoid this.
We use the macro vFork() - a function seems to cause problems
and is unnecessary overhead.
2010-04-23 00:18:50 +00:00
dholland d1466497fc Use _PATH_TMP instead of a literal /tmp; noted by Christos 2010-04-22 22:39:13 +00:00
sjg 1870812db3 Force LANG=C to ensure sort(1) behaves as expected 2010-04-22 21:41:11 +00:00
dholland fb0f75db1f don't use strlcpy; it causes bootstrap issues. (noted by moof) 2010-04-22 20:25:16 +00:00
sjg 7254a559b2 PR: 42850
Reviewed by:

modmisc: since we apply an exists() test to $paths, be conservative
in what we expect.

Run the unit tests with -r -m / so that we do not fail if there
is no sys.mk present.
2010-04-22 19:15:23 +00:00
sjg a71a4119cf Just because $TMPDIR is set does not mean it is valid.
Add a central function for creating temp files so we have one place to
audit.

Reviewed by: dh
2010-04-22 19:11:17 +00:00
plunky f183cc477b no need to forward declare struct uio and proc before including
<sys/file.h> as it does that internally, and don't continue the
_KERNEL definition afterwards as it causes some other problems
with pcc relating to unreferenced symbols in unused static
inline functions which gcc optimises away.
2010-04-22 14:37:06 +00:00
plunky cb88fa41a4 it is not [any longer] necessary to #define _KERNEL while including
<net/route.h> so remove it.

This fixes a build problem with pcc which is not as clever as gcc
when optimising away unused static inline functions which refer to
unknown symbols (eg sockaddr_dup).
2010-04-22 14:32:30 +00:00
christos cf1f9ba391 move LDSTATIC before the includes because the rules need it early for
conditionals.
2010-04-21 14:58:10 +00:00
sjg 862d4ff05d If we do .export (all) and have any variables that involve :sh
we will hit an error (var is recursive) while trying to evaluate that.
Fix, and add a unit test for this.
2010-04-21 04:25:27 +00:00
sjg b7f72d44a7 Behavior of realpath() appears to vary.
To ensure consistent results, use stat(2) as a final check for success.
2010-04-20 17:48:16 +00:00
sjg 197caaa8e0 On some systems realpath will prefix make with cwd, so make sure
we can stat(2) the value for .MAKE
2010-04-20 17:18:08 +00:00
pooka 3718acd4b5 output __arraycount instead of homegrown macro 2010-04-15 12:35:57 +00:00
sjg 290b1f00e6 Add :tA to attempt to resolve to absoute path using realpath(). 2010-04-15 03:48:39 +00:00
joerg 70729907f6 Consistently use -- for all programs called. Drop some redundant flags
for the no file argument case.
2010-04-14 20:30:28 +00:00
wiz 10b9fb64b7 Sort SEE ALSO, fix an xref. 2010-04-14 19:52:05 +00:00
joerg 68128a5628 Refactor zdiff and extend functionality to the common suffixes for bzip2
and xz.
2010-04-14 18:55:12 +00:00
sjg 9334c6107c If argv[0] is not an absolute path, attempt to resolve it
using realpath() for setting .MAKE
2010-04-14 16:16:17 +00:00
jruoho f21271de63 Split overly large paragraph. 2010-04-13 09:01:10 +00:00
sjg dc03377f35 Process .ERROR the same as .BEGIN, .END etc
so that it cannot be the default target.
Add unit-tests for .info - .error, and .ERROR.
2010-04-08 17:41:29 +00:00
wiz 6f9ff54b1b Sort a bit more. 2010-04-07 06:45:21 +00:00
sjg b6e2a6c85f Add:
.error "message"
.warning "message"
	based on FreeBSD implementation.
	add .info while were at it.

.ERROR:	a target to run on error.
	We pass the failing GNode to PrintOnError so it can set
	.ERROR_TARGET.

.MAKE.MAKEFILE_PREFERENCE
	As a means to control make's list of prefered makefile names.
	(Default: "makefile Makefile")

.MAKE.DEPENDFILE
	Names the file to read dependencies from
	(Default ".depend")

.MAKE.MODE
	Processed after all makefiles are read.
	Can put make into "compat" mode (more to come).

Fix:

compat.c: Error code should not be sent to debug_file.
Make_DoAllVar: use DONE_ALLSRC to avoid processing a node multiple times.
ReadMakefile: we can simply use doing_depend to control setting MAKEFILE.
2010-04-07 00:11:27 +00:00
pgoyette fefa3f0923 Typo: s/ a a/ as a/ 2010-04-05 21:33:09 +00:00
joerg a3d484cd9e \\ -> \e 2010-04-05 21:25:01 +00:00
joerg 57e0101802 \\*(Pm -> \*(Pm 2010-04-05 21:24:14 +00:00
joerg f95fad15ff \\ -> \e 2010-04-05 21:16:21 +00:00
joerg e7a0ec0f19 No trailing whitespace 2010-04-05 16:13:58 +00:00
he d399695a05 Follow christos' suggestions, and make ks_active a u_short, and
also only use 16 u_shorts instead of 32 ints.  Also add panic()
calls for under- and overflow of the ks_active members under
DIAGNOSTIC.  The MAXBUCKET constant ended up in sys/mallocvar.h
and not sys/param.h, as the latter caused build problems.

Ride the kernel revision bump of my previous change.
2010-04-05 08:03:41 +00:00
he bb89b7208d Extend struct malloc_type to count the number of active allocations
per size, and make vmstat report this information under the "Memory
statistics by type" display, which is only printed when the kernel
has been compiled with KMEMSTATS defined, like this:

Memory statistics by type                                Type  Kern
           Type InUse  MemUse HighUse   Limit   Requests Limit Limit Size(s)
          wapbl    15   4192K   4192K  78644K     376426     0     0 32:0,256:3,512:6,131072:1,262144:2,524288:3

Since struct malloc_type is user-visible and is changed, bump kernel
revision to 5.99.26.

While it is true that malloc(9) is in general on the path of slowly
being replaced by kmem(9) (kmem_alloc/kmem_free), there remains a
lot of points of usage of malloc/free, and this could aid in finding
any leaks.  (It helped finding the leak fixed in PR#42661.)

This was discussed with and somewhat hestitantly OKed by rmind@
2010-04-05 07:16:12 +00:00
joerg d6c268fede Just ignore the errno of strtoimax, it doesn't provide much value. 2010-03-31 21:55:23 +00:00
joerg 451c42c37a Remove 2**31 limit on the number of lines or bytes to process.
For the byte operations, process in blocks of 64KB.
2010-03-31 21:52:11 +00:00
joerg 7b1fd4e47e Make eval a local variable. 2010-03-31 15:01:51 +00:00
joerg 21a8c61ac7 ANSIfy. Sprinkle static. 2010-03-31 15:01:02 +00:00
mrg 65fad457b3 build elf2aout and fdformat on macppc64 (for now, it's a lot easier than
figuring out how to split the sets... but that will have to happen.)

fixes the first easy part of PR#43075.
2010-03-30 07:26:23 +00:00
pooka b7a2b071f9 Put cfdata* in a similar namespace with cfdriver** cfattachinit*.
This was nagging me already yesterday, but I decided to leave it
alone for better compat with old ioconf.c builds.  But as it turns
out, new code depends on newly built ioconf.c with a new config(1)
anyway, so renaming is not an issue (at least not at this stage).

While renaming, namespace cfdriver and cfattach in "ioconf" rather
than "comp", since the former reflects the config(5) keyword.
2010-03-26 15:51:17 +00:00
pooka abc34bd561 Generate cfdriver and cfattach lists for ioconf configs. 2010-03-25 19:39:05 +00:00
joerg 46b2dedeba Use .In instead of .Aq Pa for header files. 2010-03-22 18:34:14 +00:00
pooka d0e5d93744 Some drivers want to include ioconf.h, so generate it if doing
"ioconf" config.
2010-03-22 14:40:54 +00:00
mrg 668cb96893 for mips64*, use mips64 subdir, otherwise use $MACHINE_ARCH if exists,
or $MACHINE_CPU.  idea from dennis.c.ferguson@gmail.com in PR#43021.
2010-03-22 05:12:24 +00:00
mrg 4e60bef737 convert -idirafter to -isystem, as recommended by cgd in PR 11843.
most of the list in that PR were already done.
2010-03-22 01:29:29 +00:00
christos 9a10b49e97 revert for now. 2010-03-21 14:29:04 +00:00
joerg 5180429ad8 Use \e 2010-03-21 13:34:34 +00:00
christos d867aaf024 make lint recognize constant shift values and not warn if the number of bits
shifted results in a narrower type.
2010-03-21 00:02:13 +00:00
enami fc5eb1b7ac Since we have st_birthtime in struct stat, it is in default display. 2010-03-11 21:37:01 +00:00
joerg 2c0a7fd6bd Do not call pam_end with an invalid handle if pam_start failed.
From Richard Hansen.
2010-03-09 16:14:08 +00:00
pooka 523c21179c print ioconf WARNING in caps too 2010-03-08 11:12:32 +00:00
pooka 90ac64de16 Add a highly experimental pseudo-root feature to be used in conjuction
with the also-experimental ioconf keyword.  pseudo-root allows to
specify a root at any point in the device tree without having
attachments from the actual root.

For example, instead of having a config file like this:
mainbus0 at root
bus_a? at mainbus0
bus_b? at bus_a*
device7 at bus_b?

You can have one like this:
pseudo-root bus_b*
device7 at bus_b?

This will produce the relevant ioconf.c glue for device number 7
only instead of the whole 9 yards from root.  Perhaps needless to
say, this can be used to generate snippets of config glue for
modules and, let's not deny that my main motivation for doing this,
rump components.

This is part 2/3 of my modifications to config (the last part is
autogenerating source file lists and component Makefiles).

No strong objection from cube (after a little pressuring ;), but
like he said, the implementation will most likely need some more
tweaking and may not work correctly under all pseudo-root uses yet.
2010-03-08 10:19:14 +00:00