Commit Graph

19110 Commits

Author SHA1 Message Date
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
maxv f8e693e577 Deprecate the pmc functions in libi386. The parameters will be updated,
and we are not interested in maintaining this anyway. Now i386's pmc
interface is opaque, which is good.
2017-03-08 16:09:27 +00:00
maxv a2375778e5 Remove i386 from libpmc; it has its own interface (sysarch), and we won't
maintain compatibility.

Verily, I cannot build a distribution now, so I'm committing this rather
blindly. This being said, it looks correct enough.
2017-03-08 15:53:00 +00:00
maya 0e7316adf4 Remove redundant null check before free()
It is guaranteed to be fine also by C99
2017-03-07 11:15:08 +00:00
pgoyette 5169db68cb Improve grammar. Pointed out by Timo Buhrmester on netbsd-docs list. 2017-03-06 09:24:09 +00:00
christos 3bea32ca4f one extra char for NUL. 2017-03-05 19:23:58 +00:00
njoly 9be71c742b Fix man page ERRORS section for (clock,pthread}_getcpuclockid to match
reality.
2017-03-05 18:42:51 +00:00
christos bd242e1e3e Grow the buffer for event search if there was not enough space.
From Gerry Swislow
2017-03-05 17:30:38 +00:00
njoly 5e0724b3f9 Fix {clock,pthread}_getcpuclockid to return an error number on
failure, to match OpenGroup specifications.
2017-03-04 11:16:33 +00:00
chs 55470246b3 fix asm operands: "ctc1" uses the register as an input, not an output. 2017-02-27 06:55:26 +00:00
chs ae1038858d have fpsetmask() change the FE0/FE1 MSR bits to precise mode if any
FP exceptions are enabled.  fix the kernel emulation of mfmsr and mtmsr
to use the correct opcodes for these instructions.  ignore PSL_FE
(the FP enable bit) in the MSR that a user program tries to set,
since it will naturally be set for FP-using processes but
we can't let the user process manage that bit.
2017-02-27 06:54:00 +00:00
chs a3f976c753 the MI lrint() code assumes that rounding is done in at most double precision
but m68k (68881) uses extended precision by default, so put the FPU in
double-precision mode temporarily here.
2017-02-27 06:49:02 +00:00
joerg 6fbd2a0be4 Switch from __ABICALLS__ to __mips_abicalls like upstream GCC does in
the generic MIPS target logic.
2017-02-25 21:16:50 +00:00
christos 3fed35c1f4 add link for accept4. 2017-02-23 15:17:17 +00:00
wiz 5de13b617d Formatting fix. 2017-02-23 08:11:09 +00:00
kamil 7250944257 Document PT_GETDBREGS and PT_SETDBRGS in ptrace(2)
Not this interface in MD part.
Explain design choices.

Sponsored by <The NetBSD Foundation>
2017-02-23 05:48:14 +00:00
scole e3edf3b621 Add fenv for ia64, imported from FreeBSD, compile tested only. 2017-02-23 02:05:30 +00:00
kamil f9b2093d06 Introduce new ptrace(2) API to allow/prevent exection of LWP
Introduce new API for debuggers to allow/prevent execution of the specified
thread.

New ptrace(2) operations:

     PT_RESUME     Allow execution of a specified thread, change its state
                   from suspended to continued.  The addr argument is unused.
                   The data argument specifies the LWP ID.

                   This call is equivalent to _lwp_continue(2) called by a
                   traced process.  This call does not change the general
                   process state from stopped to continued.

     PT_SUSPEND    Prevent execution of a specified thread, change its state
                   from continued to suspended.  The addr argument is unused.
                   The data argument specifies the requested LWP ID.

                   This call is equivalent to _lwp_suspend(2) called by a
                   traced process.  This call does not change the general
                   process state from continued to stopped.

This interface is modeled after FreeBSD, however with NetBSD specific arguments
passed to ptrace(2) -- FreeBSD passes only thread id, NetBSD passes process and
thread id.

Extend PT_LWPINFO operation in ptrace(2) to report suspended threads. In the
ptrace_lwpinfo structure in pl_event next to PL_EVENT_NONE and PL_EVENT_SIGNAL
add new value PL_EVENT_SUSPENDED.

Add new errno(2) value EDEADLK that might be returned by ptrace(2). It prevents
dead-locking in a scenario of resuming a process or thread that is prevented
from execution. This fixes bug that old API was vulnerable to this scenario.

Kernel bump delayed till introduction of PT_GETDBREGS/PT_SETDBREGS soon.

Add new ATF tests:
 - resume1
   Verify that a thread can be suspended by a debugger and later
   resumed by the debugger

 - suspend1
   Verify that a thread can be suspended by a debugger and later
   resumed by a tracee

 - suspend2
   Verify that the while the only thread within a process is
   suspended, the whole process cannot be unstopped

