summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* change Xrs from now-defunct db(3) to dbopen(3); this wasn;t ajmc2015-11-302-6/+6
| | | | | | | straight replace: thanks both to schwarze and maja for feedback on how to rewrite parts; i've snuck in an rcs id->openbsd id change in dev_mkdb too;
* Wrap <icdb.h> so that calls go direct and the symbols are all weakguenther2015-11-251-1/+12
| | | | ok tedu@
* Don't fake a bulleted list by prefixing items with 'o'.bentley2015-11-241-8/+8
| | | | ok jmc@
* add a version field to prevent mayhem if different data gets storedtedu2015-11-181-3/+7
|
* update for new symbols and codetedu2015-11-181-2/+2
|
* Add icdb, the internal c database. A simpler replacement for the oldtedu2015-11-181-0/+367
| | | | Berzerkeley DB code.
* update NAME section to include all documented functions,jmc2015-11-101-3/+3
| | | | | | or otherwise change Dt to reflect the name of an existing function; feedback/ok schwarze
* libc.so can't be unloaded, so move the hidden atexit() and pthread_atfork()guenther2015-11-101-1/+13
| | | | | | | | | | | stubs for the executable from crtbegin.o into libc, which lets them be excluded from static links that don't use them. For this, drop the normal crt{begin,end}S.o from libc.so: the .init and .fini sections for libc aren't called at the right times anyway, so it's good that they're unused. libc.so just needs __guard_local and the .note.openbsd.ident section, so add them to stack_protector.c for now (this will be improved) "good time" deraadt@
* Move the _atfork_list definition to atexit.c so that the fork syscall stubguenther2015-10-251-1/+5
| | | | | | doesn't get pulled into all static executables ok millert@ jca@
* Hide __atexit and __atexit_register_cleanup()guenther2015-10-252-2/+9
| | | | | | | | Wrap __cxa_{atexit,finalize}() so the call from exit() goes direct Switch regress/lib/libc/atexit/ to be built with -static so that it can still access __atexit* ok millert@ jca@
* Use sigaction() instead of signal() to avoid pulling in unnecessaryguenther2015-10-251-3/+5
| | | | | | | wrappers. To keep uses from crawling back in, mark signal() as deprecated inside libc. ok deraadt@
* Loop the waitpid() on EINTR, and save and restore the disposition ofguenther2015-10-231-9/+12
| | | | | | | SIGINT and SIGQUIT with sigaction() instead of signal() so that all bits are preserved. ok deraadt@ millert@
* Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadguenther2015-10-231-4/+3
| | | | | | | | | into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between single- and multi-threaded programs and is a step in the merge of all the libpthread overloads, providing some ASM and Makefile bits that the other wrappers will need. ok deraadt@ millert@
* In rev 1.15 the sizeof argument was fixed in a strlcat() call butmillert2015-10-131-2/+2
| | | | | | the truncation check immediately following it was not updated to match. Not an issue in practice since the buffers are the same size. OK deraadt@
* Eliminate the last of the LINTEDn and PRINTFLIKEn comments. In oneguenther2015-10-011-4/+2
| | | | | | | case, by deleting some useless '& of an array' we also eliminate the need for the casts which prompted the original lint warnings ok deraadt@
* lint is dead: delete useless LINTLIBRARY commentsguenther2015-09-262-4/+2
| | | | ok millert@
* Don't wrap initialized variables: binutils appears to be mishandling themguenther2015-09-191-1/+3
| | | | | | on arm and m88k problems with optind observed by jsg@
* Only two of the *rand48.c files need <math.h>, so just #include it in themguenther2015-09-143-4/+5
|
* use .Va for global variables, and .Vt where the type is includedschwarze2015-09-141-4/+3
|
* Remove cast of int* to int*guenther2015-09-141-2/+2
|
* For now, permit overriding of the malloc family, to make emacs happyguenther2015-09-131-6/+6
|
* Overshot w/PROTO_DEPRECATED: seed48_deterministic() is used internallyguenther2015-09-131-1/+2
|
* Wrap <stdlib.h> so that calls go direct and the symbols not in theguenther2015-09-1320-24/+49
| | | | | | C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
* Wrap <inttypes.h> and finish wrapping of <wchar.h> so that calls go directguenther2015-09-122-2/+4
| | | | and the symbols not in the C standard are weak
* Wrap <getopt.h> to make the functions weak and make access to the initializedguenther2015-09-121-1/+6
| | | | variables go direct. (Common variables cannot be aliased.)
* Pull in namespace.h when building all .c files using gcc's -include option,guenther2015-09-101-2/+1
| | | | | | | | so that we can provide asm labels for the memcpy/memset/__stack_smash_handler calls that it generates ab initio. Eliminate direct #includes of it. Make sure it's a dependency of all objects (unnecessary for asm, but close enough). ok deraadt@
* reduce .Nd to one line and kill .Tn while hereschwarze2015-09-105-25/+15
|
* missing commas at the end of .Nm lines in the NAME sectionschwarze2015-09-101-3/+3
|
* Move the __rand48_* declarations into rand48.h, and then hide both themguenther2015-08-277-25/+13
| | | | | | and __dorand48() and __rand48_deterministic ok deraadt@
* All these files include <stdlib.h>, so do not need to castderaadt2015-08-202-5/+5
| | | | malloc/calloc/realloc* returns.
* Just return if nmemb is 0. Avoids a NULL dereference and ismillert2015-06-211-1/+4
| | | | | consistent with the behavior of the other libc sort functions. OK deraadt@
* Add dlclose(3) to SEE ALSOguenther2015-05-121-2/+3
| | | | ok millert@ jmc@ schwarze@
* When checking flags that will be passed to open(), test the O_ACCMODE portionguenther2015-05-111-2/+3
| | | | | | separately to avoid false negatives. ok miod@ millert@
* Another couple of commas in the wrong place, ok jmcnicm2015-04-141-3/+3
|
* Make pthread_atfork() track the DSO that called it like atexit() does,guenther2015-04-071-1/+19
| | | | | | | | | | unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread. verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
* improve realloc. when expanding a region, actually use the free page cachetedu2015-04-061-7/+16
| | | | | instead of simply zapping it. this can save many syscalls in a program that repeatedly grows and shrinks a buffer, as observed in the wild.
* remove incorrect statement. the standard *does* require calloc to checktedu2015-03-141-7/+2
| | | | | for overflow. stop talking about old broken systems, there's little use for such info.
* lsearch and lfind return void *tedu2015-02-151-4/+4
|
* Use .Rv where appropriate, and move it to RETURN VALUES;schwarze2015-01-292-18/+7
| | | | | remove .Tn, and a few minor macro adjustments. Patch from Kaspars at Bankovskis dot net.
* Improve wording in alloca.tedu2015-01-171-7/+5
| | | | | | | 1. it's not a bug; it's a caveat. 2. "slightly unsafe" gives me the willies. 3. one .Xr to malloc should suffice ok deraadt jmc
* Move to the <limits.h> universe.deraadt2015-01-163-9/+6
| | | | review by millert, binary checking process with doug, concept with guenther
* missing , found by Dongsheng Songderaadt2015-01-081-3/+3
|
* rename kern enter/exit macros to malloc enter/leave to better reflecttedu2015-01-051-7/+7
| | | | what's going on.
* typo; ok deraadtsthen2014-12-162-3/+3
|
* warn for correct symbolderaadt2014-12-161-2/+2
|
* Xr and Ox fixes;jmc2014-12-093-12/+18
|
* random seed buffer must be unsignedderaadt2014-12-091-2/+2
|
* fix NAME;jmc2014-12-091-3/+3
|
* improve warnings from rand_r(), rand(), and random()libressl-v2.1.2deraadt2014-12-092-3/+8
| | | | | It may take a few iterations to get the tone right. previously discussed with millert
* more standardsier: cast to int to make sure we keep the negative numbers.tedu2014-12-091-2/+2
| | | | observed by jonas termansen