summaryrefslogtreecommitdiff
path: root/src/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Give clear directions on how to declare, PROTO_*() and DEF_*() new symbolsguenther2015-11-141-0/+97
| | | | prodded by deraadt@
* update NAME section to include all documented functions,jmc2015-11-106-18/+18
| | | | | | 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@
* inet(4), not inet(3);jmc2015-11-081-3/+3
|
* delete old lint ARGSUSED commentsguenther2015-11-011-2/+1
|
* 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@
* The only thing that was translated into multiple languages in OpenBSDbluhm2015-10-251-23/+1
| | | | | | | | | are the errno messages and signal names. Everything else is in English. We are not planning to translate more text. Running a mixed system with less than 1% of the text in native language makes no sense. So remove the NLS support from libc messages. The catopen(3) functions stay as they are. OK stsp@ mpi@
* 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@
* Switch if_nameindex(3) to use the new NET_RT_IFNAMES sysctl to get theclaudio2015-10-233-88/+73
| | | | | | | | list of interface names. At the same time switch if_nametoindex(3) and if_indextoname(3) to use if_nameindex(3) instead of getifaddrs(3). if_nameindex(3) exposes much less then getifaddrs(3) and is allowed by pledge(2). With and OK deraadt@
* Use waitpid() instead of wait() to avoid returning early from another childguenther2015-10-231-2/+3
| | | | | | exiting, and loop the waitpid() on EINTR ok deraadt@ millert@
* 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-232-9/+9
| | | | | | | | | 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@
* Cast ctype function arguments to unsigned char.mmcc2015-10-221-2/+2
| | | | ok guenther@
* 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@
* Wrap <resolv.h> so that internal calls go directguenther2015-10-053-5/+11
| | | | ok millert@
* wrap __ivaliduser_sa() so the internal call is direct (at least until weguenther2015-10-041-0/+2
| | | | stop exporting it)
* recv() and send() aren't overriden by libpthread (vs recvfrom() and sendto()!)guenther2015-10-042-2/+4
| | | | so wrap them to make internal calls go direct
* Eliminate the last of the LINTEDn and PRINTFLIKEn comments. In oneguenther2015-10-016-15/+7
| | | | | | | 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
|
* Wrap <ifaddrs.h>, <netinet/in.h>, and <netinet/if_ether.h> so internalguenther2015-09-143-3/+7
| | | | calls go direct and all the symbols are weak
* Wrap <net/if.h> and <net/if_dl.h> so internal calls go direct and all theguenther2015-09-142-2/+4
| | | | symbols are weak
* Remove cast of int* to int*guenther2015-09-141-2/+2
|
* Finish wrapping <netdb.h> so that calls go direct and the symbols are all weakguenther2015-09-149-9/+24
|
* Wrap <arpa/inet.h> and <arpa/nameser.h> so that calls go direct and theguenther2015-09-135-5/+11
| | | | symbols without underbar prefix are all weak
* For now, permit overriding of the malloc family, to make emacs happyguenther2015-09-131-6/+6
|
* Wrap <pwd.h> so that calls go direct and the symbols are all weak.guenther2015-09-132-7/+8
| | | | Hide bcrypt_autorounds(), prefixing with an underbar for static builds.
* Overshot w/PROTO_DEPRECATED: seed48_deterministic() is used internallyguenther2015-09-131-1/+2
|
* The number of rounds is just two digits in the salt. We've alreadymillert2015-09-131-2/+2
| | | | | verified that they are there via isdigit() so we can convert from ASCII to an int without using atoi(). OK guenther@ deraadt@
* Wrap <stdlib.h> so that calls go direct and the symbols not in theguenther2015-09-1322-26/+54
| | | | | | 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.
* __strsignal() is now declared in hidden/signal.hguenther2015-09-121-2/+0
|
* Wrap <inttypes.h> and finish wrapping of <wchar.h> so that calls go directguenther2015-09-1224-24/+51
| | | | and the symbols not in the C standard are weak
* Wrap <unistd.h> so that internal calls go direct and they're all weak symbolsguenther2015-09-126-4/+12
| | | | Delete unused 'fd' argument from internal function oldttyname()
* 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.)
* _getnetbyaddr and _getnetbyname appear to be historical accidents inderaadt2015-09-113-103/+2
| | | | our tree. ok guenther miod
* Wrap blowfish, sha*, md5, and rmd160 so that internal calls go directguenther2015-09-112-2/+24
| | | | ok deraadt@
* Add support for building arc4random with MSVC.bcook2015-09-101-7/+8
| | | | | | | By default, MSVC's stdlib.h defines min(), so we need to spell out something less common to avoid picking it up. ok deraadt@ beck@ miod@
* Pull in namespace.h when building all .c files using gcc's -include option,guenther2015-09-102-3/+18
| | | | | | | | 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
|
* tweak Nd after previous; ok mpijmc2015-09-101-2/+2
|
* Remove link_addr(3). A function to encode the name of an interface inmpi2015-09-103-136/+8
| | | | | | | | | | | | a sockaddr_dl is a questionnable interface. But now it makes it harder to properly reference ifp becauses of this. Set sdl_index to the index of the corresponding interface when constructing a routing message. Ridding previous libc crank. ok guenther@, deraadt@, dlg@
* Stop exporting from libc the <mpool.h> and the mpool_* APIguenther2015-09-091-0/+122
| | | | ports scan by sthen@
* Fix aliasing of sys_errlist, sys_nerr, sys_siglist, and sys_signameguenther2015-09-062-15/+4
| | | | | | to eliminate duplicate copies of the tables and get direct access internally ok kettenis@ deraadt@
* Use new framework for wrapping cat{open,gets,close}(), eliminatingguenther2015-09-052-8/+2
| | | | | | _cat* in the process. ok kettenis@