summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* Assorted mdoc(7) fixes.ru2003-06-011-27/+28
|
* Clarify the code a bit.phk2003-06-011-1/+2
| | | | Submitted by: Nadav Eiron <nadav@TheEirons.org>
* Fix grammar bogons.schweikh2003-05-311-1/+1
| | | | MFC after: 3 days
* Fix stripping last path component when only one path component left.fjoe2003-05-281-2/+2
| | | | | PR: 52686 MFC after: 1 day
* Assorted mdoc(7) fixes.ru2003-05-221-5/+6
| | | | Approved by: re (blanket)
* Back out the `hiding' of strlcpy and strlcat. Several peoplenectar2003-05-011-6/+6
| | | | vocally objected to this safety belt.
* Tell malloc.c that AMD64 uses the same pagesize as i386.peter2003-04-301-0/+4
|
* `Hide' strlcpy and strlcat (using the namespace.h / __weak_referencenectar2003-04-291-6/+6
| | | | | | | technique) so that we don't wind up calling into an application's version if the application defines them. Inspired by: qpopper's interfering and buggy version of strlcpy
* MFp4: Link strtof.3 and strtold.3 to strtod.3.tjr2003-04-051-0/+1
|
* BDE'ifyfjoe2003-03-291-79/+89
|
* fix truncation check and buffer overflow checkfjoe2003-03-291-11/+11
|
* - MAXPATHLEN -> PATH_MAX (pass correct buffer size to readlink as well)fjoe2003-03-281-17/+17
| | | | Requested by: bde
* Make realpath() thread-safe. New implementation does not use chdir(2) at all.fjoe2003-03-272-111/+128
| | | | Submitted by: Constantin S. Svintsoff <kostik (at) iclub.nsu.ru>
* According to C99 decimal_point can't be emptyache2003-03-201-4/+1
|
* The gdtoa import apparently hasn't caused anything or anyone todas2003-03-151-2429/+0
| | | | | explode, so nix the old strtod() / dtoa(). This change is part of the gdtoa patches reviewed on standards@.
* Document strtof() and strtold(). Update vendor license.das2003-03-121-32/+75
| | | | Reviewed by: bde (briefly), mike (mentor), obrien
* Replace our ancient dtoa/strtod implementation with the gdtoadas2003-03-121-1/+1
| | | | | | | | | | | | | | | | | | package, a more recent, generalized set of routines. Among the changes: - Declare strtof() and strtold() in stdlib.h. - Add glue to libc to support these routines for all kinds of ``long double''. - Update printf() to reflect the fact that dtoa works slightly differently now. As soon as I see that nothing has blown up, I will kill src/lib/libc/stdlib/strtod.c. Soon printf() will be able to use the new routines to output long doubles without loss of precision, but numerous bugs in the existing code must be addressed first. Reviewed by: bde (briefly), mike (mentor), obrien
* Document the fact that hdestory calls free on the keys added withdwmalone2003-03-121-5/+25
| | | | | | | hsearch(.., ENTER). Make the example reflect this. PR: 49951 Submitted by: Peter Jeremy <peterjeremy@optushome.com.au>
* Fix typo.robert2003-02-251-1/+1
|
* Use strlcpy instead of strncpy.johan2003-02-221-2/+1
| | | | | Submitted by: imp Reviewed by: silence on -audit
* Back out "drop first N values" method of removing monotonically increasedache2003-02-171-7/+1
| | | | | | | | | | | | | | | seed->first value correlation. It breaks rand_r()... Other possible methods like shuffling inside aray will breaks rand_r() too, because it assumes only one word state, i.e. nothing extra can be added after seed assignment in srand(). BTW, for old formulae seed->first value correlation is not so monotonically increased as with other Linear Congruential Generators of this type only becase arithmetic overflow happens. But overflow affects distribution and lower bits very badly, as many articles says, such type of overflow not improves PRNG. So, monotonically increased seed->first value correlation problem remains...
* Since we drop NSHUFF values now, set default seed to what it becomesache2003-02-051-3/+3
| | | | after srand(1)
* For rand(3) and random(3) TYPE_0 drop NSHUFF values right after srand{om}()ache2003-02-042-6/+15
| | | | | | | to remove part of seed -> 1st value correlation. Correlation still remains because of algorithm limits. Note that old algorithm have even stronger correlation, especially in the lower bits area, but not eye-visible, as current one.
* Park & Miller PRNG can be safely initialized with any value but 0 and stuckache2003-02-032-2/+8
| | | | | | | at 0 as designed. Its BSD adaptation tries to fight it by mapping 0 to 2147483647 after calculation, but this method not works since 2147483647 seed returns to 0 again on the next interation. Instead of after calculation mapping, map 0 to another value _before_ calculation, so it never stucks.
* For some combinations of variable sizes and RAND_MAX value rand_r()ache2003-02-021-2/+4
| | | | may store less amount bits for seed, than available. Fix it.
* Catch some cases where asking for ridiculously large allocations couldphk2003-01-301-0/+4
| | | | result in a segfault. Instead just return NULL.
* Add an MLINK malloc.conf(5) -> malloc(3).mike2003-01-241-1/+2
|
* For "sensitive" processes, we always set the 'A' flag which causes abort()phk2003-01-231-0/+7
| | | | | | | | | | | | | to be called on first sight of trouble. "sensitive" is somewhat arbitrarily defined as "setuid, setgid, uid == root or gid == wheel". The 'A' option carries no performance penalty. It is not possible to override this setting: fix the program instead. Absentmindedly nodded OK to by: various
* realpath(3) should use PATH_MAX instead of MAXPATHLEN according to POSIX.johan2003-01-152-9/+9
| | | | | | | | This also reverts the PATH_MAX -> MAXPATHLEN part of rev 1.3 of src/bin/realpath/realpath.c Requested by: imp Reviewed by: imp, bde
* strfmon(3) does not correctly handle multibyte characters in thetjr2003-01-061-0/+6
| | | | format string.
* No need to include <assert.h> here.tjr2003-01-054-4/+0
|
* Fix three warnings:tjr2003-01-041-2/+2
| | | | | | o #include <stdio.h> to make sprintf()'s prototype visible. o Remove unused variable: sbuf. o Don't use assignment as truth value.
* style(9): return type on separate line from function name.tjr2003-01-042-2/+4
|
* Add missing #include "namespace.h".tjr2003-01-031-0/+1
|
* Remove unused variable: ntmp.tjr2003-01-031-1/+0
|
* #include <string.h> for strcmp()'s prototype.tjr2003-01-031-1/+2
|
* Implement POSIX grantpt(3) functionality, and add a pt_chown utility (akinjmallett2003-01-023-7/+491
| | | | | | | | to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes to the user being granted the pty. Submitted by: Ryan Younce <ryany@pobox.com> Reviewed by: security-officer@, standards@, mike@
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* mdoc(7) police: Deal with self-xrefs.ru2002-12-241-1/+1
|
* Document what really occurs when we obtain an error.trhodes2002-12-201-6/+9
| | | | | PR: 43357 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>
* mdoc(7) police: "The .Fa argument.".ru2002-12-192-1/+5
|
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.ru2002-12-1810-31/+32
|
* mdoc(7) police: "The .Fn function".ru2002-12-187-10/+34
|
* mdoc(7) police: sort xrefs in SEE ALSO.ru2002-12-131-1/+1
|
* Uniformly refer to a file system as "file system".ru2002-12-121-1/+1
| | | | Approved by: re
* mdoc(7) police: overhaul.ru2002-12-091-109/+232
| | | | Approved by: re
* mdoc(7) police: nits.ru2002-12-091-15/+18
| | | | Approved by: re
* Consistently mark std(in|out|err) with .Dv, because that's how theyru2002-12-042-3/+7
| | | | | | | are marked up in stdio(3), and because they are defined expressions of type "FILE *". Approved by: re
* mdoc(7) police: sweep.ru2002-11-291-11/+13
|
* mdoc(7) police: formatting nits.ru2002-11-293-12/+32
| | | | Approved by: re
OpenPOWER on IntegriCloud