summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
AgeCommit message (Collapse)Author
1999-12-02Change the declaration of the argv argument to getopt(3) from "char * const *"kleink
(as originally declared in System V) to "char * const []", as was done in 1003.2 and subsequently propagated into XPG4. From Andrew Cagney in PR lib/8930.
1999-11-26check __sh3__msaitoh
1999-11-19Typos (from OpenBSD)kristerw
1999-11-19Don't pass so many args to .Nd macro. It just overflows.enami
1999-09-20back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.lukem
_DIAGASSERT() is still retained.
1999-09-16* use _DIAGASSERT() to check pointer arguments against NULL and filelukem
descriptors against -1 (as appropriate). * add actual checks which to detect stuff that would trigger_DIAGASSERT(), and attempt to return a sane error condition. * knf some code * remove some `register' decls. the first two items result in the addition of code similar to the following in various functions: _DIAGASSERT(path != NULL) #ifdef _DIAGNOSTIC if (path == NULL) { errno = EFAULT; return (-1); } #endif
1999-09-16whitespace knflukem
1999-09-10Restore the behaviour of not setting errno to ENOMEM when allocating 0kleink
units of storage and returning a null pointer in System V mode; this was broken by the `fix' in rev. 1.24. Also, as it is stated in ISO C that such operation does not constitute an allocation failure, do not abort() even if the `X' option is set. Amusingly enough the SVID, Fourth Edition, specifies the `unique pointer' return behaviour for this kind of allocation, so this is kind of mis-named.
1999-08-22Need "namespace.h".kleink
1999-08-17Make some needed weak aliases.mycroft
1999-08-02replace malloc(3) with one from freebsd which documents our new malloc.clukem
(also from freebsd). comment out references to reallocf with .\"XXX" for now. i also fixed some roff misuse as well. replace calloc(3), free(3) and realloc(3) with links to malloc(3)
1999-07-23 getopt long functionalitymcr
1999-07-08Make sure errno is set to ENOMEM if we return NULL.thorpej
1999-07-05index -> ldx (and similar in some related variable names). Avoids a lintthorpej
warning.
1999-07-05Oops, back out 1.21. Christos and I apparently stepped on each other.thorpej
1999-07-05s/index/idx/christos
s/EXTRA_SANITY/MALLOC_EXTRA_SANITY/ const poisoning use sysconf to get the pagesize
1999-07-05Compute page size related parameters at run-time.thorpej
1999-07-05EXTRA_SANITY -> MALLOC_EXTRA_SANITY, consistently.thorpej
1999-07-04Only define MADV_FREE do MADV_DONTNEED if it's not already definedthorpej
by <sys/mman.h>.
1999-06-26The 'new malloc' (phk's malloc, from FreeBSD) is now our only malloc.tls
1999-06-17add FreeBSD's malloc, compiled in only if MALLOC_NEW is set in mk.conftls
1999-05-03add a const castaway lint comment.christos
1999-04-06Fix typo noted by NAKAJIMA Yoshihiro in PR lib/7328.tron
1999-03-22Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,garbled
so we shouldn't override it with versions in the manpages. Wheee!
1999-03-22Add 3 additional slots to the statically allocated exit handler array tokleink
guarantee the ANSI-defined 32 registrations being possible despite those exit handler registrations made by the startup code (a.out: 2, ELF: 3).
1999-03-09Add missing .El lines.erh
1999-02-24use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriatedrochner
libc builds on pmax again
1999-02-22t{search,find,walk,delete} from OpenBSD via Neil A. Carsonchristos
1999-02-07getopt() does not return -1 when encountering an unknown option.bad
Also, minor KNF nit in an example.
1999-02-06Serialize freelist access with a mutex.kleink
1999-02-06Add l64a_r(), a reentrant version of l64a(); found in the Multithreadingkleink
Extension of SVID4.
1999-02-06Changes from Niklas Hallqvist from OpenBSD. Commit message there was:simonb
Make code ANSI/ISO C conformant. Formerly undefined constructs were used making load/store architectures (like mips&alpha) fail whn compiled with gcc -O2. Tested on mips and i386 ok. Can someone with an alpha test this please?
1999-01-29Protect access of state with a mutex. Miscellaneous notes:kleink
* still needs an implementation-independent ("reentrant.h") method for disabling cancellation, * break a leg to leave realloc() `storage compaction' as was for non-reentrant code, * use of stdio in assertion code is unsafe.
1999-01-091003.2-92 specifies the string "--" to be recognized as the option listkleink
delimiter as opposed to any string merely beginning with '-''-'; change to match the standard. From Simon J. Gerraty <sjg@quick.com.au> in PR lib/6762.
1998-11-16Since we are forcing unsigned shifts for portability, define Unsigned_shiftschristos
1998-11-15delintchristos
1998-10-19Slight formatting glitch.kleink
1998-10-19More vax -> __vax__ cruft.matt
1998-10-18Protect __atexit manipulation and traversal with a mutex.kleink
1998-10-12Exit via _exit() rather than exit(), as the latter would cause exit handlerskleink
installed using atexit() to be executed which is supposed to happen on `normal termination' of the process only, whereas abort() is specifically defined to cause `abnormal termination'.
1998-09-26Adapt to posix signal system calls.christos
1998-09-11Add a multiple-reader/single-writer lock to protect environ.kleink
1998-09-09Addendum to previous commit: remove stdio usage from sections during whichkleink
random_mutex is locked, because * a cancellation point may occur during fprintf(), and no cancellation handler had been installed, and * the XSH5 specifcation of these functions does not permit output to stderr. Therefore, in initstate() and setstate(), return a null pointer if the supplied state is not valid. This also fixes a bug in setstate() which caused corrupt state information being used despite printing an error message.
1998-09-09Add a mutex to protect the state.kleink
1998-08-29first pass at fixing up capitalization of function names andlukem
arguments; ensure that each is correct with respect to the implementation, rather than being correct as per english.
1998-08-26make memcpy into memmove in some casesperry
1998-08-10bzero->memset, bcopy->memcpy, bcmp->memcmpperry
1998-07-29English.ross
1998-07-26const poisoning.mycroft
1998-07-26constify some tables.mycroft