Commit Graph

10114 Commits

Author SHA1 Message Date
ed
ce57dfe403 Sort header file names.
Spotted by:	des
2011-10-17 13:54:55 +00:00
ed
934a6f8b67 Add missing #include.
Note to myself: don't write patches while watching a movie.
2011-10-16 19:23:43 +00:00
ed
191c732ed6 Don't cast SIZE_T_MAX to off_t.
I focused so much on the 32-bits case where we have to cast SIZE_T_MAX
up in size, that I forgot about the 64-bits case, where off_t and size_t
are equal in size. Simply cast both numbers to uintmax_t, as we can
assume st_size is never negative.

Reported by:	cperciva
2011-10-16 19:15:25 +00:00
eadler
9d7884364e - change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
2011-10-16 14:30:28 +00:00
marcel
4718565769 o Use C99 designated initializer to properly handle ELFOSABI_STANDALONE.
o  In elf_get_byte(), cast through uint8_t and not char to avoid sign
   extension.
2011-10-16 14:11:05 +00:00
ed
d4ce73cfd5 Fix ncplist to build with WARNS=6.
Add some const and static keywords to get it all to build. Also add
missing #includes.
2011-10-16 10:00:28 +00:00
ed
49ae4d0407 Undo r226423.
It seems su does build without warnings, but it requires a small fix to
libbsm headers, which I have not committed to SVN yet.
2011-10-16 09:09:33 +00:00
ed
e3855b1e6b Build rwho(1) with WARNS=6.
The only reason why it didn't build with WARNS=6, is because of some
simple to fix string formatting bugs.

MFC after:	3 months
2011-10-16 08:54:41 +00:00
ed
50100c914e Use integer to store the result of getch().
We need to use an integer to make the comparison against ERR work.

MFC after:	3 months
2011-10-16 08:36:10 +00:00
ed
a8849a7323 Remove WARNS line. This tool builds with WARNS=6 properly. 2011-10-16 08:14:12 +00:00
ed
225015e0ef Fix build of m4 with WARNS=6.
Change the parser; rename `exp' to `exponent' not to collide with exp(3).
2011-10-16 08:09:17 +00:00
ed
7ccc19c3b8 Remove unneeded WARNS=3 lines.
It seems these two tools can be built properly with WARNS=6, even on
architectures that are stricter about alignment.
2011-10-16 08:04:43 +00:00
ed
26202ae0ce Build at(1) with NO_WFORMAT instead of WARNS=1. 2011-10-16 07:57:01 +00:00
ed
e4b5520b25 Make some internal fixes to ruptime(1):
- Prevent possible unaligned access to struct whoent.
- Increase uptime column by one, to properly print hosts with an uptime
  greater than 1000 days.
- Reduce code complexity by storing struct whod inside struct hs.
- Set WARNS to 6.

MFC after:	3 months
2011-10-16 07:36:27 +00:00
delphij
7f0cb2e0bc According to the NetBSD foundation [1]:
Third parties are encouraged to change the license on any files which have
a 4-clause license contributed to the NetBSD Foundation to a 2-clause
license. We would also encourage you to inform us about these files, so
that we can continue to track the many places in which NetBSD is used.

http://www.netbsd.org/about/redistribution.html#why2clause [1]

Requested by:	joel@
2011-10-16 07:35:26 +00:00
delphij
3192efecae Partially revert r226274, the old code was right. 2011-10-16 07:05:43 +00:00
trociny
5edcf5899d In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.

Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:

  echo 1 |script /tmp/script.out cat

