summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update base system libexpat to 2.1.0.delphij2013-02-262-7/+20
|\ | | | | | | MFC after: 3 days
| * Vendor import of expat 2.1.0 (trimmed).delphij2013-02-266-163/+283
| |
| * Apply a vendor fix (rev 1.165): Don't update next pointer since it coulddelphij2009-12-111-1/+0
| | | | | | | | | | | | | | confuse tokenizer. Obtained from: expat CVS Security: CVE-2009-3720
| * Correct a DoS issue when processing XML document with malformeddelphij2009-12-101-1/+1
| | | | | | | | | | | | | | UTF-8 sequences. Obtained from: expat CVS (revisions 1.14 and 1.15) Security: CVE-2009-3560
| * Flattern all tags and dist tree for expat.delphij2009-12-1018-0/+13268
|
* libc/opendir: Improve behaviour of union uniquifier:jilles2013-02-241-25/+26
| | | | | | | | | * Reopen the directory using openat(fd, ".", ...) instead of opening the pathname again. This fixes a race condition where the meaning of the pathname changes and allows a reopen with fdopendir(). * Always reopen the directory for union stacks, not only when DTF_REWIND is passed. Applications should be able to fchdir(dirfd(dir)) and *at(dirfd(dir), ...). DTF_REWIND now does nothing.
* Merge part of r1712 from elftoolchain, making it possible to resize ELFmarkj2013-02-241-127/+181
| | | | | | | | | | sections and indirectly change the layout of an ELF file when ELF_F_LAYOUT is not set. PR: bin/167103 Approved by: rstone (co-mentor) Obtained from: elftoolchain MFC after: 2 weeks
* Now that qsort(3) has a sample comparison function, point to thatkeramida2013-02-231-1/+7
| | | | | | | | | | example from bsearch(3) too, so that we don't have to duplicate the example code in both places. PR: docs/176197 Reviewed by: stefanf Approved by: remko (mentor), gjb (mentor) MFC after: 1 week
* Sort sections.joel2013-02-201-6/+6
|
* Various improvements to the qsort(3) usage example:keramida2013-02-201-14/+8
| | | | | | | | | | | | | | | - Remove unused #include. - Do not cast away const. - Use the canonical idiom to compare two numbers. - Use proper type for sizes, i.e. size_t instead of int. - Correct indentation. - Simplify printf("\n") to puts(""). - Use return instead of exit() in main(). Submitted by: Christoph Mallon, christoph.mallon at gmx.de Approved by: gjb (mentor) Reviewed by: stefanf MFC after: 1 week
* Add a sample program that shows how a custom comparison function andkeramida2013-02-191-1/+47
| | | | | | | | | qsort(3) can work together to sort an array of integers. PR: docs/176197 Submitted by: Fernando, fapesteguia at opensistemas.com Approved by: gjb (mentor) MFC after: 1 week
* Fix includes for use in libstand.kientzle2013-02-191-3/+1
|
* - Make sure to set an error code when trying to obtain a data descriptor formarkj2013-02-192-3/+24
| | | | | | | | | | a section of type SHT_NULL. - Update the man page to reflect the fact that elf_getdata() and elf_rawdata() may return with an error of ELF_E_SECTION. PR: bin/175491 Approved by: emaste (co-mentor) MFC after: 1 week
* setbuf(3): Restore a BUGS section about setbuf().jilles2013-02-181-1/+4
| | | | | | | The brokenness of setbuf() is not specific to 4.2BSD and 4.3BSD but inherent in the API definition. Reported by: bde
* Add strtoul() to libstand by copying from libc and clipping outkientzle2013-02-183-1/+125
| | | | locale code.
* Make more code be protected by internal mutex, and now it is fork-safe, indavidxu2013-02-171-2/+2
| | | | | error case, the file exclusive lock is now released as soon as possible, in previous code, child process can still hold the exclusive lock.
* Put one file per line so it is easier to read diffs against those files.pjd2013-02-162-184/+653
|
* Since clang 3.2 now has an option to suppress warnings about implicitlydim2013-02-161-5/+0
| | | | | | | promoted K&R parameters, remove the workarounds added for sendmail components in r228558. MFC after: 1 week
* Simplify code by using flag O_EXLOCK.davidxu2013-02-161-9/+3
| | | | PR: kern/175674
* Upgrade to 1.6.16des2013-02-151-0/+1
|
* Import LDNS and build it as an internal library.des2013-02-152-0/+49
|
* setbuf(3): Remove bugs section about ancient versions of BSD.jilles2013-02-151-17/+1
|
* Change examples to be consistent with what style(9) says.zeising2013-02-142-8/+8
| | | | | Approved by: joel (mentor) MFC After: 2 weeks
* Add USB API to read power draw on USB devices.hselasky2013-02-146-1/+39
| | | | | | | Update usbconfig to print power draw on USB devices. MFC after: 2 weeks Submitted by: Matt Burke @ icritical.com
* Add strchrnul(), a GNU function similar to strchr(), except that it returnszeising2013-02-134-5/+81
| | | | | | | a pointer to the end of the string, rather than NULL, if the character was not found. Approved by: theraven
* Make the F_READAHEAD option to fcntl(2) work as documented: a value of zeroian2013-02-131-2/+2
| | | | | | | | now disables read-ahead. It used to effectively restore the system default readahead hueristic if it had been changed; a negative value now restores the default. Reviewed by: kib
* When clang builds libc it may insert calls to __aeabi_* functions. Normallyandrew2013-02-121-0/+19
| | | | | | | | | | this is not a problem as they are resolved by libgcc. The exception is for the __aeabi_mem* functions. These call back into libc to the appropriate function. This causes issues for static binaries as we only link against libc once so there is no way for it to call into libgcc and back. The fix for this is to include these symbols in libc but keep them hidden so binaries use the libgcc version.
* Allow us to build clang for ARM EABI. Clang and llvm use theandrew2013-02-121-1/+9
| | | | | | | arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or armv6 and are building for EABI. Reviewed by: dim
* Implement guest vcpu pinning using 'pthread_setaffinity_np(3)'.neel2013-02-112-30/+0
| | | | | | | | | | | | | | Prior to this change pinning was implemented via an ioctl (VM_SET_PINNING) that called 'sched_bind()' on behalf of the user thread. The ULE implementation of 'sched_bind()' bumps up 'td_pinned' which in turn runs afoul of the assertion '(td_pinned == 0)' in userret(). Using the cpuset affinity to implement pinning of the vcpu threads works with both 4BSD and ULE schedulers and has the happy side-effect of getting rid of a bunch of code in vmm.ko. Discussed with: grehan
* fts: Use O_DIRECTORY when opening name that might be changed by attacker.jilles2013-02-101-1/+2
| | | | | | | | There are uncommon cases where fts_safe_changedir() may be called with a non-NULL name that is not "..". Do not block or worse if an attacker put (a (symlink to) a fifo or device where a directory used to be. MFC after: 1 week
* Improve code style. No functional change.tuexen2013-02-101-7/+7
| | | | MFC after: 3 days
* sigqueue(2): Fix typo (EEPERM -> EPERM).jilles2013-02-101-1/+1
| | | | MFC after: 3 days
* Fix logic inversion.eadler2013-02-091-1/+1
| | | | | | PR: docs/174966 Submitted by: Christian Ullrich <chris+freebsd@chrullrich.net> Approved by: bcr (mentor)
* mdoc: Remove EOL whitespace.joel2013-02-091-1/+1
|
* Document the detail of interaction between vfork and PT_TRACEME.kib2013-02-071-1/+11
| | | | MFC after: 2 weeks
* Document the ERESTART translation to EINTR for devfs nodes.kib2013-02-071-1/+12
| | | | | Based on the submission by: jilles MFC after: 2 weeks
* Add the __aeabi_mem* functions to compiler-rt as clang uses them.andrew2013-02-061-0/+4
|
* * Add the integer div & mod functions and ARM EABI support functions toandrew2013-02-051-0/+13
| | | | | | libstand. * Stop linking the ARM U-Boot loader against libgcc now libstand has the required symbols.
* Sort by MK_* knob like the comment saysdes2013-02-041-5/+5
| | | | MFC after: 1 week
* Add several missing symbols to libcxxrt's symbol version map, and removedim2013-02-031-14/+12
| | | | | | | | | a few duplicates. This should fix building world with -stdlib=libc++ after r246028. Submitted by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp> MFC after: 1 week X-MFC-With: r246028
* Pull in r170135 from upstream clang trunk:dim2013-02-0264-8/+147
| | | | | | | | | | | | | | | | Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user specifies not to. Dont build ASTMatchers with Rewriter disabled and StaticAnalyzer when it's disabled. Without all those three, the clang binary shrinks (x86_64) from ~36MB to ~32MB (unstripped). To disable these clang components, and get a smaller clang binary built and installed, set WITHOUT_CLANG_FULL in src.conf(5). During the initial stages of buildworld, those extra components are already disabled automatically, to save some build time. MFC after: 1 week
* - Fix more style(9)-related issues (copyright header, spaces after functiongahr2013-02-011-56/+55
| | | | | | | | | names, unnecessary casts) - Change type of boolean variable from char to bool Suggested by: jhb, zont, jmallett Reviewed by: cognet Approved by: cognet
* Update hwpmc to support the Xeon class of Ivybridge processors.sbruno2013-01-316-1/+938
| | | | | | | | | | | | | | case 0x3E: /* Per Intel document 325462-045US 01/2013. */ Add manpage to document all the goodness that is available in this processor model. No support for uncore events at this time. Submitted by: hiren panchasara <hiren.panchasara@gmail.com> Reviewed by: davide, jimharris, sbruno Obtained from: Yahoo! Inc. MFC after: 2 weeks
* - Remove underscores from the internal structure name, as it doesn't collidegahr2013-01-312-32/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with the user's namespace. - Correct size and position variables type from long to size_t. - Do not set errno to ENOMEM on malloc failure, as malloc already does so. - Implement the concept of "buffer data length", which mandates what SEEK_END refers to and the allowed extent for a read. - Use NULL as read-callback if the buffer is opened in write-only mode. Conversely, use NULL as write-callback when opened in read-only mode. - Implement the handling of the ``b'' character in the mode argument. A binary buffer differs from a text buffer (default mode if ``b'' is omitted) in that NULL bytes are never appended to writes and that the "buffer data length" equals to the size of the buffer. - Remove shall from the man page. Use indicative instead. Also, specify that the ``b'' flag does not conform with POSIX but is supported by glibc. - Update the regression test so that the ``b'' functionality and the "buffer data length" concepts are tested. - Minor style(9) corrections. Suggested by: jilles Reviewed by: cognet Approved by: cognet
* Add fmemopen(3), an interface to get a FILE * from a buffer in memory, alonggahr2013-01-304-7/+224
| | | | | | | | with the respective regression test. See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html Reviewed by: cognet Approved by: cognet
* Rework the __vdso_* symbols attributes to only make the symbols weak,kib2013-01-3016-5/+325
| | | | | | | | | | but use normal references instead of weak. This makes the statically linked binaries to use fast gettimeofday(2) by forcing the linker to resolve references and providing the neccessary functions. Reported by: bde Tested by: marius (sparc64) MFC after: 2 weeks
* Remove unused file.glebius2013-01-291-261/+0
|
* - Compute the correct size to reallocate when doubling the size of thejhb2013-01-281-1/+2
| | | | | | | | | array of loaded objects to avoid a buffer overrun. - Use reallocf() to avoid leaking memory if the realloc() fails. PR: kern/175648 Submitted by: yuri@rawbw.com (1) MFC after: 1 week
* Fix some symbol version mismatches between libstdc++ and libsupc++/libcxxrttheraven2013-01-281-56/+46
| | | | | | | | | | | | | | | | | that were causing the runtime and STL libraries to see different versions of various classes and functions when libstdc++ is used as a filter. Note: This changes the ABI for libcxxrt, but libcxxrt is currently only in -STABLE for testing and is not used by anything unless explicitly enabled by the end user. No default compiler configurations use it. libc++ will need to be recompiled after this change. make buildworld will do this automatically, but make in lib/libc++ will not necessarily work unless the new libcxxrt is installed first. PR: kern/171610, stand/175453 Reviewed by: kib MFC after: 1 week
* Only install manpages and html documentation in the ncurses/*w (wchar)brooks2013-01-244-4/+16
| | | | | builds so that it is only installed once. This is consistent with the existing decision to only install headers in the that case.
OpenPOWER on IntegriCloud