Commit Graph

5668 Commits

Author SHA1 Message Date
itojun
9585a2fa3e line2 may overrun if line is too long (> 200). be more careful on strcpy.
XXX strlen(argv[x]) should be checked before copies.
2002-02-01 05:04:43 +00:00
ross
4ecd3ab001 now needs -lm for finite(3) 2002-02-01 01:32:20 +00:00
he
1bf20079aa Typo correction. 2002-01-31 23:31:34 +00:00
tv
9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv
95407c5758 Use !finite() instead of isinf() in two places for better compatibility. 2002-01-31 22:30:20 +00:00
tv
e413f98bb4 In the generated C file, don't assume that <sys/cdefs.h> exists. Instead,
imply it with the <stdlib.h> include already present in the file, and
provide a compatibility definition for __P().
2002-01-31 21:01:15 +00:00
tv
76834aef57 Protect __RCSID and __COPYRIGHT from being invoked if not defined. 2002-01-31 19:36:47 +00:00
tv
6980d8094a Use setprogname() in main(). 2002-01-31 19:33:50 +00:00
tv
dd39a6001e Provide a placebo default for ALIGN() for hosts which don't have this. 2002-01-31 19:33:27 +00:00
tv
d08ddf4732 Make it possible for cap_mkdb to be a host tool. 2002-01-31 19:32:11 +00:00
tv
c187f70e67 Make this compilable as a host tool. 2002-01-31 19:31:31 +00:00
tv
c72d58a899 Make this compilable as a host tool. 2002-01-31 19:26:34 +00:00
tv
554a73a4ce Include config.h for host tool; protect __RCSID. 2002-01-31 19:24:47 +00:00
tv
cce248537b Make this compilable as a host tool. 2002-01-31 19:23:50 +00:00
tv
084822fde7 * Use setprogname() in main().
* Don't grossly abuse getopt(); allow only -l and -L after filenames are
  encountered, and do the parsing of these options manually.
