Commit Graph

18817 Commits

Author SHA1 Message Date
roy 0d7cbb25e8 Disable typeahead being set to infd by default as this seems to cause
refresh issues in nvi.
2017-02-17 11:18:38 +00:00
ozaki-r 44d072be9e Support paccept for nc 2017-02-16 08:08:01 +00:00
christos 379a1dffb1 fix off-by-one, found by asan. 2017-02-12 22:37:49 +00:00
maya 85f888414a overlapping strcpy is UB. use memmove
from asan+ubsan
2017-02-12 17:19:00 +00:00
kamil 61aff29627 Introduce new interface in ptrace(2) - PT_GET_SIGMASK and PT_SET_SIGMASK
Add new interface to add ability to get/set signal mask of a tracee.
It has been inspired by Linux PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, but
adapted for NetBSD API.

This interface is used for checkpointing software to set/restore context
of a process including signal mask like criu or just to track this property
in reverse-execution software like Record and Replay Framework (rr).


Add new ATF tests for this interface
====================================
getsigmask1:
    Verify that plain PT_SET_SIGMASK can be called

getsigmask2:
    Verify that PT_SET_SIGMASK reports correct mask from tracee

setsigmask1:
    Verify that plain PT_SET_SIGMASK can be called with empty mask

setsigmask2:
    Verify that sigmask is preserved between PT_GET_SIGMASK and
    PT_SET_SIGMASK

setsigmask3:
    Verify that sigmask is preserved between PT_GET_SIGMASK, process
    resumed and PT_SET_SIGMASK

setsigmask4:
    Verify that new sigmask is visible in tracee


Kernel ABI bump delayed as there are more interfaces to come in ptrace(2).

Sponsored by <The NetBSD Foundation>
2017-02-12 06:09:52 +00:00
roy 0a316e40f7 Warn about unprintable characters in capability strings. 2017-02-11 15:13:17 +00:00
roy 0fb82a6eaf Following a newline, strip leading whitespace from capability strings. 2017-02-11 14:57:15 +00:00
maya 39d6057df2 speed limit is 80 (missed this one) 2017-02-10 08:52:04 +00:00
maya 6ac4e27787 strncpy->strlcpy. use sizeof instead of numbers. 2017-02-10 08:50:27 +00:00
blymn 871cddc640 Remove checks for cursor being in scrolling region, ncurses doesn't
do checking, rather just scrolls the scrolling region so we shall
follow suit.  SUSv2 says what is happens when scrl is called with the
cursor outside the scrolling is undefined so we should match ncurses.
This fixes PR#51819 without forcing tin to use terminfo directly.
2017-02-10 06:25:28 +00:00
maya fa47e9d850 ifdef out some dead code. improves code readability.
all later users of y first assign another value.

using ifdefs to make potential future code syncs easier, as is done
elsewhere.

suggested by coverity, CID 1300929, 1300930.
2017-02-09 22:11:09 +00:00
maya d5de09b1da Appease static analyzers by making all code paths which assign
values into p,q sane. Get rid of redundant assignment. Indent
for legibility. NFC.

This doesn't create a functional difference, as all callers
test number >= 0x40000000 anyway.

To see this, note the following:
- consistently, hx is the high bits of x, lx is the low bits,
  x is the float.
- & 0x7fffffff zeroes the sign bit, as does fabs.

A case where it isn't easy to see that there's no functional
change is y1, which does:

ix = hx & 0x7fffffff (zero signbit of high bits of x)
y = fabs(x) (this has a zeroed signbit but otherwise same as x)
ix >= 0x40000000
  pone(y); qone(y)

qone(x) (also pone) do:
  ix = hx & 0x7fffffff

ix in qone and in the calling function are the same number,
and the comparison applies for both, and ix < 0x40000000 isn't
possible.

(Also, no explosions seem to happen when I feed it random numbers)
2017-02-09 21:23:11 +00:00
maya d2158a65ab minor bump libc for accept4 2017-02-08 20:26:26 +00:00
maya 248eba16c5 oops, do not write the same file twice -- accidentally ran patch twice 2017-02-08 18:03:57 +00:00
maya e89d2a589b Document accept4 in accept(2) 2017-02-08 18:01:24 +00:00
christos ea89c7259a empty to nothing 2017-02-08 18:00:37 +00:00
maya 708af0751d Add accept4, a tiny wrapper around paccept.
accept4 is a syscall in Linux, FreeBSD and OpenBSD. It is used in
LLVM, zeromq, and probably others. paccept is a superset of it.

