summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
AgeCommit message (Collapse)Author
2007-04-10Support for optional args separated with whitespace was removedTodd C. Miller
some time ago--it caused too many problems.
2007-02-12get cheaper random bytes, less waste and no getpid() calls, which areOtto Moerbeek
done by arc4random(); ok millert@ deraadt@
2007-02-06fix some dodgy displays;Jason McIntyre
2007-01-16sync with the code: int -> intmax_tSteven Mestdagh
ok jmc@
2007-01-08advertising clauses that can be droppedTheo de Raadt
2006-12-19a failed mmap returns MAP_FAILED, not NULL. found while exercising paxOtto Moerbeek
in low-mem conditions; ok dim@
2006-11-02columns for underflow and overflow were swapped, noticed by Mathieu OlivierAlexander von Gernler
<molivier at users dot sourceforge dot net> ok jmc@ mickey@
2006-10-30must pull in sys/types.h unconditionaly, because it is needed my pthreadsTheo de Raadt
includes used a bit later (for instance on the vax)
2006-10-29make __dtoa & strtod() thread-safe useing the same method as newer gdtoaTheo de Raadt
codebase. tested mostly by ckuethe and myself. __dtoa() use now requires a call to __freedtoa()
2006-10-24respond to ben hawkes's ruxcon presentation.Ted Unangst
create special allocators for pginfo and pgfree structs instead of imalloc. this keeps them separated from application memory. for chunks, to prevent deterministic reuse, keep a small array and swizzle the to be freed chunk with a random previously freed chunk. this last bit only for chunks because keeping arbitrarily large regions of pages around may cause out of memory issues (and pages are, to some extent, returned in random order). all changes enabled by default. thanks to ben for pointing out these issues. ok tech@
2006-10-13__mips64__ handling too.. sighTheo de Raadt
2006-10-12sparc64 should be in the #ifdefTheo de Raadt
2006-10-12use __amd64__ instead, until lint is fixedTheo de Raadt
2006-10-12reorder #if tests because apparently on amd64 cpp proceeds to blow it'sTheo de Raadt
own brains out, and then takes lint down with it. To be investigated...
2006-10-10Teach'em about cpus in spandexMiod Vallat
2006-10-04from wiz@netbsd:Jason McIntyre
Log Message: Switch from 4-clause to 2-clause BSD license. Ok dillo@, board@.
2006-10-01Make a var volatile, which forces a mem write at the right spot, andOtto Moerbeek
detctecion of underflow where it would otherwise not happen for FPUs that have a larger register size than sizeof double (i386, m68k). ok deraadt@ weingart@ kettenis@
2006-09-22Back out change in rev 1.15 of to allow whitespace to separate aTodd C. Miller
flag from its optional argument if permutation is disabled. The idea was that since "r:" would match "-r foo" then "r::" should match "-r foo" too as long as we know that things have not been reshuffled. Unfortunately, this causes incompatibilities with GNU getopt_long when the POSIXLY_CORRECT environment variable is set. OK deraadt@
2006-06-06Fix 'double by a factor of two' and make cache options a bit morePedro Martelletto
descriptive while at it, input and okay jmc@
2006-05-19fix a !foo & bar.Thordur I. Bjornsson
ok miod@, tedu@, pedro@
2006-05-14Fix the second malloc_ulimit regression: maintaining the free listOtto Moerbeek
requires memory; try to make sure we have it. If all fails, leak instead of crash. Test case originally found by cloder@, fix tested by many.
2006-04-25strtonum does not require limits.hTed Unangst
spotted by ray some time ago
2006-04-24Do not leave an hole in the directory list if allocation of theOtto Moerbeek
region succeeds, but allocation a required page dir failed. This can happen if we're really close to ulimit after allocation the region of the size requested. See malloc_ulimit1 regress test. Tested by many; thanks.
2006-04-18delint; original from deraadt@ with fixes from tdeval@ and me;Otto Moerbeek
tested by quite a few developers. ok deraadt@
2006-04-04POSIX says tdelete() returns the parent of the deleted node. Sadly theOtto Moerbeek
root node doesn't have a parent, and POSIX does not say what should be done in that case. Warn developers that different implementations may do different things.
2006-04-04When tdelete() is used to delete the root node, don't return aMoritz Jodeit
pointer to the freed root node, but return a pointer to the new root node. POSIX does not define, what should be returned in that case. Fixes Coverity CID 2528. ok millert@ otto@
2006-04-02Use SIZE_MAX instead of SIZE_T_MAX, the latter is not POSIX andOtto Moerbeek
remove redundant check on size. ok millert@ deraadt@
2006-03-29Xr to strtonum(3), because vice versa is already the caseAlexander von Gernler
ok jmc@ otto@
2006-03-26Add warning about malloc(num * size) and recommend calloc() instead,Ray Lai
or if malloc must be used suggest check. Get rid of "one". OK deraadt@ and jmc@, OK kjell@ to earlier version with "one"s.
2006-03-15Removes extraneous variables from getopt(3). Inspired by one ofRay Lai
David Hill's diffs. ok otto
2006-02-22Avouid a race in atexit() handling by introducing a lock. ProblemOtto Moerbeek
originally reported by Gergely Kovacs; help from dhartmei@; ok tedu@ millert@
2006-02-14quick path for free(0)Marc Espie
`looks to be safe' millert, okay tedu.
2006-01-30document posixness;Jason McIntyre
fixes pr #4996, from joachim schipper;
2006-01-18missing auxillary verbJacob Meuser
"yes, that is correct." jmc@ (a while back)
2006-01-15back out previous - imaxabs is already listed;Jason McIntyre
2006-01-14Xr imaxabs()Todd C. Miller
2006-01-14fix the .Fn line; ok millertJason McIntyre
2006-01-14sort SEE ALSO;Jason McIntyre
2006-01-13Add lldiv(), imaxabs(), imaxdiv(), strtoimax() and strtoumax()Todd C. Miller
2006-01-10Return inf or nan as per printf() not Inf, Infinity or Nan (from dtoa)Todd C. Miller
Remove an extraneous check for dtoa returning Inf/Nan
2006-01-10Use localeconv() to get the locale-specific radix char like printf does.Todd C. Miller
2006-01-10Nan and Infinity can be negativeTodd C. Miller
Decimal point was missing for some exponential output Only divide sign by 10 once per loop Add a missing NUL terminator for one case If there is no whole number portion, print a leading zero (e.g. 0.1 not .1)
2005-12-23Prototypes live in <search.h>Todd C. Miller
2005-11-30Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a timeOtto Moerbeek
and remove fallback code. If somebody is dumb enough to make the sysctl fail using systrace, he deserves what he gets. Saves 7 syscalls on process startup. looks good miod@ ok deraadt@ tedu@
2005-11-10add $OpenBSD$ tags, as requested by dtucker.Marc Espie
2005-10-26Remove obsolete comment. ok deraadt@Otto Moerbeek
2005-10-26clarifications from ray lai;Jason McIntyre
tweaked by tedu@ and myself;
2005-10-25dont' -> don't in comments;Jason McIntyre
from ray lai;
2005-10-11tidy up examplesJared Yanovich
- use err() for error handling - add lint hints - spacing nits and missing braces ok otto
2005-10-10fix a few warnings, keep the crypt stuff for later.Marc Espie
okay otto@