summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
AgeCommit message (Collapse)Author
2013-11-12avoid arithetic on void *Theo de Raadt
ok guenther otto
2013-11-01Pull in gdtoa.h instead of declaring __dtoa() and __freedtoa() directlyPhilip Guenther
ok deraadt@
2013-08-14no longer any need to quote macro lines with >9 args;Jason McIntyre
From: Jan Stary
2013-08-01Add linker warnings for rand() and random() and various related functions.Mark Kettenis
ok deraadt@
2013-07-18HISTORY; tweaks and ok sobrado@ jmc@Ingo Schwarze
2013-07-17more library historyIngo Schwarze
facts checked by sobrado@ style tweaks and ok jmc@
2013-06-08Fix parsing of ambiguous options, the whole loop must be processed.Todd C. Miller
From FreeBSD. OK miod@
2013-06-05Move _Exit() from the exit() manpage to the _exit() manpage, as it'sPhilip Guenther
just an alias of the latter. ok matthew@ tedu@
2013-06-05Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzeTed Unangst
2013-06-02Two small cleanups to atexit: remove unneeded __atexit_invalid, andMatthew Dempsky
move the call_depth decrement so it happens unconditionally and can still return to 0 when called with dso!=NULL. ok millert
2013-04-17surround the error strings with quotes to clarify exactly which stringsTed Unangst
the function is going to return.
2013-04-17the tiniest of style tweaksTed Unangst
2013-04-17add some prototypes, casts, includes, parenthesis, and whatnot toTed Unangst
silence some warnings.
2013-04-05- Add comments regarding copies of these files also in libexec/ld.soKurt Miller
okay guenther@
2013-04-03Update a comment about standards requirementsPhilip Guenther
2013-03-28Switch libc and libm to use strong aliases rather than weak aliasesMartynas Venckus
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@.
2013-03-15threadsafe random().Ted Unangst
reported by ajacoutot and (much earlier, sorry) by Alexey Suslikov
2013-01-15Don't pull <math.h> just because it can return HUGE_VAL in theMartynas Venckus
corner cases. OK millert@.
2012-12-22Fix bug in random offset introduced in rev 1.143; random range wasOtto Moerbeek
expanded, but not enough due to precedence error. Spotted by Thorsten Glaser.
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-12-05no need for .Pp before lists;Jason McIntyre
2012-12-04Rewritten posix_openpt manual that doesn't include any of the POSIXTodd C. Miller
text. OK deraadt@
2012-12-04Use "path name" not "pathname".Todd C. Miller
2012-12-03Simple emulation of POSIX pty APIs posix_openpt(), ptsname(),Todd C. Miller
grantpt() and unlockpt() using /dev/ptm. Man pages from FreeBSD. OK kettenis@ deraadt@ beck@ ajacoutot@ naddy@
2012-11-18Ensure that the base provided to strtol(3) is between 2 and 36 inclusive,Joel Sing
or the special value of 0. ok deraadt@ otto@
2012-11-10Per POSIX, fix raise() and abort() to send the signal to the current thread.Philip Guenthe
Should make coredumps from abort() easier to debug too. ok kurt@
2012-11-02Add a new malloc option 'U' => "Free unmap" that does the guarding/Damien Miller
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.
2012-09-23Make setenv(3) consistent with unsetenv(3), giving EINVAL if passedJeremy Evans
an empty name, NULL pointer, or a name containing an '=' character. OK millert@, guenther@
2012-09-16remove some wacky Xo/Xc;Jason McIntyre
2012-09-15remove tahoe-specific makefile machinery, no such hardware is known to beMiod Vallat
in working condition anymore (assuming there would be interest in running on it).
2012-09-15Document that strtod functions accept INF, NAN, NAN(). From Michal Mazurek.Martynas Venckus
2012-09-13specify the bounds of the dst to strlcat (both values were static andTheo de Raadt
equal, but it is more correct) from Michal Mazurek
2012-09-13Fix precedence bug (& has lower precedence than !=).Paul Irofti
Okay otto@. Found by Michal Mazurek <akfaew at jasminek dot net>, thanks!
2012-09-04remove lint leftovers; ok guenther@Okan Demirmen
2012-07-09use PAGE_SHIFT instead of PGSHIFT, in preperation for futureTheo de Raadt
param.h symbol reduction. ok guenther
2012-07-08Zap extra spaces from function pointer argumentsPhilip Guenthe
Pointed out by Joachim Schipper (joachim at joachimschipper.nl)
2012-07-08Describe tdelete()'s return value correctly and update the related CAVEATPhilip Guenthe
Based on a note from Steffen Daode Nurpmeso (sdaoden at googlemail.com) ok jmc@
2012-06-26after a talk with ariane, use MAP_FIXED for mquery to avoid the cost ofTed Unangst
scanning for free space if the hint isn't available. also, on further inspection, this will prevent pmap_prefer from "improving" our hint.
2012-06-22two changes which should improve realloc. first, fix zapcacheregion toTed Unangst
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.
2012-06-20two small fixes to free page cache. first, we need two nibbles of randomTed Unangst
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
2012-06-18Support larger-than-page-alignment requests in posix_memalign() byMatthew Dempsky
overallocating and then releasing unneeded memory pages. ok otto
2012-06-02Update STANDARDS section for a few <stdlib.h> functionsPhilip Guenthe
Update SYNOPSIS for setkey() to show it's in <stdlib.h> ok jmc@, millert@
2012-06-01Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),Philip Guenthe
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@
2012-04-12alloca is NOT machine dependent; it has exactly the sameTheo de Raadt
effective result. its use is NOT discouraged -- it is not common, but when you need it, there is nothing else that will do.
2012-03-21Fix a bug where random() always returns 0 when srandom() is seededTodd C. Miller
with 0. Use 1 and not 0 as the first element of the state array, similar to what glibc does. OK nicm@
2012-02-29- Test for the retrieved page address not being NULL. This turns free((void*)1)Otto Moerbeek
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.
2012-02-06Revert previous diff as it resulted in the wrong return code whenPhilip Guenthe
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@
2011-11-17Complete the HISTORY of all syscalls that exist since Version 1 AT&T UNIX.Ingo Schwarze
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).
2011-10-06Make struct chunk_info a variable sized struct, wasting lessOtto Moerbeek
space for meta data by only allocating space actually needed for the bitmap (modulo alignment requirements). ok deraadt@
2011-09-03some minor tweaks;Jason McIntyre