summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-246-31/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch Notes: svn path=/head/; revision=71579
* Prepare for mdoc(7)NG.Ruslan Ermilov2001-01-161-2/+2
| | | | Notes: svn path=/head/; revision=71097
* mdoc(7) police: Ft/Vt now accept punctuation-type arguments.Ruslan Ermilov2001-01-122-6/+6
| | | | Notes: svn path=/head/; revision=70974
* Fixed typo not fixed in previous revision.Ruslan Ermilov2000-12-291-1/+1
| | | | Notes: svn path=/head/; revision=70482
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-295-4/+5
| | | | Notes: svn path=/head/; revision=70481
* mdoc(7) police: removed history info from the .Os FreeBSD call.Ruslan Ermilov2000-12-141-1/+1
| | | | Notes: svn path=/head/; revision=70015
* Add `_PATH_DEVZERO'.David E. O'Brien2000-12-091-1/+2
| | | | | | | Use _PATH_* where where possible. Notes: svn path=/head/; revision=69793
* The parameter that contains valid options is "optstring", not "optarg".Matthew Hunt2000-11-281-1/+1
| | | | Notes: svn path=/head/; revision=69329
* Make it possible to override the function which writes messages toPoul-Henning Kamp2000-11-262-18/+32
| | | | | | | | | | stderr in case of warnings and errors. Rename malloc_options to have a leading underscore, I belive I have been told that is more correct namespace wise. Notes: svn path=/head/; revision=69201
* mdoc(7) police: Er macro usage cleanup.Ruslan Ermilov2000-11-221-2/+2
| | | | Notes: svn path=/head/; revision=69051
* mdoc(7) police: use certified section headers wherever possible.Ruslan Ermilov2000-11-172-2/+2
| | | | Notes: svn path=/head/; revision=68854
* Use Fx macro wherever possible.Ruslan Ermilov2000-11-142-2/+5
| | | | Notes: svn path=/head/; revision=68716
* Fixed typos.Ruslan Ermilov2000-11-061-4/+4
| | | | Notes: svn path=/head/; revision=68395
* Back out previous commit (MLINK malloc.conf.5 -> malloc.3).Eivind Eklund2000-10-291-1/+0
| | | | | | | | | This did not work correctly with whatis(1). Issue brought up by: mpp Notes: svn path=/head/; revision=67876
* Add link malloc.conf.5 -> malloc.3Eivind Eklund2000-10-291-0/+1
| | | | Notes: svn path=/head/; revision=67864
* Oops, un-spam this file - the last commit was an accident.Brian Somers2000-09-201-1/+0
| | | | | | | Pointed out by: phk Notes: svn path=/head/; revision=66105
* Only realloc() environ if we're sure that we know where it came from.Brian Somers2000-09-202-5/+5
| | | | | | | | | The recent problems with sshd were due to sshd reassigning `environ' when setenv() thinks it owns it. setenv() subsequently realloc()s the new version of environ and *boom* Notes: svn path=/head/; revision=66101
* Don't print an error message if the bad option is '?'. This has beenWarner Losh2000-09-041-1/+1
| | | | | | | | | | | | in my tree for a long time. bde reviewed this once upon a time and said it was OK, iirc. This also obviates the need to put ? in the optstring argument to preclude the extra warning message which some people think confuses users. When I made my getopt cleanups of a long time ago, this was the compromise reached. I just neglected to commit it until now. Notes: svn path=/head/; revision=65421
* Turn malloc options "AJ" on by default.Poul-Henning Kamp2000-07-091-2/+2
| | | | | | | | | | | These will be turned off again as we approach 5.0-RELEASE. If you benchmark things, make sure to ln -sf j /etc/malloc.conf to see "true" performance. Notes: svn path=/head/; revision=62847
* bring in binary search tree code.Alfred Perlstein2000-07-016-2/+347
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=62321
* 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