Commit Graph

151 Commits

Author SHA1 Message Date
christos fb69ccbd92 more type protection macro lossage. 2018-11-18 19:22:23 +00:00
martin a9fb6a0f33 PR standards/53525: move getsubopt() to stdlib.h 2018-08-15 10:21:42 +00:00
christos 3c15acfdbe fix typo 2018-02-06 20:22:41 +00:00
christos 4e8153bc86 detect duplicate declaration of pthread_atfork() in pthread.h 2018-02-06 20:21:21 +00:00
dholland ae3b3bcc2b PR 51287 Ralf Nolden: posix_fallocate belongs in <fcntl.h> 2016-06-30 15:29:20 +00:00
kamil e3d1905862 Use generic types in the profil(2) function prototype (<unistd.h>) 2016-06-18 14:39:15 +00:00
wiz fc5db8c0e8 Put fseeko, ftello, pread, and pwrite in the POSIX 2001 namespace.
Ok christos, apb, martin
2015-03-24 07:44:52 +00:00
christos 5a70401cf6 PR/49684: Pierre Pronchery: readlinkat(2) return type is wrong. 2015-02-22 00:50:30 +00:00
christos 718924c8d3 add execvpe, execlpe (reviewed by phone) 2014-09-26 19:28:03 +00:00
dholland d0352e761c Add userlevel manifestations of posix_fallocate and fdiscard, in
unistd.h and libc, and add a man page.

Allow wiggle room in the man page for implementations of fallocate
that either (a) don't fully unwind on failure, leaving new blocks
allocated without changing the file size, or (b) create only in-memory
transient reservations that disappear when crashing or rebooting.

Also, add crossreference to fdiscard from ftruncate(2), and remove the
old BUGS entry from there that called for a generalized version that
allows discarding ranges of a file: that's what fdiscard is.
2014-07-25 08:30:47 +00:00
christos e00a3615cf add mkostemp{s,} mkstemps from FreeBSD 2014-06-18 17:48:22 +00:00
christos a012ad3d35 PR/4891: Wiz: readlink moved from xopen to base at issue 5. 2014-01-02 23:33:50 +00:00
njoly 0d88813605 Follow OpenGroup online specification[1], move
fchmodat/mkdirat/mkfifoat/mknodat prototypes to <sys.stat.h>.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
2013-10-09 09:38:21 +00:00
dholland 196f95b039 Remove #if defined(_KERNEL) around a userlevel function. 2013-01-12 17:17:26 +00:00
skrll 6da0cd6163 Check for _NETBSD_SOURCE being defined wherever we check for
_INCOMPLETE_XOPEN_C063 so that we expose the new POSIX extended API set
recently added.
2012-12-01 13:28:18 +00:00
manu a76c1cc17f Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
2012-11-18 17:41:51 +00:00
darrenr 3ec957d580 bin/46703: BSD r-commands use wrong source address for stderr
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46703
Bump libc minor for the addition of rresvport_af_addr()
2012-07-14 15:06:26 +00:00
christos e457beb983 new flag. 2012-04-14 01:34:08 +00:00
christos ffed4f27af add more options. 2012-04-13 23:29:14 +00:00
christos 5d7ab7f99c add timeout to getpassfd. 2012-04-13 14:39:49 +00:00
christos 311b90b920 add GETPASS_ECHO_STAR 2012-04-12 23:16:38 +00:00
christos 7def94a8ad add getpassfd 2012-04-12 22:08:02 +00:00
christos eead6b2f0e add getpass_r 2012-04-12 19:36:34 +00:00
joerg 0b50389a15 Add __returns_twice for the attribute of the same name. This makes the
attribute explicit based on the functions GCC gives it too.
2011-11-05 09:27:06 +00:00
manu 9db30be448 First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
2011-08-08 12:08:52 +00:00
christos e2bebf7172 * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

    - Add F_DUPFD_CLOEXEC to fcntl(2).
    - Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
    - Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
      for socket(2) and socketpair(2).
    - Add new paccept(2) syscall that takes an additional sigset_t to alter
      the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
      SOCK_NONBLOCK.
    - Add new mode character 'e' to fopen(3) and popen(3) to open pipes
      and file descriptors for close on exec.
    - Add new kqueue1(2) syscall with a new flags argument to open the
      kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
  (rump_syscallargs.h).

