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
- 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
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@
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
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>
- Allow disabling bzip2 support with WITHOUT_BZIP2
- Fix handling patterns that start with a dot
- Remove superfluous semicolon
Approved by: delphij (mentor)
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.
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.
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