summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove clause 3 and 4 from TNF licensesemaste2013-05-2913-91/+0
| | | | | | | Per the NetBSD Foundation statement Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license.
* Remove the advertising clause from the Regents of the University ofemaste2013-05-285-25/+5
| | | | California's license, per the letter dated July 22, 1999.
* Renumber clauses to reduce diffs to other versionsemaste2013-05-28100-100/+100
| | | | | NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3, so follow suit to make comparison easier.
* Remove the advertising clause from the Regents of the University ofemaste2013-05-2810-50/+10
| | | | California's license, per the letter dated July 22, 1999.
* The getcontext() from the __fillcontextx() call in thekib2013-05-2810-8/+76
| | | | | | | | | | | | | | | | | | | | | | | | | check_deferred_signal() returns twice, since handle_signal() emulates the return from the normal signal handler by sigreturn(2)ing the passed context. Second return is performed on the destroyed stack frame, because __fillcontextx() has already returned. This causes undefined and bad behaviour, usually the victim thread gets SIGSEGV. Avoid nested frame and the need to return from it by doing direct call to getcontext() in the check_deferred_signal() and using a new private libc helper __fillcontextx2() to complement the context with the extended CPU state if the deferred signal is still present. The __fillcontextx() is now unused, but is kept to allow older libthr.so to be used with the new libc. Mark __fillcontextx() as returning twice [1]. Reported by: pgj Pointy hat to: kib Discussed with: dim Tested by: pgj, dim Suggested by: jilles [1] MFC after: 1 week
* Style(9)kargl2013-05-271-1/+1
| | | | | Approved by: das (implicit) Reported by: jh
* cap_rights_limit(2): CAP_ACCEPT also permits accept4(2).jilles2013-05-271-1/+3
|
* * Update polynomial coefficients.kargl2013-05-271-33/+30
| | | | | | | | * Use ENTERI/RETURNI to allow the use of FP_PE on i386 target. Reviewed by: das (and bde a long time ago) Approved by: das (mentor) Obtained from: bde (polynomial coefficients)
* Partially apply the capitalization of the heading word of the sequencekib2013-05-271-3/+3
| | | | | | | and fix typo. Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Fix some regressions caused by the switch from gcc to clang. The fixesdas2013-05-2720-40/+53
| | | | | | | | | | are workarounds for various symptoms of the problem described in clang bugs 3929, 8100, 8241, 10409, and 12958. The regression tests did their job: they failed, someone brought it up on the mailing lists, and then the issue got ignored for 6 months. Oops. There may still be some regressions for functions we don't have test coverage for yet.
* Make the malloc(3) family of functions weak and make their non-weakmarcel2013-05-251-0/+11
| | | | | | | | | | | | | | implementations visible for use by applications. The functions $F that are now weak symbols are: allocm, calloc, dallocm, free, malloc, malloc_usable_size, nallocm, posix_memalign, rallocm, realloc, sallocm The non-weak implementations of $F are exported as __$F. Submitted by: stevek@juniper.net Reviewed by: jasone@, kib@ Approved by: jasone@ (jemalloc) Obtained from: juniper Networks, Inc
* sigreturn(2): Remove ancient compatibility warning about 4.2BSD.jilles2013-05-251-4/+0
| | | | The HISTORY subsection still says that sigreturn() was added in 4.3BSD.
* Make some tiny improvements to iconv_open().ed2013-05-251-21/+15
| | | | | | | | | - Remove an unneeded variable. - Fix whitespace bugs. - Fix typoes in comment. - Improve string handling a bit. Don't handroll strstr() and don't terminate a strdup()'ed string. Instead, simply strndup() the part we need.
* Only call free() on something we allocated.ed2013-05-251-2/+2
| | | | | | | If we were already provided a struct _citrus_iconv (e.g. through iconv_open_into()), we should not call free() in case io_init_context() fails. Instead, call it on the pointer of the allocated object, which will be NULL in case of iconv_open_into().
* Let iconv build on -HEAD properly.ed2013-05-233-0/+3
| | | | | | - Add NO_WMISSING_VARIABLE_DECLARATIONS where we use Yacc/Lex. - Add variable declarations where possible. - Add missing static keyword.
* Update manpages for r250887.ed2013-05-213-9/+3
| | | | | | Remove the lists of unneeded header files. Requested by: eadler
* Add <uchar.h>.ed2013-05-219-52/+410
| | | | | | | | | | | | The <uchar.h> header, part of C11, adds a small number of utility functions for 16/32-bit "universal" characters, which may or may not be UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight wrappers around wcrtomb() and mbrtowc(). While there, also add (non-yet-standard) _l functions, similar to the ones we already have for the other locale-dependent functions. Reviewed by: theraven
* Add a makefle that recurses into the right architecture-specificmarcel2013-05-211-0/+10
| | | | | | | sub-directory. This to allow simpler logic outside of the csu directory. Obtained from: Juniper Networks, Inc.
* Update the setfib man page to reflect recent changes.julian2013-05-201-3/+6
|
* popen(): Add 'e' mode character to set close-on-exec on the new fd.jilles2013-05-202-10/+27
| | | | | | | | | | | | | | If 'e' is used, the kernel must support the recently added pipe2() system call. The use of pipe2() with O_CLOEXEC also fixes race conditions between concurrent popen() calls from different threads, even if the close-on-exec flag on the fd of the returned FILE is later cleared (because popen() closes all file descriptors from earlier popen() calls in the child process). Therefore, this approach should be used in all cases when pipe2() can be assumed present. The old version of popen() rejects "re" and "we" but treats "r+e" like "r+".
* Return one-based key so that user can check if the key is ever allocateddavidxu2013-05-161-4/+7
| | | | | | in the first place. Initial patch submitted by: phk
* Fix a typo: It should be "strtoll" and not "stroll".hiren2013-05-141-3/+3
| | | | | | | PR: 178642 Reported by: Michael Galassi (michaelgalassi@gmail.com) Approved by: sbruno (mentor) MFC after: 1 week
* Use an ugly hack to get around bootstrapping problems when buildingdim2013-05-131-0/+5
| | | | | | | | | | | | | | | clang on head between r239347 and r245428. The former revision introduced CLOCK_PROCESS_CPUTIME_ID as a clock id for the clock_gettime() function and friends, but it was only added in <sys/time.h>, not in <time.h>. Any program including <time.h> would therefore not be able to use CLOCK_PROCESS_CPUTIME_ID, even though the value of _POSIX_CPUTIME indicates its existence. The latter revision synchronized the defines again. Work around this problem by defining the id on the command line for the particular .cpp file that needs it. If the id ever changes value, this hack will need to be updated.
* mdoc sweep.joel2013-05-124-6/+12
|
* Fix several typoseadler2013-05-121-1/+1
| | | | | | PR: kern/176054 Submitted by: Christoph Mallon <christoph.mallon@gmx.de> MFC after: 3 days
* 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
|
* Fix return value for setcontext and swapcontext.davidxu2013-05-091-4/+8
|
* Make errbuf optional, so if a caller is not interested in an errortrociny2013-05-081-14/+30
| | | | | | message she can pass NULL (procstat(1) already does this). MFC after: 2 weeks
* Add libusb_get_port_path wrapperemaste2013-05-083-1/+18
| | | | | | | This follows the libusbx API reference at http://libusbx.sourceforge.net/api-1.0/group__dev.html Reviewed by: hselasky@
* Constify libusb_get_pollfds returnemaste2013-05-072-3/+3
| | | | | | | | | | | | | | | The correct return type, per our libusb(3) man page and the libusb.org and libusbx projects (whose interface we intend to follow for our libusb), is const struct libusb_pollfd **. Unfortunately the doxygen-generated libusbx API documentation[1] omits[2] the const for some reason. [1] http://libusbx.sourceforge.net/api-1.0/group__poll.html#gab1a72869a926552b27a6c667695df3a2 [2] http://sourceforge.net/mailarchive/forum.php?thread_name=497D10BE.8090007%40n-dimensional.de&forum_name=libusb-devel Reviewed by: hselasky@
* MFV: Update zlib to 1.2.8.delphij2013-05-0525-139/+328
| | | | MFC after: 1 month
* 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
* Bump date.pluknet2013-05-041-1/+1
|
* libkvm: Make second /dev/null file descriptor close-on-exec as well.jilles2013-05-041-1/+1
| | | | MFC after: 1 week
* libkvm: Use O_CLOEXEC instead of separate fcntl(F_SETFD) call.jilles2013-05-041-15/+4
| | | | MFC after: 1 week
* Improve compatibility with recent flex from flex.sourceforge.net.jkim2013-05-032-5/+4
|
* Similar to 233760 and 236717, export some more useful info about thejhb2013-05-034-1/+110
| | | | | | | | | | | | | | | kernel-based POSIX semaphore descriptors to userland via procstat(1) and fstat(1): - Change sem file descriptors to track the pathname they are associated with and add a ksem_info() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and ksem_info() to export the path, mode, and value of a semaphore via struct kinfo_file. - Add a struct semstat to the libprocstat(3) interface along with a procstat_get_sem_info() to export the mode and value of a semaphore. - Teach fstat about semaphores and to display their path, mode, and value. MFC after: 2 weeks
* Allow building clang on older FreeBSD releases, where log2() does notdim2013-05-031-0/+5
| | | | | | | exist yet. With this change, I have verified that building head on 8.1-RELEASE works. Noticed by: Ryan Stone <rysto32@gmail.com>
* 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
* Always install pmc.foo(3) manpages.uqs2013-05-031-12/+8
| | | | | | | | There is no point in hiding, e.g. pmc.xscale(3) from a developer running on amd64, when the target arch in question will probably never have manual pages installed at all. Reviewed by: sbruno, hiren
* Add new USB API to get the port path of a USB device.hselasky2013-05-036-1/+45
| | | | | MFC after: 2 weeks Requested by: emaste @
* accept(2), pipe(2): Fix .Dd.jilles2013-05-012-2/+2
|
OpenPOWER on IntegriCloud