summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Typo.pluknet2013-05-121-1/+1
|
* posix_spawn_file_actions_adddup2(3): Document difference with dup2().jilles2013-05-091-2/+23
| | | | | | | | The ability to clear a file descriptor's close-on-exec flag via posix_spawn_file_actions_adddup2() is in fact proposed in Austin Group issue #411. MFC after: 1 week
* posix_spawn_file_actions_addopen(3): Correct error for bad file descriptor.jilles2013-05-091-2/+2
| | | | | | | | As per POSIX.1-2008, posix_spawn_file_actions_add* return [EBADF] if a file descriptor is negative, not [EINVAL]. The bug was only in the manual page; the code is correct. MFC after: 1 week
* wordexp(): Simplify code by deferring work to sh.jilles2013-05-091-13/+3
|
* POSIX 1003.1-2008: add ENOTRECOVERABLE, EOWNERDEAD errnos.pluknet2013-05-043-1/+11
|
* Document that the return type is different from 1003.1-2008.pluknet2013-05-041-2/+9
| | | | MFC after: 1 week
* mdoc: missing comma in .Dd macro.pluknet2013-05-045-5/+5
|
* Add entry for errno ECAPMODE.pluknet2013-05-041-0/+2
| | | | MFC after: 3 days
* Improve compatibility with recent flex from flex.sourceforge.net.jkim2013-05-031-3/+2
|
* Also, add a missing period.pluknet2013-05-033-3/+3
|
* Remove an extra comma.pluknet2013-05-033-3/+3
|
* Remove the STANDARDS section.pluknet2013-05-031-4/+1
| | | | | | querylocale is not part of IEEE Std 1003.1-2008. MFC after: 3 days
* accept(2), pipe(2): Fix .Dd.jilles2013-05-012-2/+2
|
* Add pipe2() system call.jilles2013-05-013-2/+46
| | | | | | | | | | | | | The pipe2() function is similar to pipe() but allows setting FD_CLOEXEC and O_NONBLOCK (on both sides) as part of the function. If p points to two writable ints, pipe2(p, 0) is equivalent to pipe(p). If the pointer is not valid, behaviour differs: pipe2() writes into the array from the kernel like socketpair() does, while pipe() writes into the array from an architecture-specific assembler wrapper. Reviewed by: kan, kib
* Add accept4() system call.jilles2013-05-013-3/+46
| | | | | | | | | | | | | | | The accept4() function, compared to accept(), allows setting the new file descriptor atomically close-on-exec and explicitly controlling the non-blocking status on the new socket. (Note that the latter point means that accept() is not equivalent to any form of accept4().) The linuxulator's accept4 implementation leaves a race window where the new file descriptor is not close-on-exec because it calls sys_accept(). This implementation leaves no such race window (by using falloc() flags). The linuxulator could be fixed and simplified by using the new code. Like accept(), accept4() is async-signal-safe, a cancellation point and permitted in capability mode.
* intro(2): Fix some errors in ENFILE and EMFILE descriptions.jilles2013-04-271-5/+6
| | | | MFC after: 1 week
* sysconf(3): Correct the description of _SC_OPEN_MAX.jilles2013-04-261-2/+2
| | | | | Reported by: bde MFC after: 1 week
* getdtablesize(2): Describe what this function actually does.jilles2013-04-241-9/+11
| | | | | | | getdtablesize() returns the limit on new file descriptors; this says nothing about existing descriptors. MFC after: 1 week
* Convert libc/stdio from K&R to ANSI Cemaste2013-04-2334-151/+53
| | | | And add '__restrict' where it appeared in the header prototypes
* Renumber clauses to reduce diffs to other versionsemaste2013-04-2370-70/+70
| | | | | | | NetBSD, OpenBSD, and Android's Bionic all number the clauses 1 through 3, so follow suit to make comparison easier. Acked-by: imp@
* - sl_find does not modify 'name'eadler2013-04-232-2/+2
| | | | | | | | - make the prototype of sl_find match NetBSD Reviewed by: jilles Approved by: cperciva (mentor) MFC After: 3 days
* Switch from K&R prototypes to modern Ceadler2013-04-231-10/+4
| | | | | | Reviewed by: jilles Approved by: cperciva (mentor) MFC After: 3 days
* Keep up with negative addrlen check removal in r249649.pluknet2013-04-221-5/+1
|
* dup(2): Remove incorrect sentence about getdtablesize().jilles2013-04-211-4/+1
| | | | | | | | | There are no getdtablesize() bounds on the file descriptor to be duplicated; it only has to be open. If the RLIMIT_NOFILE rlimit was decreased after opening the file descriptor, it may be greater than or equal to getdtablesize() but still valid. MFC after: 1 week
* Add example.joel2013-04-211-1/+42
| | | | | | PR: 177025 Submitted by: Fernando <fernando.apesteguia@gmail.com> Reviewed by: theraven
* Remove cross-references to nonexistent CPU_SET(3) manpage.joel2013-04-212-4/+2
| | | | | | | Also fix cpu_getaffinity(2) document title. PR: 176317 Submitted by: brucec
* pututxline: Don't set errno=0 in subfunctions.jilles2013-04-171-4/+8
| | | | | | | | | | The functions utx_active_add(), utx_active_remove(), utx_lastlogin_add() and utx_log_add() set errno to 0 if they are successful. This not only violates POSIX if pututxline() is successful, but may also overwrite a valid error with 0 if, for example, utx_lastlogin_add() fails while utx_log_add() succeeds. Reviewed by: ed
* - Correct mispellings of the word occurrencegabor2013-04-174-6/+6
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* mdoc: remove superfluous paragraph macro.joel2013-04-161-1/+0
|
* - Document that sem_wait() can fail with EINTR if it is interrupted by ajhb2013-04-161-1/+9
| | | | | | | | signal. - Fix the old ksem implementation for POSIX semaphores to not restart sem_wait() or sem_timedwait() if interrupted by a signal. MFC after: 1 week
* libc: Fix typo in French translation.jilles2013-04-141-1/+1
| | | | | | PR: kern/177704 Submitted by: martymac MFC after: 1 week
* Spelling correctionemaste2013-04-112-2/+2
|
* Remove unused atomic headeremaste2013-04-111-1/+0
|
* Remove the number of addresses restriction from sctp_connectx().tuexen2013-04-101-202/+94
| | | | | | | Remove unused code. While there, do some cleanup of the code. MFC after: 1 week
* Correct the returned message lengths for timeval and bintime controlgnn2013-04-051-3/+3
| | | | | | messages (SO_BINTIME, SO_TIMEVAL). Obtained from: phk
* Replace access to /dev/random with the kernel pseudo-random numberdelphij2013-04-024-55/+32
| | | | | | | | source sysctl(KERN_ARND) and remove the fallback code. Obtained from: OpenBSD Reviewed by: secteam MFC after: 1 month
* Fix return type of extattr_set_* and fix rmextattr(8) utility.mdf2013-04-021-3/+3
| | | | | | | | | extattr_set_{fd,file,link} is logically a write(2)-like operation and should return ssize_t, just like extattr_get_*. Also, the user-space utility was using an int for the return value of extattr_get_* and extattr_list_*, both of which return an ssize_t. MFC after: 1 week
* wordexp(): Remove wrong IFS usage.jilles2013-04-011-4/+1
| | | | | | | | | | | Words in shell script are separated by spaces or tabs independent of the value of IFS. The value of IFS is only relevant for the result of substitutions. Therefore, there should be a space between 'wordexp' and the words to be expanded, not an IFS character. Paranoia might dictate that the shell ignore IFS from the environment (even though our sh currently uses it), so do not depend on it in the new test case.
* btowc(3), isblank(3): Correct prototypes for _l variants.jilles2013-03-272-3/+3
| | | | MFC after: 1 week
* accept(2): Mention inheritance of O_ASYNC and signal destination.jilles2013-03-261-3/+13
| | | | | | While almost nobody uses O_ASYNC, and rightly so, the inheritance of the related properties across accept() is a portability issue like the inheritance of O_NONBLOCK.
* Compile contrib/tzcode/stdtime/localtime.c with -fwrapv, since it reliesdim2013-03-241-0/+3
| | | | | | | | | | | | | on signed integer overflow wrapping. Otherwise mktime(3) and timegm(3) can hang, in case the timestamp passed in struct tm is not representable in a time_t. Specifically, any timestamp after 2038-01-19 03:14:07, in combination with a 32-bit time_t. Note that it would be better to change the code to not rely on undefined behaviour, but it is contributed code, and it is not entirely trivial to fix the issue properly. MFC after: 3 days
* Document chflagsat(2).pjd2013-03-213-3/+54
| | | | Obtained from: jilles
* Implement chflagsat(2) system call, similar to fchmodat(2), but operates onpjd2013-03-211-0/+1
| | | | | | | file flags. Reviewed by: kib, jilles Sponsored by: The FreeBSD Foundation
* - Make 'flags' argument to chflags(2), fchflags(2) and lchflags(2) of typepjd2013-03-211-3/+3
| | | | | | | | | | | u_long. Before this change it was of type int for syscalls, but prototypes in sys/stat.h and documentation for chflags(2) and fchflags(2) (but not for lchflags(2)) stated that it was u_long. Now some related functions use u_long type for flags (strtofflags(3), fflagstostr(3)). - Make path argument of type 'const char *' for consistency. Discussed on: arch Sponsored by: The FreeBSD Foundation
* Allow O_CLOEXEC in posix_openpt() flags.jilles2013-03-211-2/+7
| | | | | PR: kern/162374 Reviewed by: ed
* Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.jilles2013-03-193-4/+27
| | | | | | | | | | | | | | | | | | | This change allows creating file descriptors with close-on-exec set in some situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes file descriptors (SCM_RIGHTS) atomically close-on-exec. The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD. MSG_CMSG_CLOEXEC is the first free bit for MSG_*. The SOCK_* flags are not passed to MAC because this may cause incorrect failures and can be done later via fcntl() anyway. On the other hand, audit is expected to cope with the new flags. For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags argument. Reviewed by: kib
* There are actually two different cases when mlock(2) returnsglebius2013-03-191-2/+7
| | | | | | ENOMEM. Clarify this, taking text from SUS. Reviewed by: kib
* Add restrict keyword to realpath manpage.kevlo2013-03-181-1/+1
|
* Add a note to the HISTORY section about lchflags(2) being introduced inpjd2013-03-161-0/+4
| | | | FreeBSD 5.0.
* Update to the latest (un)vis(3) sources from NetBSD. This addsbrooks2013-03-142-2/+18
| | | | | | | | | | | | | multibyte support[0] and the new functions strenvisx and strsenvisx. Add MLINKS for vis(3) functions add by this and the initial import from NetBSD[1]. PR: bin/166364, bin/175418 Submitted by: "J.R. Oldroyd" <fbsd@opal.com>[0] stefanf[1] Obtained from: NetBSD MFC after: 2 weeks
OpenPOWER on IntegriCloud