Commit Graph

18844 Commits

Author SHA1 Message Date
roy
2b9f5c3f2c Instead of poking in the binary blob to work out if this is our terminal,
assume it is and load it.
Once loaded then check it's really for us.
This allows us to work out if the indexed alias entry is correct we
this was not checked previously.
2017-05-16 10:25:40 +00:00
roy
2678fcfdf5 Don't bother allocating space for the database name, just print
directly to the static buffer storage.
2017-05-16 09:19:48 +00:00
roy
3edb4adc61 Move pathbuf into the function where it's actually used. 2017-05-16 08:52:14 +00:00
christos
eeb345227e Don't make assert use stdio; saves >100K on an empty static binary. 2017-05-15 16:09:09 +00:00
wiz
0456c39519 Formatting and punctuation improvements. 2017-05-14 12:35:46 +00:00
wiz
63d3c713fa file system police. 2017-05-14 12:30:37 +00:00
wiz
cf1b0d459d Use Nx. 2017-05-14 12:29:10 +00:00
maya
5b9767ae88 Belatedly bump minor.
lots of changes since -7 (libm.so.0.11), including:
new functions: llroundl, lroundl, erfl, erfcl
partial switch to freebsd catrig
2017-05-13 13:17:11 +00:00
maya
6c9a28baeb Drop superfluous ; in __warn_references 2017-05-13 02:58:03 +00:00
christos
a613f690f9 make it the same as rump.h 2017-05-11 18:44:50 +00:00
christos
60b22e867e Don't depend on stars in order to define things. 2017-05-11 17:47:22 +00:00
martin
3397b20a60 Evil hack to fix the build: provide PRIxREGISTER here.
Sevan, please check and fix correctly ;-)
2017-05-11 10:21:55 +00:00
sevan
6b31f116cc With the removal of HAVE_REGISTER_T from rumpuser_port.h, _KERNTYPES does not
need to be defined. This allows register_t to be typedef'd to RUMP_REGISTER_T
without conflict, as highlighted in PR kern/52206.
2017-05-11 04:33:14 +00:00
sevan
64fda0b19a Update NetBSD values obtained from running configure as instructed in comment.
This paves the way to resolve rump build process using buildrump.sh, where the definition of
HAVE_REGISTER_T caused conflicting definitions of register_t.
2017-05-11 04:27:27 +00:00
kre
7cbdd94285 Turns out that the previous fix is incorrect, we were not doing ++hit
to change the boolean hit from false to true, but to change it from 1 to 2
which in a sense should have been obvious from the context:
	if (hit)
		/* more tests */
			++hit;
The real problem was that hit was (in the imported tzcode) incorrectly
changed from int to bool in a previous update.

Not that it matters, this code is never actually executed - it was there
to deal with the mythical double leapseconds, which simply never exist
(hit counted the number of leapseconds in an adjustment) and it will all
be gone in the next tzcode update.

For now, just turn hit back into an int, which should satisfy gcc 8,
I hope.
2017-05-10 10:34:30 +00:00
sevan
979875ac74 Revert previous change so builds can resume.
_KERNTYPES needs to be defined for NetBSD builds to succeed.
_KERNTYPES must not be defined for buildrum.sh builds to succeed.
2017-05-10 08:48:46 +00:00
mbalmer
0f3108288c Guard against double freeing of objects (explicit by the Lua program, then
later by the garbage collector).
This fixes PR bin/52218.
2017-05-10 07:36:01 +00:00
sevan
9204518573 Do not define _KERNTYPES as this breaks build with buildrump.sh due to
conflicting types for register_t.
Closes PR kern/52206
Steered in the right direction by christos.
2017-05-10 01:11:51 +00:00
christos
518a4ef5c5 Only add a write filter for sockets. It is not supported for vnodes, or
for 1/2 closed fifos (which we both have now).
2017-05-09 21:15:30 +00:00
kre
486691905e Add the new signalname/signalnext/signalnumber interface to libc.
This as discussed on current-users in the thread
entitled:
  Proposal: new libc/libutil functions to map SIGXXXX <-> "XXXX"
