Age | Commit message (Collapse) | Author |
|
The man page was already correct.
|
|
|
|
instead, #define to __builtin_alloca. if that doesn't work, you're hosed.
from an old discussion about the perils of alloca. (don't use alloca!)
|
|
to returning strong random by default, source from arc4random(3).
Parameters to the seeding functions are ignored, and the subsystems remain
in strong random mode. If you wish the standardized deterministic mode,
call srand_deterministic(), srandom_determistic(), srand48_deterministic(),
seed48_deterministic() or lcong48_deterministic() instead.
The re-entrant functions rand_r(), erand48(), nrand48(), jrand48() are
unaffected by this change and remain in deterministic mode (for now).
Verified as a good roadmap forward by auditing 8800 pieces of software.
Roughly 60 pieces of software will need adaptation to request the
deterministic mode.
Violates POSIX and C89, which violate best practice in this century.
ok guenther tedu millert
|
|
add siphash
delete setkey, encrypt, cfree
|
|
when creating them: mkostemp(), mkostemps(), the 'e' mode letter for
fopen(), freopen(), fdopen(), and popen(). The close-on-exec flag will
be cleared by the action created by posix_spawn_file_actions_adddup2().
Also, add support for the C11 'x' mode letter for fopen() and freopen(),
setting O_EXCL when possibly creating files.
Note: this requires kernel support for pipe2() and dup3()!
ok millert@
|
|
ok jsing@
|
|
malloc can, as always, be emulated via realloc(NULL).
ok deraadt
|
|
Like calloc(), except without the cleared-memory gaurantee
ok beck guenther, discussed for more than a year...
|
|
of size at least PATH_MAX. pread(2), pwrite(2) and readlinkat(2)
also take the buffer and the bound. OK theo.
|
|
|
|
moved them to unistd.h to match POSIX in 1995 but we never did.
The exception to this is getsubopt() which POSIX says should be in
stdlib.h. The non-standard suboptarg extern remains in the BSD-only
section of stdlib.h. Neither getsubopt() nor suboptarg belong in
unistd.h or getopt.h. They were only there to allow us to protect
all the getopt() bits from being multiply defined. OK guenther@
|
|
be using directly. Well, a few rare people cloned it upstream and it
will take a bit of time for them to learn.
ok various
|
|
Man page adapted from FreeBSD and NetBSD.
Bump libc minor now (there will be more upcoming changes).
input from tedu@
get it in deraadt@
|
|
grantpt() and unlockpt() using /dev/ptm. Man pages from FreeBSD.
OK kettenis@ deraadt@ beck@ ajacoutot@ naddy@
|
|
and valloc() are not in the current version, while posix_memalign() mkstemp(),
and mkdtemp() are, and setstate()'s argument has lost a bogus 'const'.
ok millert@ jmc@ espie@ kettenis@; ports build testing by naddy@
|
|
of NULL was incorrect for c++ compilers that aren't
gcc (or pretend to be gcc like clang).
ok miod@
|
|
Kernel and bootblocks still use the old 0L value until all the NULL abuses
in the code are fixed.
|
|
brad and millert, with hints from guenther, jmc, and otto I think.
ok previous.
|
|
standard explicitly disallows passing setenv a name with a '=' in
it but historic BSD behavior is to allow this but to ignore the '='
and anything after it.
|
|
- provide proper dtoa locks
- use the real strtof implementation
- add strtold, __hdtoa, __hldtoa
- add %a/%A support
- don't lose precision in printf, don't round to double anymore
- implement extended-precision versions of libc functions: fpclassify,
isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is
fixed
- separate vax versions of strtof, and __hdtoa
- add complex math support. added functions: cacos, casin, catan,
ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp,
clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf,
casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf,
ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf,
cimagf, conjf, cprojf, crealf
- add fdim, fmax, fmin
- add log2. (adapted implementation e_log.c. could be more acruate
& faster, but it's good enough for now)
- remove wrappers & cruft in libm, supposed to work-around mistakes
in SVID, etc.; use ieee versions. fixes issues in python 2.6 for
djm@
- make _digittoint static
- proper definitions for i386, and amd64 in ieee.h
- sh, powerpc don't really have extended-precision
- add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h
for LDBL_*
- merge lead to frac for m{6,8}k, for gdtoa to work properly
- add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa
to use
- add EXT_IMPLICIT_NBIT definition, which indicates implicit
normalization bit
- add regression tests for libc: fpclassify and printf
- arith.h & gd_qnan.h definitions
- update ieee.h: hppa doesn't have quad-precision, hppa64 does
- add missing prototypes to gdtoaimp
- on 64-bit platforms make sure gdtoa doesn't use a long when it
really wants an int
- etc., what i may have forgotten...
- bump libm major, due to removed&changed symbols
- no libc bump, since this is riding on djm's libc major crank from
a day ago
discussed with / requested by / testing theo, sthen@, djm@, jsg@,
merdely@, jsing@, tedu@, brad@, jakemsr@, and others.
looks good to millert@
parts of the diff ok kettenis@
this commit does not include:
- man page changes
|
|
|
|
except for gcc to get the wrong prototype. Ok millert@
|
|
call to strtod() with bounding check.
Discussed with pyr@ and otto@
ok otto@ deraadt@
|
|
introduce two new APIs for requesting strong random numbers:
arc4random_buf() - fill an arbitrary memory range with random numbers
arc4random_uniform() - return a uniformly distributed random number
below
a specified upper bound, avoiding the bias that comes from a naive
"arc4random() % upper_bound" construction.
these mirror similarly-named functions in the kernel;
lots of discussion deraadt@ mcbride@
|
|
|
|
|
|
updated but the function itself never was; ok millert
|
|
|
|
Add new sys/_types.h header
Include machine/_types.h or sys/_types.h where applicable
|
|
in sys/cdefs.h) instead of _FOO_SOURCE. Also fix several namespace
pollution issues, including the byte order defines. OK deraadt@
|
|
explicit about mktemp(3) in the man page.
|
|
* introduce the mbstate_t typedef.
impacts gnu libiconv, which has already been taken care of.
* Prepare for mb stuff to really exist, replace macro MB_CUR_MAX with
an external variable __mb_cur_max (impacts libX11 and various ports).
* use mbstate in all the mb <-> wchar functions with state.
* add a stub iswctype function allowing some ports to compile.
bash and gdiff are missing wcscoll, and need to be told there's no i18n
until this is fixed.
Discussed and matthieu, otto, millert, kettenis, deraadt.
Major libc bump
|
|
|
|
|
|
|
|
|
|
ok deraadt@
|
|
|
|
You must have an up-to-date gcc for this!
deraadt@ ok
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
getopt_long_only(). At some point this should replace the BSD
getopt(3) but we are not there yet.
While I am here add protection from the multiple getopt() definitions
due to conflicting standards.
|
|
|
|
when I committed atoll(3).
|
|
OK mickey@ and discussed with deraadt@
|
|
aliases to fake up strtou?q(). espie@ OK.
|
|
|
|
syntax error if the #define happens before stdlib.h is included.
If abs is #defined, #undef and issue a warning. This is similar
to what Tru64 UNIX does and is effectively the same as what happens
on Solaris (though on Solaris the real abs() is a macro).
|
|
outside the tree)
|
|
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
|