2002-01-31 19:09:33 +00:00
pk
ce3fe4630a Fix the bug addressed in revision 1.27 properly. Analysis of the problem
(see also PR#15179):

  When looking up names which directory components (i.e. having slashes,
  except when of the form `./name'), FindFile()/DirLookup() first looks
  the final filename component in the cache for each directory on the search
  path and then proceeds to match the prefixed directory components by
  comparing them to the trailing directory components of the the search
  path being probed.

  This is not correct. When looking for `bar/target' in a path `.../src/foo',
  you want it to come up with `.../src/foo/bar/target' (if it exists). There's
  no point in comparing the the `bar' prefix on the target to the `foo' suffix
  on the search path. Indeed, this will cause a false match if those prefix
  and suffix components are actually equal and search path itself also has a
  file called `target'. For example, looking for `foo/target' in `.../src/foo'
  will spuriously match `.../src/foo/target', not `.../src/foo/foo/target'.

  This last bug prompted the change in dir.c, rev 1.27, which happens
  to partially workaround it by avoiding the above matching code in the
  case of the `curdir' search path entry (at the cost of incurring an
  exorbitant amount of cache misses). The situation is unchanged however,
  when processing other entries on the search path (e.g. those other than
  `dot' and `cur').

Drop the prefix matching code in DirLookup() entirely and use DirFindDot()
and DirLookup() only for names without proper directory components (i.e.
`target' and `./target). Otherwise, non-absolute names are dealt with by
DirLookupSubdir(), while absolute names can be checked for an exact match
of the directory components prefix against the directories on the current
search path. This allows for the use of the file cache to check the
existence of the file and additionally, provides a shortcut out of
Dir_FindFile() if we have the prefix match but not a cache entry (this
is especially beneficial for searches in .CURDIR when it's not equal
to `dot').
2002-01-31 12:38:34 +00:00
augustss
adeb3ad736 Actually be verbose if the -V flag is given. 2002-01-31 00:33:10 +00:00
kleink
935d56d508 Add {POSIX_MONOTONIC_CLOCK} variables. 2002-01-31 00:32:47 +00:00
augustss
d1c426fe38 Use _PATH_SOUND etc, all fall back to _PATH_SOUND0 (etc.) if that fails. 2002-01-31 00:03:23 +00:00
tv
c77212906a Remove extraneous linkage to -ll. 2002-01-30 21:07:35 +00:00
tv
335cf252cf Only invoke __RCSID/__COPYRIGHT if these macros exist. 2002-01-30 20:38:49 +00:00
tv
2bf5ae19a1 Use __P((void)) for the function *definitions* of yygrowstack() and yyparse()
(not just their declarations) to make newer C++ compilers happy with the
output.  (Needed to make yacc produce less iffy code for src/tools/groff.)
2002-01-30 20:37:59 +00:00
thorpej
1e27695917 Define FLOAT_SIZE, DOUBLE_SIZE, LDOUBLE_SIZE, and ENUM_SIZE in
target-specific headers, and use the definitions when initializing
the type table.
2002-01-30 06:54:56 +00:00
thorpej
65260ae99b Add a missing "static" on a function decl. 2002-01-30 06:48:32 +00:00
tv
a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
tv
1ae7d35cc2 Remove #include <err.h> (now in lint.h). 2002-01-29 02:43:38 +00:00
tv
b212f6ddf9 Identify where errors come from, rather than just doing err[x]("%s", foo). 2002-01-28 19:44:03 +00:00
wiz
f50740c1dd Remove mention of -I in SYNOPSIS until we've actually implemented it.
Seems to have slipped in unintendedly in a v1.12.
Addresses standards/15401.
2002-01-28 13:49:49 +00:00
augustss
550d5dae5a Make it compile (more vmstat fallout). 2002-01-28 13:20:43 +00:00
simonb
0f944ef22b Use the new disk and tty stats sysctls when operating on a live kernel,
dk*() don't need to worry about setgid() games anymore.
2002-01-28 02:15:15 +00:00
jdolecek
910223ce2e Delete the old code which made audioctl use stderr for output
if the stdout was same as the audio device. It's no longer relevant,
and the check was broken anyway (code used st_dev rather than st_rdev
when comparing the character devices).
A by-product of this is that 'audioctl -a > /dev/null' now works.

Okay'ed by Lennart.
2002-01-27 18:21:52 +00:00
jdolecek
b88029fb96 Use '-d' rather than '-f' for specification of alternative
mixer or audioctl device. The support for '-f' is kept for compatibility
for now.
2002-01-27 10:09:55 +00:00
reinoud
a233fbd53e Fix major bug in make(1) ... due to shadowing of the dotLast path used for
the .DOTLAST primitive by a boolean variable with the same name, this whole
mechanism was broken ... it doesn't save much stat calls but it was wrong.

Thanks to Jason Thorpe for the other shadow-variable fixing patches he
made.
2002-01-27 01:50:54 +00:00
christos
b66dfef469 Don't bother to lookup for files in .' that start with a /'. Cuts in the
number of NAMI's from 1344 -> 830 in a full build of /usr/src/usr.bin/make.
2002-01-26 22:36:41 +00:00
christos
933b6f81c0 Process escaped characters properly. Now:
foo\:bar:
	touch $@

works. Of course I am lazy right now, and I am not removing the '\' escapes
so the output looks fine, but it is functionally correct.
2002-01-26 20:42:14 +00:00
tv
3dc61f3b98 Make util.c replacement functions use autoconf conditionals to probe
what is Really available in the host OS.
2002-01-25 17:51:31 +00:00
mrg
85fefefd90 update .Dd 2002-01-25 15:35:32 +00:00
mrg
2d530607f5 add $NetBSD$ 2002-01-25 15:33:51 +00:00
ragge
a8858d3140 Add special command "keepsymbols", allows the specified external symbols
not to be hidden. From Jens Nilsson, jens@rockstorm.se.
2002-01-25 12:05:00 +00:00
reinoud
45e2e07bcf Small update to make(1) to let it follow more its own guidelines ! ... This
patch makes sure that files included using ".include <bsd.own.mk>" are
really looked for in the system make file directory or in the specified -m
paths instead of allways looking in the other -I and .PATH specified paths
... This speeds up the make a few procents at times for all the system make
files are now found directly instead of searching several paths, saving a
lot of stat() calls.

The number of stat calls is still exorbirant hight though... 910 or so for
making `make' alone ....
2002-01-24 01:39:03 +00:00
atatat
c25d406046 Add a -E flag to ed(1) and sed(1) so that they can use extended
regular expressions instead of just basic regular expressions.
2002-01-23 19:07:33 +00:00
thorpej
7e8a4549fd Update ELFSIZE and VARPSZ arch lists. 2002-01-23 01:38:57 +00:00
thorpej
e05ba164ef Need <sys/types.h> early on. 2002-01-23 01:09:15 +00:00
thorpej
6e4e75cdae Add a missing "break;" statement so that this actually works again. 2002-01-22 01:14:03 +00:00
tv
279abfc5d2 Make compilable from src/tools/m4 on non-NetBSD hosts. 2002-01-21 21:49:57 +00:00
tv
d56a8ceeec Make this directory usable on a case insensitive fs. 2002-01-21 20:07:34 +00:00
tv
8f2707ae00 Add non-NetBSD host hooks. 2002-01-21 20:00:02 +00:00
tv
44fbde6015 Add hooks for compiling on non-NetBSD hosts. 2002-01-21 19:49:51 +00:00
tv
5c99654526 Add hooks for cross-hosting on non-NetBSD platforms. 2002-01-21 19:22:53 +00:00
wiz
782f0d51c3 Document basic mdoc(7) support, and some fixes. 2002-01-21 18:36:44 +00:00