that can be found (starting at):
  http://mail-index.netbsd.org/current-users/2017/04/28/msg031600.html

These functions provide the mechanism to enable applications
to divorce themselves from internal details of the signal
implementation.

Libc minor bumped, prototypes in <signal.h>, sets lists updated (and sorted).

One and all: feel free to improve the sources & man page (etc), but
please do not change the function signatures without discussion.
2017-05-09 11:14:16 +00:00
abhinav
d531aa96de Add missing word. 2017-05-09 06:41:56 +00:00
maya
9c26aa2ea4 Avoid shift of negative signed integer. this is UB. NFC.
from gcc8, ok riastradh
2017-05-09 02:56:44 +00:00
maya
6db625eb59 ++bool to bool=true to appease GCC 8. NFC
ok riastradh
2017-05-09 02:30:49 +00:00
maya
468489bfea Correct misleading indentation. NFC
This isn't a functional difference because huge + x > one is
always true for a small x, and is probably a magical incantation
to raise inexact if x != 0

Found by GCC 8.0
2017-05-09 02:04:38 +00:00
christos
048b91431b use the symbolic M_ALL and trim with M_MASK 2017-05-08 14:42:16 +00:00
martin
0dcaa3783b Complete the namespace dance 2017-05-08 09:25:03 +00:00
martin
9bce32444d Add missing namespace.h include 2017-05-08 08:21:56 +00:00
christos
922c79a2e7 Add the imprecise catrigl functions back. 2017-05-07 22:01:54 +00:00
christos
ea6fb1417c mention why we don't support this (yet) 2017-05-07 21:59:06 +00:00
martin
dc8051aeb0 Limit some rintl usage to #ifdef __HAVE_LONG_DOUBLE.
XXX should probably declare some aliases in the #else case
2017-05-07 11:29:21 +00:00
joerg
4f77b889d0 Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.

Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.

Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.

Improve test cases to ensure correct operation of the changed
interfaces.
2017-05-06 21:34:51 +00:00
christos
6b9cab4173 Bump version 2017-05-06 19:52:25 +00:00
christos
464b32545a Replace our rounding functions with the ones from FreeBSD 2017-05-06 18:03:24 +00:00
christos
f7c6682327 add missing namespace.h 2017-05-06 18:02:52 +00:00
roy
34c6060f1f Clean up some more warnings. 2017-05-04 09:46:30 +00:00
roy
04f58b4824 Clean up some compile warnings. 2017-05-04 09:42:23 +00:00
christos
1700326566 - limit size of buffers to RPC_MAXDATASIZE
- don't leak memory
- be more picky about bad parameters
https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt

XXX: pullup-7
2017-05-03 21:39:27 +00:00
roy
db8a6fb0b3 Fix some compile warnings. 2017-05-01 19:09:22 +00:00
roy
ac826cc7fc Whitespace police. 2017-05-01 18:39:02 +00:00
christos
b8fc685b9a Switch from a recursive pattern matching algorithm to handle '*'
to a backtracking one. Avoids DoS attacks with patterns "a*a*a*a*a*...b"
matching against "aaaaaaaaaaaa..." https://research.swtch.com/glob
2017-04-26 14:56:54 +00:00
abhinav
06ea77a20c Clean up the NAME section.
The entries in the NAME section of these man pages have man pages of their
own, so it doesn't make sense to have their names here, instead they
should be just described in the body (similar to what we do in math(3) man page).

This also helps whatis(1) and apropos(1), as otherwise you would see multiple
results with the same name in the output, while there is actually only one page
with that name.

Good example is:

$ apropos -n 2 -M realloc
realloc (3)       general memory allocation operations
realloc (3)       general purpose memory allocation functions