PR:		bin/161526
Reported by:	Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by:	Stefan Bethke <stb@lassitu.de>
MFC after:	3 days
2011-10-15 19:08:22 +00:00
ed
2f1e586900 Fix whitespace inconsistencies in systat(1).
According to md5(1), the resulting binary is the same.
2011-10-15 13:20:36 +00:00
ed
6f6341d894 Put parentheses in the right place.
Noted by:	jilles@
Broken by:	me. :-(
2011-10-14 10:43:55 +00:00
ed
a87680cb54 Make nl(1) build with WARNS=6.
Obtained from:	NetBSD
2011-10-14 07:28:39 +00:00
ed
ec118486fa Build last(1) and leave(1) with WARNS=6.
These ports were only built with WARNS=1, because they use certain
format extensions. We can use NO_WFORMAT for that instead.
2011-10-14 07:26:20 +00:00
ed
c532eb5b65 Build tr(1) with WARNS=6. 2011-10-14 07:25:20 +00:00
ed
9a877f97e7 Build look(1) with WARNS=6. 2011-10-14 07:24:48 +00:00
ed
a3dde8469a Build finger(1) with WARNS=6. 2011-10-14 07:24:23 +00:00
rakuco
c4fe3bac8a Add myself to committers-ports.dot and calendar.freebsd.
Approved by:	avilla (mentor)
2011-10-13 20:36:43 +00:00
des
c9a3d28e97 Clean up mkioctls a bit, and fix cross-building by checking ${MACHINE}
instead of $(uname -m).

Pointed out by:	nyan@
2011-10-13 16:29:24 +00:00
des
47b4a2d1c7 Make kdump compile cleanly at WARNS level 6, with one exception: the
ipfilter headers contain a duplicated function declaration.  Turn off
-Werror to allow kdump to compile in spite of this.

It would be neat to be able to turn off -Werror on a file-by-file basis...

PR:		bin/161478
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2011-10-12 21:45:12 +00:00
gleb
71169bb7fd Add myself
Approved by:	mdf (mentor)
2011-10-12 20:18:13 +00:00
dim
eacdf4cafb Add symlink from clang to clang-cpp, so you can use CPP=clang-cpp in
Makefiles.  Also add a manpage symlink for it.

MFC after:	3 days
2011-10-12 17:47:15 +00:00
dim
a1220b444b Add manpage symlink for clang++(1).
PR:		docs/149051
MFC after:	3 days
2011-10-12 17:25:49 +00:00
delphij
c0ed9a753b - Fix an off-by-one bug in addgroup().
- Fix the error message when setgid() failed.

PR:		bin/161509
Submitted by:	Jeremy Huddleston <jeremyhu apple com>
MFC after:	2 weeks
2011-10-12 01:19:12 +00:00
gabor
16b6dcb054 - Fix counting of match limit (-m)
Reported by:	Nali Toja <nalitoja@gmail.com>
Approved by:	delphij (mentor)
2011-10-12 01:09:57 +00:00
gabor
afe335edb5 - Use getprogname() instead of __progname
- Allow disabling bzip2 support with WITHOUT_BZIP2
- Fix handling patterns that start with a dot
- Remove superfluous semicolon

Approved by:	delphij (mentor)
2011-10-11 22:27:23 +00:00
des
9b8d9b3ed1 Add a new trace point, KTRFAC_CAPFAIL, which traces capability check
failures.  It is included in the default set for ktrace(1) and kdump(1).
2011-10-11 20:37:10 +00:00
des
0fb3102c12 The previous commit did not fix the issue since it did not prevent sign
extension.  Cast to u_register_t first, then to uintmax_t.

Submitted by:	bde@
2011-10-11 15:04:58 +00:00
des
405f55d978 Cast to unsigned for %#jx.
Noticed by:	jh@
2011-10-11 07:46:45 +00:00
delphij
2ccfd227c9 Incorporate recent changes from NetBSD. Most notable change is the addition
of support of decompressing xz files.

Obtained from:	NetBSD
2011-10-10 06:37:32 +00:00
des
1f659f520a Address some of bde@'s concerns with the new code. 2011-10-08 21:02:08 +00:00
des
3b508d2272 Teach kdump(1) to decode capability bitmasks.
MFC after:	3 weeks
2011-10-08 13:01:38 +00:00
des
4b5f03bca4 Fix the dependency issue properly by a) moving kdump_subr.c to the front
of the SRCS list and b) listing kdump_subr.h in DPSRCS.
2011-10-08 12:59:41 +00:00
des
0d23c50594 Bring ioctlname() in line with all the other *name() functions, which
actually print the name (or the numeric value, if they can't figure out
the correct name) instead of just returning a pointer to it.  Also, since
ioctl numbers are not and probably never will be unique, drop support for
using a switch statement instead of an if/else chain.
2011-10-08 12:47:00 +00:00
des
d905bcbba9 I appreciate the logic behind using a (void) cast to indicate that the
return value is intentionally ignored, but frankly, all it does is
get in the way of the code.

Also fix a few other incorrect casts, such as (void *)malloc(foo) and
passing signed values to %x.
2011-10-08 12:28:06 +00:00
des
e7179d16fc Fix casting. 2011-10-08 12:21:51 +00:00
des
cd04cd4a49 Whitespace. 2011-10-08 12:10:16 +00:00
des
5f806d203a C has had swicth statements for 40 years or so. It's about time we
started using them.
2011-10-08 11:51:48 +00:00
des
3aeaeac999 Sort and line up. 2011-10-08 11:39:00 +00:00
des
db03f845e1 1) Some of the #defines or enums for which we auto-generate naming
functions may be wider than int, so use intmax_t throughout.  Also
   add missing casts in printf() calls.

2) Clean up some of the auto-generated code to improve readability.

3) Auto-generate kdump_subr.h.  Note that this requires a semi-ugly hack
   in the Makefile to make sure it is generated before make(1) tries to
   build kdump.c, or preprocess it for 'make depend'.

MFC after:	3 weeks
2011-10-08 09:57:29 +00:00
ed
3eeda85437 Remove extraneous WARNS=7.
WARNS above 6 has no use. Also, all of usr.bin is also built with
WARNS=6 by default.

Discussed with:	edwin
2011-10-08 07:20:12 +00:00
jceel
5364f65380 Add myself.
Approved by:	wkoszek (mentor)
2011-10-07 23:12:33 +00:00
delphij
6216a3cd29 Fix build on i386 and arm.
Tested with:	make universe
Pointy hat to:	delphij
2011-10-06 04:39:18 +00:00