summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2019-04-06unbreak make includes on non-clang archs after libobjc removalJonathan Gray
found the hard way by nayden@ ok deraadt@
2019-03-05Build and install a shared libLLVM, llvm-config and llvm includes.Jonathan Gray
This is required to build the radeonsi Mesa driver. ok patrick@
2019-02-04enable libelfJonathan Gray
2019-02-04add a pthread_get_name_np to match pthread_set_name_np.Ted Unangst
could be useful in ports. initial diff by David Carlier some time ago. ok jca
2019-02-04Make gl_pathc, gl_matchc and gl_offs size_t in glob_t to match POSIX.Todd C. Miller
This requires a libc major version bump. OK deraadt@
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.Todd C. Miller
2019-01-14There are cases where a program doing dns requests wants to set theOtto Moerbeek
Checking Disabled flag. Introduce a RES flag to do so. ok krw@ deraadt@ eric@
2018-11-22Our *int_fast{8,16}_t types are int/unsigned int, so SCN*FAST{8,16}Philip Guenther
shouldn't include 'hh' or 'h'. problem noted by Andreas Kusalananda Kähäri (andreas.kahari(at)abc.se) ok deraadt@ martijn@
2018-11-21Introducing malloc_usable_size() was a mistake. While some otherOtto Moerbeek
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
2018-11-18Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man pageOtto Moerbeek
2018-11-05Implement C11's aligned_alloc(3). ok guenther@Otto Moerbeek
2018-10-30Add C11's timespec_get(3); minor bump for libc.Philip Guenther
Tweaked diff from brad@ manpage tweaks florian@ and jmc@ ok deraadt@ millert@
2018-09-13Add uid_from_user() and gid_from_group(), derived from pax's cache.c.Todd C. Miller
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@
2018-07-29Add _PATH_AUTHPROGDIR = "/usr/libexec/auth", this path will be usedTheo de Raadt
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.
2018-07-13Unveiling unveil(2).Bob Beck
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@
2018-05-30The open POSIX test suite reveals that sigpause(int sigmask) fromAlexander Bluhm
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@
2018-03-16Consistently spell "IPsec" in comments and debug outputs.Martin Pieuchot
From Raf Czlonka, ok sthen@
2018-03-10Implement sicos(3), sincosf(3) and sincosl(3). These functions are commonMark Kettenis
extensions and modern compilers (such as clang) will use them to optimize separate calculations of sine and cosine. ok tom@, patrick@, deraadt@, jmc@
2018-03-05#define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an archTheo de Raadt
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
2017-12-12pledge()'s 2nd argument becomes char *execpromises, which becomes theTheo de Raadt
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
2017-11-28Add a member to be used by __cxa_thread_atexit(). Remove padding which wouldMark Kettenis
now misalign things. ok guenther@
2017-11-28Implement a DL_REFERENCE dlctl. To be used by the upcomingMark Kettenis
__cxa_thread_atexit() implementation. ok guenther@
2017-11-04Revert recent changes to unbreak ports/net/sambaJeremie Courreges-Anglas
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@
2017-10-28Change pthread_cleanup_{push,pop} to macros that store the cleanup infoPhilip Guenther
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@
2017-10-17<elf.h> should make it easier to port our ELF-related tools to other Unices.Martin Pieuchot
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@
2017-10-15Move the thread-related .h files to /usr/src/include/, since thePhilip Guenther
implementation is now spread between libc and librthread. No changes to the content ok mpi@
2017-10-06Use the modern POSIX idiom "-exec ... {} +" instead of find|xargs andChristian Weisgerber
combine the two find(1) invocations into one. From Klemens Nanni; ok tb@
2017-09-10str[n]casecmp_l(3) appeared in POSIX 2008, not in XPG 4;Ingo Schwarze
phessler@ reported that this oversight broke an armv7 bulk build; OK guenther@
2017-09-05New POSIX xlocale implementation written from scratch.Ingo Schwarze
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.
2017-08-10fix typo in commentPhilip Guenther
2017-08-10___errno (three underbars) is long gonePhilip Guenther
2017-05-11arc4random_buf should be bounded buffer, not bounded stringTom Cosgrove
ok millert@
2017-05-10Add bounded attribute to freezero(). OK tom@Todd C. Miller
2017-04-20Get TCB address using the RDHWR instruction instead of __get_tcb().Visa Hankala
This gives fast access to the address on systems that implement the UserLocal register. TCB caching is still used when running in the single-threaded mode in order not to penalize old systems. The kernel counterpart of this change must be in place before using this diff! With guenther@
2017-04-17Change build infrastructure to allow building both gcc and clang. ThisMark Kettenis
doesn't actually flip the switch yet, so aarch64 continues to be the only architecture for which we build clang. ok jsg@, deraadt@
2017-04-10Introducing freezero(3) a version of free that guarantees the processOtto Moerbeek
no longer has access to the content of a memmory object. It does this by either clearing (if the object memory remains cached) or by calling munmap(2). ok millert@, deraadt@, guenther@
2017-03-12<struct.h> is unused and should not be used. Delete it.Philip Guenther
ok millert@ deraadt@ kettenis@
2017-03-09As per style.9, prototypes should not have variable names associatedFrederic Cambus
with the types. OK jca@
2017-03-06Introducing recallocarray(3), a blend of calloc(3) and reallocarray(3)Otto Moerbeek
with the added feature that released memory is cleared. Much input from various developers. ok deraadt@ tom@
2017-02-04The macro versions of htonl et al don't require them, but POSIX saysPhilip Guenther
<arpa/inet.h> needs to provide uint16_t and uint32_t. ok millert@ krw@ naddy@
2017-02-04Move the typedefs for in_{addr,port}_t from <sys/types.h> toPhilip Guenther
<netinet/in.h> and <arpa/inet.h> ok and ports test naddy@ (thanks!) ok krw@ beck@ millert@
2017-01-27install libcxxabi and libcxx headers when COMPILER_VERSION is clangJonathan Gray
ok patrick@
2017-01-06Add max_align_t.Mark Kettenis
ok millert@
2016-11-12Kill the /usr/include/ssl symlinkJeremie Courreges-Anglas
Proposed some time ago by tedu@, builk build by ajacoutot@
2016-11-08Set owners and permissions only after all headers are installed. Add the -PTheo Buehler
flag to chown to change the symlinks themselves instead of their targets. Also change permissions of all symlinks, so they don't depend on the umask during make build. ok millert
2016-10-16Move libcrypto, librpcsvc and gnu/usr.bin/cc/include from RDIRS to PRDIRS,Theo Buehler
and add prereq targets, so some header files are generated by BUILDUSER during 'make prereq' instead of by root during 'make includes'. Switch the order of 'make cleandir' and 'make includes' during 'make build' so we don't generate many files twice. Except for some machine@ symlinks from ${MACHINE}/stand, /usr/obj is now clean from files generated by root during 'make build'. Those will be cleaned up in a second step. help, testing & ok deraadt, input from natano, further testing rpe
2016-09-23Unhook sqlite3.Stuart Henderson
2016-09-20Remove duplicated includes in stdlib.h and termios.hFrederic Cambus
OK guenther@
2016-09-20Add dl_unwind_find_exidx prototype.Mark Kettenis
ok guenther@
2016-09-12Don't declare select() in <unistd.h>Philip Guenther
ok deraadt@ millert@