summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bitwise logic error in posix_memalign().Jason Evans2006-01-121-2/+2
| | | | | | | Reported by: glebius Notes: svn path=/head/; revision=154263
* In preparation for a new malloc implementation:Jason Evans2006-01-124-63/+156
| | | | | | | | | | | | | | | | * Add posix_memalign(). * Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in rtld-elf in order to make the loader happy (even though calloc() isn't used in rtld-elf). * Add _malloc_prefork() and _malloc_postfork(), and use them instead of directly manipulating __malloc_lock. Approved by: phk, markm (mentor) Notes: svn path=/head/; revision=154248
* Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convertTom Rhodes2005-12-244-5/+290
| | | | | | | | | | | between a 32-bit integer and a radix-64 ASCII string. The l64a_r() function is a NetBSD addition. PR: 51209 (based on submission, but very different) Reviewed by: bde, ru Notes: svn path=/head/; revision=153707
* Fix prototype.Ruslan Ermilov2005-11-231-1/+3
| | | | Notes: svn path=/head/; revision=152734
* Include a couple of headers to ensure consistency between the prototype andStefan Farfeleder2005-09-121-0/+1
| | | | | | | the function definition. Notes: svn path=/head/; revision=150065
* Move the declaration of __cleanup to libc_private.h as it is used in bothStefan Farfeleder2005-09-122-2/+4
| | | | | | | stdio/ and stdlib/. Don't define __cleanup twice. Notes: svn path=/head/; revision=150040
* Fix ptsname(3) by converting it to use devname(3) to obtain the name ofJoe Marcus Clarke2005-07-071-3/+4
| | | | | | | | | | | | | | | a tty device instead of the legacy minor number approach. This is known to fix gnome-vfs' sftp module as well as kio_sftp and kdesu on -CURRENT. Thanks to scottl for the snprintf() approach idea. Reviewed by: phk Tested by: pav mich Approved by: re (scottl) Notes: svn path=/head/; revision=147811
* Do not require the pty(4) majors to be anything in particular.Brian Feldman2005-03-041-3/+0
| | | | Notes: svn path=/head/; revision=143137
* Remove the check about whether MALLOC_EXTRA_SANITY is defined,Xin LI2005-02-271-2/+0
| | | | | | | | | | | | surrounding the undef'ing it. It does not seem necessary to undef some symbol that is not exist, and gcc does not complain about whether a symbol is exist before #undef'ing it out. Spotted by: mingyanguo via ChinaUnix.net forum Reviewed by: phk Notes: svn path=/head/; revision=142668
* Especially mention that setting errno to EINVAL in "no conversion" caseAndrey A. Chernov2005-01-222-4/+8
| | | | | | | | | is not portable. Asked by: joerg Notes: svn path=/head/; revision=140613
* Whitespace/style tweaking of prev. commit.Andrey A. Chernov2005-01-216-24/+18
| | | | | | | Noted by: bde Notes: svn path=/head/; revision=140577
* POSIX says that 0[xX] prefix is _optional_ even in base 16 case, make itAndrey A. Chernov2005-01-216-6/+30
| | | | | | | | | | | | | really so. "If the value of base is 16, the characters 0x or 0X may optionally precede the sequence of letters and digits, following the sign if present." Found by: joerg Notes: svn path=/head/; revision=140536
* Sort sections.Ruslan Ermilov2005-01-209-77/+77
| | | | Notes: svn path=/head/; revision=140505
* Markup fixes.Ruslan Ermilov2005-01-141-6/+6
| | | | Notes: svn path=/head/; revision=140262
* Fix some signed/unsigned comparisons. Fix prototypes while I'm here.Brian Somers2005-01-121-3/+6
| | | | | | | | | PR: 28890 Submitted by: matthias.andree at web dot de MFC after: 7 days Notes: svn path=/head/; revision=140098
* sranddev() is not magic pixie dust. While it gives a good randomWarner Losh2004-11-101-2/+4
| | | | | | | | | | | seed, the random number generator rand(3) still sucks and is unlikely sufficient for crypto use. Correct what appears to be a cut and paste error from the srandomdev() man page. Submitted by: Ben Mesander Notes: svn path=/head/; revision=137535
* Reword recent addition about memory moving.Alfred Perlstein2004-08-191-5/+4
| | | | | | | | | | | Requested by: keramida Bump .Dd Requested by: ru Notes: svn path=/head/; revision=134020
* Clarify that realloc and reallocf may move the memory allocation.Alfred Perlstein2004-08-181-3/+7
| | | | Notes: svn path=/head/; revision=133985
* Use #include <unistd.h> rather than the explicit externs in theWarner Losh2004-07-311-2/+1
| | | | | | | | | example. The externs haven't been needed in about 10 years, so there's no reason to have them other than for hysterical raisins. And the California Rasins haven't been around for a long time... Notes: svn path=/head/; revision=132910
* mdoc(7) fixes.Ruslan Ermilov2004-07-071-2/+3
| | | | Notes: svn path=/head/; revision=131754
* Move the return value information about the getenv(3) library functionHiten Pandya2004-07-061-4/+10
| | | | | | | | | | | | under the RETURN VALUES section so it is consistent with others. Cleanup the return value text for getenv(3) a little while I am here. PR: docs/58033 MFC after: 3 days Notes: svn path=/head/; revision=131728
* Keep it sync with OpenBSD:Andrey A. Chernov2004-07-061-3/+4
| | | | | | | | | | An optional argument cannot start with '-', even if permutation is disabled. Obtained from: OpenBSD getopt_long.c v1.17 Notes: svn path=/head/; revision=131710
* Sort SEE ALSO references (in dictionary order, ignoring case).Ruslan Ermilov2004-07-041-1/+1
| | | | Notes: svn path=/head/; revision=131594
* Consistently use __inline instead of __inline__ as the former is an empty macroStefan Farfeleder2004-07-041-3/+3
| | | | | | | in <sys/cdefs.h> for compilers without support for inline. Notes: svn path=/head/; revision=131575
* Eliminate double whitespace.Ruslan Ermilov2004-07-031-4/+4
| | | | Notes: svn path=/head/; revision=131539
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-025-14/+30
| | | | Notes: svn path=/head/; revision=131504
* Define malloc_pageshift and malloc_minsize for arm.Olivier Houchard2004-05-141-0/+4
| | | | Notes: svn path=/head/; revision=129200
* Link radixsort(3) to sradixsort(3), make the latter appear inRuslan Ermilov2004-05-122-1/+2
| | | | | | | the whatis(1) output. Notes: svn path=/head/; revision=129151
* Simplify one condition in prev. commit:Andrey A. Chernov2004-04-011-2/+1
| | | | | | | short_too already assumes FLAG_LONGONLY Notes: svn path=/head/; revision=127734
* Fix parsing of ambiguous options, whole loop must be processedAndrey A. Chernov2004-04-011-17/+27
| | | | Notes: svn path=/head/; revision=127733
* Rearrange (centralize) initialization of mallocs internals to always bePoul-Henning Kamp2004-03-071-19/+13
| | | | | | | | | done before the first call, even if this is a malloc(0) call. PR: 62859 Notes: svn path=/head/; revision=126727
* Merge some fixes from NetBSD's getopt.3 v1.31:Andrey A. Chernov2004-03-061-43/+88
| | | | | | | cleanup, add more sections, better explanation, declaration Notes: svn path=/head/; revision=126697
* Merge some fixes from NetBSD's getopt.c v1.26:Andrey A. Chernov2004-03-061-26/+43
| | | | | | | | | | | cleanups, handling 'ls -l-', handling '--*' Note this is in the same time back out of our v1.3 "Don't print an error message if the bad option is '?'" because it directly violates POSIX. Notes: svn path=/head/; revision=126696
* Fix typo, was 'W'; instead of `W;'Andrey A. Chernov2004-03-061-1/+1
| | | | Notes: svn path=/head/; revision=126693
* Make GNU-compatible following case:Andrey A. Chernov2004-03-062-23/+27
| | | | | | | single '-' in command line and '-' (non-first) in options Notes: svn path=/head/; revision=126692
* Make return code in noarg case GNU-compatibleAndrey A. Chernov2004-03-032-20/+24
| | | | Notes: svn path=/head/; revision=126535
* Be more GNU-compatible in diagnosticsAndrey A. Chernov2004-03-031-11/+61
| | | | Notes: svn path=/head/; revision=126518
* Improve GNU compatibility in several places, use internal GNU_COMPATIBLEAndrey A. Chernov2004-03-012-29/+49
| | | | | | | | | | define for it. Don't catch POSIXLY_CORRECT env. into static variable, it can be changed on the fly by program. Use P1003.2 standartized illoptchar[] Notes: svn path=/head/; revision=126452
* Comment out things related to getopt() replacement we not useAndrey A. Chernov2004-03-011-36/+36
| | | | Notes: svn path=/head/; revision=126440
* Change "-"-started options when POSIX_CORRECTLY is set handlingAndrey A. Chernov2004-03-011-17/+17
| | | | | | | | in favour of GNU instead of NetBSD, because configure's use us and expect GNU. Notes: svn path=/head/; revision=126439
* Change "-"-started options when POSIX_CORRECTLY is set handlingAndrey A. Chernov2004-03-011-1/+5
| | | | | | | | in favour of GNU instead of NetBSD, because configure's use us and expect GNU. Notes: svn path=/head/; revision=126438
* Add getopt_long_only() from OpenBSD and other OpenBSD cleanupsAndrey A. Chernov2004-02-243-299/+459
| | | | | | | | PR: 63173 Submitted by: Marius Strobl <marius@alchemy.franken.de> Notes: svn path=/head/; revision=126189
* Add optarg, optind, opterr, optopt, optreset to SYNOPSYSAndrey A. Chernov2004-02-231-0/+5
| | | | Notes: svn path=/head/; revision=126143
* POSIX clearly states that getsubopt() should be declared in <stdlib.h>Andrey A. Chernov2004-02-231-1/+1
| | | | | | | not in <unistd.h> Notes: svn path=/head/; revision=126139
* Remove unneccessary <unistd.h>Andrey A. Chernov2004-02-231-1/+0
| | | | Notes: svn path=/head/; revision=126138
* Remove the triplicity in the public functions by vectoring them allPoul-Henning Kamp2004-02-211-70/+49
| | | | | | | | | | | | | through a realloc like function. Make the malloc_active variable a local static to this new function. Don't warn about recursion more than once per base call. constify malloc_func. Notes: svn path=/head/; revision=126061
* Move the check for sensitive processes to the point where the exceptionPoul-Henning Kamp2004-02-211-14/+7
| | | | | | | | | | | | has been hit, this makes it cover more cases. Call the message function directly rather than fiddle with flag-saving when we find an unknown character in our options. The 'A' flag should not trigger on legal out of memory conditions. Notes: svn path=/head/; revision=126060
* Unbreak the upgrade path from 4.9 after removal of GNU getopt andRuslan Ermilov2004-02-201-2/+0
| | | | | | | <gnuregex.h>. Notes: svn path=/head/; revision=126039
* style cleanup: Remove duplicate $FreeBSD$ tags.Colin Percival2004-02-101-2/+0
| | | | | | | | | | | These files had tags after the copyright notice, inside the comment block (incorrect, removed), and outside the comment block (correct). Approved by: rwatson (mentor) Notes: svn path=/head/; revision=125668
* Use 'uint32_t' instead of 'long' when a 32-bit integer is intended.David Schultz2004-01-201-31/+32
| | | | | | | | | | | | This results in no functional change, aside from fixing a data corruption bug on LP64 platforms. The code here could still use a significant amount of cleanup. PR: 56502 Submitted by: hrs (earlier version) Notes: svn path=/head/; revision=124738