Commit Graph

75 Commits

Author SHA1 Message Date
sjg
852129abd1 new depends 2015-06-16 23:37:19 +00:00
sjg
a38a487b8c removed extra keyword 2015-06-13 19:53:24 +00:00
sjg
008d7c831f Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
sjg
75a137820d dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
sjg
65145fa4c8 Merge sync of head 2015-05-27 01:19:58 +00:00
ngie
ea343b0642 Install d_align.{in,out} for the :align test
X-MFC with: r276669
Pointyhat to: me
2015-01-05 20:38:47 +00:00
ngie
5c0e2da500 Integrate bin/cat/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2015-01-04 22:37:44 +00:00
sjg
5860f0d106 Updated dependencies 2014-05-16 14:09:51 +00:00
sjg
1a7e48acf1 Updated dependencies 2014-05-10 05:16:28 +00:00
sjg
5e568154a0 Merge head 2014-04-28 07:50:45 +00:00
adrian
60ae67a42b Close the newly-created FD if the pathname is too long.
Coverity:	CID 1007204
Sponsored by:	Netflix, Inc.
2014-01-11 15:01:30 +00:00
sjg
62bb106222 Merge from head 2013-09-05 20:18:59 +00:00
eadler
54ee0fda1c - Add the __dead2 attribute since it is a function that never returns
- Add an empty line in usage() according to style(9)

PR:		bin/177076
Submitted by:	Fernando <fernando.apesteguia@gmail.com>
Approved by:	cperciva (mentor)
2013-04-23 13:03:11 +00:00
sjg
6d37b86f2b Updated dependencies 2013-03-11 17:21:52 +00:00
sjg
0ee5295509 Updated dependencies 2013-02-16 01:23:54 +00:00
obrien
3028e3f8ab Sync with HEAD. 2013-02-08 16:10:16 +00:00
joel
f34880dfea Fix date. 2013-01-29 20:01:47 +00:00
brooks
9b3a8ec1ad Add -l option to cat(1). This option causes cat(1) to use fcntl(2) to
set an exclusive advisory lock on stdout.  This will be used to guarantee
orderly writing to METALOG.

Sponsored by:	DARPA, AFRL
Obtained from:	NetBSD (mason)
2013-01-29 18:19:40 +00:00
sjg
778e93c51a Sync from head 2012-11-04 02:52:03 +00:00
kevlo
8c350d5569 Use "e.g.", not "i.e.", to introduce an example.
Obtained from:	NetBSD
2012-09-07 09:00:25 +00:00
marcel
9dd41e3647 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
jh
c64014573d Use proper error message when fstat(2) fails on stdout.
PR:		bin/159746
Submitted by:	Alex K.
2012-07-20 08:33:23 +00:00
jh
0fdc094d92 style(9). 2012-07-20 08:31:36 +00:00
ed
f58d00c87a Put some static keywords in the source code.
For these simple utilities, it doesn't harm to make all global variables
static. In fact, this allows the compiler to perform better forms of
optimisation and analysis.
2011-10-31 08:59:17 +00:00
ru
4d8f1d73c3 Removed redundant WARNS setting.
Submitted by:	Ulrich Spörlein
2009-10-15 18:17:29 +00:00
des
9b5e8cb337 cat(1) compiles fine at WARNS level 6. 2009-03-16 12:16:17 +00:00
ivoras
1f332d86bf Teach cat(1) and cp(1) to use a larger buffer if enough memory is present
in the system. A simple heuristics is used to detect what is "enough"
memory: if number of physmem pages is greater than 32k (equalling 128 MB
on machines with 4 kB pages).

Typical immediate result of these changes is reduction in context switches
and the goal is to increase efficiency by using large buffers:
before: /usr/bin/time -hlp cat file1 > file2
...
       163  voluntary context switches
     11194  involuntary context switches
after: /usr/bin/time -hlp ./cat file1 > file2
...
       417  voluntary context switches
       272  involuntary context switches

Reviewed by:    hackers@ (no objections to earlier version of cat patch)
Approved by:    gnn (mentor)
MFC after:      4 months
2008-10-30 14:05:57 +00:00
ru
06bb6eb3fd One more nit. 2006-12-23 09:25:23 +00:00
ru
cce30d6dfc Fix markup. 2006-12-23 09:22:06 +00:00
ru
ffd9fd4c0e Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.
2005-01-16 16:41:59 +00:00
ru
d26afd541d Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
imp
a76898b849 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
tjr
164861df2d Use warn() instead of perror(). 2004-07-20 05:52:00 +00:00
markm
4383f14801 Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
tjr
178101a7a4 Reduce redundancy in the description of the -u option. 2004-03-21 11:04:59 +00:00
tjr
e5ce675c2f Document incorrect handling of multibyte characters when -t and -v options
are used.
2004-03-21 11:02:40 +00:00
obrien
4389ea67ab We have to hide copyright[] for gcc33. :-( 2003-04-30 17:40:28 +00:00
markm
2edaf88c8b Be consistent about declaring a function "static", and consistent
about the type of argv.
2002-10-23 10:23:38 +00:00
markm
80ff821584 Give lint a small bit of help. 2002-07-31 16:50:21 +00:00
obrien
c84c569bd1 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
tjr
2ca2fb4fa3 Avoid truncating the pathname to UNIX Domain Sockets with snprintf(),
giving a more sensible warning when the (relatively meagre) sun_path
limit is exceeded.
2002-06-29 04:52:33 +00:00
jmallett
f46221a82d Use an usage() rather than doing the fprintf inside option parsing. 2002-06-14 09:54:48 +00:00
tjr
2f568aeb91 Print the "$" symbol on blank lines when the -s and -e options are used
together.

Obtained from:	OpenBSD (millert, Denis Afonin)
2002-06-13 14:05:26 +00:00
tjr
dea5473747 Remove bogus "-" operand from usage message. There is no restriction on
where it may be placed, it is treated the same as the file arguments.
2002-06-13 13:45:14 +00:00
markm
7b7558d884 Fix warnings inspired by lint, a commercial lint and WARNS=4. 2002-02-22 20:51:00 +00:00
imp
ef44ec93a7 Drag cat(1) kicking and screaming into the late 1980's:
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.

Approved by: arch@, new style(9)
2002-02-02 06:10:01 +00:00
obrien
099f8ecbe9 Default to WARNS=2. Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by:	mike
2001-12-04 01:57:47 +00:00
ru
eb7cee6686 WARNSify. 2001-09-26 11:34:14 +00:00
ru
e43023b2d0 The "cat - -" feature was broken by the last commit.
Restore the code that avoided closing and reopening
stdin.  This is also required by POSIX.  As a bonus,
enable multiple stdin reads with the -benstv flags,
by resetting the EOF condition on stdin.
2001-09-26 11:32:23 +00:00
ru
7f833143d7 mdoc(7) police: fixed markup. 2001-09-25 18:10:18 +00:00