summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove __ARM_EABI__ from more places in libc as this is the only ARM ABIandrew2015-05-313-19/+7
| | | | we support.
* Use a register to set the cpsr bits. The ip register is safe to be changedandrew2015-05-312-8/+12
| | | | | | | | within all of these functions, and is only stored in some to correctly pad the stack. This will be needed to build as Thumb-2 as, unlike with ARM instructions, the msr instruction only takes a register as the input.
* Removed unused special fork() implementations.brooks2015-05-293-107/+1
| | | | | | | | | | | The arm version hasn't been used in ages. The mips version uses a valid, but pointless check of v1 and has been unhooked from the build since r276630. Differential Revision: https://reviews.freebsd.org/D2592 Reviewed by: emaste Sponsored by: DARPA, AFRL
* Fix __fpclassifyl when double == long double. As with r283693 this isandrew2015-05-291-0/+10
| | | | | | needed on ARM and PowerPC. MFC after: 1 Week
* Fix __isinfl on architectures where double == long double. This is theandrew2015-05-291-3/+5
| | | | | | case on at least ARM and PowerPC. MFC after: 1 week
* Export a list of VM objects in the system via a sysctl. The list can bejhb2015-05-274-2/+174
| | | | | | | | | | examined via 'vmstat -o'. It can be used to determine which files are using physical pages of memory and how much each is using. Differential Revision: https://reviews.freebsd.org/D2277 Reviewed by: alc, kib MFC after: 2 weeks Sponsored by: Norse Corp, Inc. (forward porting to HEAD/10)
* Add <sys/user.h> to the SYNOPSIS of the kinfo_get*() functions since thesejhb2015-05-274-4/+8
| | | | | | functions all return types that are defined in that header. MFC after: 1 week
* Update to ELF Tool Chain r3223emaste2015-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Highlights (upstream revisions): - Fix SHT_GROUP handling in elfcopy/strip (3206 3220 3221) - Misc elfcopy / strip bug fixes (3215 3216 3217) - Many C++ demangler improvements (3199 3200 3201 3202 3203 3204 3205 3208 3210 3211 3212) - Improve GNU binutils compatibility in elfcopy / strip (3213 3214) - Add -g option to readelf(1): dump contents of section groups (3219) - Add EM_IAMCU 32-bit Intel MCU (3198) Also add a compat #define for building with older FreeBSD ELF headers. The GRP_COMDAT flag was added to elf_common.h in r283110, but it's not available during the bootstrap build. It is also convenient to be able to build on older hosts. Thanks to antoine@ for tracking down issues through multiple exp-runs and to kaiw@ for fixing. PR: 198611 (exp-run), 200350 Sponsored by: The FreeBSD Foundation
* memmem(3): empty little string matches the beginning of the big stringemaste2015-05-262-11/+17
| | | | | | | | | | | | This function originated in glibc, and this matches their behaviour (and NetBSD, OpenBSD, and musl). An empty big string (arg "l") is handled by the existing l_len < s_len test. Reviewed by: bapt, ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2657
* Upgrade our copy of clang and llvm to 3.6.1 release.dim2015-05-256-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | This release contains the following cherry-picked revisions from upstream trunk: 226124 226151 226164 226165 226166 226407 226408 226409 226652 226905 226983 227084 227087 227089 227208 227209 227210 227211 227212 227213 227214 227269 227430 227482 227503 227519 227574 227822 227986 227987 227988 227989 227990 228037 228038 228039 228040 228188 228189 228190 228273 228372 228373 228374 228403 228765 228848 228918 229223 229225 229226 229227 229228 229230 229234 229235 229236 229238 229239 229413 229507 229680 229750 229751 229752 229911 230146 230147 230235 230253 230255 230469 230500 230564 230603 230657 230742 230748 230956 231219 231237 231245 231259 231280 231451 231563 231601 231658 231659 231662 231984 231986 232046 232085 232142 232176 232179 232189 232382 232386 232389 232425 232438 232443 232675 232786 232797 232943 232957 233075 233080 233351 233353 233409 233410 233508 233584 233819 233904 234629 234636 234891 234975 234977 235524 235641 235662 235931 236099 236306 236307 Please note that from 3.5.0 onwards, clang and llvm require C++11 support to build; see UPDATING for more information.
* Remove SUBDIR_DEPEND for non-existent libreadline directoryngie2015-05-241-1/+0
| | | | | | libreadline lives under gnu/lib MFC after: 1 week
* When only 2 bytes can be read from a 4 byte UTF-16 character in a base64tijl2015-05-241-24/+19
| | | | | | | | | encoded chunk of a UTF-7 string, treat that as an incomplete character and return an error instead of a shift sequence and no error. Also check that the low 2 bytes have a valid value. MFC after: 1 week
* Fix decoding of UTF-7 when a base64 encoded chunk appears at the end oftijl2015-05-241-5/+1
| | | | | | | | | | | | | | | | | | | | | | the input buffer. _citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it could restore this state on an incomplete character such that the next call would restart the decoding. The problem was that "-" (end of base64 mode) at the end of a string was also treated as an incomplete character but was also removed from the state buffer. So the initial state would be restored (with base64 mode) and the next call would no longer see the "-" so it continued in base64 mode. This state saving/restoring isn't needed here. It's already handled elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just remove it. Also initialise *nresult. PR: 200398 Tested by: delphij MFC after: 1 week
* Remove the stray DEBUG_FLAGS=-g line that snuck in with theimp2015-05-211-1/+0
| | | | soft-updates journaling project merge in r207141.
* Drop libmandoc and incorporate it into the main mandoc Makefilebapt2015-05-212-45/+0
| | | | | This simplifies maintainance of mandoc(1). Note that the same direction was taken on OpenBSD
* Remove clause 3 and 4 from the licensebapt2015-05-211-2/+0
| | | | Obtained from: NetBSD
* Create links to the libprocstat man pages for all of the libprocstat ↵allanjude2015-05-212-26/+57
| | | | | | | | | | | | | functions so they can be looked up by name Add a cross refrence to libprocstat in the procstat.1 man page Differential Revision: https://reviews.freebsd.org/D2578 Suggested by: jmg Reviewed by: brueffer Approved by: wblock (mentor) MFC after: 1 week Sponsored by: ScaleEngine Inc.
* Remove the write-only variable phent. We currently do not check thekib2015-05-201-5/+0
| | | | | | | | size of the program header's entries. Reported by: adrian (by using gcc 4.9) Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Fix underlinkingbapt2015-05-191-0/+2
|
* All FreeBSD platforms are elf: move i386-elf to i386emaste2015-05-196-3/+2
| | | | | | | | This was a leftover from when we had both i386 a.out and ELF. Reviewed by: kib, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2591
* Use fixed enum values for PMC_CLASSES().jhb2015-05-191-5/+12
| | | | | | | | | This removes one of the frequent causes of ABI breakage when new CPU types are added to hwpmc(4). Differential Revision: https://reviews.freebsd.org/D2586 Reviewed by: davide, emaste, gnn (earlier version) MFC after: 2 weeks
* Add Performance Monitoring Counters support for AArch64.br2015-05-191-0/+77
| | | | | | | | | | Family-common and CPU-specific counters implemented. Supported CPUs: ARM Cortex A53/57/72. Reviewed by: andrew, bz, emaste, gnn, jhb Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2555
* Synchronize libedit with NetBSDbapt2015-05-188-72/+116
| | | | | It incorporates and fixes our patches to get el_gets return the proper count of characters in unicode mode.
* Drop some unnecessary casts.pfg2015-05-181-4/+3
| | | | | Reported by: Clang static analyzer Obtained from: NetBSD
* In r279493, the functions pzero[f](), qzero[f], pone[f](),kargl2015-05-174-4/+4
| | | | | | | | and qone[f]() were marked as __inline, but their forward declarations were not updated. Fix the forward declarations to match the actual function declarations. Requested by: bde
* Some third-party malloc(3) implementations use pthread_setspecific(3)kib2015-05-151-110/+91
| | | | | | | | | | | | | | | | | | | | | | | | | to handle per-thread information. Since our pthread_setspecific() implementation calls calloc(3) to allocate per-thread specific data storage, things get complicated. Switch the allocator to use bare mmap(2). There is some loss of the allocated page, since e.g. on amd64, PTHREAD_KEYS_MAX * sizeof(struct pthread_specific_elem) is 3K (it actually spans whole page due to padding), but I believe it is more acceptable than additional code for specialized allocator(). The alternatives would either to make the specific data array be part of the struct thread, or use internal bindings to call the libc malloc, avoiding interposing. Also do the style pass over the thr_spec.c, esp. simplify the conditionals nesting by returning early when an error detected. Remove trivial comments. Found by: yuri@rawbw.com PR: 200138 Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Update to ELF Tool Chain r3197emaste2015-05-141-1/+1
| | | | | | | | | | Highlights: - Fix man page markup, whitespace, and typos - Fix sh_info of SHT_GROUP section to point to the correct string - Improve validation in readelf and elfcopy/strip - Handle DWARF 4's DW_AT_high_pc in addr2line Sponsored by: The FreeBSD Foundation
* Add fabs() to arm64 libcemaste2015-05-143-1/+36
| | | | | Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2532
* Remove redundant csu subdir logicemaste2015-05-121-11/+1
| | | | | | | | | The appropriate subdirectories are handled by lib/csu/Makefile. There's no need to duplicate this logic in Makefile.inc1 and lib/Makefile. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2523
* Teach bits of libc about Thumb. This adds the if-then instructions neededandrew2015-05-125-4/+48
| | | | | | | | | to handle the ARM conditional execution. While here fix a bug found by this in the hard-float code, cc is the opposite of cs. The former is used for 'less than' in floating-point code and is executed when the C (carry) bit is clear, the latter is used when greater than, equal, or unordered, and is executed when the C bit is set.
* Revert r282775 for now. The added dependency would cause problems fordelphij2015-05-123-5/+12
| | | | | | e.g. ports-mgmt/pkg and we would like to do an exp-build. Requested by: bdrewery
* Use the GOT_* macros to help simplify the code, these work with both picandrew2015-05-112-26/+9
| | | | and non-pic code, and to build for Thumb.
* Revert r281372, it's no longer needed after r282726 (fix for PR 199119) as thedelphij2015-05-113-12/+5
| | | | symbol conflict between libmd and libcrypto have been solved.
* Unbreak MIPS build following rev. 282726thomas2015-05-118-6/+49
| | | | | | | | Introduce further adjustments to the renaming of libmd symbols: make sure that we do not generate dangling weak aliases, as this causes build failures on MIPS. Tested by: sbruno
* Unbreak build following rev. 282726thomas2015-05-106-0/+130
| | | | | | | | | | | | | | (Makefile.inc1): add dependency of xinstall on libmd to avoid failure of parallel bootstrap. (lib/libmd/*.h): do not redefine symbols if already defined as macros (libcrypt uses the same sources internally, redefining symbols with a prefix of its own). Fixes build failures caused by previous change to libmd. Reported by: ian Pointy hat to: thomas
* recv(),send(): Directly call interposing entry instead of going through PLT.jilles2015-05-102-2/+10
| | | | | | recv() and send()'s calls to recvfrom() and sendto() are much like waitpid()'s call to wait4(), and likewise need not allow PLT interposing on the called function.
* Ensure libmd symbols do not clash with libcryptothomas2015-05-1014-1/+195
| | | | | | | | | | | | | Add a prefix to all symbols in libmd to avoid incompatibilites with same-named, but not binary compatible, symbols from libcrypto. Also introduce Weak aliases to avoid the need to rebuild dependent binaries and a major version bump. PR: 199119 Differential Revision: D2216 Reviewed by: roberto, delphij MFC after: 2 weeks
* Tweak the comment here some more. In particular, the previous openingjhb2015-05-061-7/+7
| | | | | | sentence was a bit confusing. Noted by: kib
* Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().neel2015-05-062-26/+19
| | | | | | | | | | | | | | | | | | Prior to this change both functions returned 0 for success, -1 for failure and +1 to indicate that an exception was injected into the guest. The numerical value of ERESTART also happens to be -1 so when these functions returned -1 it had to be translated to a positive errno value to prevent the VM_RUN ioctl from being inadvertently restarted. This made it easy to introduce bugs when writing emulation code. Fix this by adding an 'int *guest_fault' parameter and setting it to '1' if an exception was delivered to the guest. The return value is 0 or EFAULT so no additional translation is needed. Reviewed by: tychon MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D2428
* Remove the note about seekdir() removing telldir() cookies. That wasjhb2015-05-061-7/+1
| | | | | | removed back in r269204. MFC after: 3 days
* A few style fixes and expand the comment a bit on what _fixtelldir() isjhb2015-05-061-6/+10
| | | | doing.
* Tweak seekdir, telldir and readdir so that when htere are deletes going on,julian2015-05-055-1/+65
| | | | | | | | | | | as seek to teh last location saved will still work. This is needed for Samba to be able to correctly handle delete requests from windows. This does not completely fix seekdir when deletes are present but fixes the worst of the problems. The real solution must involve some changes to the API for eh VFS and getdirentries(2). Obtained from: Panzura inc MFC after: 1 week
* Fix major copy/paste and other style errors.pluknet2015-05-051-5/+10
|
* Rework PRIVATELIBbapt2015-05-042-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Now when a lib is marked as PRIVATELIB it is renamed into libprivate$foo instead of being installed in /usr/lib/private and playing with rpath. Also allow to install headers for PRIVATELIBS in that case the headers will be installed in /usr/include/private/$foo Keep the headers under a private namespace to prevent third party build system to easily find them to ensure they are only used on purpose. This allows for non base applications to statically link against a library in base which is linked to a privatelib Treating PRIVATELIBS as regular libraries allows to push them into our current compatX packages if needed. While here finish promotion of libevent as PRIVATELIB Install header for bsdstat and libucl Differential Revision: https://reviews.freebsd.org/D2365 Reviewed by: brooks, des Discussed with: imp
* Various updates to the ftruncate(2) documentation:jhb2015-05-041-7/+19
| | | | | | | | | | | | | | | | | - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472 (2) Submitted by: andrew@ugh.net.au (2) MFC after: 1 week
* Partially revert r255486, the first argument to socketpair() is a socketjhb2015-05-041-4/+4
| | | | | | | | | domain, not a file descriptor. Use 'domain' instead of the original 'd' for this argument to match socket(2). PR: 199491 Reported by: sp55aa@qq.com MFC after: 1 week
* Add test case for unpack with diffrent flags.oshogbo2015-05-021-0/+35
| | | | Approved by: pjd (mentor)
* Introduce the NV_FLAG_NO_UNIQUE flag. When set, it allows to storeoshogbo2015-05-021-0/+2
| | | | | | | | | | | | multiple values using the same key in a nvlist. Approved by: pjd (mentor) Obtained from: WHEEL Systems (http://www.wheelsystems.com) Update man page. Reviewed by: AllanJude Approved by: pjd (mentor)
* Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno.oshogbo2015-05-0213-39/+87
| | | | | | | | | | | | | | | | | Change the nvlist_recv() function to take additional argument that specifies flags expected on the received nvlist. Receiving a nvlist with different set of flags than the ones we expect might lead to undefined behaviour, which might be potentially dangerous. Update consumers of this and related functions and update the tests. Approved by: pjd (mentor) Update man page for nvlist_unpack, nvlist_recv, nvlist_xfer, cap_recv_nvlist and cap_xfer_nvlist. Reviewed by: AllanJude Approved by: pjd (mentor)
* fork(2): Add a note to the effect that kqueue descriptors, unlike othermarkj2015-05-021-2/+5
| | | | | | | descriptor types, are not inherited from the parent process. Reported by: kmacy MFC after: 1 week
OpenPOWER on IntegriCloud