summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* Fix miscellaneous mdoc macro argument limit infringements.Sheldon Hearn2000-05-091-1/+1
| | | | | | | | PR: 18465 Reported by: Kazu TAKAMUNE <takamune@avrl.mei.co.jp> Notes: svn path=/head/; revision=60258
* Use `Er' variable to define first column width in ERRORS section.Alexey Zelkin2000-05-065-5/+5
| | | | Notes: svn path=/head/; revision=60075
* Minor mdoc cleanup.Mike Pritchard2000-05-051-2/+3
| | | | | | | PR: docs/13218 Notes: svn path=/head/; revision=60015
* Introduce ".Lb" macro to libc manpages.Alexey Zelkin2000-04-2126-0/+52
| | | | | | | More libraries manpages updates following. Notes: svn path=/head/; revision=59460
* Add a missing THREAD_UNLOCK() found missing by Valentin NechayevPoul-Henning Kamp2000-04-102-8/+2
| | | | | | | | | | <netch@segfault.kiev.ua> Remove allocation failure check from 'A' option, the 'X' option does this as a standalone check now. Notes: svn path=/head/; revision=59117
* Spelling, fprintf -> err, remove unneeded variable declarationPhilippe Charnier2000-03-261-8/+3
| | | | Notes: svn path=/head/; revision=58633
* Take care to avoid having "strong" and "weak" symbols of the same name inJason Evans2000-03-161-0/+2
| | | | | | | libc_r. Notes: svn path=/head/; revision=58126
* Merge from RELENG_3 (oops):Chris Costello2000-01-291-5/+5
| | | | | | | | resolved_name -> resolved_path resolvedname -> resolved_path Notes: svn path=/head/; revision=56880
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-01-274-18/+17
| | | | | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen Notes: svn path=/head/; revision=56698
* o Back out rev 1.4 - reallocf() failure clobbers existing `environ'.Ruslan Ermilov2000-01-271-3/+8
| | | | | | | | | | | o Do not override `environ' if realloc() fails, leave it intact. o Set `alloced' only when memory is actually allocated. PR: bin/5604 (2nd part) Reviewed by: bde Notes: svn path=/head/; revision=56676
* Document the memory leak that is inherent in FreeBSD's semanticsArchie Cobbs2000-01-261-0/+15
| | | | | | | | | for getenv()/putenv(). PR: 10341 5604 Notes: svn path=/head/; revision=56652
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-01-124-18/+25
| | | | | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read(). Notes: svn path=/head/; revision=55837
* Make example for handling "-##" work and comply with style(9). StillTim Vanderhoek2000-01-061-5/+12
| | | | | | | | | doesn't handle nastier corner cases such as "-j3 -33" correctly. <shrug> PR: docs/12994 (James Howard <howardjp@wam.umd.edu>) Notes: svn path=/head/; revision=55490
* Add history: The reallocf() function first appeared in FreeBSD-3.0.Tim Vanderhoek1999-12-281-0/+5
| | | | | | | | See imp's 199808201619.KAA20970@harmony.village.org in freebsd-hackers (the reallocf.c cvs history mistakenly refers to freebsd-current). Notes: svn path=/head/; revision=55186
* Fixed missing installation of a link to rand_r.3.Bruce Evans1999-12-231-1/+1
| | | | Notes: svn path=/head/; revision=55032
* Document the current behaviour with respect to the handling of errno.Sheldon Hearn1999-12-221-1/+8
| | | | | | | Approved by: phk Notes: svn path=/head/; revision=55006
* Fix handling of trailing :'s to match what other OSes do (spit outJordan K. Hubbard1999-12-171-2/+8
| | | | | | | | | a diagnostis). Submitted by: Guy Harris <gharris@flashcom.net> Notes: svn path=/head/; revision=54713
* Add a cross-reference to fabs(3) man page.Chris Costello1999-12-071-0/+1
| | | | | | | | PR: docs/15337 Submitted by: Bruce A. Mah <bmah@ca.sandia.gov> Notes: svn path=/head/; revision=54274
* TypoKris Kennaway1999-11-151-1/+1
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=53168
* Go to a bit more trouble to make it absolutely clear that malloc(3)Peter Wemm1999-11-121-2/+9
| | | | | | | does not zero the allocated memory. Notes: svn path=/head/; revision=53111
* Change .Fn to .Xr on a couple of lines where abort(3) is referenced.Chris Costello1999-09-251-2/+2
| | | | Notes: svn path=/head/; revision=51667
* Tidy up $Log$ debris.Peter Wemm1999-09-051-32/+2
| | | | Notes: svn path=/head/; revision=50967
* $Header$ -> $FreeBSD$Peter Wemm1999-08-281-1/+5
| | | | Notes: svn path=/head/; revision=50488
* $Id$ -> $FreeBSD$Peter Wemm1999-08-2832-32/+32
| | | | Notes: svn path=/head/; revision=50476
* Various man page cleanup:Mike Pritchard1999-08-151-3/+3
| | | | | | | | | | | | | - Sort xrefs - FreeBSD.ORG -> FreeBSD.org - Be consistent with section names as outlines in mdoc(7) - Other misc mdoc cleanup. PR: doc/13144 Submitted by: Alexy M. Zelkin <phantom@cris.net> Notes: svn path=/head/; revision=49828
* Fix .Xr line for `getpagesize'Chris Costello1999-08-141-2/+2
| | | | Notes: svn path=/head/; revision=49744
* Mention that EXIT_SUCCESS and EXIT_FAILURE are preferred overTim Vanderhoek1999-08-011-1/+7
| | | | | | | sysexits.h-values as exit codes for portable programs. Notes: svn path=/head/; revision=49358
* Add $Id$, to make it simpler for members of the translation teams toNik Clayton1999-07-1223-0/+23
| | | | | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde Notes: svn path=/head/; revision=48794
* Back out previous commit after discussing it with Dmitrij Tejblum.Dag-Erling Smørgrav1999-07-071-4/+0
| | | | Notes: svn path=/head/; revision=48672
* Always set errno to ENOMEM when returning 0 from malloc() or realloc().Dag-Erling Smørgrav1999-07-071-1/+5
| | | | | | | Approved by: phk Notes: svn path=/head/; revision=48670
* Added Posix rand_r function.Wes Peters1999-05-242-5/+74
| | | | Notes: svn path=/head/; revision=47474
* Disable the "Hint" option in phkmalloc as default. Recent VM systemPoul-Henning Kamp1999-03-282-4/+4
| | | | | | | | | | | | | | | changes have made this too expensive. This gains about 1.25% on worldstone on my SMP machine. Swap-less machines, for instance PicoBSDs, and machines which experience page-out trafic, check with top(1), will probably want to reenable this with: ln -s H /etc/malloc.conf Suggested by: alc (&dyson ?) Notes: svn path=/head/; revision=45091
* Correct synopsys: getsubopt is declared in unistd.h, not stdlib.h.Guy Helmer1999-03-021-1/+1
| | | | | | | PR: docs/9376 Notes: svn path=/head/; revision=44388
* fix tabs lost apparently in copy&pasteAndrey A. Chernov1999-02-121-5/+5
| | | | Notes: svn path=/head/; revision=43937
* Clarify format of exit status code. Note when a return code of -1 canJoseph Koshy1999-01-271-4/+8
| | | | | | | | | | be expected. PR: docs/9701 Submitted by: Marc van Kempen <marc@bowtie.nl> Notes: svn path=/head/; revision=43265
* Include mergesort() in description of errors.Robert Nordier1998-11-041-1/+3
| | | | Notes: svn path=/head/; revision=40901
* Drop unused labels.Robert Nordier1998-11-041-2/+2
| | | | Notes: svn path=/head/; revision=40900
* Handle a zero elements argument.Robert Nordier1998-11-041-0/+3
| | | | | | | | PR: 8566 Submitted by: Archie Cobbs <archie@whistle.com> Notes: svn path=/head/; revision=40896
* Delete the XXX comments that refer to spinlock recursion. The malloc/free/John Birrell1998-09-301-15/+1
| | | | | | | | | | | | realloc functions check for recursion within the malloc code itself. In a thread-safe library, the single spinlock ensures that no two threads go inside the protected code at the same time. The thread implementation is responsible for ensuring that the spinlock does in fact protect malloc. There was a window of opportunity in which this was not the case. I'll fix that with a commit RSN. Notes: svn path=/head/; revision=39802
* Use 8k pagesize on alpha, not 4k.Doug Rabson1998-09-231-1/+5
| | | | Notes: svn path=/head/; revision=39606
* Back out part of previous commit (even though it's technically correct).Alexander Langer1998-09-201-1/+17
| | | | | | | | | | | | | | Our spinlock implementation allows a particular thread to obtain a lock multiple times, but release the lock with a single unlock call. Since we're detecting recursion, we know the lock is already owned by the current thread in a previous call and must not be released in the current call. This is really far too dependent on this particular spinlock implementation, so I've added commented out calls to THREAD_UNLOCK in the appropriate places. We can activate this code when spinlock is taught to count each lock operation. Notes: svn path=/head/; revision=39501
* Correctly back out of free if a recursive call into malloc.c is detected.Alexander Langer1998-09-191-8/+7
| | | | | | | | | Set malloc_func *after* grabbing the thread lock. Noticed by: Simon Coggins <simon@oz.org> Notes: svn path=/head/; revision=39491
* Replace memory leaking instances of realloc with non-leaking reallocf.Warner Losh1998-09-162-2/+2
| | | | | | | | | | | | | | In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but... Notes: svn path=/head/; revision=39327
* o Don't reference non-existant function freealloc.Warner Losh1998-09-161-4/+4
| | | | | | | | | o Properly order things Pointed out by: bde Notes: svn path=/head/; revision=39325
* Fix style problems noted by Bruce:Warner Losh1998-09-162-8/+35
| | | | | | | | | o No copyright on reallocf. o Order makefile list correctly. o indent reallocf properly. Notes: svn path=/head/; revision=39322
* Add reallocf to the library. This function is simliar to realloc, butWarner Losh1998-09-143-13/+42
| | | | | | | | | | | | | | | | when it returns NULL to indicate failure, it will also free the memory that was passed to it, if that was non-null. This does not change the semantics of realloc. A second commit will be done to commit the conversion of those places in the code that can safely use this to avoid memory leaks when confronted with low memory situations. Beaten-to-death-but-finally-approved-in: -current Notes: svn path=/head/; revision=39191
* preserve errno across the readlink() calls. There is no value in trashingPeter Wemm1998-06-181-1/+4
| | | | | | | errno during a successful malloc() call. Notes: svn path=/head/; revision=37048
* Add support for thread lock debug. No impact of the malloc code.John Birrell1998-06-091-4/+4
| | | | Notes: svn path=/head/; revision=36804
* This is a hack to workaround source that is coded to use long variablesJohn Birrell1998-05-082-2/+2528
| | | | | | | | | | | | | but also assumes that they are 32-bits. This is one place where I don't think it is appropriate to change 'long' to 'int'. I don't see why the code couldn't be fixed so that using natural long variables does the right thing. It's spaggetti code so it'll take some effort. Obviously NetBSD thought so too because they change 'long' to 'int32_t' etc and left it at that. As a temporary measure FreeBSD/Alpha can use the NetBSD code and put this on the list of things to fix. Notes: svn path=/head/; revision=35837
* Fix a few nits in quoted code fragments and elsewhere.Robert Nordier1998-05-041-5/+4
| | | | Notes: svn path=/head/; revision=35726