The first line is there because memory(3) man page had realloc in its
NAME section. This commit will fix this issue.

ok wiz@
2017-04-26 07:40:09 +00:00
riastradh
6fa7b15833 Change VOP_REMOVE and VOP_RMDIR to preserve lock/ref on dvp.
No change to vp -- the plan is to replace the node by the
componentname in the vop parameters, and let all directory vops do
lookups internally.

Proposed on tech-kern with no objections:
https://mail-index.netbsd.org/tech-kern/2017/04/17/msg021825.html
2017-04-26 03:02:47 +00:00
christos
1e4359e82a merge tzcode2017b. 2017-04-25 13:19:44 +00:00
christos
882d7a48e8 fix typo (Leonardo Taccari) 2017-04-23 13:23:02 +00:00
wiz
014a98250c Sort errors. 2017-04-23 11:38:53 +00:00
abhinav
bf7f329587 Fix sentences at couple of places
s/a file/the file/
	s/a -1 is returned/-1 is returned/
2017-04-23 06:46:04 +00:00
christos
6f84e2e257 Add VIS_DQ (for OpenBSD compat) 2017-04-23 01:58:48 +00:00
christos
5ec33a074f Mention that the signal stack of the newly created lwp is reset to disabled. 2017-04-21 15:04:10 +00:00
abhinav
3a89c5769a When doing filename autocompletion, append a trailing slash at the end of directory
names. We already do this when there is only one completion option but
in case of of multiple completion options, it wasn't being done.

ok christos@
2017-04-21 05:38:03 +00:00
roy
5b2b9b53e2 Whitespace, fit in 80 and extra braces for readability.
No functional change.
2017-04-20 08:34:23 +00:00
christos
6ad75611ab F_DUPFD* needs an argument (minfd) found by jmcneill 2017-04-19 22:21:07 +00:00
maya
b24bc65591 always initialize iovcnt
from clang static analyzer
2017-04-18 12:34:07 +00:00
maya
0e5a550a5b avoid calloc(1,0).
from clang static analyzer

ok christos
2017-04-18 11:35:34 +00:00
christos
50dd7b358e Fix out of bounds read for very large numbers (pointed out by Brooks Davis)
https://svnweb.freebsd.org/changeset/base/316766
2017-04-13 17:45:56 +00:00
abhinav
bf08a0975f Use more markup for struct timespec
Use Xr to refer to timespec(3)
Add timespec(3) to SEE ALSO
2017-04-11 17:59:23 +00:00
riastradh
87fb32292e Make VOP_INACTIVE preserve vnode lock on return.
Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html

Ride 7.99.68, a bumpy bus of incremental vfs improvements!
2017-04-11 14:24:59 +00:00
abhinav
3b14f403c3 s/Sets/Set: Use style consistent with the other sentences in that list.
Add .Pp before next sentence.
2017-04-11 11:06:39 +00:00
abhinav
c626d04131 Add missing argument for H_SET.
ok christos@
2017-04-10 15:02:40 +00:00
kamil
049bc8e25e Fix typo in previous (ptrace(2)) 2017-04-08 00:58:35 +00:00
kamil
d50fceb568 Document new calls and be more clear about PT_SYSCALL* in ptrace(2)
Document PT_SETSTEP and PT_CLEARSTEP in ptrace(2).

Try to explain more details of PT_SYSCALL and PT_SYSCALLEMU.

The description of PT_*STEP has been obtained from FreeBSD.

Sponsored by <The NetBSD Foundation>
2017-04-08 00:56:38 +00:00
pgoyette
158c71ad1f Fix typos and some grammar 2017-04-07 07:21:58 +00:00
kamil
2667b4dcaa Correction in ptrace(2) about operations that emit signals
PT_STEP and PT_DETACH cannot emit signals
PT_CONTINUE and PT_SYSCALL can emit signals