Sponsored by <The NetBSD Foundation>
2017-02-22 23:43:43 +00:00
abhinav c56d982263 Add reference to flockfile(3) in SEE ALSO section. 2017-02-22 15:08:55 +00:00
abhinav 4acd25c1d4 Fix a sentence.
Add write(2) in SEE ALSO.
2017-02-22 14:58:33 +00:00
maya bee20f7c3c GC deprecated logic. GCC 4.8 is not in tree any more. 2017-02-22 02:58:31 +00:00
abhinav 44c9d98bb0 Use Fn for function name. 2017-02-21 19:53:20 +00:00
abhinav 74752680de Insert comma between two Nm entries.
Replace Nm with Fn to refer a function.
2017-02-21 18:47:40 +00:00
abhinav 68d0ebc2d9 Fix spelling of "parenthesis". 2017-02-21 18:22:15 +00:00
abhinav 52cc192a32 Use .Fn to refer functions instead of .Nm. 2017-02-21 18:01:38 +00:00
abhinav 9c8d63417a Fix spelling of "includes". 2017-02-21 17:56:21 +00:00
rin 36be1ec540 Fix -O0 build; <machine/bwx.h> should be included after ".arch ev56" pseudo-op. 2017-02-20 15:23:43 +00:00
roy d837f94776 Note that typeahead(3) is no longer set to infd by default. 2017-02-17 11:23:21 +00:00
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
scole 53744582f1 For ski, break into debugger instead of exiting 2016-11-22 22:50:32 +00:00
kamil f54728af92 Obsolete thread_type in td_thread_info_st in <pthread_dbg.h>
The thread_type is irrelevant as all local POSIX threads are in user-space.

Keep the thread_type member in td_thread_info_st to preserve ABI
compatibility.

Later the remnants from M:N will be refactored in one go with library ABI
version bump.

Sponsored by <The NetBSD Foundation>
2016-11-22 04:51:06 +00:00
kamil 4c8a06b7ee Simplify (pthread_t)pt_magic read in td_map_pth2thr(3)
No functional change. All ATF tests for pthread_dbg(3) still pass.

Sponsored by <The NetBSD Foundation>
2016-11-22 04:17:05 +00:00
kamil 7b8609d5c0 Document td_map_pth2thr(3) from libpthread_dbg(3)
td_map_pth2thr - convert the pthread_t to a thread handle

Sponsored by <The NetBSD Foundation>
2016-11-22 03:52:01 +00:00
kamil 2d6a6aff1c Document td_thr_getname(3) from libpthread_dbg(3)
td_thr_getname - get the user-assigned name of a thread

Sponsored by <The NetBSD Foundation>
2016-11-22 01:49:36 +00:00
kamil 6c74bd40be Add reference in SEE ALSO to pthread_dbg(3)
Sponsored by <The NetBSD Foundation>
2016-11-22 00:32:09 +00:00
kamil 2e8fabe0b7 Document td_thr_iter(3) from libpthread_dbg(3)
td_thr_iter - iterate over the threads in the process

Sponsored by <The NetBSD Foundation>
2016-11-22 00:07:40 +00:00
kamil 7332bc9351 Document td_thr_info(3) from libpthread_dbg(3)
td_thr_info - get information on a thread

Currently a subset of td_thread_info_t is documented. This version
describes thread_addr and thread_state.

Sponsored by <The NetBSD Foundation>
2016-11-21 22:19:03 +00:00
kamil ba06ccfe95 Add initial documentation (man-pages) for libpthread_dbg
Document libpthread_dbg and basic function calls: td_open() and td_close()

Sponsored by <The NetBSD Foundation>
2016-11-21 20:43:25 +00:00
kamil 2bd33bc337 Kill SA thread states (TD_STATE_*) in pthread_dbg and add TD_STATE_DEAD
Scheduler Activation types were removed in NetBSD 5.0. Old type set is not
matching the new world POSIX threads library.

Only TD_STATE_RUNNING, TD_STATE_ZOMBIE are still applicable - keep it.

Keep TD_STATE_UNKNOWN as generic unrecognized type.

Add new TD_STATE_DEAD one. The TD_STATE_DEAD type is represented by number
6 in the POSIX threads library, but for the sake of compatibility with
older software using pthread_dbg - renumber it to 7, as six was reserved
for TD_STATE_SUSPENDED.

Old removed state types are marked as reserved and unused.

Sponsored by <The NetBSD Foundation>
2016-11-21 03:02:34 +00:00
kamil c35485043b Always set trailing '\0' in td_thr_getname() to compose valid ASCIIZ string
This fixes threads5 in tests/lib/libpthread_dbg

Sponsored by <The NetBSD Foundation>
2016-11-20 21:49:24 +00:00
pho 82c0423db2 fuse_main(3): Support general fuse options via fuse_parse_cmdline(3)
* Prototypes for fuse_new(3), fuse_mount(3), and fuse_unmount(3) now
  matches to the original fuse interface.

* Add fuse_daemonize(3): needs to have a different prototype,
  otherwise we can't use puffs_daemon(3).

* Remove fuse_setup(3) and fuse_teardown(3). These obsolete functions
  has already been removed from the original interface.

* fuse_main(3) now supports the following command-line options
  compatible with the original fuse:

  -h, --help      print help message
  -V, --version   print library version (currently does nothing)
  -d, -o debug    enable debug output (PUFFS_FLAG_OPDUMP), implies -f
  -f              foreground mode
  -s              single threaded mode (always enabled for now)
  -o fsname=NAME  explicitly set the name of the file system

* fuse_main(3) now daemonizes the process by default. This is for the
  compatibility with the original fuse.
2016-11-20 13:28:32 +00:00
pho 0e4f248f77 fuse_lowlevel.h: new file, currently only contains fuse_parse_cmdline(3) and struct fuse_cmdline_opts 2016-11-20 13:26:28 +00:00
wiz 14feb52a56 Whitespace. 2016-11-20 09:38:37 +00:00
dholland b6a15c213c Add crossreference to fork(2) per note in PR 9627. 2016-11-20 07:05:20 +00:00
kamil df6b325f24 Fix pt_magic read in td_map_pth2thr()
The pt_magic field is not the first one in the pthread_t structure.

