summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* mdoc(7) police: fix markup.Ruslan Ermilov2001-12-121-13/+17
| | | | Notes: svn path=/head/; revision=87736
* Add my e-mail to copyrightsAlexey Zelkin2001-12-111-1/+1
| | | | Notes: svn path=/head/; revision=87659
* Get rid of unused anymore file! Alpha works fine with our strtod() now.Alexey Zelkin2001-12-071-2496/+0
| | | | Notes: svn path=/head/; revision=87501
* Return 'c' back to signed due to potential comparison problemsAndrey A. Chernov2001-12-076-60/+72
| | | | | | | | | Use simpler test for valid ranges Submitted by: bde Notes: svn path=/head/; revision=87494
* Use the merged strtod.c everywhere. This has been tested on alpha andPeter Wemm2001-12-021-10/+1
| | | | | | | ia64. Notes: svn path=/head/; revision=87225
* Make it works for non ASCII compatible encodings too.Andrey A. Chernov2001-12-026-42/+42
| | | | | | | The only assumption left is that 'A'..'Z' 'a'..'z' both are contiguous Notes: svn path=/head/; revision=87196
* Merge NetBSD's changes from netbsd_strtod.c in preparation ofAlexey Zelkin2001-11-301-47/+54
| | | | | | | | | | | | removing it from our source tree in order to have one version of strtod() for all arches. netbsd_strtod.c still left in source tree until alpha folks make sure that our native strtod() works as well as NetBSD's one. Reviewed by: peter, bde (some time ago) Notes: svn path=/head/; revision=87123
* Back out national digits support, POSIX explicetely disallows it:Andrey A. Chernov2001-11-297-30/+30
| | | | | | | | | | | | | | The definition of character class digit requires that only ten characters -the ones defining digits- can be specified; alternate digits (for example, Hindi or Kanji) cannot be specified here. However, the encoding may vary if an implementation supports more than one encoding. The definition of character class xdigit requires that the characters included in character class digit are included here also and allows for different symbols for the hexadecimal digits 10 through 15. Notes: svn path=/head/; revision=87078
* Don't ever assume that isdigit() is always subset of isxdigit()Andrey A. Chernov2001-11-286-6/+6
| | | | Notes: svn path=/head/; revision=87042
* Fix typoAndrey A. Chernov2001-11-281-1/+1
| | | | Notes: svn path=/head/; revision=87040
* Use stricter tests to disallow national digits > 9Andrey A. Chernov2001-11-281-14/+14
| | | | | | | Optimize national digits code a bit Notes: svn path=/head/; revision=87038
* Allow national (non-ASCII) digitsAndrey A. Chernov2001-11-281-23/+23
| | | | Notes: svn path=/head/; revision=87029
* Implement strtoimax() and strtoumax()Bill Fenner2001-11-285-42/+337
| | | | Notes: svn path=/head/; revision=87027
* Also mention "long long" in synopsis.Bill Fenner2001-11-281-1/+1
| | | | Notes: svn path=/head/; revision=87026
* Base 36 is allowed.Bill Fenner2001-11-284-4/+4
| | | | Notes: svn path=/head/; revision=87023
* Put back base > 35 check. If someone dislike it, plese discuss it withAndrey A. Chernov2001-11-284-4/+4
| | | | | | | standards group first. Notes: svn path=/head/; revision=87020
* Add atoll(3) to conform POSIX and C99Andrey A. Chernov2001-11-283-2/+69
| | | | Notes: svn path=/head/; revision=87017
* Understand national (non-ASCII) digits nowAndrey A. Chernov2001-11-286-56/+42
| | | | | | | | Allow bases >=36 again Misc cleanup Notes: svn path=/head/; revision=87016
* Be more explicit about the fact that realloc() might return aGiorgos Keramidas2001-11-241-0/+4
| | | | | | | | | | different pointer than the one passed to it. PR: docs/31925 Submitted by: Andrew <andrew@ugh.net.au> Notes: svn path=/head/; revision=86845
* mdoc(7) police: fixed typos and minor markup nits.Ruslan Ermilov2001-11-214-17/+21
| | | | Notes: svn path=/head/; revision=86737
* If 'VX' is given, realloc(foo,0) will bail, it shouldn't.Poul-Henning Kamp2001-11-171-2/+5
| | | | | | | | PR: 29376 Submitted by: Farooq Mela <fmela0@sm.socccd.cc.ca.us> Notes: svn path=/head/; revision=86488
* Correctly call THREAD_UNLOCK() if the recursive call trap is sprung.Poul-Henning Kamp2001-11-161-0/+2
| | | | | | | Pointed out by: knu Notes: svn path=/head/; revision=86466
* o Implement imaxabs(), imaxdiv(), llabs(), lldiv().Mike Barcroft2001-11-1513-12/+450
| | | | | | | | | | o Update abs(3), div(3), labs(3), ldiv(3) to reflect standards conformance and add additional references. Reviewed by: bde, wollman Notes: svn path=/head/; revision=86368
* malloc and calloc do not free memory.Dima Dorfman2001-11-051-2/+3
| | | | | | | | PR: 31365 Submitted by: SUZUKI Koichi <koich@cac.co.jp> Notes: svn path=/head/; revision=86063
* Make strtod.c work on Alpha as well. strtod.c has got locale support,Peter Wemm2001-11-041-11/+8
| | | | | | | | | the netbsd_strtod.c file we have does not. More still should be done here, but this works happily on my Alpha. I have not (yet?) changed the Makefile.inc to use this. Notes: svn path=/head/; revision=86043
* Slightly closer to netbsd_strtod.c:Peter Wemm2001-11-041-11/+12
| | | | | | | | s/IEEE_8087/IEEE_LITTLE_ENDIAN/ s/IEEE_MC68k/IEEE_BIG_ENDIAN/ Notes: svn path=/head/; revision=86033
* phkmalloc->evilchecks++;Poul-Henning Kamp2001-11-021-3/+13
| | | | | | | | | | | If zero bytes are allocated, return pointer to the middle of page-zero (which is protected) so that the program will crash if it dereferences this illgotten pointer. Inspired & Urged by: Theo de Raadt <deraadt@cvs.openbsd.org> Notes: svn path=/head/; revision=85869
* Add a long-overdue nail to the deprecated /dev/urandom interfaceMark Murray2001-10-302-2/+2
| | | | | | | | by asking some things that need unpredictable numbers to read /dev/random instead. Notes: svn path=/head/; revision=85752
* Make this work on ia64. I have no idea why it works on alpha - itDoug Rabson2001-10-061-1/+7
| | | | | | | shouldn't. Notes: svn path=/head/; revision=84591
* Avoid getting stuck in system(3) when the internal call to wait4()Alfred Perlstein2001-10-031-2/+3
| | | | | | | | | | | | | is interrupted by saving the pid. The old code would assign the return value to pid which would trash it, to fix the problem save a copy of the pid to be used as the paramter to wait4(). Submitted by: Toshihiko ARAI <toshi@jp.FreeBSD.org> Notes: svn path=/head/; revision=84417
* mdoc(7) police: don't split author names in the AUTHORS section.Ruslan Ermilov2001-10-011-0/+1
| | | | Notes: svn path=/head/; revision=84298
* mdoc(7) police: s/atof/atoi/Ruslan Ermilov2001-10-011-1/+1
| | | | Notes: svn path=/head/; revision=84280
* Add ERRORS section.Jeroen Ruigrok van der Werven2001-09-261-1/+18
| | | | | | | | | | | Mention thread safety and async-cancel safety status [not]. Add standards compliancy references. Note strtol() is preferred over atoi(). MFC after: 2 weeks Notes: svn path=/head/; revision=83982
* Be explicit about the POSIX version it conforms to [in this case 1990].Jeroen Ruigrok van der Werven2001-09-261-5/+5
| | | | | | | Put the error comment under the more appropriate ERRORS section. Notes: svn path=/head/; revision=83973
* Change standards compliancy order so that C and POSIX are grouped.Jeroen Ruigrok van der Werven2001-09-261-1/+1
| | | | Notes: svn path=/head/; revision=83967
* style(9)Mike Barcroft2001-09-171-62/+56
| | | | | | | Silence from: phantom Notes: svn path=/head/; revision=83559
* mdoc(7) police: changed pure POSIX text; added missing markup bits.Ruslan Ermilov2001-09-112-8/+12
| | | | Notes: svn path=/head/; revision=83328
* Add more standards which we conform to.Jeroen Ruigrok van der Werven2001-09-091-1/+18
| | | | | | | | | Note our implementation is not thread nor async-cancel safe. Explicitely note atof() does not check nor report errors. Note that strtod() should be used instead. Notes: svn path=/head/; revision=83256