Pointed out by <chs>
2017-04-07 00:56:14 +00:00
abhinav
8e077e469b Fix sentence. 2017-04-02 14:27:11 +00:00
abhinav
9f9499a40c Add man page links for:
EV_SET to kqueue(2)
   getmntoptstr, getmntoptnum, freemntopts to getmntopts(3)

Reviewed by wiz@
2017-04-01 14:31:05 +00:00
abhinav
8e39d64647 Add EV_SET() to the NAME section
Use Xr instead of Fn to refer other man pages
Add some more entries to SEE ALSO

Reviewed by wiz@
2017-04-01 14:20:45 +00:00
abhinav
ad5244b4e8 Use Sy to highlight the table header. 2017-03-30 20:00:21 +00:00
abhinav
1bf28fdbff Add missing functions 2017-03-30 19:56:36 +00:00
abhinav
33d7e92834 Add getmntoptstr, getmntoptnum, and freemntopts to the NAME section
Fix couple of sentences

getmntoptstr, getmntoptnum, and freemntopts need to be linked to the getmntopts(3)
man page as well. Will do in a later commit after doing a relase build test.
2017-03-30 19:41:41 +00:00
abhinav
cd4acf025e Add getdiskcookedname to the NAME section
Fix couple of typos.
2017-03-30 19:23:06 +00:00
abhinav
21edcefd45 Remov comma from the last Nm entry
Use Xr instead of Fn to refer rmdir(2)
Fix couple of sentences
2017-03-30 18:54:26 +00:00
maya
38f9590df4 Remove outdated CAVEATS.
Not sure everything is standards compliant, but I've been told non-default
values are supported and pshared exists.
2017-03-28 17:42:52 +00:00
nat
e5d1b604d5 ABI of libossaudio did not change, so there was no need to bump the version
number.

Pointed out by mrg@
2017-03-24 11:46:52 +00:00
chs
c853a494e6 expose the BSD/linux fenv extensions in libm on ia64 too. 2017-03-23 18:27:29 +00:00
chs
de7c5b7203 sun2 just has to be different, of course.
it doesn't use the libc softfloat and thus doesn't set MKSOFTFLOAT=yes.
enable the fenv functions here explicitly for now.
2017-03-23 18:26:03 +00:00
nat
dab5456581 Calculate GETISPACE/GETOSPACE properly.
Bump version.

Addresses PR kern/51999.
2017-03-23 15:50:48 +00:00
wiz
54c511cc9d Remove trailing whitespace. 2017-03-23 12:31:57 +00:00
roy
5128a2ed79 POSIX says that use_env(3) must precede setupterm(3).
The former lives in curses.h, but the latter lives in term.h.

This is solved by moving the function to libterminfo.
Because the environment can affect the terminal capabilities for
lines and columns, it follows that the tty size should affect it to.
So move that code to libterminfo and adjust in libcurses.
2017-03-23 00:55:39 +00:00
roy
d5c74a0225 Allow terminfo users to update flag and numeric capabilities as they do
strings.
2017-03-23 00:39:06 +00:00
roy
c8a6d4546d Revert botched commit. 2017-03-23 00:36:37 +00:00
roy
8bf4334f27 term.h 2017-03-23 00:23:29 +00:00
roy
a3b8817f64 Revert prior .... some ncurses application expect to be able to update
the terminal capabilities.
2017-03-23 00:17:57 +00:00
chs
7e30e94394 provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
2017-03-22 23:11:07 +00:00
kre
4b48a30a7a Unbreak build, init variable (not a false alarm for this one.) 2017-03-22 19:36:04 +00:00
kre
de1e0dfd01 parsedate.y: meaningless KNF of a comment (no code changes)
parsedate.3:  add an item in BUGS noting the weirdness of "next"

The real purpose of this commit is to supply the following message
which should be used for the immediately previous commit, replacing
its commit message (the two are similar, but definitely not the
same).   With thanks to gdt@ for pointing out one of the (many) errors
in the previous message (and noting others I had already seen).

    ----