Sponsored by <The NetBSD Foundation>
2016-11-20 03:53:47 +00:00
kamil 57fc5895ae Catch up with correct pt_magic reads in td_thr_{getname,suspend,resume}
The pt_magic field is not the first one in the pthread_t structure.

Sponsored by <The NetBSD Foundation>
2016-11-20 03:11:32 +00:00
kamil 1d6ebe4f76 Fix pt_magic (part of pthread_t) read in td_thr_info()
The pt_magic field is not the first one in the pthread_t structure.
After this fix, this code is confirmed to work and function td_thr_info()
is functional.

Sponsored by <The NetBSD Foundation>
2016-11-20 02:27:56 +00:00
pho 12a2d5638d Change the way how puffs_fuse_node_create() behaves.
In puffs "create" and "open" are two separate operations with
atomicity achieved by locking the parent vnode. In fuse, on the other
hand, "create" is actually a create-and-open-atomically and the open
flags (O_RDWR, O_APPEND, ...) are passed via fi.flags. So the only way
to emulate the fuse semantics is to open the file with dummy flags and
then immediately close it.

You might think that we could simply use fuse->op.mknod all the time
but no, that's not possible because most file systems nowadays expect
op.mknod to be called only for non-regular files and many don't even
support it.
2016-11-17 14:20:25 +00:00
pho fd86259521 Major rework of fuse_opt_parse(3) so that it supports all the functionality of the original function 2016-11-16 16:11:42 +00:00
pho 5ae81a5b54 fuse_opt_match(3): Support every form of templates, not just the simple strcmp case
Also it should return 1 for successful matches, not the way around.
2016-11-15 00:34:19 +00:00
pho 8a68fd4cd6 Add missing macros 2016-11-14 17:48:57 +00:00
pho 111da591d5 Implement missing fuse_opt_add_opt(3) and fuse_opt_add_opt_escaped(3) 2016-11-14 17:19:29 +00:00
wiz f662fdae7e Whitespace. 2016-11-14 10:40:59 +00:00
christos c231d3fa1b Explain rmtp setting. 2016-11-11 16:07:05 +00:00
christos 50d1e6ecfe Document WNOZOMBIE 2016-11-10 17:08:31 +00:00
riastradh 263e13aeed Use the keywords `underflow' and `overflow' in ERANGE summary. 2016-11-07 21:52:36 +00:00
riastradh 95f4e015a9 Fix phrasing about `out-of-band' and `sentinel value'.
Either an out-of-band channel, or an in-band sentinel value, could
indicate an error, but an out-of-band sentinel value is a silly
proposition.

