summaryrefslogtreecommitdiff
path: root/include/unistd.h
AgeCommit message (Collapse)Author
2015-10-09tame -> pledge.Theo de Raadt
2015-09-09Move to next tame() API. The flags are now passed as a very simple string,Theo de Raadt
which results in tame() code placements being much more recognizeable. tame() can be moved to unistd.h and does not need cpp symbols to turn the bits on and off. The resulting API is a bit unexpected, but simplifies the mapping to enabling bits in the kernel substantially. vague ok's from various including guenther doug semarie
2015-08-26Hide many (194!) symbols that nothing should be using.Philip Guenther
Delete exect(2); it wasn't portable across archs and nothing used it. ports test build by naddy@ ok deraadt@ kettenis@
2014-12-13claim posix 2008 compat. apparently people look at this and get scaredTed Unangst
when it's really old. but no actual ports fallout in espie's build. ok deraadt
2014-12-11update swab() to match the current posix definition. "rationale: none."Ted Unangst
rewrite the function to be simpler as well. the compiler can unroll the loop for us if necessary. ok schwarze
2014-12-08header changes for recent libc changes:Ted Unangst
add siphash delete setkey, encrypt, cfree
2014-11-21change prototype for crypt_newhash. the login_cap_t is a holdover from itsTed Unangst
pwd_gensalt origins, but a string argument works equally work and is more friendly to consumers beyond local user accounts. ok deraadt
2014-09-18Our setpgrp() is the BSD version with two args and not the XSIPhilip Guenther
version with zero args, so it should only be visible if __BSD_VISIBLE (and not also for __XPG_VISIBLE). Contrawise, readlink() has been part of base POSIX since 1995, so move to proper #if area for that. Move crypt_checkpass() to the pure-BSD section of the file. setpgrp() issue noted by Matti Karnaattu (mkarnaattu (at) gmail.com) ok millert@
2014-09-01Sync readlink(2) with IEEE Std 1003.1-2008.Doug Hogan
discussion, help and ok guenther@
2014-08-31Declare and document getthrid()Philip Guenther
indirectly prodded by krw@
2014-08-31Add additional kernel interfaces for setting close-on-exec on fdsPhilip Guenther
when creating them: pipe2(), dup3(), accept4(), MSG_CMSG_CLOEXEC, SOCK_CLOEXEC. Includes SOCK_NONBLOCK support. ok matthew@
2014-07-08update _POSIX2_FORT_RUN, so that sysconf(_SC_2_FORT_RUN) remains correct.Ted Unangst
because you care. reminded by matthew.
2014-06-14Change return value of getentropy() to int 0 for success. MaximumTheo de Raadt
buffersize is enforced strictly, this supplies sufficient entropy payload to act as seed material. Discourage general use of this API, but lock down this function name as the go-to for userland PRNG seeding. Improve documentation. ok miod matthew
2014-06-13Add new getentropy() system call. Code and pressure from matthew.Theo de Raadt
I accepted that he's right (again) to seperate this out from heavy sysctl API and this will simply a variety of things. Functionname is not used by anyone in the ports tree, so we guess we can use it. Shocking that no application has a function called this. ok matthew & others who pushed him to start this early on
2014-05-16add prototypes for new crypt functionsTed Unangst
2014-04-21Use internal '__' names for __attributes__ in public headersPhilip Guenther
2014-04-01Define intptr_t in <unistd.h> as specified by POSIXMatthew Dempsky
ok millert
2013-12-28Annotate a few more bounded functions: realpath(3) needs a bufferMartynas Venckus
of size at least PATH_MAX. pread(2), pwrite(2) and readlinkat(2) also take the buffer and the bound. OK theo.
2013-12-04express final disapproval of the interfaces in libcompat, such asTheo de Raadt
them ftime(), gtty(), stty(), re_comp(), cuserid() and others. Discussion and ongoing work to fix the ports tree from many, especially naddy. ok naddy [There is a bit more cleanup possible after that, but this is considered the current safe step]
2013-11-22The getopt() prototype and externs don't belong in stdlib.h. BerkeleyTodd C. Miller
moved them to unistd.h to match POSIX in 1995 but we never did. The exception to this is getsubopt() which POSIX says should be in stdlib.h. The non-standard suboptarg extern remains in the BSD-only section of stdlib.h. Neither getsubopt() nor suboptarg belong in unistd.h or getopt.h. They were only there to allow us to protect all the getopt() bits from being multiply defined. OK guenther@
2013-10-24Align suseconds_t with POSIX: it's the type of the tv_usec member of timeval.Philip Guenther
Use useconds_t in the ualarm() declaration. Bump libstdc++ major to be sure there isn't ABI issues. ok deraadt@ jca@ jmc@ millert@ ports testing by landry@
2013-06-17Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,Philip Guenther
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and {clock,pthread}_getcpuclockid() functions. Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@ ok matthew@
2013-06-04Enable the _POSIX_SHARED_MEMORY_OBJECTS option group now that we have ↵Brad Smith
shm_open / shm_unlink. ok guenther@
2013-04-15Implement fdatasync() as a wrapper around fsync()Matthew Dempsky
ok guenther, deraadt, jmc
2013-04-11getpgid() and getsid() were rolled into POSIX in 2008Philip Guenther
ok millert@
2013-03-01Adds the (somewhat silly) _CS_V[67]_ENV and _CS_POSIX_V[67]_* definesPhilip Guenther
to <unistd.h> and confstr(3) per POSIX 1003.1-2008 Change confstr(_CS_PATH) to operate directly instead of calling sysctl(3) ports build tested by espie@
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-06-21__tfork() needs to set the stack address of the new thread in the kernel,Philip Guenthe
so that it can't get a signal while still running on the parent thread's stack. Also, pass in sizeof(struct __tfork) to provide forward compat when more members are added. This is an ABI change, so switch syscall numbers and bump lib majors this time. ok deraadt@ matthew@
2012-05-30Move the _SC_* and _CS_* configurable system variables and stringsMatthew Dempsky
from sys/unistd.h to unistd.h. From Brad; ok millert and me
2012-05-14More sysconf(3)-y and pathconf(3)-y goodness from Brad.Matthew Dempsky
ok guenther, millert (and me); bulk build test by naddy
2012-04-12remove rfork(); ok guenther miodTheo de Raadt
2012-04-12prototype getdtablecount()Theo de Raadt
2012-03-21Implement execvpe(3) and posix_spawn(3) and family. Based onMatthew Dempsky
FreeBSD's implementation via Frank Denis, with various cleanups and tweaks by me. ok deraadt@, guenther@; discussions and tweaks from many others jmc@ promises to help me further with the man pages in tree
2012-01-13Replace _SELECT_DECLARED with _SELECT_DEFINED_Nigel Taylor
Ok sthen@, millert@, dcoppa@
2011-11-09getcwd() buffer's length can be smaller than 1024. In that case it willFederico G. Schwindt
fail with errno set to ERANGE if not enough room is provided. Similar for getlogin_r() so remove minbytes enforcement attribute. ok kettenis@ guenther@ deraadt@ on getcwd, deraadt@ on getlogin_r.
2011-07-18Expose a bunch of new functionality from POSIX 2008: openat(2),Matthew Dempsky
fchmodat(2), fstatat(2), mkdirat(2), mkfifoat(2), mknodat(2), faccessat(2), fchownat(2), linkat(2), readlinkat(2), renameat(2), symlinkat(2), unlinkat(2), utimensat(2), futimens(2), and fdopendir(3). "Minor" libc bump. Tested in a bulk build by naddy@ Much help from guenther@, thib@, tedu@, oga@, and others. ok deraadt@, naddy@
2011-07-03As pointed out by Richard Guenther our definitionJonathan Gray
of NULL was incorrect for c++ compilers that aren't gcc (or pretend to be gcc like clang). ok miod@
2011-04-06Define NULL as a void * instead of a long integer, as required by Single Unix.Miod Vallat
Kernel and bootblocks still use the old 0L value until all the NULL abuses in the code are fixed.
2008-06-25Move _POSIX_THREAD_SAFE_FUNCTIONS into unistd.h and set it to 200112Todd C. Miller
now that we support all the _r functions required by POSIX 1003.1-2001. Also define _POSIX_REENTRANT_FUNCTIONS. OK kurt@ deraadt@
2008-04-29Remove duplicate psignal(3) and sys_siglist definitions. signal.hKurt Miller
is the correct place for them and nothing gets them from here in base/xenocara/ports. no objection millert@ okay kettenis@
2008-04-24- correct brk(2) prototype and man page to match implementation and POSIX.Kurt Miller
brk(2) returns an int value not a void *. brk(2) returns 0 upon success not a pointer to the new end of memory. okay millert@, kettenis@, deraadt@
2006-12-20zap bogus sentinel, as noticed by dasn.Marc Espie
okay theo
2006-08-28zap argument name, okay millert@Marc Espie
2005-12-13First step in include files overhaul. Use __FOO_VISIBLE (as definedTodd C. Miller
in sys/cdefs.h) instead of _FOO_SOURCE. Also fix several namespace pollution issues, including the byte order defines. OK deraadt@
2005-11-24undelete died a while back; millert okTheo de Raadt
2005-11-21Move contents of sys/select.h to sys/selinfo.h in preparation for aTodd C. Miller
userland-visible sys/select.h. Consistent with what Net and Free do. OK deraadt@, tested with full ports build by naddy@.
2005-11-20brk() and sbrk() should use void *, not char *. Note that sbrk()Todd C. Miller
should take intptr_t, not int, but we don't presently have intptr_t available from unistd.h. OK marco@
2005-05-27mktemp(3) et al. go in stdlib.h, not unistd.h. While there be moreTodd C. Miller
explicit about mktemp(3) in the man page.
2004-01-13Prototype closefrom(); tedu@ OKTodd C. Miller
2003-08-07des_cipher 3rd param is int32_t not longTheo de Raadt