summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* de-__P()Alfred Perlstein2002-10-161-3/+3
| | | | Notes: svn path=/head/; revision=105299
* - Remove the lsearch() and lfind() functions and their manpage fromRobert Drehmel2002-10-163-2/+165
| | | | | | | | | | | | the compatibility library libcompat. - Add new implementations of lsearch() and lfind() which conform to IEEE Std 1003.1-2001 to libc. Add a new manual page for them and add them to the makefile. - Add function prototypes for lsearch() and lfind() to the search.h header. Notes: svn path=/head/; revision=105250
* Remove unneeded $FreeBSD$ tags.Robert Drehmel2002-10-162-4/+0
| | | | Notes: svn path=/head/; revision=105246
* - Remove the old insque() and remque() functions and their manualRobert Drehmel2002-10-164-5/+144
| | | | | | | | | | | | page from the compatibility library. - Add new implementations of insque() and remque() which conform to IEEE Std 1003.1-2001 to libc. Add a new manual page for them and connect them to the build. - Add the prototypes of insque() and remque() to the search.h header. Notes: svn path=/head/; revision=105245
* Fix a typo causing incorrect formatting for negative values in some localesTim J. Robbins2002-10-121-3/+5
| | | | | | | | | (at least the French ones), a memory leak upon successful termination, a pointer arithmetic error causing heap corruption, and an off-by-one bug causing incorrect amounts of padding at the right of the value. Notes: svn path=/head/; revision=104963
* Save errno around calls to free(); at least some code paths clobber itTim J. Robbins2002-10-111-0/+3
| | | | | | | and we are not interested in any errors it may report. Notes: svn path=/head/; revision=104946
* Document the kind of format string strfmon() expects. Sync the ErrorsTim J. Robbins2002-10-111-5/+74
| | | | | | | section with reality. Notes: svn path=/head/; revision=104945
* Use the new struct lconv members to determine how to format internationalTim J. Robbins2002-10-111-1/+12
| | | | | | | monetary values. Notes: svn path=/head/; revision=104944
* Non-negative amounts should not have an extra space in front of themTim J. Robbins2002-10-111-6/+2
| | | | | | | when the `(' flag is used. Notes: svn path=/head/; revision=104943
* "Left precision" and "right precision" are not flags, but separate partsTim J. Robbins2002-10-111-13/+15
| | | | | | | of the format string that appear after the field width. Notes: svn path=/head/; revision=104942
* Add cross-references to wide character versions of these functions.Tim J. Robbins2002-10-103-3/+6
| | | | Notes: svn path=/head/; revision=104751
* Add missing const qualifier in tfind().Mike Barcroft2002-10-032-2/+2
| | | | Notes: svn path=/head/; revision=104400
* Add getopt_long(3).Eric Melville2002-09-293-2/+771
| | | | | | | | Obtained from: NetBSD Sponsored by: Apple Notes: svn path=/head/; revision=104128
* Add restrict type-qualifier.Mike Barcroft2002-09-202-2/+3
| | | | Notes: svn path=/head/; revision=103668
* Implement C99's _Exit() interface.Garrett Wollman2002-09-106-55/+158
| | | | | | | | | Implement a version of qsort that provides a thunk to the comparison function. Update manual pages. Notes: svn path=/head/; revision=103165
* Include some verbage about not calling exit() from functions registeredGarrett Wollman2002-09-062-2/+24
| | | | | | | by atexit(). Notes: svn path=/head/; revision=103036
* Style: One space between "restrict" qualifier and "*".Tim J. Robbins2002-09-0612-17/+17
| | | | Notes: svn path=/head/; revision=103012
* s/EDOFUS/EDOOFUS/Poul-Henning Kamp2002-08-211-3/+3
| | | | | | | Persuaded by: Google Notes: svn path=/head/; revision=102229
* - Add the 'restrict' qualifier to the function prototypes andRobert Drehmel2002-08-1512-41/+17
| | | | | | | | | | | definitions of the functions that convert strings to numbers and are defined by IEEE Std 1003-1.2001. - Use ANSI-C function definitions for all of the functions mentioned above plus strtouq and strtoq. - Update the prototypes in the manual pages. Notes: svn path=/head/; revision=101912
* - Add the 'restrict' qualifier to match the IEEE Std 1003.1-2001Robert Drehmel2002-08-142-7/+11
| | | | | | | | | | prototype of the tdelete(3) function. - Remove duplicated space. - Use an ANSI-C function definition for tdelete(3). - Update the manual page. Notes: svn path=/head/; revision=101882
* Use a union to access the words of a double as this is less likelyDavid Malone2002-08-131-4/+8
| | | | | | | | | | | | | | | to cause bugs when gcc is more aggressively optimising things. There are still problems with dtoa mentioned in the PR - maybe Dan could suggest a patch. PR: 40209 Submitted by: Dan Lukes <dan@obluda.cz> Approved by: bde MFC after: 2 weeks Notes: svn path=/head/; revision=101812
* Make sure we set errno sensibly in case of failure.Poul-Henning Kamp2002-08-091-0/+7
| | | | | | | Spotted by: ache Notes: svn path=/head/; revision=101568
* Nonexistent SIZE_MAX -> SIZE_T_MAXAndrey A. Chernov2002-08-041-1/+1
| | | | Notes: svn path=/head/; revision=101291
* Signal an error instead of giving the caller less memory than they askedTim J. Robbins2002-08-041-0/+7
| | | | | | | | | for when num * size would cause integer overflow. MFC after: 1 week Notes: svn path=/head/; revision=101290
* Fix some comments.Garrett Wollman2002-07-101-4/+6
| | | | Notes: svn path=/head/; revision=99735
* Remove improper use of <namespace.h>Daniel Eischen2002-06-271-1/+0
| | | | Notes: svn path=/head/; revision=98907
* Clarify the bit about realloc() and its `ptr' argument a bit.Giorgos Keramidas2002-06-061-2/+3
| | | | | | | | | | | Hopefully, now it is more clear that the memory referenced by the ptr argument of realloc(ptr,size) is freed and only the return value of realloc() points to a valid memory area upon successful completion. Submitted by: Martin Faxer <gmh003532@brfmasthugget.se> Notes: svn path=/head/; revision=97967
* Const poison.Poul-Henning Kamp2002-05-301-3/+5
| | | | | | | Partially submitted by: wollman Notes: svn path=/head/; revision=97639
* mdoc(7) police: nit.Ruslan Ermilov2002-05-291-1/+1
| | | | Notes: svn path=/head/; revision=97467
* Assume __STDC__, remove non-__STDC__ code.Alfred Perlstein2002-05-282-28/+0
| | | | | | | Submitted by: keramida Notes: svn path=/head/; revision=97407
* Remove spurious period.Dima Dorfman2002-05-271-1/+1
| | | | Notes: svn path=/head/; revision=97330
* Let this code know about PowerPC.Benno Rice2002-05-211-1/+1
| | | | Notes: svn path=/head/; revision=97044
* Avoid casting a different sized integer to a pointer on LP64 systems.Peter Wemm2002-05-101-1/+1
| | | | Notes: svn path=/head/; revision=96350
* Constify _malloc_options.Poul-Henning Kamp2002-04-242-3/+3
| | | | Notes: svn path=/head/; revision=95377
* Do not use __progname directly (except in [gs]etprogname(3)).Mark Murray2002-03-292-8/+9
| | | | | | | | | Also, make an internal _getprogname() that is used only inside libc. For libc, getprogname(3) is a weak symbol in case a function of the same name is defined in userland. Notes: svn path=/head/; revision=93399
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-0/+1
| | | | | | | I believe have made all of libc .h's as consistent as possible. Notes: svn path=/head/; revision=92991
* Fix the style of the SCM ID's.David E. O'Brien2002-03-2237-66/+83
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Remove multi-line __P() usage.David E. O'Brien2002-03-222-4/+4
| | | | Notes: svn path=/head/; revision=92941
* Remove __P() usage.David E. O'Brien2002-03-2113-21/+21
| | | | Notes: svn path=/head/; revision=92905
* Remove 'register' keyword.David E. O'Brien2002-03-2114-61/+75
| | | | Notes: svn path=/head/; revision=92889
* When multiple threads call atexit at the same time, some operations mustTor Egge2002-03-051-2/+28
| | | | | | | | | | | | | be serialized. A mutex is used to protect the critical regions. sbrk() and brk() are not thread safe. Replace use of sbrk() with a call to malloc to avoid race when one thread calls atexit while another thread calls malloc. Reviewed by: deischen Notes: svn path=/head/; revision=91697
* Add ifdefs for sparc64.Jake Burkholder2002-02-232-1/+6
| | | | Notes: svn path=/head/; revision=91161
* Minor typo fix: uquad_t -> u_quad_t.Yaroslav Tykhiy2002-01-201-1/+1
| | | | Notes: svn path=/head/; revision=89585
* mdoc(7) police: add missing markup bits for ``errno''.Ruslan Ermilov2002-01-093-3/+9
| | | | Notes: svn path=/head/; revision=89139
* Back out errno preservingAndrey A. Chernov2001-12-307-47/+12
| | | | Notes: svn path=/head/; revision=88681
* Add "except the handling of errors" into "equivalent to" paragraph.Andrey A. Chernov2001-12-253-0/+8
| | | | | | | | Pointed by: bde Inspired by: POSIX Notes: svn path=/head/; revision=88472
* Preserve errno.Andrey A. Chernov2001-12-255-9/+44
| | | | | | | | | | | According to C99: "The functions atof, atoi, atol, and atoll need not affect the value of the integer expression errno on an error. If the value of the result cannot be represented, the behavior is undefined." Notes: svn path=/head/; revision=88469
* * cleanup comments and definesAlexey Zelkin2001-12-141-8/+1
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=87872
* mdoc(7) police: fix markup, bump document date.Ruslan Ermilov2001-12-122-30/+38
| | | | Notes: svn path=/head/; revision=87738
* mdoc(7) police: kill HSBs, add missing comma.Ruslan Ermilov2001-12-121-8/+13
| | | | Notes: svn path=/head/; revision=87737