Noted by uwe@.
2016-11-07 21:51:42 +00:00
christos f09a36d8a1 Change the way the built-in history works; some programs enter history
with the trailing newline, others don't so don't make any assumptions
about it when printing. Also print the correct event number (generated),
separate the event number from the event with a tab, and visually encode
the string (don't encode tabs and spaces though).
2016-11-07 15:30:18 +00:00
kre edb49bae9b Actually, this problem won't be reported upstream, their code is
just ...

	ptrdiff_t nitems_max = PTRDIFF_MAX - WORK_AROUND_QTBUG_53071;
	ptrdiff_t amax = nitems_max < SIZE_MAX ? nitems_max : SIZE_MAX;

which is just fine if you think about it a little,   Unfortunately,
in our zealous effort to never leave a ggc warning unused, and to
treat all of the warnings as fatal errors, that code falls foul of the
"you must not compare an unsigned value with a signed value" warning.

nitems_max is a (signed) largish positive integer (obviously, by
inspection).  If it is less than SIZE_MAX then amax is just nitems_max.
In the unlikely case that size_t has less bits than ptrdiff_t so
SIZE_MAX is smaller, amax is limited to SIZE_MAX (which in that case
is known to fit in the ptrdiff_t and to remain positive).

To pacify gcc (and the way the build system uses it), casts are
required.   Unfortunately the cast that was installed here was to
convert SIZE_MAX to a ptrdiff_t.  Unfortunately when ptrdiff_t has
the same number of bits (or less) as size_t (ie: the common case)
but is signed, (ptrdiff_t)SIZE_MAX is just a fancy way of writing -1.

Rearrange the casting in a way that keeps the original intent
of the code for us (it is actyaly now incorrect if size_t has less
bits than a ptrdiff_t) and keeps gcc happy, all at the same time.

What a mess.
2016-11-05 23:09:37 +00:00
kre 752944af9d Revert a couple of lines of code from tzcode2016i to their state in 2016h
SIZE_MAX is the max value of a size_t (and is unsigned) so when converted
to a ptrdiff_t  (int) becomes -1.   That's not what the code was attempting
to achieve.

This will be reported upstream to the tzcode maintainers, and we'll see
what variation appears in tzcode2016j ...

Until then, the older code always worked for us, so it will do for now.

This should fix the broken i386 build.
2016-11-05 22:21:48 +00:00
riastradh 2d9978a06e Update strtoul(3) example to reflect clarifications in strtol(3). 2016-11-05 20:57:31 +00:00
christos 375cff8702 lint knows about _Generic 2016-11-05 01:08:58 +00:00
riastradh 02eab895ae Bump date for previous. 2016-11-04 20:19:58 +00:00
riastradh 59495a850c Tidy up the second example too. 2016-11-04 20:18:23 +00:00
riastradh 105424da40 Simplify error condition case.
Add assertions to reflect its implications.
2016-11-04 20:16:18 +00:00
riastradh e465e7c45b Distinguish invalid syntax from trailing garbage cases. Clarify. 2016-11-04 20:14:31 +00:00
riastradh 3a33a135da Distinguish altogether invalid syntax from trailing garbage. 2016-11-04 20:06:09 +00:00
riastradh 95993320dc EXIT_FAILURE police 2016-11-04 20:04:04 +00:00
christos aafaa3c48f tzcode2016i 2016-11-04 19:41:53 +00:00
riastradh fd26083f95 Fix infinity detection with isinf(d), not d == HUGE_VAL.
Negative infinity counts as overflow too.

Simplify.
2016-11-04 19:18:53 +00:00
riastradh e7962ffd1d Add example for strtod.
This illustrates all the cases you might be interested in and asserts
theorems in those cases.
2016-11-04 19:10:04 +00:00
riastradh 7f81880412 Fix description of ERANGE cases again.
Do use the technical terms `overflow' and `underflow', because strtod
sets ERANGE precisely to indicate either of these two conditions, and
they are the right keywords that one might be looking for.

Note that strtod may set ERANGE even if it returns noninfinity and
nonzero -- specifically, if the result is subnormal.  This part was
wrong before I `fixed' it and remained wrong after I `fixed' it
earlier this year.
2016-11-04 18:46:15 +00:00
pgoyette bf821edee1 Typo - "a requests" --> "a request" 2016-11-02 03:21:38 +00:00
wiz f899b3dcea Bump date for previous. 2016-11-01 15:30:47 +00:00
kamil 0144090d24 Document PT_SET_EVENT_MASK, PT_GET_EVENT_MASK and PT_GET_PROCESS_STATE
These descriptions are imported from OpenBSD.

Approved by <christos>

Sponsored by <The NetBSD Foundation>
2016-11-01 13:51:13 +00:00
christos 6e03f6000c Don't spin if we already own the mutex, otherwise we will get stuck spinning
forever, fixes timemutex{1,2} tests.
2016-10-31 23:53:12 +00:00
kamil 3b2abf0b2a Add CHECK_NOT_THREADED() in __libc_mutexattr_settype_stub()
This makes this function consistent with __libc_mutex_catchall_stub()
and others in the same group.

Approved by <christos>.
2016-10-31 18:10:11 +00:00
abhinav 0551ffcf66 Fix file name auto completion in one specific case.
For example if you do
$mkdir -p /tmp/dir1/dir2

Then:
$ls /tmp/di <TAB> auto completes to
$ls /tmp/dir1/

Hitting <TAB> again auto completes to
$ls /tmp/dir1/dir2

Whereas it should auto complete to
$ls /tmp/dir1/dir2/


Essentially, in cases like above where you have to hit <TAB> twice to get
to the match and there is only one match (because only one file/sub-directory) then
auto complete doesn't work correctly. It doesn't append a trailing slash (in case
of directory) or a space (in case of a file) to the match name.

I have tested file name completion in sh(1) and symbol completion in gdb after
this change.
2016-10-31 17:46:32 +00:00
pgoyette c16bd04c08 Fix markup .Dv --> .Dq
(Thanks, wiz!)
2016-10-31 07:37:10 +00:00
pgoyette 34a71bb24b Typo 2016-10-31 01:31:25 +00:00
kamil 06b9d77598 POSIX harder the pthread_mutex_timedlock(3) prototype
Add missing __restrict keyword to the first pointer parameter.

It was already used for the second argument, should not be a functional
change and generated code should be the same.

This new form is now aligned with POSIX.
2016-10-30 23:26:33 +00:00
christos 931e76f255 export rl_done 2016-10-28 18:32:35 +00:00
christos 1a4590725b pass the stream to the getc function 2016-10-28 18:32:26 +00:00
christos 6c345d9579 PR/51578: Henning Petersen: Fix leak on error. 2016-10-26 15:39:30 +00:00
christos 4384a68ce2 KNF, no real change (except malloc(x * y) -> calloc(x, y)) 2016-10-26 15:36:17 +00:00
christos 59538e7ea4 It is expensive to open and close files for every printf, keep it around. 2016-10-23 21:20:56 +00:00
christos 5b486ace20 PR/51572: calling funopen on each printw call is a tad excessive, but this
is not a reason for funopen to leak. Always call the close function since we
are indirecting through our cookie and we need to free it.
2016-10-23 21:01:52 +00:00
christos 8a48cf6610 remove bogus malloc casts 2016-10-22 21:55:06 +00:00
skrll 11da075cc5 Add multiple inclusion protection and __{BEGIN,END}_DECLS as a native gdb
build uses c++ to build nbsd-thread.c
2016-10-22 18:04:40 +00:00
christos af580f3ad2 welcome to 2016h 2016-10-20 17:41:34 +00:00
maya 57f1116306 Revert previous. it shouldn't have an effect.
$$ should make it sufficiently unique.
2016-10-19 09:51:38 +00:00
christos 95c12ccdf1 make the env stuff visible. 2016-10-19 01:30:35 +00:00
wiz 90f5b47a4a Sort sections. new sentence, new line. Whitespace. 2016-10-18 22:26:13 +00:00
christos 476dcf2b00 make this compile again, and simplify. 2016-10-18 17:56:31 +00:00
manu edb96218ee Make FUSE socket buffer tunable
When dealing with high I/O throughput, we could run out of buffer
space if the filesystem was not consuming requests fast enough.
Here we slightly raise the buffer size, and we make it tunable
through the PERFUSE_BUFSIZE environment variable so that we can
cope with higher requirement later.

While there, document PERFUSE_OPTIONS environment variable.
2016-10-18 15:06:17 +00:00
maya ae394a6300 use mktemp instead of $RANDOM for tmpdir
..$RANDOM won't work with our /bin/sh.

unsure if this script is used, but it is wrong.
might help the spurious build failures that occasionally
show up on autobuilds.
2016-10-17 18:24:42 +00:00
wiz d42d91aeec Add missing word. 2016-10-16 05:28:33 +00:00
kamil cc5d581159 Add NetBSD CVS Id on top of the wcsnlen.c file 2016-10-15 14:30:36 +00:00
kamil 6245abaafa Import wcsnlen(3) to libc
The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.
2016-10-15 14:21:59 +00:00
macallan f61977ef47 build libc_fp only on mips64* 2016-10-14 17:29:29 +00:00
christos 6c1a8a7017 add strchrnul 2016-10-12 20:01:12 +00:00
macallan 8baff5f4bf build and install libc_fp on mips
use with LD_PRELOAD=/lib/libc_fp.so for FPU use via softfloat
2016-10-11 17:02:28 +00:00
macallan 8575febebd move shlib_version into the main directory 2016-10-11 16:55:22 +00:00
macallan 8de18d0a37 set MKSOFTFLOAT=no so we don't get another -msoft-float slapped on COPTS
now this actually builds
thanks to mrg for pointing me in the right direction
2016-10-10 18:49:30 +00:00
macallan f21b7d7f2c fix tpyo 2016-10-09 17:18:32 +00:00
joerg 04b0597d11 Fix syntax for currently not compiled in code. From Henning Petersen in
PR lib/51538.
2016-10-09 11:48:24 +00:00
kre 3a37e001c7 Patch 0001 from upstream to tzcode2016g to restore full functionality
of zic -l
2016-10-07 19:47:16 +00:00
christos 9551d334d2 merge tzcode2016g 2016-10-07 15:29:42 +00:00
christos 1acb507c2d Sync with compat and remove dup implementations of ldexp and modf, switching
mips and m68k to the compat copies.
2016-10-07 11:10:43 +00:00
christos c7db9c14b4 return 0 on unsupported bases. 2016-10-04 12:48:15 +00:00
wiz 33e9a4f901 Fix xref. 2016-10-04 10:46:40 +00:00
kamil 7f4b5eb156 Add timespec_get(3) in <time.h> and enable unconditionally struct timespec
These changes conforms to the C11 standard
References:
 - 7.27.1/3 Components of time (struct timespec)
 - 7.27.2.5 The timespec_get function

According to ISO/IEC 9899:201x (draft) <time.h> defines the timespec
structure and declares the timespec_get(3) function with TIME_UTC
definition.

According to a C++17 standard draft <ctime> offers the same interface in
the std:: namespace.

The timespec_get function modifies the timespec object pointed by ts
to hold the current calendar time in the given base. The standard notes
only the TIME_UTC base with implementation defined value, set it to 1
as zero is reserved for error handling. Once operation was successful this
function returns passed base, otherwise exits with zero.

The timespec struct was already part of the POSIX standard in <time.h>.

Enable this interface unconditionally in the header to allow to use it
in a code prior C11 and C++17 as an extension.

Review notes from <christos>
2016-10-04 09:41:40 +00:00
christos beaa4a9608 bump warns 2016-10-03 17:06:58 +00:00
dholland 8536f06c47 Be more careful about preserving errno. Might conceivably be related
to PR 51432.
2016-09-30 06:22:21 +00:00
dholland 48faaeec69 Be consistent about returning -1 on error. Don't return random errnos
instead.
2016-09-30 06:16:47 +00:00
wiz d6414e373d Remove duplicate Pp. 2016-09-27 11:11:43 +00:00
mrg 62ee7dc27b introduce a better pci_drvname() and PCI_IOC_DRVNAME as pciio_drvnameonbus()
and PCI_IOC_DRVNAMEONBUS.  the new ones also take a (autoconf) PCI bus
number, which allows lookups for any device on any pci bus node.  use this
in pcictl which current reports the wrong values sometimes.

up next: use these in libpciaccess.
2016-09-24 23:12:54 +00:00
christos aae80e6be7 remove mpool_getf 2016-09-24 21:31:25 +00:00
christos f3f19d16f2 bump for the flags version of db routines 2016-09-24 20:12:07 +00:00
christos 86147b1c32 Merge the recursive tree traversal changes from the mit kerberos tree. This
Also make the tracefile customizable. Unfortunately we can't merge any of
the hash changes because they have a different on-disk format. That does not
matter really because we've fixed most of the problems...
2016-09-24 20:11:12 +00:00
christos d42d73761d When writing out pages in the "other endian" format, make a copy instead of
trashing the in-memory one.
2016-09-24 20:08:29 +00:00
christos a49c1d21d7 move the description of CLOCK_REALTIME in the list. 2016-09-24 01:05:51 +00:00
pgoyette 9a9ece3b27 Since the argument buf is earlier described as a buffer, replace all
references to "the array" with "the buffer" for consistency.

Bump date.
2016-09-22 23:18:10 +00:00
christos 122a9a6480 deal with namespace issues and missing atanhf for vax. 2016-09-21 14:11:40 +00:00
roy 72d40e7cf4 Bump libc version for ifaddrs. 2016-09-21 10:54:36 +00:00
roy 45b7bd08f6 Add ifa_addrflags to ifaddrs. 2016-09-21 10:53:24 +00:00
skrll 46ef072377 Fix for [on]{32,64}
/usr/tests/lib/libc/sys/t_getcontext
/usr/tests/lib/libc/sys/t_swapcontext
/usr/tests/lib/libc/sys/t_ucontext
/usr/tests/lib/libpthread/t_swapcontext

All pass now.

Changes amount to

- saving GP from caller in context for n{32,64}
- performing (the equivalient of) PIC_PROLOGUE for swapcontext and
  __resumecontext
- Call setcontext via the PLT in __resumecontext
2016-09-21 06:49:39 +00:00
skrll ed78dc9b59 Trailing whitespace. 2016-09-21 06:41:42 +00:00
christos 939877e98c fix VAX! 2016-09-20 18:25:20 +00:00
christos a4f5c51335 use a define, and cast. 2016-09-20 15:03:07 +00:00
christos 42bfe206ef put back part of the code that determines the smallest of INT_MAX and
SIZE_MAX to avoid llvm truncation warning.
2016-09-20 13:09:08 +00:00
christos 0f266a6ca3 Add the complex trig functions from FreeBSD 2016-09-19 22:05:05 +00:00
christos 5698ccad84 PR/51484: gson@: Fix off by one (wrong merge) 2016-09-19 18:43:23 +00:00
christos 16bd23da7a welcome to tzcond-2016f 2016-09-16 17:12:06 +00:00
joerg 0f37b1b875 gethostbyname_r should die. 2016-09-15 16:23:05 +00:00
njoly 9018f13e85 Fix function name macro. 2016-09-15 07:53:59 +00:00
jakllsch 6b848d5cfa Actually get fma(3) and friends into ARM libm. 2016-09-07 14:41:33 +00:00
martin 832d276ed9 Redo previous by avoiding the casts and using PRIxREGISTER instead 2016-09-06 07:45:41 +00:00
martin cccccd8360 Can not print register_t with %d, cast to long and use %ld instead. 2016-09-06 07:32:39 +00:00
martin a4856ef48c Fix DPRINTF format 2016-09-06 07:12:48 +00:00
dholland 7bd425cccf printf functions should be tagged as printf functions. Noticed by
martin, whose build broke for some reason yet to be determined.
2016-09-05 20:41:59 +00:00
joerg 0f183be635 Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.
2016-09-04 18:27:08 +00:00
mbalmer fc37f15ca1 fix typo 2016-09-01 13:23:44 +00:00
christos d2f713bbd1 don't shortcut closing if the metadata is dirty (from the krb5 tree) 2016-08-31 06:23:51 +00:00
uwe 2bd409d71f ___start is __dso_hidden, so use CALL_DATUM_LOCAL and drop the PIC
prologue from __start.
2016-08-29 21:27:03 +00:00
tnn 523a6b00a9 mention puffs_node_pathconf and puffs_node_advlock 2016-08-29 01:13:56 +00:00
christos a0c7fda095 fix pic code; otherwise we generate text relocations. 2016-08-28 13:50:25 +00:00
wiz 0c9a844188 Merge ENOMEM descriptions. 2016-08-28 05:07:50 +00:00
dholland 880009a06c fix broken xrefs 2016-08-28 00:15:01 +00:00
dholland c959793a57 Rework pursuant to PR 7934: be more clear about the page granularity
behavior and when new memory is zeroed.

Also, strengthen the warning about mixing with calls to malloc (which
is not a bug) and mention that the portable way to fetch the initial
break is to call sbrk(0). There are implementations in the wild where
using _end as the initial break doesn't work.
2016-08-27 23:06:01 +00:00
christos e222705068 Improvements to fgetwln(3) from Andrey Chernov:
1) Set the stdio error indicator on __slbexpand() failure.