adding it to libc ensures it is used by programs and prevents the
need to define the same wrapper in every program.
2017-02-08 17:58:41 +00:00
maya fefc5fa8d9 Make paccept a weak symbol in preparation for using it in another function 2017-02-08 17:30:27 +00:00
christos 9aa43b8677 __empty is defined in <sys/cdefs.h> 2017-02-08 16:13:40 +00:00
riastradh adfa6ca875 Omit duplicate text. 2017-02-08 13:31:36 +00:00
kamil 0892a29a1a libpthread_dbg(3) deletion from the base distribution
libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by <The NetBSD Foundation>
2017-02-08 03:44:40 +00:00
christos 4251f87df7 PR/51958: Ngie Cooper: ESRCH error description in hcreate(3) contains typo
for action
2017-02-07 22:25:25 +00:00
kamil 5acf460d25 Mark exect(3) obsolete and bind it to plain execve(2) on all platforms
The original exect(2) from BSD4.2 was enabling bit for tracing
(single-step mode) and calling execve(2). The purpose of it was to generate
a signal for a tracer once the application will change its image to a new
program.

This approach no longer works as:
 - exect(2) traces (single-steps) libc and it requires hundreds or
   thousands steps before entering a new image
 - it's vax and x86 specific code
 - this functionality has been moved to the kernel - once a process is
   traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to
   its debugger
 - the side effects and unportability make this interface unusable
 - there are no known users of this interface
 - it apparently never worked better since day0 of NetBSD ("day0 bug")

Users are requested to move to other execve(2) variants. Calling current
execve(2) as it is the most similar behavior to this one from BSD4.2.

Discussed several times on mailing lists and in PR/51700.

Add warning to exect(3) telling about marking this function obsolete.

This function is prepared to be removed in next libc major bump.

Sponsored by <The NetBSD Foundation>
2017-02-07 19:29:39 +00:00
kamil c58abbea19 Document in libc's shlib_version request for exect(3) removal
This functionality has been moved long time to the kernel. Kernel exec()
emits SIGTRAP under a debugger (unless PT_SYSCALL traced).
2017-02-07 15:33:25 +00:00
abhinav 6b1f1a07e7 Add posix_madvise(2) in the NAME section. 2017-02-03 21:10:22 +00:00
abhinav 0d379b321a Insert comma between two Nm entries.
Remove Pp before Bd
2017-02-03 21:03:05 +00:00
abhinav b566e9d11b Remove comma after the last Nm entry. 2017-02-03 08:14:58 +00:00
njoly cada2c18c7 Fix a typo : pthread_mutexaddr_init -> pthread_mutexattr_init. 2017-02-02 10:48:22 +00:00
abhinav 60763e809a Add comma between two Nm entries in the NAME section. 2017-02-01 16:06:19 +00:00
abhinav d2174aa7ea Add modff and modfl in the NAME section. 2017-02-01 15:57:47 +00:00
abhinav 11aef024b5 Fix a sentence.
Correct function name in the DESCRIPTION section.
2017-02-01 15:49:02 +00:00
abhinav 5f9e091f8e Also, fix spelling of described. 2017-02-01 14:51:29 +00:00
abhinav 6cef231ea2 Fix sentence. 2017-02-01 14:46:51 +00:00
abhinav b59ab9a645 Remove comma after last Nm entry. 2017-02-01 14:42:28 +00:00
abhinav 53327cbb3e Remove comma after the last Nm entry. 2017-02-01 14:37:20 +00:00
sevan cc576e1d8e Update supporting files for components which rely on autoconf to allow systems
introducing since release of software to be recognised. This should hopefully
allow the builds to progress a littles further on systems such as the POWER8
which features a little endian 64-bit PowerPC CPU identified as ppc64le.
2017-02-01 09:26:39 +00:00
roy 8dcd50a6a0 Move ESCDELAY to curses.c so all globals are close to each other.
Remove _reentrant and use ESCDELAY and TABSIZE as we're not really
reentrant.
2017-01-31 09:17:53 +00:00
roy 3c94ec04f2 Just return ERR instead of asserting if someone calls the slk routines
to affect the ripped off window before the window is actually ripped off.
2017-01-30 17:15:52 +00:00
roy 7487819a0b Check _cursesi_term is set in a few places and sprinkle some static. 2017-01-30 16:50:44 +00:00
roy 64b2ce979c If either set_escdelay(3) or set_tabsize(3) are called, set _reentrant
to ensure we use the saved value for the sceen.

