summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
AgeCommit message (Collapse)Author
2003-11-26improve random number generation by using largest 31-bit primejdolecek
as denominator; regenerate the randtbl[] with new generator patch provided in lib/22853 by KIHARA Hideto; code actually present in libkern/random.c since 1994/06/03 matches similar change done in glibc in 1995, and FreeBSD & OpenBSD in 1996
2003-10-27Overhaul how `build.sh tools' are used:lukem
* Rename "config.h" to "nbtool_config.h" and HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H. This makes in more obvious in the source when we're using tools/compat/config.h versus "standard autoconf" config.h * Consistently move the inclusion of nbtool_config.h to before <sys/cdefs.h> so that the former can provide __RCSID() (et al), and there's no need to protect those macros any more. These changes should make it easier to "tool-ify" a program by adding: #if HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h" #endif to the top of the source files (for the general case).
2003-10-05Style fixes to reduce diff size against the FreeBSD version, notably:junyoung
- Use NULL where appropriate. - No need to pull in stdint.h. - Get rid of "register" keywords in the hope that the compiler will do a better job for us. :-) - Every message ends with a period. - MMAP() macro is supposed to return MAP_FAILED rather than -1 if it fails. - De-__P.
2003-09-23Slight syncing with OpenBSD version.wiz
2003-09-19add warning on realloc() size de-synchronization. from openbsditojun
2003-09-10Use standard section headers, suggested by jmc@openbsd. Sort sections.wiz
2003-09-10Pull over some improvements from OpenBSD's v1.26 of this file, includingwiz
SEE ALSO and RETURN VALUES sections.
2003-09-10getopt return value has to be held in int, not char.itojun
2003-09-09Fix typos and declare a missing variable in example. From Quentin Garnier in ↵wiz
PR 22733.
2003-09-08Use St -isoC-9X instead of St -isoC9X, to be in sync with groff.wiz
2003-09-07Fix typos in comments; from Brian Poole via jmc@openbsd.wiz
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-07-26netbsd.org->NetBSD.orgsalo
2003-07-23call malloc_init() on first call to free/realloc, to make malloc.conf toitojun
take effect. in response to PR 22223
2003-06-27Remove superfluous comma.wiz
2003-06-27Quote question mark.wiz
2003-06-03Add atoll(3) to libnbcompat. We need it when building target's gccuwe
for a 64-bit target on a 32-bit host. NB: There seems to be a bug in either gcc itself or the way we import it, b/c the incorrect #define HAVE_ATOLL is picked from (e.g. for sparc64) gnu/usr.bin/gcc/arch/sparc64/auto-host.h - so when gen* auxilary (host) programs are built in gnu/usr.bin/gcc/backend, they incorrectly pick-up target's HAVE_ATOLL. For now providing atoll(3) in libnbcompat is a simple and sufficient workaround.
2003-05-29KNF example: NULL vs. 0, space after switch.kleink
2003-05-10Misc fixes from jmc@openbsd.wiz
2003-04-16Usewiz
.In header.h instead of .Fd #include \*[Lt]header.h\*[Gt] Much easier to read and write, and supported by groff for ages. Okayed by ross.
2003-04-13Warn if the old unsetenv() is referenced.kleink
2003-04-07Observed in other places: move __unsetenv13.c near unsetenv.c, onlykleink
group name space wrappers separately.
2003-04-07unsetenv(3) returns "int" nowdrochner
2003-04-07compile unsetenv(3) into libc or you'll mess up your systemdrochner
2003-04-071003.1-2001 has introduced unsetenv() which differs from the currentkleink
implementation in not permitting a "name=value" argument. * Add a conforming __unsetenv13() and do function renaming for unsetenv(); preserve old symbol with old behavior. * Make visible setenv() and unsetenv() for 1003.1-2001 feature selection macros; resolves PR standards/20479.
2003-03-19When implementing a recursive mutex, it helps if you remember tonathanw
decrement the recursion count. Fixes the problem of uic dying with a no-next-thread assertion while building kdeadmin3; reported by Perry Metzger and others on tech-pkg.
2003-03-04Don't acquire __environ_lock around exec*() calls; nothing requiresnathanw
that these calls be thread-safe with respect to the environment, and it causes serious problems for threaded applications which call vfork() and exec*() (including indirectly, via popen() or system()). Acquire and release __environ_lock in the parent in popen() and system() to play safe and provide the child with a stable environment. __environ_lock should also have an atfork() handler; still under development.
2003-03-04Fix lib/20558:thorpej
A dynamically linked program invokes the rtld cleanup routine via an atexit handler. This rtld cleanup routine invokes _fini() for shared libraries, which in-turn invoke __cxa_finalize() with their DSO handle. By luck, this happens to work okay for non-threaded programs, but for a threaded program, this leads to deadlock (sometimes manifested as an assertion failure, if the program didn't actually create any threads). Fixed by teaching __cxa_finalize() that it can be recursively invoked, adjusting the handler list manipulation accordingly.
2003-03-01Add _Exit(), for C99 and POSIX-2001.bjh21
Proposed on tech-userlevel to a resounding silence in April last year.
2003-03-01Rewrite atexit(3), and add support for __cxa_atexit()/__cxa_finalize(),thorpej
as specified by the C++ ABI for Itanium. Despite the ABI document's name, many of the items in it are implemented for other architectures. See the following URL for a reference: http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor Fixes lib/18379 (from Joel Baker).
2003-02-08Use definition in "namespace.h" to rename functions, not home grown.itohy
2003-01-29Provide some more details for papers by Bentley/M.D. McIlroy and byheinz
P.M. McIlroy (after short e-mail conversation with M.D. McIlroy on www@).
2003-01-20Fix lib/17248 properlydsl
'ls -l-' now reports unknown option -- - 'env -' and 'su -' both work ok (change approved by christos)
2003-01-18s/_REENT/_REENTRANT/christos
2003-01-18Merge the nathanw_sa branch.thorpej
2002-12-09Add a couple of missing THREAD_UNLOCK's, for the error exit path.chris
No functional change on Mainline, however SA branch probably needs this.
2002-11-29a <-> an fixes.wiz
2002-11-29add strsuftoll(3) and strsuftollx(3) - parse a string for a numberlukem
with an optional suffix, product (two numbers separated by `x'), and provide range checking
2002-11-15Fix indent in sample code.enami
2002-11-11Fix signed/unsigned comparison warnings.thorpej
2002-11-11Fix signed/unsigned comparison warnings.thorpej
2002-10-06pull in config.h (et al) for libnbcompatlukem
2002-10-02Grammar fixes and markup improvements.wiz
2002-10-02completely with only one "el".wiz
2002-10-01New sentence, new line. From Robert Elz.wiz
2002-08-20Mark up NULL and ENOMEM.wiz
2002-08-20Remove superfluous double quotes and a superfluous Ns.wiz
2002-08-11bring in EXAMPLES and a note.yamt
from openbsd.
2002-08-11bring in EXAMPLES from OpenBSD.yamt
2002-08-11- more description about realloc.yamt
- mention errno. - add FILES section for malloc.conf. from openbsd.