summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Return monotonically increasing values.cheloha2018-03-022-27/+32
| | | | | | | | | | | | | | | | | | | | | The latest POSIX description of times(3) (and all others I can find) suggests that times(3) should return monotonically increasing values and that these values are only useful for real time interval measurement. All extant uses of times(3) confirm that this expectation is shared by application programmers. So, change gettimeofday(2) to clock_gettime(2)/CLOCK_MONOTONIC to ensure the return value increases monotonically, even if the system clock is changed by the superuser. Then update the manpage accordingly. While we're updating the manpage, move the information about the return values to a new RETURN VALUES section to bring times.3 up to speed with other library man pages. Manpage changes kicked around on tech@ with millert@ and jmc@. times.3 ok millert@ tb@ jmc@ times.c ok millert@ tb@
* Adjust references for sysctl(3) to sysctl(2)deraadt2018-01-125-18/+18
|
* sysctl(3) can now be renamed to sysctl(2)deraadt2018-01-122-2259/+2
|
* Fix spelling: bet -> net from Scott Bennett, thankstb2017-11-071-3/+3
|
* No need to include <sys/param.h> before <sys/sysctl.h>.mpi2017-10-281-3/+3
| | | | ok deraadt@, jca@
* Use <elf.h> instead of <elf_abi.h>mpi2017-10-271-2/+2
| | | | ok jasper@, jca@, deraadt@
* add missing HISTORY; based on CVS logs and release announcementsschwarze2017-10-172-8/+18
|
* draft-ietf-tcpm-initcwnd was published as rfc 6928mikeb2017-10-161-3/+3
|
* iscntrl(0) is != 0 at least since Version 7 AT&T UNIX, and POSIXschwarze2017-10-041-3/+3
| | | | | | | requires that, too (in XBD 7.3.1), even though the C standard leaves it implementation-defined; found during my kcgi audit on behalf of CAPEM; OK deraadt (stupid me forgot to commit before lock).
* Document readdir_r() return value and update style of the examplemillert2017-09-181-6/+9
| | | | code. Adapted from a diff by Ross L Richardson.
* __progname has type char *, we cannot change its type without causingotto2017-09-171-3/+3
| | | | | havoc all over the place. So add some casts to silence the compiler. ok deraadt@ guenther@
* Update the documentation regarding /dev/mem and /dev/kmem;schwarze2017-09-121-2/+4
| | | | | | Theo already clamped down on these devices last year. Triggered by a question from Nan Xiao <xiaonan830818 at gmail dot com>. OK deraadt@
* shm_open(), sysconf(), tcflow(), and tcsendbreak() are not permitted to beguenther2017-09-102-6/+6
| | | | | | | cancellation points in POSIX, so change them to invoke the non-cancellation point versions of open(), close(), nanosleep(), and write() ok deraadt@ millert@
* Fix spelling of 4.3BSD-Net/2.schwarze2017-09-101-3/+3
|
* sysctl strings include the termingating NUL character in both in and out lengthstom2017-09-101-2/+4
| | | | | | Prompted by Nan Xiao noticing the redundancy of bzero+termination - thanks. ok deraadt@
* Remove unused 32bit version of elf_hash().mpi2017-09-052-61/+2
| | | | | | Riding previous libc bump. ok kettenis@
* New POSIX xlocale implementation written from scratch.schwarze2017-09-0514-217/+623
| | | | | | | | | | | | Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8. With important help from kettenis@, guenther@, and jca@. Repeated testing in ports bulk builds by naddy@. Additional testing by jca@, sebastia@, dcoppa@, and others. OK kettenis@ dcoppa@, and guenther@ on an earlier version. Riding guenther@'s libc/librthread major bump.
* Add additional errno values required by POSIX.jsg2017-09-051-1/+5
| | | | ok jca@ kettenis@ deraadt@
* It is confusing to talk about priorities being ordered from highmillert2017-08-291-6/+6
| | | | | | | to low when they are actually numbered in the opposite (numerical) order. Use "ordered by decreasing importance" instead. Also try to make it clear that LOG_UPTO uses the numerical priorities where a larger value means a lower priority. OK jmc@
* isunordered() returns true if at least one of the arguments is NaNmillert2017-08-291-7/+3
| | | | OK espie@
* Minimize #includes, particularly to avoid thread_private.hguenther2017-08-122-6/+2
| | | | ok tedu@
* Stop running nd6_expire every second.florian2017-08-081-7/+2
| | | | | We know when pltime or vltime decrease to zero. Run nd6_expire then. Input & OK mpi, bluhm
* Kernel sendsyslog(2), libc syslog(3), and syslogd(8) restrict andbluhm2017-08-081-2/+2
| | | | | | truncate the length of a syslog message to 8192 bytes. Use one global define LOG_MAXLINE for all of them. OK deraadt@ millert@
* Since sendsyslog(2) handles the LOG_CONS parameter, the variablebluhm2017-08-071-4/+2
| | | | | conp in syslog(3) is unused. Remove dead code. OK jca@ deraadt@
* add missing and correct misspelled names, most in NAME sections;schwarze2017-08-011-3/+4
| | | | | found with regress/usr.bin/mandoc/db/dbm_dump; OK jmc@
* Rename TBUF_LEN and FMT_LEN to _SIZE as they contain a NUL byte.bluhm2017-07-201-11/+11
| | | | | | Change FMT_SIZE to 1024+1 for consistency. Do not loop over the format string if there is no output space left. OK deraadt@ millert@
* Get rid of ip6.maxifprefixes and ip6.maxifdefrouters, the kernel noflorian2017-07-131-15/+2
| | | | | | | longer tracks prefixes or default routers from router advertisements. Pointed out by jmc. ports tree grepping sthen, who only found nsh OK mpi, sthen
* fix broken cross references; found with mandoc -Tlintschwarze2017-07-061-3/+3
|
* port the RBT code to userland by making it part of libc.dlg2017-06-192-2/+657
| | | | | | | | | | | | | | src/lib/libc/gen/tree.c is a copy of src/sys/kern/subr_tree.c, but with annotations for symbol visibility. changes to one should be reflected in the other. the malloc debug code that uses RB code is ported to RBT. because libc provides the RBT code, procmap doesn't have to reach into the kernel and build subr_tree.c itself now. mild enthusiasm from many ok guenther@
* Fix broken markup of function pointer invocations; foundschwarze2017-06-101-11/+6
| | | | with mandoc -Tlint. While here, delete .Tn macros.
* It is distasteful to have manual pages which don't refer to realderaadt2017-05-293-8/+8
| | | | | | | function calls, but instead a "class" of functions like "sigsetops". Rename to sigaddset", and while at it improve documentation in sigprocmask(2) to point to it. ok tedu
* Fix exponential CPU use with repeated '*' operators by changing '*'millert2017-05-081-21/+34
| | | | | handling to be interative instead of recursive. Fix by Yves Orton, ported to OpenBSD glob.c by Ray Lai. OK tb@
* Update STANDARDS section, these are now in XSI BASE.millert2017-05-082-8/+10
|
* Merge headers defining identifiers from sysctl.8 into sysctl.3. Shorten andtb2017-05-041-23/+28
| | | | | | update their descriptions. In sysctl.8 refer to /etc/sysctl.conf in FILES. discussed with and ok jmc
* whitespacederaadt2017-04-141-2/+2
|
* correct path; from Klemens Nannideraadt2017-04-141-3/+3
|
* recallocarray() the string buffer, to avoid leaving such contentsderaadt2017-03-171-5/+6
| | | | | | around in the address space. Don't bother doing so for the buffer which contains aslr'd pointers... ok millert
* sync the vfs bits as best i can;jmc2017-03-161-25/+17
|
* bit more consistent;jmc2017-03-161-5/+4
|
* - no KERN_RND: from schwarzejmc2017-03-131-13/+1
| | | | - remove some XXX i no longer need
* for each sysctl name, attach the variable name as seen by sysctl(8);jmc2017-03-131-370/+353
| | | | | | includes some fixes from schwarze, as well as some general tweaking; ok deraadt schwarze
* Style improvement, no functional change.schwarze2017-02-151-8/+7
| | | | | | | | | | As reported by Yuri Pankov, some versions of GCC whine that "tmp" might be used uninitialized in fts_open(3). Clearly, that cannot actually happen, but explicitly setting it to NULL is safer anyway. While here, rename the badly named variable "tmp" and make the inner "if" easier to understand. Feedback and OK guenther@
* gcc says "if you define labels and don't use them, I will whine."krw2016-12-251-2/+1
| | | | ok tom@
* Fix a use after free error introduced in rev 1.18 by only callingmillert2016-11-091-8/+11
| | | | closedir() outside the loop. OK deraadt@ guenther@ markus@
* Use the reentrant strerror_r() instead of strerror() to expand %m.millert2016-10-191-10/+5
| | | | | Previously, syslog_r() would avoid calling strerror() since the latter is not reentrant. OK bluhm@
* Avoid generate SIGTTOU when restoring the terminal mode. If we getmillert2016-10-181-1/+5
| | | | | | | | | SIGTTOU it means the process is not in the foreground process group which, in most cases, means that the shell has taken control of the tty. Requiring the user the fg the process in this case doesn't make sense and can result in both SIGTSTP and SIGTTOU being sent which can lead to the process being suspended again immediately after being brought into the foreground.
* sort;jmc2016-10-071-5/+5
|
* introduce a sysctl to hijack dns sockets. when set to a port number,tedu2016-10-071-2/+6
| | | | | | | all dns socket connections will be redirected to localhost:port. this could be a sockopt on the listening socket, but sysctl is an easier interface to work with right now. ok deraadt
* use the same template for describing securelevel interaction;jmc2016-09-281-11/+15
|
* document kern.allowkmem; ok deraadtjmc2016-09-281-2/+10
|