2) fgetwc(3) may succeed even when ferror(3) is already set
   (for example, consider a program using SIG_IGN on SIGTTIN,
   reading from the tty while in the background, getting EIO,
   then coming to the foreground and reading again).
   So do not force fgetwln(3) to fail in such a case either.
   (Yes, the program should probably clearerr(3) before
   reading again, but let's be nicer in case it forgets.)
2016-08-27 13:15:48 +00:00
christos fac93a1e7a no need for stdio. 2016-08-27 10:03:16 +00:00
christos c898927fa5 sync with FreeBSD 2016-08-27 10:01:08 +00:00
christos 53b6bfd5c1 correct case 23 for -0.0 2016-08-27 10:00:38 +00:00
christos bb5114e4e0 remove debugging 2016-08-27 09:35:13 +00:00
christos 394a54cbfc skip buggy assembly for libm_g.a 2016-08-27 09:15:44 +00:00
christos a66a750e64 detect overflow in oldexp + newexp 2016-08-27 09:11:56 +00:00
dholland 8c87f52cc0 Add MLINKS for atomic_add_nv, atomic_cas_ni, and so forth - otherwise
you have to remember that they're the same page as plain atomic_add and
atomic_cas, or remember one of the types that they're defined on.
PR 51033.
2016-08-27 08:03:13 +00:00
dholland f3ab3c700b strtod, not strod. 2016-08-27 02:56:26 +00:00
christos a3fc1936b1 fix double merge. 2016-08-26 08:33:48 +00:00
christos 048f5b6f16 do the FENV test consistently 2016-08-26 08:31:17 +00:00
christos b1803eb858 fix sun2 build; only IEEE math platform (and coldfire) without fenv 2016-08-26 08:20:31 +00:00
christos 92e958de60 more fenv for sh 2016-08-25 12:15:28 +00:00
christos 78abb1b97e more compatible with readline history functions. 2016-08-24 13:10:59 +00:00
christos 5b36f996f3 fix ilogb* 2016-08-24 10:03:32 +00:00
christos 96936a322e add ilogb. 2016-08-24 09:10:57 +00:00
christos 87691b796d ilogb for the vax 2016-08-24 09:08:50 +00:00
christos efaac31f0f fenv.h for alpha 2016-08-23 10:00:15 +00:00
christos 8c27d15300 missing _ 2016-08-22 07:41:10 +00:00
maya 47a6662175 BUGS section is no longer correct
FP_ILOGB0 and FP_ILOGBNAN are both defined in math.h
2016-08-22 07:33:30 +00:00
christos a78f4eaca1 From OpenBSD:
bugfix: when fgetwc(3) fails, fgetwln(3) must fail as well;
2016-08-22 06:11:39 +00:00
christos c90b9921a5 unbound additions 2016-08-20 11:21:50 +00:00
skrll 97239cd361 Add a NOP_L 2016-08-13 08:09:17 +00:00
skrll 48bbbdf1d5 PIC_TAILCALL on n32/n64 would mess up GP, so just use SYSTRAP to call
setcontext.

Fixes tests/lib/libc/sys/t_getcontext.c:setcontext_link
2016-08-13 07:49:32 +00:00
skrll 24c5917e57 Provide _OFFSETOF_UC_GREGS_GP and use _OFFSETOF_UC_GREGS_* in getcontext 2016-08-12 15:26:04 +00:00
skrll f820f85434 Trailing whitespace 2016-08-12 15:21:25 +00:00
kre 1ec349e914 Object to dup2() if target fd is in the range of fd's that
librumphijack reserves for rump to use.

This is not normally a problem, as most applications don't attempt
to use very high fds - but /bin/sh does.

This fix is something of a kludge - really the apparent fd resource limit
ought to be lowered as well, but this is sufficient to allow the shell
to work (when its dup2() gets rejected, it just tries again with a smaller
target fd until it eventually succeeds.)   This fixes the librumphijack
shell ATF tests.

A better, more comprehensive, fix would be good...
2016-08-11 09:48:57 +00:00
skrll 21763d8f6e We need to save the GP of the caller in the context for n32/n64 2016-08-10 16:45:24 +00:00
skrll 7241a8c40f Fix comments 2016-08-10 16:40:24 +00:00
dholland 94048eede3 Typo. 2016-08-08 04:16:45 +00:00
scole 21984c24a3 PR port-ia64/51261
Add stubs for ia64 build
2016-08-05 16:40:47 +00:00
christos f87fbe2f55 add missing stuff for the affinity calls (Rocky Hotas) 2016-08-05 13:03:13 +00:00
wiz 07114cee33 Remove trailing whitespace. 2016-08-05 08:55:28 +00:00
sevan 9d1016b7d6 Grammar 2016-08-04 16:36:45 +00:00
christos 68df3d57d2 Flesh out sched_protect 2016-08-04 07:09:15 +00:00
christos c10c4abe0f Realtime signal support from GSoC 2016, Charles Cui. 2016-08-04 06:43:43 +00:00
ryoon e2898a6bda Fix _SC_TIMER_MAX listing, bump date 2016-08-03 12:40:42 +00:00
wiz 6333fb3d2f Sort errors. 2016-07-30 11:31:00 +00:00
njoly c38e2c9645 Remove obsolete BUGS section. getsockname(2) report sensible values
for bound UNIX domain sockets.
2016-07-30 11:10:40 +00:00
wiz 8cc73798f2 Remove one of the two SEE ALSO sections. 2016-07-25 22:00:36 +00:00
christos 285a8995e1 unnamed unions need special treatment since they need braced initializers
for old style initializations.
2016-07-20 21:02:04 +00:00
christos 353946982c cplusplus does not like complex named initializers... 2016-07-20 20:06:04 +00:00
christos b826eda4de use named initializers 2016-07-20 19:26:52 +00:00
skrll 3b2c691c07 Use anonymous union for ptm_ceiling and old __pthread_spin_t field to
maintain backward compatibility and fix hppa build.  hppa has an non-
integer type __pthread_spin_t
2016-07-17 13:49:43 +00:00
skrll d946c609af KNF 2016-07-16 12:58:11 +00:00
skrll 8f5f191a49 No need to define PSW_MBS as machine/psl.h provides it for us 2016-07-16 09:51:13 +00:00
wiz c94dcc5db3 Fix mdoclint warnings. 2016-07-15 21:19:19 +00:00
riastradh e37ca7a7a0 Number the properties. Identify the key erasure property by name. 2016-07-15 15:23:43 +00:00
abhinav 83de4e7bb8 Fix grammar. 2016-07-14 18:36:57 +00:00
abhinav f282f7d15c Fix grammar. 2016-07-14 18:21:31 +00:00
abhinav 2e498fa9f2 Use .In for header file. 2016-07-14 17:43:48 +00:00
abhinav d1c42b6403 Add comma to separate the Nm entries. 2016-07-14 17:17:58 +00:00
abhinav 24f5d739f4 Add missing words and fix grammar. 2016-07-14 17:09:03 +00:00
abhinav 263b36c655 Fix sentence. 2016-07-14 16:09:56 +00:00
abhinav 3b46a91395 Fix grammar and be consistent between using 0 and zero. 2016-07-14 07:19:11 +00:00
matt fdd524d4cc Library which implements the softfloat primitives using FP instructions
Currently contains only untested MIPS routines.
XXX move arm libc_vfp to here.
2016-07-14 01:59:18 +00:00
abhinav 2893d320e8 Fix grammar and be consistent between using zero and 0. 2016-07-13 09:05:16 +00:00
abhinav 25421db367 Add STANDARDS section, referencing IEEE std 1003.1-2008
ok wiz@
2016-07-13 06:50:02 +00:00
wiz 9e24a59267 Add missing word. 2016-07-12 21:45:41 +00:00
abhinav 5d114c3928 Fix sentence 2016-07-12 16:43:53 +00:00
abhinav 2bdfd85b5f Add STANDARDS section.
It is part of IEEE Std 1003.1-2001 and 2008, both, but there doesn't seem to be
any difference between the two versions, therefore referencing the older standard.
2016-07-12 15:45:24 +00:00
wiz 7304bf1e95 Merge two EAGAIN sections. 2016-07-12 12:24:40 +00:00
dholland 20b32a3eee Drop in a reference to the list of async-signal-safe functions. 2016-07-09 23:10:05 +00:00
dholland b00b33da18 Dump the list of async-signal-safe functions here. It belongs in
programmer-facing docs, not user-facing docs, so shouldn't be in
signal(7).
2016-07-09 23:08:32 +00:00
dholland 3944777ad3 Fix three of these strings (ones that are rarely seen) 2016-07-09 21:15:00 +00:00
dholland 323c08e328 note that on libc bump obsolete signal functions should be sent to
libcompat.
2016-07-09 20:15:06 +00:00
wiz ed940b32ac Markup improvements. 2016-07-06 15:55:02 +00:00
christos 1f9c8df1d3 man page for sched_protect (Charles Cui, GSoC 2016) 2016-07-05 21:13:12 +00:00
wiz b9737c740d Fix some lint.
Too much or too little whitespace;
improve macro usage;
add missing .El;
merge error sections for same error code.
2016-07-05 10:04:17 +00:00
wiz c5a003bb82 Bump date for _SC_THREAD_PRIO_PROTECT. 2016-07-05 09:51:10 +00:00
christos 7cf7644fc7 GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).
2016-07-03 14:24:58 +00:00
wiz 6a3cf64c78 Fix pasto. 2016-07-02 16:04:47 +00:00
christos 2b01a63d9e Add license 2016-07-02 15:50:17 +00:00
wiz c5d2e9596f Some minor fixes.
XXX: this file has no license.
2016-07-02 08:49:19 +00:00
christos a8673dd4cc Improve wording. 2016-07-01 22:56:06 +00:00
christos a1d87d3311 new hmac function. 2016-07-01 22:41:39 +00:00
wiz c763387bbc Bump date for header file change. 2016-06-30 18:43:43 +00:00
abhinav 5fd6a784bb Document WAIT_ANY and WAIT_MYPGRP constants
(text referenced from OpenBSD wait(2) man page)