This effectively makes ESCDELAY and TABSIZE read-only when either
of these functions are called.
2017-01-30 14:55:58 +00:00
abhinav c8b491e821 Fix a typo. 2017-01-29 16:52:38 +00:00
snj e6059b4b0a new lookup order will be in 7.1 before 8.0 2017-01-29 05:13:55 +00:00
wiz bb66c0074f Spelling fixes. 2017-01-27 12:52:39 +00:00
kamil 231f136ce0 Make the PIOD_READ_AUXV operation more clear
Describe how to set piod_offs.

Sponsored by <The NetBSD Foundation>
2017-01-25 17:12:56 +00:00
roy 2ebbf64e54 Document baudrate(3). 2017-01-25 12:42:05 +00:00
roy 1899e6576b And more functions .... 2017-01-25 12:21:18 +00:00
roy 9ab26a1db5 Note the substantial work by others on the curses library. 2017-01-25 12:05:26 +00:00
roy cb39f3d94a Document recently added functions in curses.3 2017-01-25 12:00:57 +00:00
roy de49f4c9e2 Reference curses_slk(3). 2017-01-25 11:44:55 +00:00
roy a2ac1ce48c Implement POSIX Curses Soft Label Key functions. 2017-01-24 17:27:30 +00:00
roy 9d818e01f4 Note an issue with our cursor movement in 1 line size window. 2017-01-24 16:45:41 +00:00
maya c7ed247615 add a wishlist for a major bump. isinff and compatibility cabs. 2017-01-20 22:10:38 +00:00
kamil c2ffce666f Fix one markup issue and add initial HISTORY section
Import HISTORY notes from FreeBSD.

Sponsored by <The NetBSD Foundation>
2017-01-15 22:18:11 +00:00
christos 1ecca95a27 fix *syslog_ss* 2017-01-15 16:41:39 +00:00
christos 213f09a410 don't include machine/param.h <sys/param.h> already does WTF? 2017-01-14 22:19:29 +00:00
christos 9d493e3dc8 remove useless include; asm.h is not useful for c files. our current assumption
is that stuff in cdefs.h is duplicated in asm.h.
2017-01-14 15:50:24 +00:00
wiz 13cf5641ee Wording, macro use. 2017-01-14 14:33:18 +00:00
kamil c2476a0996 Document PTRACE_LWP_CREATE and PTRACE_LWP_EXIT in ptrace(2)
Sponsored by <The NetBSD Foundation>
2017-01-14 07:17:38 +00:00
kamil 4e100202af Document PTRACE_VFORK and PTRACE_VFORK_DONE in ptrace(2)
PTRACE_VFORK - report vfork(2)-like operations and trace child
PTRACE_VFORK_DONE - report unblocking the parent after vfork(2)-like call

Note that PTRACE_VFORK is currently unimplemented and returns ENOTSUP.

