aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Disable h_raw/h_read with gccEnji Cooper2015-10-301-2/+7
| | | | | | | | | | I forgot that these testcases fail with gcc 4.2.1; add a note to that effect MFC after: never Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290185
* - Re-enable h_raw with clang 3.7.0+Enji Cooper2015-10-301-1/+2
| | | | | | | | | | | - Fix the compiler check to allow the test to be compiled for gcc PR: 196430 MFC after: never Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290183
* Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ ↵Enji Cooper2015-10-301-2/+1
| | | | | | | | | | warning MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290179
* Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suiteEnji Cooper2015-10-301-0/+1
| | | | | | | | | | | | | as lib/libc/rpc This testcase requires rpcbind be up in running; otherwise the testcases will time out and be skipped MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290177
* Use memmove(3) to avoid overlapping copy.Bryan Drewery2015-10-291-1/+1
| | | | | | | | | Reported by: valgrind MFC after: 2 weeks X-MFC-With: r290168 Notes: svn path=/head/; revision=290169
* Fix several memory leaks, and crashes, in iconvlist(3).Bryan Drewery2015-10-291-18/+26
| | | | | | | | | | | | | | | | | | - Both curitem and curitem (via the names list) was always leaked. - malloc(3) failures lead to some leaks. - __bsd___iconv_get_list() failure lead to a crash since its error was not handles and __bsd___iconv_free_list() is not NULL-safe. I have slightly refactored this to avoid extra malloc and free logic in cases of malloc(3) failing. There are still bad assumptions here that I did not deal with. One of which is that the data will always have a '/' so the strchr(3) will not return NULL. Coverity CID: 1130055 1130054 1130053 Notes: svn path=/head/; revision=290168
* Add _flags2 per jhb@ suggestion since no room left in _flags.Andrey A. Chernov2015-10-286-10/+7
| | | | | | | | | Rewrite O_APPEND flag checking using new __S2OAP flag. MFC after: 3 weeks Notes: svn path=/head/; revision=290110
* Update libucl to latest git snapshot (20151027)Baptiste Daroussin2015-10-271-0/+2
| | | | Notes: svn path=/head/; revision=290071
* libedit: Use correct buffer lengths in vi mode v command.Jilles Tjoelker2015-10-271-6/+6
| | | | | | | | | | | | | | | | | Libedit's vi mode provides a v command to edit the current line in vi(1) (hard-coded to vi, in fact). When Unicode/wide character mode was added, this command started truncating and/or corrupting the edited text. This commit fixes v if the text fits into the buffer. If the text is longer, it is truncated. PR: 203743 Obtained from: NetBSD (originally submitted by me) Notes: svn path=/head/; revision=290065
* According to POSIX, a write operation shall start at the current size ofAndrey A. Chernov2015-10-251-0/+3
| | | | | | | | | the stream (if mode had 'a' as the first character). MFC after: 1 week Notes: svn path=/head/; revision=289931
* Fix compiling with gcc [4.2.1] after r287797 when MK_HESOID == no andEnji Cooper2015-10-252-13/+9
| | | | | | | | | | | | | | | | | | | | | | | MK_NIS == no by converting `i` back to an int, and instead cast the loop comparison to `int` The loop comparison is iterating the len(ns_dtab)-1, because the last element is the sentinel tuple { NULL, NULL, NULL, }, so when both HESOID and NIS are off, len(ns_dtab)-1 == 1 - 1 == 0, and the loop is skipped because the expression is tautologically false While here, convert `(sizeof(x) / sizeof(x[0]))` to `nitems(x)` Tested with: clang 3.7.0, gcc 4.2.1, and gcc 4.9.4 [*] with MK_NIS={no,yes} and by running bash -lc 'id -u && id -g && id' * gcc 4.9.4 needs another patch in order for the compile to succeed with -Werror with lib/libc/gen/getgrent.c Reported by: jhibbits Notes: svn path=/head/; revision=289925
* Since no room left in the _flags, reuse __SALC for O_APPEND.Andrey A. Chernov2015-10-245-19/+31
| | | | | | | | | | It helps to remove _fcntl() call from _ftello() and optimize seek position calculation in _swrite(). MFC after: 3 weeks Notes: svn path=/head/; revision=289863
* resolver: abuse _res a little lessEric van Gyzen2015-10-231-39/+52
| | | | | | | | | | | | | | | | | | | | In the past, _res was a global variable. Now, it's multiple function calls. Several functions in the resolver use _res multiple times and therefore call the function(s) far more than necessary. Fix those callers to store the result of _res in a local variable. Add __noinline to the definition of res_init() to avoid the code bloat that these changes would have otherwise incurred. Thanks to jilles for noticing this. Reviewed by: jilles MFC after: 1 week Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3887 Notes: svn path=/head/; revision=289837
* figpar(3) merged to stable/10 before release/10.2.0Devin Teske2015-10-231-3/+3
| | | | | | | | MFC after: 3 days X-MFC-to: stable/10 Notes: svn path=/head/; revision=289794
* Bump date/copyright after correcting HISTORYDevin Teske2015-10-231-2/+2
| | | | | | | | | MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r289790 Notes: svn path=/head/; revision=289793
* dpv(3) merged to stable/10 before release/10.2.0Devin Teske2015-10-231-1/+1
| | | | | | | | MFC after: 3 days X-MFC-to: stable/10 Notes: svn path=/head/; revision=289790
* Remove more disconnected libgpib items missed in r276214.Bryan Drewery2015-10-225-1467/+0
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289730
* Revert lib/libc/gen/dirname.3@r289695Enji Cooper2015-10-211-2/+0
| | | | | | | This is why I use branches usually, not commit directly to head Notes: svn path=/head/; revision=289696
* Revert r289694Enji Cooper2015-10-211-0/+2
| | | | | | | I committed some other undesirable local changes by accident Notes: svn path=/head/; revision=289695
* cpuset.9: Link to/from the new pageConrad Meyer2015-10-202-4/+6
| | | | | | | | | A follow-up to r289667. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289668
* Switch pl_child_pid from int to pid_t.John Baldwin2015-10-201-2/+2
| | | | | | | | | Reviewed by: emaste, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3857 Notes: svn path=/head/; revision=289636
* Switch the default OpenMP runtime for clang to libomp (from the LLVMDimitry Andric2015-10-182-2/+2
| | | | | | | | project), as libgomp is not supported anyway. You can use the devel/llvm-devel port to install a recent copy of the OpenMP runtime. Notes: svn path=/head/; revision=289525
* Make libxo depend on libutil because it uses humanize_number after r287111Enji Cooper2015-10-183-4/+4
| | | | | | | | | | | Remove overlinking in lib/libxo/tests, sbin/savecore, and usr.bin/{iscsictl,wc,xo} PR: 203673 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289490
* Document bitset(9)Conrad Meyer2015-10-171-2/+3
| | | | Notes: svn path=/head/; revision=289467
* Conditionalize the META_MODE tool handling on MK_META_MODE.Bryan Drewery2015-10-171-0/+2
| | | | | | | | | | It was not being used outside of META_MODE but this should make it more clear that it is only for META_MODE. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289458
* Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fdEnji Cooper2015-10-171-1/+3
| | | | | | | | | | | | | descriptor to avoid trashing valid file descriptors that access dev->fd at a later point in time PR: 192671 Submitted by: Scott Ferris <scott.ferris@isilon.com> MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289450
* Use fopen()'s newfangled "e" flag instead of explicit fcntl() calls.Dag-Erling Smørgrav2015-10-161-5/+3
| | | | | | | | | PR: 199801 Submitted by: Jukka Ukkonen <jau@iki.fi> MFC after: 1 week Notes: svn path=/head/; revision=289420
* Fix two bugs in HTTPS tunnelling:Dag-Erling Smørgrav2015-10-161-4/+32
| | | | | | | | | | | | | - If the proxy returns a non-200 result, set the error code accordingly so the caller / user gets a somewhat meaningful error message. - Consume and discard any HTTP response header following the result line. PR: 194483 Tested by: Fabian Keil <fk@fabiankeil.de> MFC after: 1 week Notes: svn path=/head/; revision=289419
* Add more SUBDIR_PARALLEL.Bryan Drewery2015-10-151-0/+1
| | | | | | | | MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289393
* libstdc++ also snook in incorrectly in r267511, despite not being a realBryan Drewery2015-10-151-1/+0
| | | | | | | | | subdir. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289389
* Remove unneeded libg++ reference that came in with r267511 based on a removedBryan Drewery2015-10-151-1/+0
| | | | | | | | | comment. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289388
* Fix another ++= parsed as '+=', missed in r289384.Bryan Drewery2015-10-151-1/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289387
* Let the SUBDIR_DEPEND*c++ variables actually work rather than being parsedBryan Drewery2015-10-151-2/+2
| | | | | | | | | as a +=. These were safe due to a .WAIT very early on. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289384
* For the Cortex-A8 use the a8 and not the a9 events table.Bjoern A. Zeeb2015-10-141-1/+1
| | | | | | | | | MFC after: 2 weeks Sponsored by: DARPA/AFRL Differential Revision: https://reviews.freebsd.org/D3882 Notes: svn path=/head/; revision=289317
* resolver: automatically reload /etc/resolv.confEric van Gyzen2015-10-142-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | On each resolver query, use stat(2) to see if the modification time of /etc/resolv.conf has changed. If so, reload the file and reinitialize the resolver library. However, only call stat(2) if at least two seconds have passed since the last call to stat(2), since calling it on every query could kill performance. This new behavior is enabled by default. Add a "reload-period" option to disable it or change the period of the test. Document this behavior and option in resolv.conf(5). Polish the man page just enough to appease igor. https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html Reviewed by: kp, wblock Discussed with: jilles, imp, alfred MFC after: 1 month Relnotes: yes Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3867 Notes: svn path=/head/; revision=289315
* Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in toEnji Cooper2015-10-124-262/+508
| | | | | | | | | | | | | | | | | | | | | the FreeBSD test suite functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided by upstream. A handful of testcases in lib/libarchive/tests have been disabled as they were failing when run with kyua test (see BROKEN_TESTS in lib/libarchive/tests/Makefile) As a sidenote: this removes the check/test targets from the Makefiles as they don't match the pattern used in the rest of the FreeBSD test suite. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289195
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-1244-100/+17
| | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* Change the default setting of kern.ipc.shm_allow_removed from 0 to 1.Edward Tomasz Napierala2015-10-101-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need for manually changing this flag for Google Chrome users. It also improves compatibility with Linux applications running under Linuxulator compatibility layer, and possibly also helps in porting software from Linux. Generally speaking, the flag allows applications to create the shared memory segment, attach it, remove it, and then continue to use it and to reattach it later. This means that the kernel will automatically "clean up" after the application exits. It could be argued that it's against POSIX. However, SUSv3 says this about IPC_RMID: "Remove the shared memory identifier specified by shmid from the system and destroy the shared memory segment and shmid_ds data structure associated with it." From my reading, we break it in any case by deferring removal of the segment until it's detached; we won't break it any more by also deferring removal of the identifier. This is the behaviour exhibited by Linux since... probably always, and also by OpenBSD since the following commit: revision 1.54 date: 2011/10/27 07:56:28; author: robert; state: Exp; lines: +3 -8; Allow segments to be used even after they were marked for deletion with the IPC_RMID flag. This is permitted as an extension beyond the standards and this is similar to what other operating systems like linux do. MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3603 Notes: svn path=/head/; revision=289112
* If we can't open the file, skip devclose() for the exclusive_file_systemMarcel Moolenaar2015-10-081-1/+1
| | | | | | | case. We never called devopen(), so we know there's nothing to close. Notes: svn path=/head/; revision=289044
* Move SHLIBDIR?=/lib before <src.opts.mk> so that it works again.Peter Wemm2015-10-081-2/+2
| | | | Notes: svn path=/head/; revision=289000
* Use -fpermissive if compiling with GCC.Craig Rodrigues2015-10-081-0/+3
| | | | | | | | | Works around GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67888 when compiling Module.cpp Notes: svn path=/head/; revision=288998
* Use proper function prototypes.Craig Rodrigues2015-10-072-4/+4
| | | | | | | Eliminates -Wstrict-prototypes warning Notes: svn path=/head/; revision=288995
* Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.John Baldwin2015-10-071-1/+24
| | | | | | | | Reviewed by: emaste, kib Differential Revision: https://reviews.freebsd.org/D3833 Notes: svn path=/head/; revision=288993
* truss: Add support for utrace(2).Bryan Drewery2015-10-061-2/+3
| | | | | | | | | | | | | | | | | This uses the kdump(1) utrace support code directly until a common library is created. This allows malloc(3) tracing with MALLOC_CONF=utrace:true and rtld tracing with LD_UTRACE=1. Unknown utrace(2) data is just printed as hex. PR: 43819 [inspired by] Reviewed by: jhb MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3819 Notes: svn path=/head/; revision=288957
* Stop linking libc++.so verbosely, there is no need to.Dimitry Andric2015-10-061-1/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=288953
* For llvm/clang libraries, skip including tablegen-produced .d files whenDimitry Andric2015-10-061-3/+5
| | | | | | | | | | | the target is "make depend". This works around errors during incremental make depend of some clang libraries, for example "don't know how to make contrib/llvm/include/llvm/IR/IntrinsicsR600.td". Reported by: emaste Notes: svn path=/head/; revision=288951
* Fix core corruption caused by race in note_procstat_vmmapConrad Meyer2015-10-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is spiritually similar to r287442 and was discovered thanks to the KASSERT added in that revision. NT_PROCSTAT_VMMAP output length, when packing kinfo structs, is tied to the length of filenames corresponding to vnodes in the process' vm map via vn_fullpath. As vnodes may move during coredump, this is racy. We do not remove the race, only prevent it from causing coredump corruption. - Add a sysctl, kern.coredump_pack_vmmapinfo, to allow users to disable kinfo packing for PROCSTAT_VMMAP notes. This avoids VMMAP corruption and truncation, even if names change, at the cost of up to PATH_MAX bytes per mapped object. The new sysctl is documented in core.5. - Fix note_procstat_vmmap to self-limit in the second pass. This addresses corruption, at the cost of sometimes producing a truncated result. - Fix PROCSTAT_VMMAP consumers libutil (and libprocstat, via copy-paste) to grok the new zero padding. Reported by: pho (https://people.freebsd.org/~pho/stress/log/datamove4-2.txt) Relnotes: yes Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3824 Notes: svn path=/head/; revision=288944
* Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.7.0Dimitry Andric2015-10-0685-243/+668
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | release. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.7.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.7.0/tools/clang/docs/ReleaseNotes.html> Thanks to Ed Maste, Andrew Turner and Antoine Brodin for their help. Exp-run: antoine Relnotes: yes Notes: svn path=/head/; revision=288943
| * Merge ^/head r288836 through r288925.Dimitry Andric2015-10-061-3/+3
| |\ | | | | | | | | | Notes: svn path=/projects/clang370-import/; revision=288926
| * \ Merge ^/head r288831 through r288835.Dimitry Andric2015-10-051-7/+6
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/clang370-import/; revision=288836