While there, remove duplicated information and add more refernces in SEE ALSO
Also, the NOTES section refers to intro(2), while siginterrupt(3) is a better
suited reference, so fix that too.

Ok by wiz
2016-06-30 17:00:55 +00:00
dholland ae3b3bcc2b PR 51287 Ralf Nolden: posix_fallocate belongs in <fcntl.h> 2016-06-30 15:29:20 +00:00
mrg 5f3362148f various ia64 updates:
- add a compat vfork because of stupid
- add a weak sbrk
- add a shmat syscall
- add an empty kvm implementation that links
- add missing fp stuff
2016-06-30 09:14:30 +00:00
joerg b16a977791 For some mind-boogling reasons, GCC 5.4 believes that a weak reference
cannot alias with an extern. While this is clearly bogus, avoid yet
another alias handling bug and use strong aliases. It's actually
slightly simpler, too.
2016-06-29 11:16:47 +00:00
abhinav 2ed9602dad Fix function prototype in the SYNOPSIS
Also, fix function name in the RETURN VALUES section.

From Henning Petersen in PR lib/51284
2016-06-27 08:18:34 +00:00
kre 0a924e39aa Remove dawn/sunup/sunset/sundown (sunrise was never there...)
If 06:00 or 18:00 are wanted, just say "06:00" (etc).  If these
are ever added back, they really should determine location, and
calculate actual sunrise/sunset times for the location and date.
That's not likely to happen...
2016-06-26 07:09:24 +00:00
kamil e3d1905862 Use generic types in the profil(2) function prototype (<unistd.h>) 2016-06-18 14:39:15 +00:00
ryoon 71d366f3be Bump date for previous 2016-06-16 12:48:09 +00:00
ryoon e9d3857230 Fix typo 2016-06-16 12:47:10 +00:00