summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* fix a !foo & bar.thib2006-05-191-2/+2
| | | | ok miod@, tedu@, pedro@
* Fix the second malloc_ulimit regression: maintaining the free listotto2006-05-141-3/+12
| | | | | | 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.
* strtonum does not require limits.htedu2006-04-251-2/+1
| | | | spotted by ray some time ago
* Do not leave an hole in the directory list if allocation of theotto2006-04-241-11/+32
| | | | | | | 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.
* delint; original from deraadt@ with fixes from tdeval@ and me;otto2006-04-181-43/+60
| | | | tested by quite a few developers. ok deraadt@
* POSIX says tdelete() returns the parent of the deleted node. Sadly theotto2006-04-041-1/+9
| | | | | | 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.
* When tdelete() is used to delete the root node, don't return amoritz2006-04-042-3/+5
| | | | | | | | | | 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@
* Use SIZE_MAX instead of SIZE_T_MAX, the latter is not POSIX andotto2006-04-022-4/+4
| | | | remove redundant check on size. ok millert@ deraadt@
* Xr to strtonum(3), because vice versa is already the casegrunk2006-03-291-1/+2
| | | | ok jmc@ otto@
* Add warning about malloc(num * size) and recommend calloc() instead,ray2006-03-261-5/+40
| | | | | | | | or if malloc must be used suggest check. Get rid of "one". OK deraadt@ and jmc@, OK kjell@ to earlier version with "one"s.
* Removes extraneous variables from getopt(3). Inspired by one ofray2006-03-151-3/+1
| | | | | | David Hill's diffs. ok otto
* Avouid a race in atexit() handling by introducing a lock. Problemotto2006-02-221-9/+20
| | | | | originally reported by Gergely Kovacs; help from dhartmei@; ok tedu@ millert@
* quick path for free(0)espie2006-02-141-5/+5
| | | | `looks to be safe' millert, okay tedu.
* document posixness;jmc2006-01-302-9/+7
| | | | fixes pr #4996, from joachim schipper;
* missing auxillary verbjakemsr2006-01-181-2/+2
| | | | "yes, that is correct." jmc@ (a while back)
* back out previous - imaxabs is already listed;jmc2006-01-151-2/+1
|
* Xr imaxabs()millert2006-01-141-1/+2
|
* fix the .Fn line; ok millertjmc2006-01-141-2/+2
|
* sort SEE ALSO;jmc2006-01-141-2/+2
|
* Add lldiv(), imaxabs(), imaxdiv(), strtoimax() and strtoumax()millert2006-01-1317-74/+685
|
* Return inf or nan as per printf() not Inf, Infinity or Nan (from dtoa)millert2006-01-102-11/+15
| | | | Remove an extraneous check for dtoa returning Inf/Nan
* Use localeconv() to get the locale-specific radix char like printf does.millert2006-01-101-3/+6
|
* Nan and Infinity can be negativemillert2006-01-101-6/+12
| | | | | | | 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)
* Prototypes live in <search.h>millert2005-12-231-1/+2
|
* Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a timeotto2005-11-302-42/+14
| | | | | | | 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@
* add $OpenBSD$ tags, as requested by dtucker.espie2005-11-101-0/+1
|
* Remove obsolete comment. ok deraadt@otto2005-10-261-5/+1
|
* clarifications from ray lai;jmc2005-10-261-3/+5
| | | | tweaked by tedu@ and myself;
* dont' -> don't in comments;jmc2005-10-251-2/+2
| | | | from ray lai;
* tidy up examplesjaredy2005-10-113-17/+16
| | | | | | | | - use err() for error handling - add lint hints - spacing nits and missing braces ok otto
* fix a few warnings, keep the crypt stuff for later.espie2005-10-101-2/+2
| | | | okay otto@
* Remove a few warnings. Those were not apparent thanks to a bug in gcc 2.95.espie2005-10-101-3/+3
| | | | | Patch by Leonardo Chiquitto Filho <leonardo@iken.com.br> Thanks.
* further knf and cleaning; ok tdevalderaadt2005-10-051-382/+364
|
* first KNF (no binary diffs)deraadt2005-10-051-1322/+1356
|
* spelling: you missed this one david ;)jmc2005-08-221-2/+2
|
* zap remaining rcsid.espie2005-08-0855-361/+52
| | | | | | Kill old files that are no longer compiled. okay theo
* tell people that atexit is bad; ok jmcderaadt2005-08-061-1/+7
|
* kill errant blank line;jmc2005-07-261-2/+1
|
* - typos, punctuation, layout, macro tweaksjaredy2005-07-269-34/+48
| | | | | | - break long lines ok jmc
* - typos, grammar, punctuation, layout tweaksjaredy2005-07-261-74/+156
| | | | | | | | - use `$' for command prompts - clean up: use a bullet list instead of adding junk to denote list items ok jmc
* provide a description of the EXAMPLE; ok jmcjaredy2005-07-261-2/+11
|
* note when these first appeared; ok jmcjaredy2005-07-261-1/+3
|
* kill errant full stop;jmc2005-07-071-2/+2
|
* got to be a pasto...jmc2005-07-071-4/+4
|
* Fix the unmapping of freed pages, leaving just 64k worth of cache pages.tdeval2005-07-071-58/+136
| | | | Prodded by art@ and fgsch@, ok deraadt@
* whitespace;jmc2005-07-011-4/+4
|
* More robust example of numeric argument handling. The old examplemillert2005-07-011-11/+23
| | | | | code would dereference NULL for mixed letter and number args. OK deraadt@
* no longer a need for the free(malloc(1)) hack, because the brk stuffderaadt2005-06-171-9/+5
| | | | | no longer needs initializing (we use mmap for malloc entirely now) noticed by kjell, ok dhartmei, tested by me
* no need to insert spacing between list members;jmc2005-06-071-13/+1
|
* adding pointer protection to 'G' was too heavyweight. Since malloc guardtedu2005-06-072-7/+14
| | | | should be generally usable, split this out into option 'P'. ok deraadt