aboutsummaryrefslogtreecommitdiff
path: root/include/unistd.h
Commit message (Collapse)AuthorAgeFilesLines
* Various namespace cleanups, including exposing fchmod() and fchmodat()David Schultz2009-03-141-5/+4
| | | | | | | | | | in the POSIX namespace, and hiding eaccess() and setproctitle(). Also move mknodat() from unistd.h to sys/stat.h where it belongs. The *at() syscalls are only in CURRENT, so this shouldn't cause problems. Notes: svn path=/head/; revision=189817
* - Add getsid, fchdir, getpgid, lchown, pread, pwrite, truncate,David Schultz2009-03-041-26/+38
| | | | | | | | | *at, and fexecve to the POSIX.1-2008 namespace. - Remove getwd, ualarm, usleep, and vfork from the XSI namespace. - Remove mkdtemp from the POSIX.1-2008 namespace (should be in stdlib.h). Notes: svn path=/head/; revision=189351
* Move getosreldate(3) prototype from the machine generated <osreldate.h>Peter Wemm2008-09-261-0/+1
| | | | | | | | | to <unistd.h> in the BSD section. Suggested by: kib Notes: svn path=/head/; revision=183390
* posix_spawn() is supported, set _POSIX_SPAWN to 200212L.David Xu2008-07-081-1/+1
| | | | Notes: svn path=/head/; revision=180360
* Turn execvpe() into an internal libc routine.Ed Schouten2008-06-231-1/+0
| | | | | | | | | | | | | | | Adding exevpe() has caused some ports to break. Even though execvpe() is a useful routine, it does not conform to any standards. This patch is a little bit different from the patch sent to the mailing list. I forgot to remove execvpe from the Symbol.map (which does not seem to miscompile libc, though). Reviewed by: davidxu Approved by: philip Notes: svn path=/head/; revision=179947
* Add POSIX routines called posix_spawn() and posix_spawnp(), whichDavid Xu2008-06-171-0/+1
| | | | | | | | | | | | can be used as replacements for exec/fork in a lot of cases. This change also added execvpe() which allows environment variable PATH to be used for searching executable file, it is used for implementing posix_spawnp(). PR: standards/122051 Notes: svn path=/head/; revision=179838
* Add the restrict qualifiers to the pointer arguments of the readlinkat.Konstantin Belousov2008-04-101-1/+1
| | | | Notes: svn path=/head/; revision=178064
* Correct the prototype for the faccessat().Konstantin Belousov2008-04-011-1/+1
| | | | | | | Reported by: ru Notes: svn path=/head/; revision=177830
* Add the libc glue and headers definitions for the *at() syscalls.Konstantin Belousov2008-03-311-0/+11
| | | | | | | | | | Based on the submission by rdivacky, sponsored by Google Summer of Code 2007 Reviewed by: rwatson, rdivacky Tested by: pho Notes: svn path=/head/; revision=177791
* Added the "restrict" type-qualifier to the readlink() prototype.Ruslan Ermilov2008-02-261-1/+1
| | | | Notes: svn path=/head/; revision=176607
* Change readlink(2)'s return type and type of the last argumentRuslan Ermilov2008-02-121-1/+1
| | | | | | | | | to match POSIX. Prodded by: Alexey Lyashkov Notes: svn path=/head/; revision=176215
* _POSIX_THREAD_CPUTIME is now supported.David Xu2008-01-181-1/+1
| | | | Notes: svn path=/head/; revision=175431
* Add a feature_present(3) function which checks to see if a named kernelJohn Baldwin2008-01-101-0/+1
| | | | | | | | | feature is present by checking the kern.features sysctl MIB. MFC after: 1 week Notes: svn path=/head/; revision=175220
* Forgot to commit this file: add definition for _SC_PHYS_PAGES.Pawel Jakub Dawidek2006-12-141-0/+3
| | | | Notes: svn path=/head/; revision=165230
* barrier and spin_lock had already been implemented in libpthread andDavid Xu2005-12-021-2/+2
| | | | | | | | libthr for a long time, set both _POSIX_BARRIERS and _POSIX_SPIN_LOCKS to 200112L. Notes: svn path=/head/; revision=153005
* Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightlyXin LI2005-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different from what has been offered in libc_r (the one spotted in the original PR which is found in libthr has already been removed by David's commit, which is rev. 1.44 of lib/libthr/thread/thr_private.h): - Use POSIX standard prototype for ttyname_r, which is, int ttyname_r(int, char *, size_t); Instead of: char *ttyname_r(int, char *, size_t); This is to conform IEEE Std 1003.1, 2004 Edition [1]. - Since we need to use standard errno for return code, include errno.h in ttyname.c - Update ttyname(3) implementation according to reflect the API change. - Document new ttyname_r(3) behavior - Since we already make use of a thread local storage for ttyname(3), remove the BUGS section. - Remove conflicting ttyname_r related declarations found in libc_r. Hopefully this change should not have changed the API/ABI, as the ttyname_r symbol was never introduced before the last unistd.h change which happens a couple of days before. [1] http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html Requested by: Tom McLaughlin <tmclaugh sdf lonestar org> Through PR: threads/76938 Patched by: Craig Rodrigues <rodrigc crodrigues org> (with minor changes) Prompted by: mezz@ Notes: svn path=/head/; revision=146186
* Connect MLINKS for ttyname_r(3), and add prototype into unistd.h.Xin LI2005-05-111-0/+1
| | | | Notes: svn path=/head/; revision=146099
* - Declare mknod in stat.h (in addition to unistd.h), as per XSI.David Schultz2005-03-221-0/+3
| | | | | | | | | - Use blksize_t and blkcnt_t in struct stat. - Hide non-standard fields in stat.h when !__BSD_VISIBLE. - Add restrict qualifiers in stat.h. Notes: svn path=/head/; revision=143952
* According to the information on:Tom Rhodes2004-12-101-1/+6
| | | | | | | | | | | | | | http://www.opengroup.org/onlinepubs/009695399/functions/swab.html the prototype for swab() should be in <unistd.h> and not in <string.h>. Move it, and update to match SUS. Leave the prototype in string.h for now, for backwards compat. PR: 74751 Submitted by: Craig Rodrigues <rodrigc@crodrigues.org> Discussed with: das Notes: svn path=/head/; revision=138659
* Remove nfsclnt() prototype.Poul-Henning Kamp2004-12-071-1/+0
| | | | Notes: svn path=/head/; revision=138508
* Add optreset to getopt.h too since NetBSD getopt_long() (but not GNU one)Andrey A. Chernov2004-02-231-0/+3
| | | | | | | use it too. Notes: svn path=/head/; revision=126142
* Try to better mimic GNU getopt.h which does not assume to make visibleAndrey A. Chernov2004-02-231-0/+3
| | | | | | | all unistd.h functions, use _GETOPT_DECLARE define for that. Notes: svn path=/head/; revision=126141
* POSIX clearly states that getsubopt() should be declared in <stdlib.h>,Andrey A. Chernov2004-02-231-5/+0
| | | | | | | not in <unistd.h> Notes: svn path=/head/; revision=126136
* Change the definition of NULL on ia64 (for LP64 compilations) fromMarcel Moolenaar2003-12-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an int constant to a long constant. This change improves consistency in the following two ways: 1. The first 8 arguments are always passed in registers on ia64, which by virtue of the generated code implicitly widens ints to longs and allows the use of an 32-bit integral type for 64-bit arguments. Subsequent arguments are passed onto the memory stack, which does not exhibit the same behaviour and consequently do not allow this. In practice this means that variadic functions taking pointers and given NULL (without cast) work as long as the NULL is passed in one of the first 8 arguments. A SIGSEGV is more likely the result if such would be done for stack-based arguments. This is due to the fact that the upper 4 bytes remain undefined. 2. All 64-bit platforms that FreeBSD supports, with the obvious exception of ia64, allow 32-bit integral types (specifically NULL) when 64-bit pointers are expected in variadic functions by way of how the compiler generates code. As such, code that works correctly (whether rightfully so or not) on any platform other than ia64, may fail on ia64. To more easily allow tweaking of the definition of NULL, this commit removes the 12 definitions in the various headers and puts it in a new header that can be included whenever NULL is to be made visible. This commit fixes GNOME, emacs, xemacs and a whole bunch of ports that I don't particularly care about at this time... Notes: svn path=/head/; revision=123257
* Update gethostname() prototype to match source and standard.Garrett Wollman2003-08-191-1/+1
| | | | Notes: svn path=/head/; revision=119141
* Fixed namespace pollution and unsorting of the 1003.1-1990 list inBruce Evans2003-07-011-1/+1
| | | | | | | previous commit. Notes: svn path=/head/; revision=117105
* Add a libc function execvP that takes the search path as an arguement.Gordon Tetlow2003-06-291-0/+1
| | | | | | | | | | | Change execvp to be a wrapper around execvP. This is necessary for some of the /rescue pieces. It may also be more generally applicable as well. Submitted by: Tim Kientzle <kientzle@acm.org> Approved by: Silence on arch@ Notes: svn path=/head/; revision=117030
* o Add typedef for off_t, pid_t, and useconds_t.Mike Barcroft2002-12-291-6/+17
| | | | | | | | o Use useconds_t where appropriate. o Fix a bug in typedef for uid_t (5.0-R candidate). Notes: svn path=/head/; revision=108381
* This is David Schultz's swapoff code which I am finally able to commit.Matthew Dillon2002-12-151-0/+1
| | | | | | | | | | This should be considered highly experimental for the moment. Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> MFC after: 3 weeks Notes: svn path=/head/; revision=107913
* Fix XSI (X/Open) namespace support.Mike Barcroft2002-11-121-11/+18
| | | | Notes: svn path=/head/; revision=106812
* Create a small library function, check_utility_compat(3), to determineGarrett Wollman2002-10-281-0/+1
| | | | | | | | | | | whether a named utility should behave in FreeBSD 4.x-compatible mode or in a standard mode (default standard). The configuration is done malloc(3)-style, with either an environment variable or a symlink. Update expr(1) to use this new interface. Notes: svn path=/head/; revision=106065
* Update limits and configuration parameters for 1003.1/TC1/D6.Garrett Wollman2002-10-271-0/+3
| | | | | | | | | | | | | | Implement new sysconf keys. Change the implenentation of _SC_ASYNCHRONOUS_IO in preparation for the next set of changes. Move some limits which had been in <sys/syslimits.h> to <limits.h> where they belong. They had only ever been in syslimits.h to provide for the kernel implementation of the CTL_USER MIB branch, which went away with newsysctl years ago. (There is a #error in <sys/syslimits.h> which I will downgrade in the next commit.) Notes: svn path=/head/; revision=106055
* Move the _POSIX_VERSION constant from <unistd.h> to <sys/unistd.h>, soMike Barcroft2002-10-131-2/+1
| | | | | | | that it can be used in-kernel for a sysctl. Notes: svn path=/head/; revision=105045
* Back down to 1003.2-1992 for the time being -- it is causing too manyGarrett Wollman2002-09-251-1/+1
| | | | | | | headaches for common but deprecated uses of standard utilities. Notes: svn path=/head/; revision=103929
* o Move select() helper macros from <sys/types.h> to <sys/select.h>.Mike Barcroft2002-09-231-0/+5
| | | | | | | | | | | | | o Include <sys/select.h> from <sys/types.h> in the __BSD_VISIBLE case, so applications and base software can be slowly updated. o Prototype select() in <sys/select.h>. It was previously only prototyped in <unistd.h>. o Add some XXX's to <sys/types.h>. Reviewed by: -standards Notes: svn path=/head/; revision=103867
* Define constants for those POSIX options and option groups which areGarrett Wollman2002-09-211-18/+237
| | | | | | | | | | | | | | | | | | | | (or would be) implemented (or not) exclusively in user-land. A threads expert should check over the values I have set to make sure that they correctly reflect reality. Move all sysconf() keys here from <sys/unistd.h> as they are not implemented in the kernel. Add new keys from 1003.1-2001 final text. (Some additional keys are expected in TC1.) Add some protection against redundant declarations between <stdlib.h> and <unistd.h> for some functions which XSI requires in the former and BSD traditionally declares in the latter. Restrict qualifiers and other changes from 1003.1-2001 have not been made to the functions prototyped here. (3 of 5) Notes: svn path=/head/; revision=103729
* Style: One space between "restrict" qualifier and "*".Tim J. Robbins2002-09-061-2/+2
| | | | Notes: svn path=/head/; revision=103012
* o Merge <machine/ansi.h> and <machine/types.h> into a new headerMike Barcroft2002-08-211-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien Notes: svn path=/head/; revision=102227
* Support POSIX/SUS ``programming environment'' mistake in confstr().Garrett Wollman2002-07-151-0/+15
| | | | Notes: svn path=/head/; revision=100149
* Move _CS_PATH from <sys/unistd.h> to <unistd.h> -- the kernel isn't involvedGarrett Wollman2002-07-151-0/+2
| | | | | | | in confstr() processing. Notes: svn path=/head/; revision=100147
* getopt(3) was also added in 1003.2-1992.Garrett Wollman2002-07-151-4/+4
| | | | Notes: svn path=/head/; revision=100145
* Fix visibility:Garrett Wollman2002-07-151-11/+14
| | | | | | | | | | - symlink() is from 1003.1-2001 and XPG4.2 - fchown() is from 1003.1-2001 - fsync() is from ISO/IEC 9945-1:1995 - confstr() is from 1003.2-1992 Notes: svn path=/head/; revision=100140
* Partially fix namespace visibility issues by using new visibility macros.Garrett Wollman2002-06-151-38/+70
| | | | | | | | Some issues still remain, and will require research in old POSIX standards if we care to get them right. Notes: svn path=/head/; revision=98269
* o Implement <sys/_types.h>, a new header for storing types that areMike Barcroft2002-04-011-1/+26
| | | | | | | | | | | | | | | | | | MI, not required to be a fixed size, and used in multiple headers. This will grow in time, as more things move here from <sys/types.h> and <machine/ansi.h>. o Add missing type definitions (uint16_t and uint32_t) to <arpa/inet.h> and <netinet/in.h>. o Reduce pollution in <sys/types.h> by using `#if _FOO_T_DECLARED' widgets to avoid including <sys/stdint.h>. o Add some missing type definitions to <unistd.h> and note the ones that still need to be added. o Make use of <sys/_types.h> primitives in <grp.h> and <sys/types.h>. Reviewed by: bde Notes: svn path=/head/; revision=93514
* Breath deep and take __P out of the system include files.Warner Losh2002-03-231-151/+148
| | | | | | | | | # This appears to not break X11, but I'm having problems compiling the # glide part of the server with or without this patch, so I can't tell # for sure. Notes: svn path=/head/; revision=93032
* Change brk's prototype from char *brk(const char *) to int brk(const void *)David Malone2002-01-241-2/+2
| | | | | | | | | | | | | | | | | | and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t). This makes us more consistant with NetBSD and standards which include these functions. Bruce pointed out that ptrdiff_t would probably have been better than intptr_t, but this doesn't match other implimentations. Also remove local declarations of sbrk and unnecessary casting. PR: 32296 Tested by: Harti Brandt <brandt@fokus.gmd.de> MFC after: 1 month Notes: svn path=/head/; revision=89732
* Use the proper type (gid_t) for (group)->gr_gid to be orthogonalMark Murray2002-01-221-2/+2
| | | | | | | | | with uid_t usage and (user)->pw_uid. PR: 3242 Notes: svn path=/head/; revision=89663
* Fix support for K&R C.Mike Barcroft2001-12-221-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=88399
* NFS split forgot to prototype nfsclnt() syscall, do it.Alfred Perlstein2001-11-131-0/+1
| | | | Notes: svn path=/head/; revision=86317
* - Put missing prototype for rcmd() in <unistd.h>.Ruslan Ermilov2001-11-091-0/+2
| | | | | | | | | | - Clean up the manpage. - style(9) rcmdsh.c. Committed from: BSDCon/EU 2k+1 terminal room Notes: svn path=/head/; revision=86214