summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fix build of libc.so after r232620. This caused a duplicate definitiondim2012-03-061-0/+6
| | | | | | of __getCurrentRuneLocale(). Pointy hat to: me
* Remove some duplicated copyright notices.theraven2012-03-062-10/+0
| | | | Approved by: dim (mentor)
* - Switch ARM and MIPS to TLS Variant Igonzo2012-03-061-3/+10
| | | | | | - Fix TLS allocation for Variant I: both rtld and libc allocators assume that tls_static_space includes space for TLS structure. So increment calculated static size by the size of it.
* Implement _set_tpgonzo2012-03-061-0/+4
|
* Link EV_SET(3) to kqueue(2).pjd2012-03-051-1/+1
| | | | MFC after: 3 days
* Remove outdated comment of seven yearseadler2012-03-041-7/+0
| | | | | | PR: docs/116116 Approved by: cperciva MFC after: 1 week
* Remove reference to gcc's non-standard -fwritable-strings, whicheadler2012-03-041-7/+1
| | | | | | | | | doesn't exist in recent releases (and is bad advice anyway) PR: docs/163119 Submitted by: Yuri Pankov <yuri.pankov@gmail.com> Approved by: cperciva MFC after: 1 week
* POSIX mandates that swab do nothing when len < 0eadler2012-03-042-1/+6
| | | | | | | PR: kern/140690 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Approved by: cperciva MFC after: 2 weeks
* Reapply 227753 (xlocale cleanup), plus some fixes so that it passes buildtheraven2012-03-045-29/+115
| | | | | | universe with gcc. Approved by: dim (mentor)
* Add __aeabi_read_tp to the symbol list.cognet2012-03-041-0/+1
|
* Removed excessive _seekdir() call in closedir(). This saves one lseek()ru2012-03-021-3/+1
| | | | | | | | | | | | | | | syscall. Before r5958, seekdir() was called for its side effect of freeing memory allocated by opendir() for rewinddir(), but that revision added _reclaim_telldir() that frees all memory allocated by telldir() calls, making this call redundant. This introduces a slight change. If an application duplicated the descriptor obtained through dirfd(), it can no longer rely on file position to be reset to the start of file after a call to closedir(). It's believed to be safe because neither POSIX, nor any other OS I've tested (NetBSD, Linux, OS X) rewind the file offset pointer on closedir(). Reported by: Igor Sysoev
* Belatedly add dl_iterate_phdr(3) to the list of installed manpages.kib2012-03-021-1/+1
| | | | MFC after: 3 days
* Finally removed the stat() and fstat() calls from the opendir() code.ru2012-03-021-24/+14
| | | | | | | | | | | They were made excessive in r205424 by opening with O_DIRECTORY. Also eliminated the fcntl() call used to set FD_CLOEXEC by opening with O_CLOEXEC. (fdopendir() still checks that the passed descriptor is a directory, and sets FD_CLOEXEC on it.) Reviewed by: ed
* Note that memory should be freed after uuid_to_string(3) call.ae2012-03-011-2/+11
| | | | MFC after: 1 week
* Document SO_PROTOCOL socket option.kib2012-02-261-2/+13
| | | | | | Discussed with: bz Reviewed by: glebius MFC after: 2 weeks
* Whitespace cleanup:gjb2012-02-251-1/+2
| | | | | | | | | o Wrap sentences on to new lines o Cleanup trailing whitespace Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157
* Fix various typos in manual pages.gjb2012-02-254-8/+8
| | | | | | Submitted by: amdmi3 PR: 165431 MFC after: 1 week
* In revision 231989, we pass a 16-bit clock ID into kernel, howeverdavidxu2012-02-252-21/+32
| | | | | | | | | | | | according to POSIX document, the clock ID may be dynamically allocated, it unlikely will be in 64K forever. To make it future compatible, we pack all timeout information into a new structure called _umtx_time, and use fourth argument as a size indication, a zero means it is old code using timespec as timeout value, but the new structure also includes flags and a clock ID, so the size argument is different than before, and it is non-zero. With this change, it is possible that a thread can sleep on any supported clock, though current kernel code does not have such a POSIX clock driver system.
* libc: Eliminate some relative relocations in fmtmsg().jilles2012-02-221-7/+7
|
* Document the fact that getgrouplist(3) returns 0 on success.pjd2012-02-201-2/+2
| | | | MFC after: 3 days
* Document PL_FLAG_CHILD.kib2012-02-181-1/+6
| | | | MFC after: 3 days
* Use ANSI prototypes.delphij2012-02-181-42/+13
|
* Fix cross-references.kib2012-02-171-2/+2
| | | | | Submitted by: pluknet MFC after: 2 weeks
* Document dl_iterate_phdr(3).kib2012-02-171-0/+115
| | | | | | | Man page is based on the OpenBSD version, extended and corrected for the FreeBSD implementation. MFC after: 2 weeks
* Fetch the aux vector for the static libc, and use the entries tokib2012-02-173-5/+89
| | | | | | | | | | | | | | initialize the cache of the system information as it was done for the dynamic libc. This removes several sysctls from the static binary startup. Use the aux vector to fill the single struct dl_phdr_info describing the static binary itself, to implement dl_iterate_phdr(3) for the static binaries. [1] Based on the submission by: John Marino <draco marino st> [1] Tested by: flo (sparc64) MFC after: 2 weeks
* Add err(3) to strerror(3) SEE ALSO sectioneadler2012-02-161-0/+1
| | | | | | | PR: docs/164940 Submitted by: Niclas Zeising <zeising@daemonic.se> Approved by: cperciva MFC after: 3 days
* Bump .Dd date for previous revision.delphij2012-02-151-1/+1
|
* Add notes about sigev_notify_kevent_flags introduced in revision 230857davidxu2012-02-151-0/+3
| | | | | | which enables thread-friendly polling on same fd for AIO events. Reviewed by: delphij
* Revert r231673 and r231682 for now, until we can run a full makedim2012-02-145-115/+29
| | | | | | universe with them. Sorry for the breakage. Pointy hat to: me and brooks
* Fix a misplaced __NO_TLS locations, and change a GNUism to a C11ism fortheraven2012-02-142-3/+5
| | | | | | consistency. Approved by: brooks (mentor)
* Cleanup of xlocale:theraven2012-02-145-29/+113
| | | | | | | | | | | | | | | | - Address performance regressions encountered by das@ by caching per-thread data in TLS where available. - Add a __NO_TLS flag to cdefs.h to indicate where not available. - Reorganise the xlocale.h definitions into xlocale/*.h so that they can be included from multiple places. - Export the POSIX2008 subset of xlocale when POSIX2008 says it should be exported, independently of whether xlocale.h is included. - Fix the bug where programs using ctype functions always assumed ASCII unless recompiled. - Fix some style(9) violations. Reviewed by: brooks (mentor) Approved by: dim (mentor)
* wctob() returns EOF and not WEOF.delphij2012-02-141-2/+2
| | | | | Noticed by: Zhihao Yuan <lichray gmail com> MFC after: 1 week
* Add __aeabi_read_tp function required for thread-local storagegonzo2012-02-142-1/+43
| | | | Reviewed by: cognet
* Globally replace u_int*_t from (non-contributed) man pages.ed2012-02-128-22/+22
| | | | | | | | | | | The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types. I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected. MFC after: 1 month
* Replace utxrm(8) by utx(8).ed2012-02-111-1/+1
| | | | | | | | | | At first, I added a utility called utxrm(8) to remove stale entries from the user accounting database. It seems there are cases in which we need to perform different operations on the database as well. Simply rename utxrm(8) to utx(8) and place the old code under the "rm" command. In addition to "rm", this tool supports "boot" and "shutdown", which are going to be used by an rc-script which I am going to commit separately.
* Set read buffer size to multiple of sizeof(struct futx).ed2012-02-111-7/+12
| | | | | | | | | If the utmpx database gets updated while an application is reading it, there is a chance the reading application processes partially overwritten entries. To solve this, make sure we always read a multiple of sizeof(struct futx) at a time. MFC after: 2 weeks
* Switch getifaddrs(3) to the new API introduced in r231505. Also removebz2012-02-111-122/+47
| | | | | | | | | | | | | conditional code parts not used by or applicable to FreeBSD. The new implementation is supposed to be able to cope with changes to the 'l' versions of the msghdr structs now used as well as to if_data allowing future changes without breaking things. This restores carp(4) config support in HEAD after r231504. Reviewed by: glebius, brooks MFC After: 3 months
* Introduce a new NET_RT_IFLISTL API to query the address list. It worksbz2012-02-111-1/+15
| | | | | | | | | | | on extended and extensible structs if_msghdrl and ifa_msghdrl. This will allow us to extend both the msghdrl structs and eventually if_data in the future without breaking the ABI. Bump __FreeBSD_version to allow ports to more easily detect the new API. Reviewed by: glebius, brooks MFC after: 3 days
* Backout changes from r228571. Remove if_data from struct ifa_msghdr again.bz2012-02-111-1/+1
| | | | | | | While this breaks carp on HEAD temporary, it restores the upgrade path from stable, and head before 20111215. Reviewed by: glebius, brooks
* More accurately document what happens on error.eadler2012-02-091-3/+6
| | | | | | | PR: docs/127908 Submitted by: Matthew D. Fuller <fullermd@over-yonder.net> Approved by: cperciva MFC after: 1 week
* Acknowledge that jail_attach and jail_remove can return EPERM.jamie2012-02-081-1/+3
| | | | MFC after: 1 week
* eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r andbrooks2012-02-081-7/+0
| | | | | | | | ether_nota_r and do not use static variables so remove the note copied from ethers.3 saying they do. Reported by: bms MFC after: 3 days
* Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessordim2012-02-072-2/+2
| | | | | | set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp. MFC after: 1 week
* Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE whichandreast2012-02-054-34/+34
| | | | | | | | | has the same API as __weak_reference(). Give 'x' in SYS.h a more meaningful name. Tested on 32- and 64-bit PowerMac. Reviewed by: bde
* Make the sys/ucontext.h self-contained by changing the return typekib2012-02-018-8/+8
| | | | | | | of __getcontextx_size(3) from size_t to int. PR: ports/164654 MFC after: 1 month
* Move descriptions of file caching commands out of the file locking section.tijl2012-01-281-17/+17
| | | | Approved by: kib (mentor)
* Remove a left-over reference to make.conf(5) which was used as a place topluknet2012-01-271-2/+1
| | | | | | | store the VM_STACK compile option to enable MAP_STACK support in its earliest stage of development. Found by: mux
* Clarify the implementation-defined behaviour in case of close(2)kib2012-01-221-1/+5
| | | | | | returning error. MFC after: 1 week
* The sys/uio.h header is needed only for readv(2), preadv(2), writev(2) andpjd2012-01-222-4/+4
| | | | | | | pwritev(2). Document it more precisely. Reviewed by: jilles MFC after: 3 days
* Add API for obtaining extended machine context states that cannot bekib2012-01-2119-10/+693
| | | | | | | | | | | fit into existing mcontext_t. On i386 and amd64 do return the extended FPU states using getcontextx(3). For other architectures, getcontextx(3) returns the same information as getcontext(2). Tested by: pho MFC after: 1 month
OpenPOWER on IntegriCloud