summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix parsing of ambiguous options, the whole loop must be processed.millert2013-06-081-15/+22
| | | | From FreeBSD. OK miod@
* Move _Exit() from the exit() manpage to the _exit() manpage, as it'sguenther2013-06-052-36/+10
| | | | | | just an alias of the latter. ok matthew@ tedu@
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-0539-129/+129
|
* Two small cleanups to atexit: remove unneeded __atexit_invalid, andmatthew2013-06-022-12/+5
| | | | | | | move the call_depth decrement so it happens unconditionally and can still return to 0 when called with dso!=NULL. ok millert
* surround the error strings with quotes to clarify exactly which stringstedu2013-04-171-5/+5
| | | | the function is going to return.
* the tiniest of style tweakstedu2013-04-171-7/+7
|
* add some prototypes, casts, includes, parenthesis, and whatnot totedu2013-04-172-6/+6
| | | | silence some warnings.
* - Add comments regarding copies of these files also in libexec/ld.sokurt2013-04-051-1/+3
| | | | okay guenther@
* Update a comment about standards requirementsguenther2013-04-031-4/+4
|
* Switch libc and libm to use strong aliases rather than weak aliasesmartynas2013-03-282-22/+4
| | | | | | | | | | | where appropriate. Among other things makes the symbols consistent across all architectures (notably where ldbl mantissa is 53 bits). While at it, kill unused LINTLIBRARY/PROTOLIB1 cruft which was there to trick lint into recording the right prototypes for aliased functions. Most of the work done at the awesome n2k13 hackathon. Agreed by kettenis@, guenther@, matthew@.
* threadsafe random().tedu2013-03-151-8/+43
| | | | reported by ajacoutot and (much earlier, sorry) by Alexey Suslikov
* Don't pull <math.h> just because it can return HUGE_VAL in themartynas2013-01-151-3/+2
| | | | corner cases. OK millert@.
* Fix bug in random offset introduced in rev 1.143; random range wasotto2012-12-221-3/+3
| | | | expanded, but not enough due to precedence error. Spotted by Thorsten Glaser.
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-051-2/+1
| | | | ok guenther millert kettenis
* no need for .Pp before lists;jmc2012-12-051-3/+2
|
* Rewritten posix_openpt manual that doesn't include any of the POSIXmillert2012-12-041-74/+49
| | | | text. OK deraadt@
* Use "path name" not "pathname".millert2012-12-041-3/+3
|
* Simple emulation of POSIX pty APIs posix_openpt(), ptsname(),millert2012-12-034-6/+414
| | | | | grantpt() and unlockpt() using /dev/ptm. Man pages from FreeBSD. OK kettenis@ deraadt@ beck@ ajacoutot@ naddy@
* Ensure that the base provided to strtol(3) is between 2 and 36 inclusive,jsing2012-11-181-1/+12
| | | | | | or the special value of 0. ok deraadt@ otto@
* Per POSIX, fix raise() and abort() to send the signal to the current thread.guenther2012-11-101-3/+5
| | | | | | Should make coredumps from abort() easier to debug too. ok kurt@
* Add a new malloc option 'U' => "Free unmap" that does the guarding/djm2012-11-022-18/+36
| | | | | | | | | | | | unmapping of freed allocations without disabling chunk randomisation like the "Freeguard" ('F') option does. Make security 'S' option use 'U' and not 'F'. Rationale: guarding with no chunk randomisation is great for debugging use-after-free, but chunk randomisation offers better defence against "heap feng shui" style attacks that depend on carefully constructing a particular heap layout so we should leave this enabled when requesting security options.
* Make setenv(3) consistent with unsetenv(3), giving EINVAL if passedjeremy2012-09-232-20/+10
| | | | | | an empty name, NULL pointer, or a name containing an '=' character. OK millert@, guenther@
* remove some wacky Xo/Xc;jmc2012-09-161-3/+3
|
* remove tahoe-specific makefile machinery, no such hardware is known to bemiod2012-09-151-5/+1
| | | | | in working condition anymore (assuming there would be interest in running on it).
* Document that strtod functions accept INF, NAN, NAN(). From Michal Mazurek.martynas2012-09-151-3/+28
|
* specify the bounds of the dst to strlcat (both values were static andderaadt2012-09-131-2/+2
| | | | | equal, but it is more correct) from Michal Mazurek
* Fix precedence bug (& has lower precedence than !=).pirofti2012-09-131-2/+2
| | | | | | Okay otto@. Found by Michal Mazurek <akfaew at jasminek dot net>, thanks!
* remove lint leftovers; ok guenther@okan2012-09-041-5/+1
|
* use PAGE_SHIFT instead of PGSHIFT, in preperation for futurederaadt2012-07-091-2/+2
| | | | | param.h symbol reduction. ok guenther
* Zap extra spaces from function pointer argumentsguenther2012-07-082-8/+8
| | | | Pointed out by Joachim Schipper (joachim at joachimschipper.nl)
* Describe tdelete()'s return value correctly and update the related CAVEATguenther2012-07-081-12/+15
| | | | | Based on a note from Steffen Daode Nurpmeso (sdaoden at googlemail.com) ok jmc@
* after a talk with ariane, use MAP_FIXED for mquery to avoid the cost oftedu2012-06-261-2/+2
| | | | | | scanning for free space if the hint isn't available. also, on further inspection, this will prevent pmap_prefer from "improving" our hint.
* two changes which should improve realloc. first, fix zapcacheregion totedu2012-06-221-10/+19
| | | | | | clear out the entire requested area, not just a perfect fit. second, use mquery to check for room to avoid getting an address we don't like and having to send it back.
* two small fixes to free page cache. first, we need two nibbles of randomtedu2012-06-201-4/+4
| | | | | | in order to span the the entire cache. second, on free use the same offset to put things in the cache instead of always starting at zero. ok otto
* Support larger-than-page-alignment requests in posix_memalign() bymatthew2012-06-182-23/+130
| | | | | | overallocating and then releasing unneeded memory pages. ok otto
* Update STANDARDS section for a few <stdlib.h> functionsguenther2012-06-023-9/+29
| | | | | | Update SYNOPSIS for setkey() to show it's in <stdlib.h> ok jmc@, millert@
* Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),guenther2012-06-013-8/+11
| | | | | | | and valloc() are not in the current version, while posix_memalign() mkstemp(), and mkdtemp() are, and setstate()'s argument has lost a bogus 'const'. ok millert@ jmc@ espie@ kettenis@; ports build testing by naddy@
* alloca is NOT machine dependent; it has exactly the samederaadt2012-04-121-7/+3
| | | | | effective result. its use is NOT discouraged -- it is not common, but when you need it, there is nothing else that will do.
* Fix a bug where random() always returns 0 when srandom() is seededmillert2012-03-211-2/+3
| | | | | with 0. Use 1 and not 0 as the first element of the state array, similar to what glibc does. OK nicm@
* - Test for the retrieved page address not being NULL. This turns free((void*)1)otto2012-02-291-2/+7
| | | | | | into an bogus pointer error instead of a segfault. - Document that we use the assumption that a non-MAP_FIXED mmap() with hint 0 never returns NULL.
* Revert previous diff as it resulted in the wrong return code whenguenther2012-02-061-5/+3
| | | | | | | the last node is deleted. Instead, resolve the Coverity warning by returning (node *)1 when you delete the root node. based an idea from millert@. ok otto@
* Complete the HISTORY of all syscalls that exist since Version 1 AT&T UNIX.schwarze2011-11-171-2/+11
| | | | | All facts from http://minnie.tuhs.org/cgi-bin/utree.pl, checked by sobrado@. Feedback and ok jmc@ jmc@ (sic, Jason checked and ok'ed this twice).
* Make struct chunk_info a variable sized struct, wasting lessotto2011-10-061-28/+55
| | | | | space for meta data by only allocating space actually needed for the bitmap (modulo alignment requirements). ok deraadt@
* some minor tweaks;jmc2011-09-031-2/+2
|
* make -column lists pretty again;jmc2011-09-031-3/+3
| | | | | | | | | | specifically, rewrite them to permit some markup in the column headers, and use "Ta" instead of literal tabs; mandoc does not currently match groff 100%, but a mandoc fix may be some time off, and we've gone enough releases with poorly formatting column lists. in some cases i have rewritten the lists as -tag, where -column made little sense.
* in column lists, enforce the following ordering:jmc2011-08-301-3/+3
| | | | | | | | | .Bl -column header1 header2 ... <Bl flags> mixing things up confuses mandoc, and adding flags in can screw up the list. this hopefully just makes things a bit safer (and more consistent). (one more bit of work left and all column lists should format how we want)
* occured -> occurred;jmc2011-07-241-2/+2
|
* Recent Single Unix will malloc memory if the second argument of realpath()miod2011-07-242-17/+52
| | | | | | is NULL, and third-party software is starting to rely upon this. Adapted from FreeBSD via Jona Joachim (jaj ; hcl-club , .lu), with minor tweaks from nicm@ and yours truly.
* Show (in the example) that < and > can be used multiple times; ok jmc@otto2011-07-221-4/+5
| | | | jasper@
* - add a MALLOC_OPTIONS section header. the content is already there, but havingjasper2011-07-211-3/+3
| | | | | | a section will help people looking for just the MALLOC_OPTIONS. ok otto@ jmc@