Make parsedate handle "12 noon" and "12 midnight" (including when the
time given is "12:00" or "12:00:00") - but only for exactly 12 o'clock.
"12:00:01" is am or pm, not noon or midnight.

"12 am" remains as an alias for "12 midnight", and "12 pm" for noon,
though both are strictly (pedanticly) invalid (and meaningless.)

Note that "12 midnight" (or "12 am") means 00:00:00 (ie: midnight at
the start of the day, not at the end.)
2017-03-22 18:17:42 +00:00
roy
1b119018c7 openlog(3): add LOG_PTRIM and LOG_NLOG log options.
syslog(3) is the one stop method of logging system events and diagnostics.
When debugging a daemon in the foreground on a terminal, each line is
prefixed with tag[pid]: which is very repetative and can take up valuable
screen estate.
LOG_PTRIM solves this by removing this prefix from stderr output.

There is also the case where the debugging could involve a dry-run and
syslog(3) calls would pollute the system log with incorrect data.
LOG_NLOG solves this by not writing the the system log, but allowing
LOG_PERROR to operate as before.

Initially discussed here:
https://mail-index.netbsd.org/tech-userlevel/2016/10/06/msg010330.html
2017-03-22 17:52:36 +00:00
kre
e9cfba3947 Make parsedate handle "12 noon" and "12 midnight" (including when
the time is "12:00" or "12:00:00) - but only for exactly 12 o'clock.
"12:00:01" is am or pm, not noon or midnight.

"12 am" remains as an alias for "12 midnight", and "12 pm" for midnight,
though both are strictly invalid (and meaningless.)

Note that "12 pm" means 00:00:00 (ie: midnight at the start of the
day, not at the end.)
2017-03-22 01:49:36 +00:00
kre
b717517d3c Fix PR lib/52101 -- 12:30 am is 00:30:00 and 12:30 pm is 12:30:00 2017-03-22 00:59:06 +00:00
christos
010ddb1dfc Make this compile again (gcc does not like strcmp(maybe-NULL, maybe-NULL);
simplify the life of the {compiler,human eyes}.
2017-03-20 20:44:06 +00:00
christos
f85b99dc0a Make this compile again: use ce instead of clr_eol which gcc thinks might
be NULL.
2017-03-20 20:42:39 +00:00
christos
12423e3e50 comment out unused code. 2017-03-20 18:19:34 +00:00
roy
0f7015d835 Ensure there is a terminal to return capabilities from. 2017-03-20 14:46:28 +00:00
roy
3cd3ec3cb0 Put back filter(3) I mistakenly removed in r1.29 2017-03-20 10:20:16 +00:00
chs
ed8841c51d lrint() and lrintf() are supposed to use the current rounding mode,
so use vcvtr rather than vcvt.
2017-03-16 16:32:12 +00:00
dholland
9fc21b6efb more trash to take out at bump time 2017-03-15 23:23:15 +00:00
wiz
65bf0053ed Update zlib version in pkgconfig file. 2017-03-12 20:38:30 +00:00
christos
20e5bd1924 merge 2017a 2017-03-11 18:23:14 +00:00
chs
6626e5c201 fix the mapping table. this sh3 version was originally copied from arm,
but FP_RP and FP_RM have opposite values on sh3 vs. arm.
2017-03-11 01:25:04 +00:00
maya
4644559ea4 Remove entirely redundant free right after declaration.
This block existed because the original code used bindname as a global.
2017-03-10 18:02:32 +00:00
maya
88f58dd75f Drop redundant null checks.
this doesn't increase diff to upstream, the whole block differs already.
2017-03-10 17:47:20 +00:00
maya
7ab45b5b71 Remove redundant null check before free. it is safe to free(NULL)
While here, clear up odd whitespace issue. NFC
2017-03-09 11:39:41 +00:00