Sponsored by <The NetBSD Foundation>
2017-01-14 00:02:40 +00:00
christos 4afb65f9d5 fix compilation 2017-01-13 18:18:20 +00:00
christos 025af9a44f allow overriding snprintf/vsnprintf 2017-01-13 14:41:27 +00:00
christos 794a9d5044 use getpagesize(3). 2017-01-13 04:18:54 +00:00
maya 68f994d51e replace old style function declaration 2017-01-12 19:02:22 +00:00
christos 585a07d820 Don't go redefining system constants, without checking if the system provides
them.
2017-01-12 18:23:04 +00:00
christos e9f6168b19 undo SSP damage from -Wsystem-headers 2017-01-12 18:16:52 +00:00
roy 5952c1b776 Use the screen argument, not _cursesi_screen. 2017-01-12 16:23:46 +00:00
roy ca57f21848 Correct terminfo variable pkey_norm to plab_norm. 2017-01-12 13:53:11 +00:00
christos 8212adb6e3 Avoid sysconf: __sysconf -> sysctlgetmibinfo -> strtoimax -> locale, etc. 2017-01-12 02:00:42 +00:00
christos 9cc0be316b A little more restructuring so that we don't need mutex stuff in syslog_ss. 2017-01-12 01:58:39 +00:00
christos 227c2c0795 make this smaller. 2017-01-12 01:02:09 +00:00
christos b722e4222b put back strerror_ss, it will be used shortly. 2017-01-12 00:43:55 +00:00
riastradh 0add037f37 Clarify the explanation of the compat_time.c definition of time. 2017-01-12 00:38:25 +00:00
christos 820e172c78 Split syslog.c to:
- syslog_ss.c *_ss api functions (don't use stdio, time)
- syslog.c: *syslog* non _ss api functions (use stdio, time)
- xsyslog.c> common guts.

The motivation for this is not to drag in stdio/locale/floating point/time
for every binary, since syslog_ss() is used in __stack_check_fail() for SSP.
2017-01-12 00:38:01 +00:00
christos 2a1a34d545 Add strerror_ss_r to be used by syslog_ss 2017-01-12 00:35:38 +00:00
roy 53035e70de Fix some off by one issues with arraycount ..thanks coypu. 2017-01-11 20:53:52 +00:00
roy c77e1d014f Move the ripoffline logic out of screen.c and into ripoffline.c.
Store ripped off lines in the SCREEN structure so we can repaint then
when the terminal is resized.
Fix mvwin(3) so it can move windows in the ripped off area.
2017-01-11 20:43:03 +00:00
roy 295b0bfab7 Remove setup already done in newterm and even set_term. 2017-01-11 17:15:27 +00:00
roy 518bfd5577 Kill stray refs to __virtscr and _cursesi_screen missed in prior commit. 2017-01-11 10:06:32 +00:00
roy 019139adbd ripoffline requires wnoutrefresh to work before _cursesi_screen has been
set.
2017-01-11 09:54:54 +00:00
kamil 2e2dd171b3 Correct man-page category of posix_spawn: is (3) not (2) 2017-01-11 07:32:36 +00:00
kamil 5ed9a833b2 Document SIGTRAP with si_code TRAP_CHLD in ptrace(2)
Document the current behavior of TRAP_CHILD in NetBSD.
Add more notes on PTRACE_FORK events.

Sponsored by <The NetBSD Foundation>
2017-01-11 07:31:14 +00:00
roy 98102593fe Use the window's screen's terminal. 2017-01-10 23:49:20 +00:00
roy cc74ade3a6 Fix resizing terms. 2017-01-10 23:28:45 +00:00
roy e56dac4e35 Use the terminal of the SCREEN of the WINDOW rather than cur_term
for window attribute functions.
2017-01-10 21:56:50 +00:00
christos 4ad16b3e7c PR/51814: Ngie Cooper: add <stdio.h> since sys_nerr is declared there on
FreeBSD.
2017-01-10 20:25:48 +00:00
christos 4476579893 KNF, simplify expressions for readability. 2017-01-10 17:51:01 +00:00
christos 46629f8e5f pacify lint. 2017-01-10 17:50:24 +00:00
christos 6ddfa6c010 simplify cast. 2017-01-10 17:46:47 +00:00
christos 01b3cff52b add missing cast. 2017-01-10 17:46:26 +00:00
christos 56572bf5f5 cast for size_t 2017-01-10 17:45:58 +00:00
christos 14501124c4 use correct type for poll 2017-01-10 17:45:27 +00:00
christos 3707fb92bc include <sys/stat.h> 2017-01-10 17:45:12 +00:00
christos d472a9154a add constcond 2017-01-10 17:44:51 +00:00
christos f8af623337 add linted comment 2017-01-10 17:44:28 +00:00
christos 93438ac9dd Need <sys/stat.h> 2017-01-10 17:00:58 +00:00
christos ef5b9db358 need <sys/stat.h> 2017-01-10 16:51:30 +00:00
roy 545dbcc586 When doupdate is called, check for typeahead input after N lines changed
instead of aborting really early.

This allows some screen update when holding the page down key for example.
2017-01-10 10:33:49 +00:00
roy 25445577c0 Implement POSIX curses function ripoffline(3). 2017-01-10 10:13:24 +00:00
roy 5714904ce2 Test for __ISPASTEOL when moving the cursor and it hasn't moved.
Unset __ISPASTEOL when moving the cursor during refresh.
2017-01-10 09:32:01 +00:00
abhinav fe8fae7920 Add missing word. 2017-01-10 06:28:46 +00:00
christos 93f630910e Adapt to new zlib 2017-01-10 01:28:03 +00:00
blymn b3963fa60a Checks for bottom right corner were reversed. 2017-01-09 21:17:29 +00:00
christos 1ec9eafabc Make sure we take into account history_base when computing negative history
offsets. (Gerry Swinslow)
2017-01-09 03:09:05 +00:00
christos 4937de3b47 Make sure that argv is NULL terminated since functions like tty_stty rely
on it to be so (Gerry Swinslow)
2017-01-09 02:54:18 +00:00
wiz 65fa8d4547 Use more markup, sort ENVIRONMENT. 2017-01-08 13:49:21 +00:00
wiz 6811b22279 Whitespace fix, bump date for previous. 2017-01-08 13:49:05 +00:00
kamil 69c3a1c44c Add more notes explaining how debuggers work on NetBSD
Explain:
 - execve(2) handling and behavior, SIGTRAP & TRAP_EXEC
 - reference PaX MPROTECT restrictions for debuggers
 - software breakpoints handling and behavior, SIGTRAP & TRAP_BKPT
 - single step behavior, SIGTRAP & TRAP_TRACE
 - list predefined MI symbols for help debuggers in port specific headers
 - explain that PT_TRACE_ME does not send a SIGSTOP signal

Sponsored by <The NetBSD Foundation>
2017-01-07 05:51:14 +00:00
kamil 6a0def7293 Document PT_SET_SIGINFO and PT_GET_SIGINFO in ptrace(2)
PT_SET_SIGINFO - fake signal information emitted to tracee
PT_GET_SIGINFO - read signal information routed to tracee

Sponsored by <The NetBSD Foundation>
2017-01-07 03:41:25 +00:00
kamil 6615db4a39 Fix swapped text between PT_GET_PROCESS_STATE and PT_GET_EVENT_MASK
Sponsored by <The NetBSD Foundation>
2017-01-07 01:32:35 +00:00
kamil 929c1cc1fe ptrace(2): Document addr and data argument usage for PT_GET_PROCESS_STATE
The PT_GET_PROCESS_STATE call in ptrace(2) has the following usage of addr
and data:

    A pointer to this structure is passed in addr.  The data
    argument should be set to sizeof(struct ptrace_event).

Sponsored by <The NetBSD Foundation>
2017-01-07 01:29:18 +00:00
roy 84fe414e1f KNF 2017-01-06 14:25:41 +00:00
roy 9180469668 KNF 2017-01-06 14:06:00 +00:00
roy 50a63ac8d2 KNF.
Normalise coding style.
White space police.
Sprinkle some extra braces to make the flow more clear.

No functional changes.
2017-01-06 13:53:18 +00:00
roy 846cb8f380 u_int -> unsigned int, u_int32_t -> uint32_t. 2017-01-06 09:14:07 +00:00
roy 506f84ec9a Implement ncurses is_pad(3).
Correct documentation about is_keypad(3).
2017-01-05 23:15:43 +00:00
roy 433b66d936 Whitespace 2017-01-05 21:42:04 +00:00
roy 4550c5287c Implement is_term_resized and resize_term(3) ncurses extensions.
resizeterm(3) is now a wrapper for resize_term(3).
2017-01-05 21:25:17 +00:00
roy 47cc2fc353 Add the set_escdelay(3) and set_tabsize(3) ncurses extensions. 2017-01-05 20:31:37 +00:00
wiz e4ec469a39 Fix typo. 2017-01-05 12:35:41 +00:00
wiz 3134e606a6 Whitespace. 2017-01-05 09:46:32 +00:00
wiz 6e0a1cbf88 Use Ev for environment variables. 2017-01-05 09:46:08 +00:00
roy ffbd31d04d White space police 2017-01-04 03:51:29 +00:00
roy c293b9d8ca Allow C++ to link with all curses parts. 2017-01-04 02:05:23 +00:00
roy 5a86062c02 Add missing man pages for wsyncup.3 and wcursyncup.3 2017-01-03 13:21:40 +00:00
roy 8cf8e1d614 Support 256 colour terms.
From: rofl0r <retnyg@gmx.net>
2017-01-03 12:42:06 +00:00
roy 330e363652 Now that we have the initialize_color capability,
init_color can be made to work.

From: rofl0r <retnyg@gmx.net>
2017-01-03 12:39:44 +00:00
christos 29343d16d1 set to NULL after releasing to avoid double free. 2017-01-03 00:59:31 +00:00
roy c247fb6646 Bump libcurses to 7.1 for prior additions. 2017-01-02 12:38:16 +00:00
roy 1369811d4e Implement POSIX Curses functions immedok(3) and syncok(3). 2017-01-02 10:28:34 +00:00
roy 4da08ba387 Whitespace 2017-01-02 08:44:12 +00:00
maya 038de09f8a compare to zero, instead of using signbit, and be more specific in comment.
-0.0 > 0 is also false. no functional change.

while this is mostly a change to be consistent in style (the rest of the
comparisons aren't done with signbit), it is also a micro-optimization.

with our default compile flags, calls to copysign are libm calls (and a
whole function call!!). this generates more efficient code.
2017-01-01 19:32:14 +00:00
abhinav db324dcb86 Fix sentences at a couple of places.
Reorganize the RETURN VALUES section a bit to improve readability.
Add xrefs to clearerr(3) and ungetc(3) in SEE ALSO.
Bump date.

ok wiz@
2017-01-01 12:39:33 +00:00
roy 6de5f0d137 Implement ncurses extension has_key. 2017-01-01 03:06:06 +00:00
maya c0f2822a3c similar to csqrt, spare ourselves a fabsf call. we already check sign
later on, use this to our advantage.

No functional change.
2016-12-31 22:54:56 +00:00
roy a663bc11be Implement POSIX Curses typeahead function. 2016-12-31 22:47:01 +00:00
maya 43e54dd9fc csqrt has a branch cut on the negative real axis, and this requires
delicacy in order to maintain continuity around it.

we have an initial case to deal with a fairly common case: getting
a real number. Avoid dealing with the branch cut in this case by
checking if the real part is negative.

later, -0.0 < 0 is not met, so instead, test for a negative number
using signbit, so negative zero is also treated as a negative number.

Fixes last part of PR lib/51427: libm issues triggered by py-numpy

ok riastradh
2016-12-31 20:01:15 +00:00
roy 77943ff6ed Implement POSIX curses use_env function. 2016-12-31 17:46:35 +00:00
maya 03a73f9282 Spare ourselves a fabs call. We already check the sign later.
w = r + y*I is the same as w = r because this is the y == 0 case.

no functional change.
2016-12-31 15:33:03 +00:00
roy 2ab1e31d80 Implement ncurses extensions is_leaveok and is_keypad.
The former allows the ncurses (and pdcurses) macros getsyx and setsyx
to be implemented, which is needed by a surprising number of applications.

The latter is needed for Python curses support so it doesn't have to dive
into ncurses window structure.
2016-12-31 13:50:16 +00:00
roy 1c3d328353 Add the POSIX filter() function to libcurses. 2016-12-30 22:38:38 +00:00
wiz 1e92e63851 Fix some prototypes. 2016-12-29 23:50:59 +00:00
kamil 383dde7b6a Reference siginfo(2) for a SIGCHLD signal
siginfo(2) describes appropriate signal specific information for SIGCHLD.

Sponsored by <The NetBSD Foundation>
2016-12-29 22:17:51 +00:00
wiz 42d8f555f6 Update prototypes to match current RPC code.
Bump date.
2016-12-29 22:07:12 +00:00
wiz 29b4283f3f Fix asctime_r prototype. 2016-12-29 21:03:51 +00:00
wiz b52b1cd113 Mention stdarg.h for va_list. 2016-12-29 20:29:30 +00:00
christos 5d7e998696 Make this portable to other OSs 2016-12-29 18:30:55 +00:00
wiz 146c3bb911 Fix typos. 2016-12-27 21:25:12 +00:00
rmind cbc7bab49c KNF 2016-12-27 20:32:58 +00:00
christos 52d8bce52a Add a function to iterate over endpoints 2016-12-27 20:14:07 +00:00
rmind 5e66d73d01 Update libnpf(3) man page. 2016-12-27 17:58:56 +00:00
christos f75d79eb69 Sync NPF with the version on github: backport standalone NPF changes,
which allow us to create and run separate NPF instances. Minor fixes.
(from rmind@)
2016-12-26 23:05:05 +00:00
abhinav c95a15e71b Add missing full stop. 2016-12-26 10:16:43 +00:00
abhinav b2f786d04e As per the IEEE 1003.1-2008 standard, the range of values for the %S
format specifier is [0,60].
2016-12-25 06:37:50 +00:00
maya 177f6a3a05 don't use systm.h header, it's not available to userland.
as a side effect, this fixes the evbarm64 build, which was failing due
to a declaration of psize_t physmem in systm.h, while psize_t is
kernel-only.

ok riastradh
2016-12-24 15:23:06 +00:00
abhinav a4dca42e82 As per C99 the range of values for the %S format specifier is [0,60]
rather than [0,61]. The standard has removed mention of double leap seconds.
The standard has give the following rationale in the time.h man page:

"The range [0,60] seconds allows for positive or negative leap seconds.
The formal definition of UTC does not permit double leap seconds, so all
mention of double leap seconds has been removed, and the range shortened
from the former [0,61] seconds seen in previous versions of POSIX."
2016-12-24 05:33:51 +00:00
abhinav 93864c5433 Complete a sentence
and replace full stop with a comma at one place as the sentence wasn't finished
2016-12-23 06:01:41 +00:00
abhinav 6672db53ac Remove trailing comma at the end of the last .Nm entry in the NAME section 2016-12-22 17:39:28 +00:00
abhinav d52ecd3afc Grammar fixes at few places
Also, don't use .D1 inside .Bd (mandoc -Tlint was complaining)
Remove whitespace at the end of a sentence
2016-12-22 17:27:02 +00:00
christos 116a2064fe PR/50228: Christian Groessler: fix bzero(ptr, 0) on ppc. Check for 0 length
before jumping to cb_memset like memset does.
2016-12-19 14:30:23 +00:00
abhinav af4d0016d3 Use markup for errno
Also remove a .Pp before .Bl while there
2016-12-19 07:48:35 +00:00
abhinav fc41d23c04 Be consistent in using process' (vs process's). 2016-12-19 07:17:45 +00:00
abhinav 490a78e58c Fix sentence. 2016-12-19 06:45:29 +00:00
christos b91b113b53 flesh out _Unwind_Exception, rust needs it. 2016-12-19 01:24:40 +00:00
christos cb01aa8e82 clarify res_nclose and res_ndestroy. 2016-12-18 17:34:36 +00:00
wiz 31a419311f Fix typo. 2016-12-17 10:25:49 +00:00
abhinav adaa892a13 Fix typo 2016-12-17 06:17:16 +00:00
mrg f1582e88f7 scandir/alphasort take "const struct dirent **" not "const void *" in
modern unix.  since we claim to be 'IEEE Std 1003.1-2008', make it so.
2016-12-16 04:45:04 +00:00
kamil 1779f12820 ptrace(2): Document PT_GETVECREGS and PT_SETVECREGS (ppc ports specific)
Sponsored by <The NetBSD Foundation>
2016-12-15 15:03:17 +00:00
kamil 3c3d6699d5 ptrace(2): Document PT_GETXMMREGS and PT_SETXMMREGS (i386 port specific)
Sponsored by <The NetBSD Foundation>
2016-12-15 14:49:46 +00:00
kamil 091cebb2c4 ptrace(2): Remove dead text, some of it commented in this file for years
For example PT_READ_U/PT_WRITE_U has been removed by <mycroft> in 19950126.

Sponsored by <The NetBSD Foundation>
2016-12-15 13:06:08 +00:00
christos 2b4d6aa5a1 fix placement of lint comment 2016-12-12 04:20:31 +00:00
blymn 4114d2610d Improve debug information. 2016-12-11 21:25:22 +00:00
christos 3d8a0ad9b3 PR/51706: Amir Plivatsky: Fix memory leak 2016-12-11 15:47:06 +00:00
scole 5e40039f22 Add exect stub so "build.sh distribution" will compile 2016-12-10 21:19:15 +00:00
christos 5467719bc0 use array notation 2016-12-10 21:04:12 +00:00
kamil 4067ec816b Remove outdated note in the PT_DUMPCORE call of the ptrace(2) man-page
Currently the PT_DUMPCORE call requires process to be stopped, therefore it
no longer need to warn about stoped tracee to generate consistent data.

Sponsored by <The NetBSD Foundation>
2016-12-10 20:02:07 +00:00
christos 431fde0e65 update for v18 conn list; more error checks 2016-12-10 19:07:22 +00:00
rin 7edfde5134 Fix typo; ".Lx" should be ".Nx" 2016-12-10 14:13:29 +00:00
kre c0121372b2 Remove what was probably a left over remnant of a debugging printf
which was incompletely deleted.   Hopefully fix the build.
2016-12-10 08:48:11 +00:00
christos 3d5a430c2b add npf_nat_lookup() 2016-12-10 05:37:55 +00:00
christos 5398e0956f more stuff needs -mfpu=vfp 2016-12-08 18:42:01 +00:00
pgoyette 02a1db30fb Fix comment: s/ACCD/ADDC/ 2016-12-07 10:03:29 +00:00
kre 7a3aec16f6 Actually guarantee that the returned buffer from link_ntoa() is always
NUL terminated, even when called by malicious/broken applications.
2016-12-07 09:52:34 +00:00
pgoyette d6b064e942 More tweaking... 2016-12-07 03:48:05 +00:00
pgoyette dfa0a7c726 Update BUGS section to note the possibility of a truncated return value. 2016-12-07 03:22:14 +00:00
christos 2067ca0866 make it always return a NUL terminated string instead of NULL when the address
is truncated for compatibility with others.
2016-12-07 03:16:45 +00:00
christos 7143892b68 Add the terminating NUL as a regular character addition. 2016-12-07 02:48:54 +00:00
dholland f118bedc12 Leave room for the null terminator. Spotted by DuClare on freenode. 2016-12-07 02:36:41 +00:00
christos 8f4552233c Fix buffer copy without checking the size of input:
https://www.kb.cert.org/vuls/id/548487
2016-12-06 18:41:02 +00:00
christos d10d9a2322 fix test lib/librumphijack/t_sh/runscript
(handle F_DUPFD_CLOEXEC that the shell is now using)
2016-12-02 20:53:36 +00:00
christos b293c8a9d7 Add unwind action type and constants 2016-12-02 19:25:19 +00:00
christos 6d100a1021 PR/51673: Carsten Kunze: curses: standend() does not turn off A_BOLD;
according the X/Open it needs to turn off all attributes.
2016-11-29 17:33:48 +00:00
christos 56b8322bcc If we are inserting spaces to account for a tab, move the x position of the
cursor, otherwise this is a no-op (Carsten Kunze)
2016-11-28 18:25:26 +00:00
dholland aa08bfea54 More of previous. 2016-11-26 21:17:06 +00:00
dholland a714102aaa fix comment about initialization-time calls; ok joerg 2016-11-26 20:38:20 +00:00
christos ee97ae6abf off-by-one in memcpy. Found by ASAN (Carsten Kunze)
XXX: pullup 7.
2016-11-24 17:09:55 +00:00
christos 50c795e166 don't coredump if we call endwin when initscr fails. 2016-11-24 14:49:08 +00:00
wiz fe65e38bd3 Bump date for previous. 2016-11-24 12:19:28 +00:00
wiz 9e3f1ccd88 Various fixes. 2016-11-24 12:18:02 +00:00
kamil eedb67d83d Remove duplicated PT_DUMPCORE description in machine-specific calls section
This function is part of the general ptrace(2) interface.

Sponsored by <The NetBSD Foundation>
2016-11-24 00:12:52 +00:00