summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* mbtowc(3): set errno to EILSEQ if an incomplete character is passed.pfg2016-03-011-2/+9
| | | | | | | | | | | According to POSIX, The mbtowc() function shall fail if: [EILSEQ] An invalid character sequence is detected. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D5496 Obtained from: OpenBSD (Ingo Schwarze) MFC after: 1 month
* Add two comments explaining the fine points of the hashkib2016-03-011-0/+31
| | | | | | | | implementation. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D5490
* Connect pmc.haswellxeon(3) to the build; looks like it was missed in r279829.trasz2016-03-011-0/+1
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Update jemalloc to 4.1.0.jasone2016-02-292-2/+7
| | | | | | | | | | Add missing Symbol.map entry for __aligned_alloc. Add weak-->strong symbol binding for {malloc_stats_print,mallctl,mallctlnametomib,mallctlbymib} --> {__malloc_stats_print,__mallctl,__mallctlnametomib,__mallctlbymib}. These bindings complete the set necessary to allow applications to replace all malloc-related symbols.
* errno(3) -> errno(2)trasz2016-02-292-6/+5
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* kenv(8) -> kenv(1)trasz2016-02-291-1/+1
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Fix typo.trasz2016-02-291-1/+1
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* sysconf(2) -> sysconf(3)trasz2016-02-291-1/+1
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* sendmsg(3) -> sendmsg(2)trasz2016-02-292-2/+2
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Fix typos in .Xrs.trasz2016-02-292-2/+2
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* MFV r296159pfg2016-02-2942-595/+684
| | | | | | Sync our libedit with NetBSD's libedit 2016-02-27. Obtained from: NetBSD
* Implement process-shared locks support for libthr.so.3, withoutkib2016-02-2813-307/+788
| | | | | | | | | | | | breaking the ABI. Special value is stored in the lock pointer to indicate shared lock, and offline page in the shared memory is allocated to store the actual lock. Reviewed by: vangyzen (previous version) Discussed with: deischen, emaste, jhb, rwatson, Martin Simmons <martin@lispworks.com> Tested by: pho Sponsored by: The FreeBSD Foundation
* RPC: update the getrpcbyname() definition to include a const qualifier.pfg2016-02-262-3/+3
| | | | | | | Add const qualifier making getrpcbyname() and getrpcbyname_r() prototypes match those used in latest Sun RPC code (TI-RPC 2.3). Obtained from: NetBSD
* Remove WARNS inherited fine by ../Makefile.inc.bdrewery2016-02-267-12/+3
| | | | Sponsored by: EMC / Isilon Storage Division
* Make it clear that the "size" argument is for the dst string.bdrewery2016-02-261-3/+3
| | | | | | | | The rest of the manpage already referenced 'dstsize' but did not rename the variable in the prototype in r257646. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* Update dependencies.bdrewery2016-02-266-2/+100
| | | | Sponsored by: EMC / Isilon Storage Division
* Remove unneeded lines.bdrewery2016-02-268-17/+6
| | | | | | | | - WARNS can be inherited from lib/Makefile.inc - CFLAGS referred to a non-existent directory and this shouldn't be needed anyhow due to the build picking up includes from WORLDTMP. Sponsored by: EMC / Isilon Storage Division
* These can build in parallel.bdrewery2016-02-262-0/+4
| | | | Sponsored by: EMC / Isilon Storage Division
* Make unions in PowerPC libc endian-safe.nwhitehorn2016-02-264-4/+44
|
* Make FPSCR definition endian clean.nwhitehorn2016-02-261-0/+5
| | | | | | | PR: 207526 Submitted by: Simon Byrne Obtained from: Julia MFC after: 1 month
* rpc: fix failure to clear string by passing the wrong size to memset.pfg2016-02-261-1/+1
| | | | | | | Noted by NetBSD's PR/21014 Obtained from: NetBSD (CVS Rev. 1.24, 1.25) MFC after: 1 month
* Convert casperd(8) daemon to the libcasper.oshogbo2016-02-2535-547/+2448
| | | | | | | | | | | | | | | | | | | | After calling the cap_init(3) function Casper will fork from it's original process, using pdfork(2). Forking from a process has a lot of advantages: 1. We have the same cwd as the original process. 2. The same uid, gid and groups. 3. The same MAC labels. 4. The same descriptor table. 5. The same routing table. 6. The same umask. 7. The same cpuset(1). From now services are also in form of libraries. We also removed libcapsicum at all and converts existing program using Casper to new architecture. Discussed with: pjd, jonathan, ed, drysdale@google.com, emaste Partially reviewed by: drysdale@google.com, bdrewery Approved by: pjd (mentor) Differential Revision: https://reviews.freebsd.org/D4277
* DIRDEPS_BUILD: Regenerate without local dependencies.bdrewery2016-02-24127-12814/+0
| | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division
* FAST_DEPEND: Always run depend via beforebuild which removes many hacks.bdrewery2016-02-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will generate dependencies rather than depending on the previous behavior of depending on the guessed OBJS: *.h dependecies or a user running 'make depend'. Experimentation showed that depending only on headers was not enough and prone to .ORDER errors. Downstream users may also have added dependencies into beforedepend or afterdepend targets. The safest way to ensure dependencies are generated before build is to run 'make depend' beforehand rather than just depending on DPSRCS+SRCS. Note that the OBJS_DEPEND_GUESS mechanism (a.k.a .if !exists(.depend) then foo.o: *.h) is still useful as it improves incremental builds with missing .depend.* files and allows 'make foo.o' to usually work, while this 'beforebuild: depend' ensures that the build will always find all dependencies. The 'make foo.o' case has no means of a 'beforebuild' hook. This also removes several hacks in the DIRDEPS_BUILD: - NO_INSTALL_INCLUDES is no longer needed as it mostly was to work around .ORDER problems with building the needed headers early. - DIRDEPS_BUILD: It is no longer necesarry to track "local dependencies" in Makefile.depend. These were only in Makefile.depend for 'clean builds' since nothing would generate the files due to skipping 'make depend' and early dependency bugs that have been fixed, such as adding headers into SRCS for the OBJS_DEPEND_GUESS mechanism. Normally if a .depend file does not exist then a dependency is added by bsd.lib.mk/bsd.prog.mk from OBJS: *.h. However, meta.autodep.mk creates a .depend file from created meta files and inserts that into Makefile.depend. It also only tracks *.[ch] files though which can miss some dependencies that are hooked into 'make depend'. This .depend that is created then breaks incremental builds due to the !exists(.depend) checks for OBJS_DEPEND_GUESS. The goal was to skip 'make depend' yet it only really works the first time. After that files are not generated as expected, which r288966 tried to address but was using buildfiles: rather than beforebuild: and was reverted in r291725. As noted previously, depending only on headers in beforebuild: would create .ORDER errors in some cases. meta.autodep.mk is still used to generate Makefile.depend though via: gendirdeps: Makefile.depend .END: gendirdeps This commit allows removing all of the "local dependencies" in Makefile.depend which cuts down on churn and removes some of the arch-dependent Makefile.depend files. The "local dependencies" were also problematic for bootstrapping. Sponsored by: EMC / Isilon Storage Division
* DIRDEPS_BUILD: Update dependencies.bdrewery2016-02-241-1/+0
| | | | Sponsored by: EMC / Isilon Storage Division
* db(3): Fix aliasing warnings from modern GCC.pfg2016-02-241-3/+2
| | | | | | While here also drop a malloc cast. Obtained from: NetBSD (CVS Rev. 1.18 - 1.20)
* db(3): Fix aliasing warnings from modern GCC.pfg2016-02-241-6/+12
| | | | Obtained from: NetBSD (CVS Rev. 1.20)
* Add handling for non-native error values to libsysdecode.jhb2016-02-236-3/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new functions, sysdecode_abi_to_freebsd_errno() and sysdecode_freebsd_to_abi_errno(), which convert errno values between the native FreeBSD ABI and other supported ABIs. Note that the mappings are not necessarily perfect meaning in some cases multiple errors in one ABI might map to a single error in another ABI. In that case, the reverse mapping will return one of the errors that maps, but which error is non-deterministic. Change truss to always report the raw error value to the user but use libsysdecode to map it to a native errno value that can be used with strerror() to generate a description. Previously truss reported the "converted" error value. Now the user will always see the exact error value that the application sees. Change kdump to report the truly raw error value to the user. Previously kdump would report the absolute value of the raw error value (so for Linux binaries it didn't output the FreeBSD error value, but the positive value of the Linux error). Now it reports the real (i.e. negative) error value for Linux binaries. Also, use libsysdecode to convert the native FreeBSD error reported in the ktrace record to the raw error used by the ABI. This means that the Linux ABI can now be handled directly in ktrsysret() and removes the need for linux_ktrsysret(). Reviewed by: bdrewery, kib Helpful notes: wblock (manpage) Differential Revision: https://reviews.freebsd.org/D5314
* If we close or sync a hash-based db file, make sure to call fsync todwmalone2016-02-231-1/+5
| | | | | | | | | make sure the changes are on disk. The people at pfSense noticed that it didn't always make it to the disk soon enough with soft updates. Differential Revision: https://reviews.freebsd.org/D5186 Reviewed by: garga, vangyzen, bapt, se MFC after: 1 week
* As <machine/param.h> is included from <sys/param.h>, there is no needskra2016-02-221-1/+0
| | | | | | | to include it explicitly when <sys/param.h> is already included. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5378
* Rename pte.h to pte-v4.h and start including directly either pte-v4.hskra2016-02-191-4/+6
| | | | | | | | | | | | | | or pte-v6.h in files which needs it. There are quite internal definitions in pte-v4.h and pte-v6.h headers specific for corresponding pmap implementation. These headers should be included only in very few files and an intention is to not hide for which implementation such files are. Further, sys/arm/arm/elf_trampoline.c is an example of file which uses armv4 like pmap implementation for both armv4 and armv6 platforms. This is another reason why pte.h which includes specific header according to __ARM_ARCH is not created.
* Remove sys/types.hkevlo2016-02-191-2/+1
|
* Bump .Dd for r295764bjk2016-02-181-3/+3
| | | | Also fix a spelling and grammar nit while here.
* Right now, the "virtual hole" API feature of lseek(2) is very vaguelysobomax2016-02-181-4/+12
| | | | | | | | | | | documented and easy to miss. At the same time, it's pretty important for anyone who is trying to use SEEK_HOLE/SEEK_DATA in real app. Try to bridge that gap by making that description more pronounced and also document how it affects failure codes. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D5162
* Remove dd xfer stats emitted during buildworldemaste2016-02-182-2/+2
| | | | They result in gratuitous differences when comparing build log output.
* Remove redundant ARM_L2_ADDR_BITS and L2_ADDR_BITS definitions andskra2016-02-182-4/+1
| | | | replace them by primary ones where needed.
* Fix build race after r295643.bdrewery2016-02-171-0/+2
| | | | Sponsored by: EMC / Isilon Storage Division
* DIRDEPS_BUILD: Hookup CLANG_EXTRAS.bdrewery2016-02-167-0/+114
| | | | Sponsored by: EMC / Isilon Storage Division
* DIRDEPS_BUILD: Update dependencies.bdrewery2016-02-161-0/+13
| | | | Sponsored by: EMC / Isilon Storage Division
* fputs: Return the number of bytes written.pfg2016-02-151-1/+1
| | | | | | | Fix r295631: wrong value. Pointy hat: pfg (me) Pointed out by: bde
* getln: We cannot expand the buffer beyond INT_MAX.pfg2016-02-152-2/+12
| | | | | | | | | In such cases return ENOMEM. This is a limitation of our implementation, alternatively you may consider getline(3). Differential Revision: https://reviews.freebsd.org/D442 (Partial) Obtained from: Apple Inc. (Libc 997.90.3) Relnotes: yes
* fputs: Return the number of bytes written.pfg2016-02-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | POSIX.1-2008 requires that successful completion simply return a non-negative integer. We have regularly returned a constant value. Another, equally valid, implementation convention implies returning the number of bytes written. Adopt this last convention to be in line with what Apple's libc does. POSIX also explicitly notes: Note that this implementation convention cannot be adhered to for strings longer than {INT_MAX} bytes as the value would not be representable in the return type of the function. For backwards-compatibility, implementations can return the number of bytes for strings of up to {INT_MAX} bytes, and return {INT_MAX} for all longer strings. Developers shouldn't depend specifically on either convention but the change may help port software from Apple. Differential Revision: https://reviews.freebsd.org/D442 (Partial) Obtained from: Apple Inc. (Libc 997.90.3 with changes) Relnotes: yes
* Add libpe for elfcopy(1) PE/COFF supportemaste2016-02-122-0/+36
| | | | Sponsored by: The FreeBSD Foundation
* Update ELF Tool Chain to upstream rev 3400emaste2016-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Some notable improvements include: readelf: - Add AArch64 relocation definitions. - Report value of unknown relocation types. elfcopy: - Consider symbols with STB_GNU_UNIQUE binding as global symbols. - Fixed support for VMA adjustment for loadable sections found in relocatable objects. - Handle nameless global symbols. - Improve wildcard matching for !-prefixed symbols. - Add PE/COFF support. elfdump: - Improve section type reporting. - Add MIPS-specific section types. This update also includes a significant number of bug fixes. PR: 207091 [exp-run] Sponsored by: The FreeBSD Foundation
* Fix double-free error: r289419 moved all error handling in http_connect()des2016-02-111-1/+0
| | | | | | | | | to the end of the function, but did not remove a fetch_close() call which was made redundant by the one in the shared error-handling code. PR: 206774 Submitted by: Christian Heckendorf <heckendorfc@gmail.com> MFC after: 3 days
* Use the new insecure-lan-zones option instead of listing each AS112 zonedes2016-02-111-1/+1
| | | | | | separately. MFC after: 3 days
* Remove man page references to rndassociates.com, which has been taken overjamie2016-02-101-1/+0
| | | | by a domain squatter.
* Include sys/_task.h into uma_int.h, so that taskqueue.h isn't aglebius2016-02-091-1/+0
| | | | | | requirement for uma_int.h. Suggested by: jhb
* Fix the gcc build after r295407.markj2016-02-081-1/+1
| | | | X-MFC-With: r295407
* If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbolskib2016-02-087-6/+16
| | | | | | | | | | | | | | | | | | | | | | do not participate in the global symbols namespace, but rtld locks are still replaced and functions are interposed. In particular, __pthread_map_stacks_exec is resolved to the libc version. If a library is loaded later, which requires adjustment of the stack protection mode, rtld calls into libc __pthread_map_stacks_exec due to the symbols scope. The libc version might recurse into binder and recursively acquire rtld bind lock, causing the hang. Make libc __pthread_map_stacks_exec() interposed, which synchronizes rtld locks and version of the stack exec hook when libthr loaded, regardless of the symbol scope control or symbol resolution order. The __pthread_map_stacks_exec() symbol is removed from the private version in libthr since libc symbol now operates correctly in presence of libthr. Reported and tested by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
OpenPOWER on IntegriCloud