summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in a comment.rpaulo2014-09-021-1/+1
|
* Add bsearch_b to the libc map and the stdlib header.pfg2014-09-011-0/+1
| | | | | | | | | | | | bsearch_b is the Apple blocks enabled version of bsearch(3). This was added to libc in Revision 264042 but the commit missed the declaration required to make use of it. While here move some other block-related functions to the BSD_VISIBLE block as these are non-standard. Phabric: D638 Reviewed by: theraven, wollman
* Add lock annotations to libcuse.ed2014-09-011-5/+7
| | | | | | | | | - Add annotations to the lock/unlock function to indicate that the function is allowed to lock and unlock the underlying pthread mutex. - Add __guarded_by() annotations to the global variables. Approved by: hselasky@
* According to the ISO C standard, lgamma(-integer) returnskargl2014-09-012-11/+13
| | | | | | | | | | | | inf and raises the divided-by-zero exception. Compilers constant fold one/zero to inf but do not raise the exception. Introduce a volatile vzero to prevent the constant folding. Move the declaration of zero into the main declaration block. While here, fix a nearby disordering of 'lx,ix' Discussed with: bde
* Add lock annotations to the header files of our threading libraries.ed2014-09-011-9/+18
| | | | | | | | | | | | | | | This change extends all of the functions present in the <pthread.h> and <threads.h> headers to have lock annotations. This will allow Clang to warn about the following: - Locking a function twice, - Unlocking a function without a mutex being locked, - Forgetting to unlock a mutex before returning, - Destroying or reinitializing a mutex that is currenty locked, - Using an unlocked mutex in combination with a condition variable. Enabling these annotations already allowed me to catch a bug in one of our userspace tools (r270749).
* Fix a tab that somehow became 8 spaces.kargl2014-09-012-10/+5
| | | | | | | | | | | | | Remove parentheses in a return statement to be consistent with the rest of the file. Rename sin_pi() in the float version to sin_pif(). Remove large comment that precedes sin_pif(). The comment duplicates a comment in e_lgamma_r.c where the algorithm is documented. Requested by: bde
* Compute sin(pi*x) without actually doing the pi*x multiplication.kargl2014-08-312-53/+49
| | | | | | | | | | sin_pi(x) is only called for x < 0 and |x| < 2**(p-1) where p is the precision of x. The new argument reduction is an optimization compared to the old code, and it removes a chunk of dead code. Accuracy tests in the intervals (-21,-20), (-20,-19), ... (-1,0) show no differences between the old and new code. Obtained from: bde
* In ARM asm code, ensure that every ENTRY(foo) has a matching END(foo).ian2014-08-3122-1/+36
| | | | | | | | | The EABI unwind info requires a .fnend for every .fnstart, and newer binutils will complain about seeing two .fnstart in a row. This change allows newer tools to compile our code. Reported by: bapt Reviewed by: imp
* Fix the order of "const volatile" to be consistent withkargl2014-08-302-2/+2
| | | | the rest of msun.
* Make tiny volatile to prevent the compiler(s) fromkargl2014-08-302-2/+5
| | | | | constant folding expressions of the form "1 - tiny", which are used to raise FE_INEXACT.
* The standard we compile libc++ with is called c++11 not c++0x.rdivacky2014-08-251-1/+1
|
* Fix "make checkdpadd" for lib/libc when MK_SSP != nongie2014-08-251-0/+1
| | | | | | | | | | Add LIBSSP_NONSHARED to bsd.libnames.mk and append LIBSSP_NONSHARED to DPADD in lib/libc when MK_SSP != no Approved by: rpaulo (mentor) MFC after: 3 days Phabric: D675 (as part of a larger diff) PR: 192728
* Fix a bug in r265255: only return NULL if the requested map wasn't found.markj2014-08-241-4/+6
| | | | | Submitted by: Luke Chang-Hsien Tsai <luke.tw@gmail.com> MFC after: 1 week
* Add missing break.pfg2014-08-201-0/+1
| | | | CID: 603368
* Use bsd.lib.mk here as all other csu Makefiles do.bdrewery2014-08-191-7/+11
| | | | | | | | | This effectively reverts r124752. There's no reason this should be different. It resulted in needing NO_PIE in the original opt-out NO_PIE commit as this was not using the proper framework. Reported by: peter
* Revert r267233 for now. PIE support needs to be reworked.bdrewery2014-08-192-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | 1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed. We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled. Reported by: kib
* Replace DPADD with DPSRCS to fix "make checkdpadd"ngie2014-08-181-1/+1
| | | | | | | | Phabric: D625 Approved by: jmmv (mentor) Reviewed by: dim PR: 192734 MFC after: 2 weeks
* Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile ↵ngie2014-08-181-1/+2
| | | | | | | | | | | variables This fixes "make checkdpadd" Phabric: D620 Approved by: jmmv (mentor) PR: 192729 MFC after: 5 days
* Add more USB class codes.hselasky2014-08-181-0/+8
| | | | | Obtained from: libusb project at SourceForge MFC after: 1 week
* Fix typo in lib/atf/libatfc++/Makefilengie2014-08-171-1/+1
| | | | | | | | | | LIBATFC should be LIBATF_C; this was missed in the initial import (r241823) PR: 192731 MFC after: 3 days Phabric: D619 Approved by: rpaulo (mentor)
* Add missing DPADD to Makefile.hselasky2014-08-171-0/+1
| | | | PR: 192733
* Bump version because challenge buffer size changedache2014-08-141-1/+1
| | | | MFC after: 1 week
* From https://sourceware.org/ml/newlib/2014/msg00113.htmlimp2014-08-142-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | By Richard Earnshaw at ARM > >GCC has for a number of years provides a set of pre-defined macros for >use with determining the ISA and features of the target during >pre-processing. However, the design was always somewhat cumbersome in >that each new architecture revision created a new define and then >removed the previous one. This meant that it was necessary to keep >updating the support code simply to recognise a new architecture being >added. > >The ACLE specification (ARM C Language Extentions) >(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html) >provides a much more suitable interface and GCC has supported this >since gcc-4.8. > >This patch makes use of the ACLE pre-defines to map to the internal >feature definitions. To support older versions of GCC a compatibility >header is provided that maps the traditional pre-defines onto the new >ACLE ones. Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the couple of places in tree. clang already implements ACLE. Add a define that says we implement version 1.1, even though the implementation isn't quite complete.
* Stop telling people to directly report llvm or clang bugs upstream,dim2014-08-132-2/+2
| | | | | | | point them to the FreeBSD bug tracker instead, since we use our own patches. MFC after: 3 days
* Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUStuexen2014-08-131-0/+6
| | | | | | | | | socket options. This includes managing the correspoing stat counters. Add the SCTP_DETAILED_STR_STATS kernel option to control per policy counters on every stream. The default is off and only an aggregated counter is available. This is sufficient for the RTCWeb usecase. MFC after: 1 week
* Fixed ENOMEM description.pluknet2014-08-131-1/+1
| | | | | MFC after: 1 week Sponsored by: Nginx, Inc.
* Add a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leavekib2014-08-132-1/+12
| | | | | | | | | | | | | | | | | the whole RLIMIT_STACK-sized region of the kernel-allocated stack as the stack of main thread. By default, the main thread stack is clamped at 2MB (4MB on 64bit ABIs) and the rest is used for other threads stack allocation. Since there is no programmatic way to adjust the size of the main thread stack, pthread_attr_setstacksize() is too late, the knob allows user to manage the main stack size both for single-threaded and multi-threaded processes with the rlimit. Reported by: "Ivan A. Kosarev" <ivan@ivan-labs.com> Tested by: dim Sponsored by: The FreeBSD Foundation MFC after: 3 days
* Style.kib2014-08-131-1/+1
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 3 days
* Integrate lib/libutil into the build/kyuangie2014-08-138-0/+1406
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the .t wrappers Rename all of the TAP test applications from test-<test> to <test>_test to match the convention described in the TestSuite wiki page humanize_number_test.c: - Fix -Wformat warnings with counter variables - Fix minor style(9) issues: -- Header sorting -- Variable declaration alignment/sorting in main(..) -- Fit the lines in <80 columns - Fix an off by one index error in the testcase output [*] - Remove unnecessary `extern char * optarg;` (this is already provided by unistd.h) Phabric: D555 Approved by: jmmv (mentor) MFC after: 2 weeks Obtained from: EMC / Isilon Storage Division [*] Submitted by: Casey Peel <cpeel@isilon.com> [*] Sponsored by: EMC / Isilon Storage Division
* Minor style tweaks.pfg2014-08-131-7/+7
| | | | | Obtained from: OpenBSD (CVS rev. 1.7) MFC after: 3 days
* According to opie code and even direct mention in opie(4) challenge bufferache2014-08-121-1/+1
| | | | | | | size must be OPIE_CHALLENGE_MAX + 1, not OPIE_CHALLENGE_MAX Reviewed by: des MFC after: 1 week
* Fix broken pointer overflow check ns_name_unpack()ume2014-08-121-2/+3
| | | | | | | | | | | | | | Many compilers may optimize away the overflow check `msg + l < msg', where `msg' is a pointer and `l' is an integer, because pointer overflow is undefined behavior in C. Use a safe precondition test `l >= eom - msg' instead. Reference: https://android-review.googlesource.com/#/c/50570/ Requested by: pfg Obtained from: NetBSD (CVS rev. 1.10)
* Update our stub resolver to final version of libbind.ume2014-08-1236-199/+909
| | | | Obtained from: ISC
* Bring the md5 functions into libc for internal use only.ume2014-08-122-0/+6
| | | | | It is required to support ID randomization for our stub resolver.
* Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTEDtuexen2014-08-121-0/+7
| | | | | | socket options. Add also a sysctl to control the support of ASCONF. MFC after: 1 week
* When r255294 was committed, it exposed the symbols lgammal, powl,kargl2014-08-091-22/+3
| | | | | | | | | | and tgammal in libm. These functions are part of ISO/IEC 9899:1999 and their prototypes should have been moved into the appropriate __ISO_C_VISIBLE >= 1999 section. After moving the prototypes, remnants of r236148 can be removed. PR: standards/191754 Reviewed by: bde
* In r268463, I misplaced a return in demangle(), causing the function todim2014-08-091-8/+2
| | | | | | | | | | | | erroneously skip symbols that were not mangled at all. Fix this by moving the return into the preceding if block. While here, simplify the code by letting __cxa_demangle() allocate the needed space for the demangled symbol. This also fixes a memory leak, which would occur whenever __cxa_demangle() failed. Reported by: pgj MFC after: 3 days
* Const-ify character stringpfg2014-08-071-1/+1
| | | | | Obtained from: Apple Inc. (Libc 997.90.3) MFC after: 3 days
* Make libohash a proper internallib instead of hidding it in m4bapt2014-08-066-0/+783
| | | | | mandoc development seems to be also using ohash so prepare to share the code when needed
* Rework privatelib/internallibbapt2014-08-061-1/+1
| | | | | | | | | | | | | | Make sure everything linking to a privatelib and/or an internallib does it directly from the OBJDIR rather than DESTDIR. Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing in final installation Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to internal/privatelib Directly link to the .so in case of private library to avoid having to complexify LDFLAGS. Phabric: https://phabric.freebsd.org/D553 Reviewed by: imp, emaste
* Integrate lib/libnv into the build/kyuangie2014-08-058-0/+1429
| | | | | | | | | Rename all of the TAP test applications from <test> to <test>_test to match the convention described in the TestSuite wiki page Phabric: D538 Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division
* Integrate lib/libmp into the build/kyuangie2014-08-043-0/+227
| | | | | | | | | | | | | - Remove the .t wrapper - Fix -Wreturn-type warnings with clang This change has been tested on amd64/i386 Phabric: D530 Reviewed by: jmmv Approved by: jmmv (co-mentor) MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* fix misordering...jmg2014-08-041-3/+3
| | | | | Obtained from: gjb MFC after: 1 week
* add xrefs for the other functions...jmg2014-08-041-1/+5
| | | | | | | There should be more text in this page talking about each of these links, but at least people know about them now... MFC after: 1 week
* Add support for the SCTP_RECONFIG_SUPPORTED and the correspondingtuexen2014-08-041-0/+3
| | | | | | sysctl controlling the negotiation of the RE-CONFIG extension. MFC after: 3 days
* Add support for the SCTP_PKTDROP_SUPPORTED socket option andtuexen2014-08-031-0/+3
| | | | | | | the corresponding sysctl variable. The default is off, since the specification is not an RFC yet. MFC after: 1 week
* Add SCTP socket option SCTP_NRSACK_SUPPORTED to control thetuexen2014-08-031-0/+3
| | | | | | | | NRSACK extension. The default will still be off, since it it not an RFC (yet). Changing the sysctl name will be in a separate commit. MFC after: 1 week
* Add support for the SCTP_PR_SUPPORTED socket option as specified intuexen2014-08-021-0/+3
| | | | | | | http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-prpolicies Add also a sysctl controlling the default of the end-points. MFC after: 1 week
* Cleanup the ECN configuration handling and provide an SCTP sockettuexen2014-08-021-0/+3
| | | | | | | option for controlling ECN on future associations and get the status on current associations. A simialar pattern will be used for controlling SCTP extensions in upcoming commits.
* Add pkgfs, a file system implementation for reading files out of amarcel2014-07-313-0/+793
| | | | | | | | | | | | | | | | | | compressed tarball, aka package. The file system assumes that the files are layed-out in the same order as needed to allow for the package to be streamed. As such, it does not read an entire package into memory first. Some properties of the file system: o Files that start with '+' are silently skipped. These are found in FreeBSD package files. o Files smaller than or equal to 4KB will be cached in memory and as such allow for some flexibility in accessing files out of order. o Files with the .tgz suffix are assumed to be (sub-)packages and signal the end for a directory scan. Obtained from: Juniper Networks, Inc.
OpenPOWER on IntegriCloud