summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Ouch... recommend arc4random, not random.deraadt2014-01-211-3/+3
| | | | spotted by tedu
* obvious .Pa fixes; found with mandocdb(8)schwarze2014-01-212-6/+6
|
* Fix an obvious .Fn/.Fa typo, found while testing mandocdb(8).schwarze2014-01-201-3/+3
|
* Usually, you don't want macros in the .Nd line, so remove instances of .Tnschwarze2014-01-191-5/+3
| | | | | | marking up words that are not trademarks (ASCII, I/O, NFS, TCP, TELNET). While here, remove .Tn markup from the same words in the body of these pages, too.
* Punctuation after macro arguments needs to be in a separate argument.schwarze2014-01-191-3/+4
| | | | Found while testing mandocdb(8).
* Move atexit(3) into crtbegin.c and certbeginS.c such that we can pass thekettenis2013-12-281-10/+1
| | | | | | | | | | right __dso_handle and have dlopen'ed shared objects run their atexit handlers when they get unloaded. This is what Linux does, and several ports depend on this behaviour (and will crash upon exit without this chang). Based on an earlier diff from matthew@ Tested by ajacoutot@ ok deraadt@
* avoid arithetic on void *deraadt2013-11-121-4/+4
| | | | ok guenther otto
* Pull in gdtoa.h instead of declaring __dtoa() and __freedtoa() directlyguenther2013-11-012-7/+4
| | | | ok deraadt@
* no longer any need to quote macro lines with >9 args;jmc2013-08-143-9/+9
| | | | From: Jan Stary
* Add linker warnings for rand() and random() and various related functions.kettenis2013-08-012-1/+31
| | | | ok deraadt@
* HISTORY; tweaks and ok sobrado@ jmc@schwarze2013-07-183-9/+38
|
* more library historyschwarze2013-07-177-14/+49
| | | | | facts checked by sobrado@ style tweaks and ok jmc@
* 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.