summaryrefslogtreecommitdiffstats
path: root/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rearrange variables in dump / restore to handle -fno-common.mortimer2021-01-211-2/+2
| | | | | | Largely following the commit by mckusick in FreeBSD. ok naddy@
* Move Makefiles for libc++ and libc++abi to gnu/lib in preparation for anpatrick2021-01-021-2/+2
| | | | | | | | upcoming update to those, which will see both codebases heading into the gnu/llvm dumpster. Feedback from jsg@ ok deraadt@ kettenis@
* Hook up agentx.h.martijn2020-10-261-4/+4
| | | | OK deraadt@
* Align the basename(3) and dirname(3) prototypes with the POSIX spec:naddy2020-10-201-3/+3
| | | | | | | Both functions take a non-const parameter. Implementations may modify the passed string, even though ours do not. ok stsp@ deraadt@ millert@
* add format string checking annotations for dprintf(3) and vdprintf(3)naddy2020-09-111-3/+7
| | | | ok millert@ deraadt@
* Use __STDC_VERSION__ instead of __ISO_C_VISIBLE to guard _Static_assert.millert2020-09-061-2/+2
| | | | | | We need to test what the compiler supports, not what the C library provides. This prevents static_assert from being defined when compiling with the in-tree gcc (4.2.1) which does not support _Static_assert.
* Add C11's static_assert.bentley2020-09-051-1/+6
| | | | | | tested in a bulk by naddy@ previously submitted by jsg@ and Martin Wanvik ok millert@
* Fix TIB/TCB on powerpc64. Some bright sould decided that the TCB shouldkettenis2020-07-141-1/+6
| | | | | | | | | | | be 8 bytes in the 64-bit ABI just like in the 32-bit ABI. But that means there is no "spare" word in the TCB that we can use to store a pointer to our struct pthread. So we have to treat powerpc64 special. Also recognize that the thread pointer points 0x7000 bytes after the TCB. Since the TCB is 8 bytes this means that TCB_OFFSET should be 0x7008. Pointed out by guenther@; ok deraadt@
* Allow switching between alternate devices (-F option) with sndioctl(1)ratchov2020-06-281-1/+1
|
* Add a new SIOCTL_SEL control type to select one of a predefined set ofratchov2020-06-281-2/+3
| | | | | mutually exclusive values. It's the same as SIOCTL_LIST except that exactly one list element may be selected.
* Fix comments about sioctl_desc's maxval fieldratchov2020-06-181-3/+3
|
* Use a double-underscore prefix for local variables declared in macrosguenther2020-05-101-23/+23
| | | | | | | that have arguments. Document this requirement/recommendation in style(9) prompted by mpi@ ok deraadt@
* Add API to control audio device parameters exposed by sndiod.ratchov2020-02-261-1/+50
| | | | | | | | | | | | | The API exposes controls of modern audio hardware and sndiod software volume knobs in a uniform way. Hardware knobs are exposed through sndiod. Multiple programs may use the controls at the same time without the need to continuously scan the controls. For now sndiod exposes only its own controls and the master output and input volumes of the underlying hardware (if any), i.e. those typically exposed by acpi volume keys. ok deraadt
* RDIRS for libcbor and libfido2djm2019-11-141-3/+3
|
* Allow the caller of asr functions to create and use a specific context.otto2019-10-241-1/+3
| | | | | Diff from eric@ and florian@, commiting on their behalf since they are absent and we want to ride the minor shlib bump.
* add /usr/local/sbin. ok deraadt millerttedu2019-07-111-3/+3
|
* Include pthread.h to make this header standalone (needs pthread_t and others)jca2019-05-281-1/+3
| | | | Will get us rid of pointless patches in the ports tree. ok guenther@
* Inroduce malloc_conceal() and calloc_conceal(). Similar to theirotto2019-05-101-1/+3
| | | | | counterparts but return memory in pages marked MAP_CONCEAL and on free() freezero() is actually called.
* ld.so boot cleanup support:guenther2019-05-101-1/+23
| | | | | | | | | | | | | | | | | - put functions and data which are only used before calling the executable's start function into their own page-aligned segments for unmapping (only done on amd64, arm64, armv7, powerpc, and sparc64 so far) - pass .init_array and .preinit_array functions an addition argument which is a callback to get a structure which includes a function that frees the boot text and data - sometimes delay doing RELRO processing: for a shared-object marked DF_1_INITFIRST do it after the object's .init_array, for the executable do it after the .preinit_array - improve test-ld.so to link against libpthread and trigger its initialization late libc changes to use this will come later ok kettenis@
* unbreak make includes on non-clang archs after libobjc removaljsg2019-04-061-3/+2
| | | | found the hard way by nayden@ ok deraadt@
* Build and install a shared libLLVM, llvm-config and llvm includes.jsg2019-03-051-2/+3
| | | | | | This is required to build the radeonsi Mesa driver. ok patrick@
* enable libelfjsg2019-02-041-2/+2
|
* add a pthread_get_name_np to match pthread_set_name_np.tedu2019-02-041-1/+2
| | | | | | could be useful in ports. initial diff by David Carlier some time ago. ok jca
* Make gl_pathc, gl_matchc and gl_offs size_t in glob_t to match POSIX.millert2019-02-041-4/+10
| | | | This requires a libc major version bump. OK deraadt@
* I am retiring my old email address; replace it with my OpenBSD one.millert2019-01-255-10/+10
|
* There are cases where a program doing dns requests wants to set theotto2019-01-141-1/+2
| | | | | Checking Disabled flag. Introduce a RES flag to do so. ok krw@ deraadt@ eric@
* Our *int_fast{8,16}_t types are int/unsigned int, so SCN*FAST{8,16}guenther2018-11-221-11/+11
| | | | | | | shouldn't include 'hh' or 'h'. problem noted by Andreas Kusalananda Kähäri (andreas.kahari(at)abc.se) ok deraadt@ martijn@
* Introducing malloc_usable_size() was a mistake. While some otherotto2018-11-211-2/+1
| | | | | | | | | | | libs have it, it is a function that is considered harmful, so: Delete malloc_usable_size(). It is a function that blurs the line between malloc managed memory and application managed memory and exposes some of the internal workings of malloc. If an application relies on that, it is likely to break using another implementation of malloc. If you want usable size x, just allocate x bytes. ok deraadt@ and other devs
* Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man pageotto2018-11-181-1/+2
|
* Implement C11's aligned_alloc(3). ok guenther@otto2018-11-051-1/+6
|
* Add C11's timespec_get(3); minor bump for libc.guenther2018-10-301-2/+9
| | | | | | Tweaked diff from brad@ manpage tweaks florian@ and jmc@ ok deraadt@ millert@
* Add uid_from_user() and gid_from_group(), derived from pax's cache.c.millert2018-09-132-4/+6
| | | | | | It replaces the existing pwcache.c functions user_from_uid(3) and group_from_gid(3) with the pax equivalents. Adapted from NetBSD (mycroft) changes from our own pax's cache.c. OK guenther@
* Add _PATH_AUTHPROGDIR = "/usr/libexec/auth", this path will be usedderaadt2018-07-291-1/+2
| | | | | | to unveil. Unfortunately the auth subsystem uses _PATH_AUTHPROG = "/usr/libexec/auth/login_", which it auth-program is appended to -- a rather gross idea which now shows lack of wisdom.
* Unveiling unveil(2).beck2018-07-131-1/+2
| | | | | | | | | | | | | This brings unveil into the tree, disabled by default - Currently this will return EPERM on all attempts to use it until we are fully certain it is ready for people to start using, but this now allows for others to do more tweaking and experimentation. Still needs to send the unveil's across forks and execs before fully enabling. Many thanks to robert@ and deraadt@ for extensive testing. ok deraadt@
* The open POSIX test suite reveals that sigpause(int sigmask) frombluhm2018-05-301-2/+3
| | | | | | | 4.2 BSD takes a signal mask as argument while POSIX sigpause(int sig) expects a single signal. Do not expose our traditional BSD sigpause(3) to XPG/POSIX sources. OK guenther@
* Consistently spell "IPsec" in comments and debug outputs.mpi2018-03-161-2/+2
| | | | From Raf Czlonka, ok sthen@
* Implement sicos(3), sincosf(3) and sincosl(3). These functions are commonkettenis2018-03-101-1/+12
| | | | | | | extensions and modern compilers (such as clang) will use them to optimize separate calculations of sine and cosine. ok tom@, patrick@, deraadt@, jmc@
* #define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an archderaadt2018-03-051-2/+2
| | | | | | | | | | needs (looking at you sgi, but others required this before). This is for the circumstances we need pagesize known at compile time, not getpagesize() runtime. Use it for malloc storage sizes, for shm, and to set pthread stack default sizes. The stack sizes were a mess, and pushing them towards page-aligned is healthy move (which will also be needed by the coming stack register checker) ok guenther kettenis, discussion with stefan
* pledge()'s 2nd argument becomes char *execpromises, which becomes thederaadt2017-12-121-2/+2
| | | | | | | | | | pledge for a new execve image immediately upon start. Also introduces "error" which makes violations return -1 ENOSYS instead of killing the program ("error" may not be handed to a setuid/setgid program, which may be missing/ignoring syscall return values and would continue with inconsistant state) Discussion with many florian has used this to improve the strictness of a daemon
* Add a member to be used by __cxa_thread_atexit(). Remove padding which wouldkettenis2017-11-281-6/+4
| | | | | | now misalign things. ok guenther@
* Implement a DL_REFERENCE dlctl. To be used by the upcomingkettenis2017-11-281-1/+2
| | | | | | __cxa_thread_atexit() implementation. ok guenther@
* Revert recent changes to unbreak ports/net/sambajca2017-11-041-32/+3
| | | | | | | | While it is not clear (to me) why that ports ends up with corrupted shared libs, reverting those changes fixes the issue and should allow us to close p2k17 more smoothly. Discussed with a bunch, ok ajacoutot@ guenther@
* Change pthread_cleanup_{push,pop} to macros that store the cleanup infoguenther2017-10-281-3/+32
| | | | | | | | | | | | | | on the stack instead of mallocing the list and move the APIs from libpthread to libc so that they can be used inside libc. Note: the standard was explicitly written to permit/support this "macro with unmatched brace" style and it's what basically everyone else already does. We xor the info with random cookies with a random magic to detect/trip-up overwrites. Major bump to both libc and libpthread due to the API move. ok mpi@
* <elf.h> should make it easier to port our ELF-related tools to other Unices.mpi2017-10-172-2/+14
| | | | | | | | For the moment it only includes <sys/exec_elf.h> but the goal is to stop pulling it directly and also replace <elf_abi.h> at least for base applications. ok deraadt@, jasper@, naddy@
* Move the thread-related .h files to /usr/src/include/, since theguenther2017-10-155-13/+528
| | | | | | | implementation is now spread between libc and librthread. No changes to the content ok mpi@
* Use the modern POSIX idiom "-exec ... {} +" instead of find|xargs andnaddy2017-10-061-5/+4
| | | | | combine the two find(1) invocations into one. From Klemens Nanni; ok tb@
* str[n]casecmp_l(3) appeared in POSIX 2008, not in XPG 4;schwarze2017-09-101-1/+3
| | | | | phessler@ reported that this oversight broke an armv7 bulk build; OK guenther@
* New POSIX xlocale implementation written from scratch.schwarze2017-09-059-13/+234
| | | | | | | | | | | | Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8. With important help from kettenis@, guenther@, and jca@. Repeated testing in ports bulk builds by naddy@. Additional testing by jca@, sebastia@, dcoppa@, and others. OK kettenis@ dcoppa@, and guenther@ on an earlier version. Riding guenther@'s libc/librthread major bump.
* fix typo in commentguenther2017-08-101-2/+2
|
* ___errno (three underbars) is long goneguenther2017-08-101-2/+1
|