* Bump libc version for the new syscalls.
2011-06-26 16:42:39 +00:00
christos 416c220c02 Re-do ssp hijacking by defining inline functions and using the weak libc
symbols to do the indirection for unistd.h instead of #define tricks.
Fixes compilation for things that define struct { ssize_t read(int fd, ...); }.
2011-01-19 19:21:29 +00:00
christos 6a4804166f The signal number argument in psignal is int not unsigned int.
Add psiginfo.
2010-08-27 08:40:38 +00:00
christos bb83e0e3c9 change size_t to ssize_t for POSIX compliance. 2010-04-17 17:51:47 +00:00
christos 244f534022 PR/43172: Jukka Ruohonen: swab(3) lacks restrict-keyword 2010-04-17 17:48:34 +00:00
kleink 9be4603670 Declare strsignal(3) in <string.h>, per POSIX-2008, and adjust
documentation accordingly.

Fixes PR standards/41325 from Perry E. Metzger.
2009-07-22 19:48:27 +00:00
christos 50728e7823 merge christos-time_t 2009-01-11 02:57:17 +00:00
lukem 4a94e73441 Change the second argument of getlogin_r() from int to size_t, per POSIX. 2009-01-06 11:16:46 +00:00
ad f778b05135 SUS says that pthread_atfork() must also be in unistd.h 2008-06-25 11:45:38 +00:00
ad 5f64faa3a9 Add getlogin_r. Manual page changes mostly lifted from FreeBSD. 2008-06-25 11:10:24 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
drochner 7cc98087b6 everyone else assumes that defining "_XOPEN_SOURCE" means XPG4.2,
so remove comparisions against the numerical values "3" or "4"
2008-04-01 19:23:28 +00:00
perry fc883a791d change some __attribute__s to __keywords 2007-12-24 17:26:09 +00:00
he fd961c4429 Add a new socket option for unix domain sockets: LOCAL_PEEREID, to make
it possible to get the pid, euid and egid of the process at the remote
end at the time it did bind() or connect().

Add a new libc function, getpeereid() to easily get at the euid and egid.
As a consequence, bump libc's minor number.

Document the LOCAL_PEEREID socket option in unix(4).

Based on contribution by Arne H. Juul, minor modifications by myself.
2007-08-09 15:23:01 +00:00
kristerw 1ef79ebc7d Do not include SSP files unless _FORTIFY_SOURCE > 0. 2007-08-02 21:49:09 +00:00
tls dc99372be9 Match usage of FORTIFY_SOURCE on other platforms by not requiring special
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).

Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3).  But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
2007-05-30 21:14:35 +00:00
perry 5f65228b74 u_intN_t -> uintN_t 2005-12-26 19:01:47 +00:00
perry a2cd732268 Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 19:12:23 +00:00
kleink 21ef7cfd14 Move ttyname_r() to the 1003.1c-1995 section. 2005-09-26 12:52:42 +00:00
christos 2b46305054 ttyname_r returns int. 2005-09-25 20:28:56 +00:00
christos e86a6cb1b4 Add getenv_r and ttyname_r 2005-09-25 20:08:15 +00:00
christos 66412e7240 compat code reorg 2005-09-13 01:44:32 +00:00
christos 5b18fe838f PR/30503: Nicolas Joly: swapctl(2) prototype does not match corresponding
syscall
2005-06-11 22:54:43 +00:00
kleink 484c40cd9f Remove the compatibility select() prototype. Going back to Lite2 select(2)
has also mandated <sys/time.h> to be included, which is now sufficient
for the prototype and all related declarations; thus the local duplicate
of the prototype can be removed.  Approved by Christos.
2005-05-22 19:10:15 +00:00
kleink 1c7e2b47c4 Provide select() and pselect() prototypes in <sys/select.h>, per
1003.1-2001, and leave the select() prototype in <unistd.h> for
compatibility.  To allow for transition, reorganization of this is
deferred until netbsd-3 gets branched.
2005-03-05 19:48:38 +00:00