summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update libarchive to 3.0.3mm2012-02-253-292/+520
| | | | | | | | | | | | | | Some of new features: - New readers: RAR, LHA/LZH, CAB reader, 7-Zip - New writers: ISO9660, XAR - Improvements to many formats, especially including ISO9660 and Zip - Stackable write filters to write, e.g., tar.gz.uu in a single pass - Exploit seekable input; new "seekable" Zip reader can exploit the Zip Central Directory when it's available; the old "streamable" Zip reader is still fully supported for cases where seeking is not possible. Full release notes available at: https://github.com/libarchive/libarchive/wiki/ReleaseNotes
* In revision 231989, we pass a 16-bit clock ID into kernel, howeverdavidxu2012-02-253-38/+64
| | | | | | | | | | | | 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
|
* Use unused fourth argument of umtx_op to pass flags to kernel for operationdavidxu2012-02-221-13/+3
| | | | | | UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower 16bits is used to pass flags. The change saves a clock_gettime() syscall from libthr.
* Document the fact that getgrouplist(3) returns 0 on success.pjd2012-02-201-2/+2
| | | | MFC after: 3 days
* Set the O_CLOEXEC flag when opening the pidfile to avoid leaking theghelmer2012-02-201-1/+1
| | | | | | | file descriptor via exec(3). Now that daemon(8) has been fixed to resolve the issue noted by trociny, the consensus is that this change should be OK.
* Check both seconds and nanoseconds are zero, only checking nanosecondsdavidxu2012-02-191-1/+1
| | | | is zero may trigger timeout too early. It seems a copy&paste bug.
* 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
* Switch the license boilerplates to our standard one.brueffer2012-02-1732-352/+352
| | | | | | | | | | | Advantages: - Reduces the number of different license versions in the tree - Eliminates a typo - Removes some incorrect author attributions due to c/p - Removes c/p error potential for future pmc manpages Approved by: jkoshy, gnn, rpaulo, fabient (copyright holders) MFC after: 1 week
* 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 thread-local storage support for arm:gonzo2012-02-142-4/+5
| | | | | - Switch to Variant I TCB layout - Use function from rtld for TCB allocation/deallocation
* 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-1212-54/+54
| | | | | | | | | | | 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
* MFp4 204292:bz2012-02-111-0/+12
| | | | | | | | | | Ignore the NAT_T extension types so we can at least dump the SADB from the in-base libipsec/setkey without error when NAT_T support is present in the kernel, though not printing the additional information yet. However in case there is no NAT_T support in kernel still consider them to be an error. MFC after: 8 weeks
* 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.
* Use the correct constant (with same value) for comparying the SA type.bz2012-02-111-1/+1
| | | | | | PR: kern/142741 Submitted by: Matthijs Kooiman (matthijs stdin.nl) MFC after: 3 days
* 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
* Make code more stable by checking NULL pointers.davidxu2012-02-111-2/+6
|
* Unbreak build.ed2012-02-101-1/+1
| | | | libprocstat still uses __si_namebuf.
* Detect file modification properly by using tv_nsec.ed2012-02-101-1/+2
| | | | | | | POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond precision to detect file modification. MFC after: 2 weeks
* Switch MIPS TLS implementation to Variant I:gonzo2012-02-102-13/+20
| | | | | Save pointer to the TLS structure taking into account TP_OFFSET and TCB structure size.
* Fix NULL ptr dereference in setusercontext if pwd is null,eadler2012-02-091-3/+6
| | | | | | | | | | | LOGIN_SETPRIORITY is set, and setting the priority (rtprio or setpriority) fails. PR: kern/164238 Submitted by: Alexander Wittig <alexander@wittig.name> Reviewed by: des Approved by: cperciva MFC after: 1 month
* 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
* Add a comment to the example that pidfile_* functions can handle pfh being NULL.pjd2012-02-081-0/+5
| | | | MFC after: 3 days
* Note that calling pidfile_write(3) multiple times is fine.pjd2012-02-081-1/+4
| | | | MFC after: 3 days
* Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessordim2012-02-074-4/+4
| | | | | | set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp. MFC after: 1 week
* Plug a memory leak. When a cached thread is reused, don't clear sleepdavidxu2012-02-072-12/+19
| | | | | | | queue pointers, just reuse it. PR: 164828 MFC after: 1 week
* Using the O_CLOEXEC flag on open(2) caused the pidfile lock to be lostghelmer2012-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | when the child process execs daemon's target program thanks to flock(2) semantics. So, we apparently have to leak the open pidfile's file descriptor to keep the lock for the pidfile(3) functions to work properly. Test case demonstrated by trociny: ref8-amd64:/home/trociny% uname -r 8.2-STABLE ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10 ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10 daemon: process already running, pid: 19799 kopusha:~% uname -r 10.0-CURRENT kopusha:~% daemon -p /tmp/sleep.pid sleep 10 kopusha:~% daemon -p /tmp/sleep.pid sleep 10 kopusha:~%
* Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,dim2012-02-0519-0/+197
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that builds the following additional llvm/clang tools: - bugpoint - llc - lli - llvm-ar - llvm-as - llvm-bcanalyzer - llvm-diff - llvm-dis - llvm-extract - llvm-ld - llvm-link - llvm-mc - llvm-nm - llvm-objdump - llvm-prof - llvm-ranlib - llvm-rtdyld - llvm-stub - macho-dump - opt These tools are mainly useful for people that want to manipulate llvm bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker with llvm and clang themselves. MFC after: 2 weeks
| * Vendor import of llvm 3.0 final release:dim2011-12-0922-161/+407
| | | | | | | | http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_30/final@145349
* | 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
* | Try to avoid ambiguity when sysctl returns ENOMEM additionallytrociny2012-02-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | checking the returned oldlen: when ENOMEM is due to the supplied buffer being too short the return oldlen is equal to buffer size. Without this additional check kvm_getprocs() gets stuck in loop if the returned ENOMEM was due the exceeded memorylocked limit. This is easily can be observed running `limits -l 1k top'. Submitted by: Andrey Zonov <andrey zonov org> MFC after: 1 week
* | 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
OpenPOWER on IntegriCloud