Marcelo Araujo
cd59e2f343
Use MIN() macro from sys/param.h.
...
MFC after: 2 weeks.
2016-04-27 02:44:10 +00:00
Marcelo Araujo
a9a46bd918
Use MIN() macro from sys/param.h.
...
MFC after: 2 weeks.
2016-04-27 02:34:25 +00:00
Marcelo Araujo
1e8b591f62
Use macro MIN() from sys/param.h.
...
MFC after: 2 weeks.
2016-04-27 02:26:31 +00:00
Marcelo Araujo
a301044615
Use MIN() macro from sys/param.h.
...
MFC after: 2 weeks.
2016-04-27 02:13:57 +00:00
Marcelo Araujo
5d49c30c7b
Use MIN() instead of MAX() as the previous syntax was wrote in a weird and
...
confused way: "prec > 9 ? 9 : prec".
Submitted by: pfg, ngie and luke <luke.tw@gmail.com>
MFC after: 2 weeks.
2016-04-26 00:29:00 +00:00
Tony Finch
c37dc1fb0b
Example RIPE whois query with options and spaces.
...
Since it is used in the example, mention the -- option in the synopsis
even though it is a universal standard, and tweak to fit it on one line.
2016-04-25 15:46:42 +00:00
Bjoern A. Zeeb
d654df1365
Try to make gcc builds happy again by removing a redundant declaration.
2016-04-25 13:20:35 +00:00
Pedro F. Giffuni
3548708c47
Adjust a type from r267490.
...
Independent of the maximum length, the return type for strnlen(3)
is always size_t.
2016-04-24 04:28:04 +00:00
Pedro F. Giffuni
2c4eed4723
patch(1): avoid signed integer overflow when debugging.
...
Integer i is used to index p_end of type LINENUM (actually long).
Match the types.
MFC after: 5 days
2016-04-24 04:08:36 +00:00
Maxim Sobolev
96ad8686f6
GC duplicate define.
2016-04-23 07:28:32 +00:00
Maxim Sobolev
4fc55e3e46
Improve performance in a few key areas:
...
o Split the compression across several worker threads. By default, "several"
matches number of CPUs, capped at 24 for sanity when running on a very big
hardwares. Provide option to set that number manually;
o Fix bug inherited from the mkulzma (R.I.P) which degraded already slow LZMA
compression even further by calling function to release compression state
after processing each block.
It is neither documented as required nor actually required by the LZMA
library. This caused spree of system calls to release memory and then map
it again for every block. LZMA compression is more than 2x faster after this
change alone;
o Record time it takes to do compression and report throughput achieved.
o Add simple first-level 256 entry hash table for de-dup code, so it's not
becoming a bottleneck at big files.
2016-04-23 07:23:43 +00:00
Marcelo Araujo
61cfb5db60
Use roundup2() macro from sys/param.h.
...
MFC after: 2 weeks.
2016-04-22 06:23:23 +00:00
Marcelo Araujo
ee03c16e64
Use MIN() macro from sys/param.h.
...
MFC after: 2 weeks.
2016-04-22 03:46:57 +00:00
Marcelo Araujo
cadc2836d8
Use macro MAX() from sys/param.h.
...
MFC after: 2 weeks.
2016-04-22 03:43:06 +00:00
Marcelo Araujo
fcc0131f63
Use macro MAX() from sys/param.h.
...
MFC after: 2 weeks.
2016-04-22 03:37:27 +00:00
Pedro F. Giffuni
e55a6575d9
kernel: use our nitems() macro when it is available through param.h.
...
No functional change, only trivial cases are done in this sweep,
Discussed in: freebsd-current
2016-04-21 21:30:51 +00:00
Ed Maste
2821bdccaa
elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree
...
It's provided by sys.mk so there's no need to derive it from ${.CURDIR}.
Suggested by: ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5998
2016-04-21 12:58:29 +00:00
Eitan Adler
c706c470e4
Bring a little more compability with GNU units 2.12
...
- notionally support a 'history file' flag. This doesn't do much now,
but is there to prevent scripts written against GNU units from
breaking
- correctly gracefully quit rather than exit (this will make it easier
to support a history file in the future)
- remove the "t" flag from fopen which was there to support windows. We
have not supported windows since at the latest, the introduction of
capsicum.
2016-04-21 05:24:47 +00:00
Baptiste Daroussin
e6d8c0e2dd
Plug memory leaks
...
Reported by: Coverity
CID= 1338535, 1338536, 1338542, 1338569, 1338570
2016-04-20 21:23:42 +00:00
Baptiste Daroussin
c1eac826c2
Fix bad checking of the return of realloc(3)
...
Reported by: Coverity
CID: 1007335
MFC after: 3 days
2016-04-20 20:56:06 +00:00
Baptiste Daroussin
89afcfedb6
Fix typo: actually test the return of strchr(3)
...
Reported by: Coverity
CID: 1007335
MFC after: 3 days
2016-04-20 20:54:47 +00:00
Marcelo Araujo
6b1c46441c
Partially revert the change on r298325 where there is an
...
(-1) casted to a pointer.
Submitted by: pfg
MFC after: 2 weeks.
2016-04-20 01:38:54 +00:00
Marcelo Araujo
b4b3d271de
Use NULL instead of 0 for pointers.
...
Small cosmetic change.
MFC after: 2 weeks.
2016-04-20 01:28:31 +00:00
Marcelo Araujo
61c2ed541d
Use NULL instead of 0 for pointers.
...
gethostbyname(3) will return NULL for error status.
MFC after: 2 weeks.
2016-04-20 01:26:03 +00:00
Xin LI
aa9ddbd03e
Fix build breakage introduced by r298253.
2016-04-19 07:28:39 +00:00
Eitan Adler
3851177de0
Rename units.lib -> definitions.units
...
- this matches GNU units 2.12
add ISO country codes from units 2.12
2016-04-19 05:17:59 +00:00
Eitan Adler
8ae87993ed
Remove pathnames.h
...
- it only holds a single constant
- it doesn't exist in the GNU variant
2016-04-19 05:04:39 +00:00
Marcelo Araujo
c81a92db98
Use NULL instead of 0 for pointers.
...
realloc will return NULL in case it cannot allocate memory.
MFC after: 2 weeks.
2016-04-19 02:05:32 +00:00
Marcelo Araujo
7a4b1114b1
Use NULL instead of 0 for pointers.
...
strchr(3) will return NULL if the character does not appear in the
string.
MFC after: 2 weeks.
2016-04-18 14:44:01 +00:00
Ed Maste
c0e5e7f3d2
Replace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain
...
This produces a nicer path in debug info and build logs.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
2016-04-18 13:13:59 +00:00
Marcelo Araujo
fffa1bd071
User NULL instead of 0 for pointers.
...
getservent(3) returns NULL on EOF or error.
MFC after: 2 weeks.
2016-04-18 07:14:01 +00:00
Marcelo Araujo
1b56693f8b
Use NULL instead of 0 for pointers.
...
fopen(3) will return NULL in case it cannot open the STREAM.
MFC after: 2 weeks.
2016-04-18 07:09:34 +00:00
Marcelo Araujo
26ac9660a4
Use NULL instead of 0 for pointers.
...
MFC after: 2 weeks.
2016-04-18 07:05:18 +00:00
Marcelo Araujo
d919e0d513
Use NULL instead of 0 for pointers.
...
realloc will return NULL if it cannot allocate memory.
MFC after: 2 weeks.
2016-04-18 06:12:00 +00:00
Marcelo Araujo
7dbab9554d
Use NULL for pointers.
...
strrchr(3) will return NULL if the character does not appears in
the string.
MFC after: 2 weeks.
2016-04-18 06:02:26 +00:00
Marcelo Araujo
ef1cb629d8
Use NULL instead of 0 for pointers.
...
Also malloc will return NULL if it cannot allocate memory.
MFC after: 2 weeks.
2016-04-18 05:46:18 +00:00
Marcelo Araujo
6a3f9a213a
Use NULL instead of 0.
...
strtok(3) will return NULL when no more tokens remain.
MFC after: 2 weeks.
2016-04-18 05:26:32 +00:00
Baptiste Daroussin
1551be3402
Note that mklocale(1) and colldef(1) are no longer used
...
mklocale and colldef has been replaced by localedef, but they have to be kept
until 10.2 is EOL for mklocale (it has been added to 10.3 as a bootstrap tools)
and until 10.3 is EOL for colldef (it has never been added to bootstrap tools)
2016-04-17 23:02:49 +00:00
Baptiste Daroussin
206541f231
Use the nitems() macro
2016-04-17 22:42:48 +00:00
Jilles Tjoelker
ae7d5745cd
mail: Don't truncate mtime of mailbox to microseconds.
2016-04-17 20:00:24 +00:00
Baptiste Daroussin
36acabc16f
Fix a mandoc -Tlint warning
2016-04-16 12:49:26 +00:00
Baptiste Daroussin
26e736b2c0
Directly set the O_CLOEXEC flags via the open(2) attributes
...
MFC after: 1 week
2016-04-16 12:47:23 +00:00
Glen Barber
0edd2576c0
MFH
...
Sponsored by: The FreeBSD Foundation
2016-04-16 02:32:12 +00:00
Pedro F. Giffuni
80c7cc1c8f
Cleanup unnecessary semicolons from utilities we all love.
2016-04-15 22:31:22 +00:00
Bryan Drewery
d1dd034d07
META_MODE: Don't rebuild build-tools targets during normal build.
...
This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build. Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.
Sponsored by: EMC / Isilon Storage Division
2016-04-14 21:06:10 +00:00
Glen Barber
9c831bbd69
MFH
...
Sponsored by: The FreeBSD Foundation
2016-04-13 02:04:09 +00:00
Pedro F. Giffuni
074e77e66e
fmt(1): for pointers use NULL instead of 0
...
While here clean excessive not lint comment indentation.
2016-04-13 01:57:06 +00:00
Pedro F. Giffuni
86aba0f293
fmt(1): reformat with indent(1).
...
Failed attempt to get nearer to style(9) and the format from the
original OpenBSD code. At least it should be readable now.
No functional change.
2016-04-13 01:46:48 +00:00
Conrad Meyer
3d222369ac
Add a small tool, resizewin(1), to query terminal for window size
...
Submitted by: Daniel O'Connor
Reviewed by: kan, wblock, cem
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4438
2016-04-13 00:30:42 +00:00
Glen Barber
876d357fa7
MFH
...
Sponsored by: The FreeBSD Foundation
2016-04-11 15:24:59 +00:00