summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* The asm in the MD_DISABLE_KBIND macro was too fragile and broke alpha and hppa.guenther2016-03-2113-304/+5
| | | | | | So instead, do the kbind disabling with syscall(). debugging and ok deraadt@, ok kettenis@
* LOCALE_CHARSETS has been unused for some time nowjca2016-03-201-5/+1
| | | | | | so no need to include share/locale/ctype/Makefile.inc to get it. ok guenther@ stsp@ (who had the same diff)
* __thrsleep.2 is contained in section 2natano2016-03-201-3/+3
| | | | ok jmc
* It's libpthread, not librthread, and __tfork(2) lets you set the TCBguenther2016-03-201-9/+12
| | | | address of the new thread
* Add $OpenBSD lineguenther2016-03-201-0/+1
|
* Rearrange C runtime bits: now that ld.so exports environ and __progname,guenther2016-03-2019-12/+427
| | | | | | | | | | | move their definitions and initialization in static links to libc.a Make crt0 always invoke a new func _csu_finish() in libc to process the auxv and to either register the ld.so cleanup function (in dynamic links) or initialize environ and __progname and do MC_DISABLE_KBIND (in static links). In libc, get pagesize from auxv; cache that between getpagesize() and sysconf(_SC_PAGESIZE) ok mpi@ "good time" deraadt@
* Currently we have about a 50/50 split over fcntl(n, F_GETFL [,0])krw2016-03-201-2/+2
| | | | | | | | | | idioms. Adopt the more concise fcntl(n, F_GETFL) over fcntl(n, F_GETFL, 0) where it is obvious further investigation will not yield and even better way. Obviousness evaluation and ok guenther@
* Add STANDARDS and HISTORY blurbs for SOCK_{NONBLOCK,CLOEXEC,DNS}guenther2016-03-192-4/+36
|
* This is thrkill, not __thrsigdivertguenther2016-03-191-3/+3
|
* remove NOTREACHEDmmcc2016-03-171-2/+1
|
* properly guard to macrosmmcc2016-03-171-5/+5
| | | | ok otto@
* remind people rewind is seldom a good choiceespie2016-03-151-2/+5
| | | | okay jmc@
* small step towards multiple pools: move two globls into the struct dir_infootto2016-03-141-112/+126
| | | | ok @stefan armani@
* Remove doaccess variable and access(2) call since this interfers withmestre2016-03-141-11/+2
| | | | | | | | | | | | | | | | applications like zdump(8) because pledge(2) doesn't allow access(2) to /usr/share/zoneinfo. millert@ better described why this call can go away: "This looks like an attempt to do access checks based on the real uid instead of the effective uid. Basically for setuid programs we don't want to allow a user to set TZ to a path they should not be able to otherwise access. However, we already have a check for issetugid() above so I think the doaccess bits can just be removed and we can rely on open()." After discussion with tb@, deraadt@ and millert@, this was also OK'ed by them
* (char *)0 -> NULLmmcc2016-03-141-2/+2
|
* environ and __progname are not declared in a public header; declare themguenther2016-03-1319-52/+27
| | | | | | in libc's hidden/stdlib.h instead of in each .c file that needs one ok deraadt@ gsoares@ mpi@
* Remove sentences in RETURN VALUES sections saying that functions withmmcc2016-03-124-25/+8
| | | | | | | | | | | | | void return types 'return no value'. This is obvious and therefore unneccessary to mention. We spare rewind(3)'s sentence because espie@ pointed out that it's a warning - the function masks a potential error. This commit also adds a sentence to X509_free clarifying that it's NULL-safe. This bit was discussed with doug@. ok martijn@, sentiment supported by schwarze@
* missing article in previous;jmc2016-03-111-2/+2
|
* pledge: define the meaning of passing NULL to one arguments of pledge(2) as "Isemarie2016-03-111-2/+11
| | | | | | | | | | don't want to change the current value" it changes only the `request' argument behaviour when NULL is passed: previously it was traited as "" was passed. with help from jmc@ for man-page OK tb@ on previous version
* ANSIfy function declarations, move initializations to declaration blockmmcc2016-03-101-19/+10
| | | | ok millert@
* un-vax;jmc2016-03-101-6/+5
| | | | i've also changed some "and" to "no", since i think it reads better;
* un-vax;jmc2016-03-101-3/+3
|
* un-vax;jmc2016-03-103-12/+9
|
* un-vax;jmc2016-03-101-17/+2
|
* We are done providing support for the vax.deraadt2016-03-0954-2782/+6
| | | | lots of agreement.
* The range of PIDs has changed, and always included zero.guenther2016-03-061-3/+3
| | | | Based on diff from Michal Mazurek (akfaew (at) jasminek.net)
* No more compat emulations, so remove ktrace EMUL records and the baggageguenther2016-03-061-4/+2
| | | | | | for generating and parsing them. ok mpi@ naddy@ millert@ deraadt@
* Document the PT_GET_THREAD_{FIRST,NEXT} requestsguenther2016-03-061-2/+24
| | | | From Michal Mazurek (akfaew (at) jasminek.net)
* KNF this file; OK stsp@millert2016-03-011-350/+349
|
* Add NET_RT_IFNAMES; OK deraadt@tim2016-02-291-1/+2
|
* __tfork is section 3, not 2;jmc2016-02-291-2/+2
|
* delete the kern.emul/KERN_EMUL sysctl bits since there are nonaddy2016-02-291-27/+2
| | | | emulations left; ok millert@ deraadt@, jmc@ (man pages)
* fruncate() returns EFBIG when length exceeds the max file size.natano2016-02-281-2/+6
| | | | ok mpi@
* Fix STANDARDS: use the appropriate .St argument and add the informationschwarze2016-02-271-5/+8
| | | | that setting errno is required by POSIX, but not by ISO C.
* If an incomplete character is passed to mbtowc(3), set errno to EILSEQ.schwarze2016-02-271-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is unambiguously required both by POSIX and by our own manual page. It also makes a lot of sense because having a function that can fail and that sets errno in some failure modes but does not set errno in other failure modes would be a terrible idea. Such a function would be ridiculously complicated to use. To detect the reason for failure, you would have to: - save errno - reset errno to zero - call the function - inspect the return value to detect failure - inspect errno to decide about the reason for failure - if errno is zero, restore the saved errno That is completely unreasonable, in particular for a seemingly innocous function like mbtowc(3). Next to no programmer would get that right in any real-world program. Note that this bug is very widespread, it also affects NetBSD, FreeBSD, Solaris 11, and glibc. I will also send a note around to the other systems. There may be fallout from programs using the interface incorrectly. If you run into any, please report that to me. OK millert@
* Fix negation of POSIX character classes; passed new regress test.millert2016-02-261-4/+10
| | | | OK tb@
* refactor option letter parsing into a subfunction, to increase clarityderaadt2016-02-251-93/+102
| | | | | about which options are turned on/off by 's' and 'S' ok tedu
* Avoid a possible double-free if the "search" keyword is used multiple times.eric2016-02-241-2/+4
| | | | ok jca@ gilles@
* Document sendsyslog2(2) in man page.bluhm2016-02-221-4/+29
| | | | from Rafael Neves; input jmc@; OK deraadt@
* Remove the "error" variable; we no longer fall back to writing tomillert2016-02-191-5/+5
| | | | | /dev/console so the value of "error" is never read. Also mention that sendsyslog2 can fail due to ENOBUFS in the comment. OK deraadt@
* Dv fix;jmc2016-02-131-2/+3
|
* Fix an obvious cut-and-paste error:schwarze2016-02-131-4/+3
| | | | | This function doesn't even have an "n" argument, so that non-existent argument clearly cannot restrict the return value.
* Document how to use sndio in pledged programs.tim2016-02-111-2/+20
| | | | Input and OK jmc@ ratchov@ semarie@
* new sentence, new line;jmc2016-02-081-2/+3
|
* mention mktime, since that is where struct tm is described. ok schwarzetedu2016-02-082-5/+9
|
* Align with reality, and with POSIX: For this particular function,schwarze2016-02-081-7/+3
| | | | | | incomplete characters are not an error, do not throw EILSEQ, and are not supposed to. OK millert@
* compare pointer to NULL in example codemmcc2016-02-071-3/+3
|
* be more forceful about not using these.espie2016-02-052-9/+28
| | | | improvements sthen@, jmc@. okay millert@, jca@ jmc@
* Fix err(3) calls after allocation failures in examples.schwarze2016-02-051-8/+8
| | | | | | There is long-standing consensus that err(1, NULL) is the best idiom after failure of malloc(3) and friends. Quirk in the manual noticed by tb@.
* avoid an uninitialised value in a return path added in rev 1.5jsg2016-02-051-2/+4
| | | | ok tobias@