summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* In lib/libthread_db/arch/i386/libpthread_md.c, clang gives two incorrectdim2011-12-161-0/+6
| | | | | | warnings about alignment, so turn -Wcast-align off for now. MFC after: 1 week
* A major overhaul of the CARP implementation. The ip_carp.c was startedglebius2011-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from scratch, copying needed functionality from the old implemenation on demand, with a thorough review of all code. The main change is that interface layer has been removed from the CARP. Now redundant addresses are configured exactly on the interfaces, they run on. The CARP configuration itself is, as before, configured and read via SIOCSVH/SIOCGVH ioctls. A new prefix created with SIOCAIFADDR or SIOCAIFADDR_IN6 may now be configured to a particular virtual host id, which makes the prefix redundant. ifconfig(8) semantics has been changed too: now one doesn't need to clone carpXX interface, he/she should directly configure a vhid on a Ethernet interface. To supply vhid data from the kernel to an application the getifaddrs(8) function had been changed to pass ifam_data with each address. [1] The new implementation definitely closes all PRs related to carp(4) being an interface, and may close several others. It also allows to run a single redundant IP per interface. Big thanks to Bjoern Zeeb for his help with inet6 part of patch, for idea on using ifam_data and for several rounds of reviewing! PR: kern/117000, kern/126945, kern/126714, kern/120130, kern/117448 Reviewed by: bz Submitted by: bz [1]
* Unfortunately, clang gives a warning about sendmail code that cannot bedim2011-12-161-0/+7
| | | | | | | turned off yet. Since this is contrib code, and we don't really care about the warnings, just turn make them non-fatal for now. MFC after: 1 week
* In lib/libpmc/libpmc.c, struct pmc_cputype_map's pm_cputype field shoulddim2011-12-161-1/+1
| | | | | | be of type 'enum pmc_cputype', not 'enum pmc_class'. MFC after: 1 week
* In lib/libipsec/policy_token.l, use lex's standard "%option noinput"dim2011-12-161-1/+1
| | | | | | instead of hand-defining the YY_NO_INPUT macro. MFC after: 1 week
* Define YY_NO_INPUT in lib/libipsec/policy_token.l, so lex's input()dim2011-12-151-0/+1
| | | | | | function does not get defined needlessly. MFC after: 1 week
* Modify pw_copy:bapt2011-12-153-13/+332
| | | | | | | | | | | | | - if pw is NULL and oldpw is not NULL then the oldpw is deleted - if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid then it renames the user add new gr_* functions so now gr_util API is similar to pw_util API, this allow to manipulate groups in a safe way. Reviewed by: des Approved by: des MFC after: 1 month
* Since clang does not support the tls_model attribute used in malloc.cdim2011-12-151-2/+10
| | | | | | | yet (see LLVM PR 9788), and warns about it, rub it out for now. When clang grows support for this attribute, I will revert this again. MFC after: 1 week
* In lib/libc/rpc/crypt_client.c, fix a clang warning about an implicitdim2011-12-151-2/+2
| | | | | | | | | conversion between enum desdir/desmode from include/rpc/des.h, and enum desdir/desmode from include/rpcsvc/crypt.x. These are actually different enums, with different value names, but by accident the integer representation of the enum values happened to be the same. MFC after: 1 week
* Remove meaningless self-assignment in res_send.c, otherwise clang willdim2011-12-151-2/+0
| | | | | | | | warn about it. I guess this was originally done to silence a bogus warning by an older version of gcc, but I could not reproduce it with any version of gcc that I have access to. MFC after: 1 week
* The TCB_GET32() and TCB_GET64() macros in the i386 and amd64-specificdim2011-12-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | versions of pthread_md.h have a special case of dereferencing a null pointer. Clang warns about this with: In file included from lib/libthr/arch/i386/i386/pthread_md.c:36: lib/libthr/arch/i386/include/pthread_md.h:96:10: error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference] return (TCB_GET32(tcb_self)); ^~~~~~~~~~~~~~~~~~~ lib/libthr/arch/i386/include/pthread_md.h:73:13: note: expanded from: : "m" (*(u_int *)(__tcb_offset(name)))); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/libthr/arch/i386/include/pthread_md.h:96:10: note: consider using __builtin_trap() or qualifying pointer with 'volatile' Since this indirection is done relative to the fs or gs segment, to retrieve thread-specific data, it is an exception to the rule. Therefore, add a volatile qualifier to tell the compiler we really want to dereference a zero address. MFC after: 1 week
* Fix a bug where sctp_sendmdg() uses uninitialized memory.tuexen2011-12-151-0/+1
| | | | MFC after: 3 days.
* Small style(9) improvements.theraven2011-12-151-2/+4
| | | | Approved by: dim (mentor)
* Clean up includes; the prototype for getosreldate() has moved toru2011-12-141-4/+3
| | | | <unistd.h> in r183390.
* Don't use __P().ed2011-12-131-2/+2
| | | | | The rest of the file doesn't use it either and according to style(9), it should not be used.
* Use the correct upstream revision number for llvm/clang 3.0 release.dim2011-12-101-2/+2
| | | | | | | The r145546 revision is from branches/release_30, the r145349 revision is from tags/RELEASE_30/final. MFC after: 1 week
* Upgrade our copy of llvm/clang to 3.0 release. Release notes can bedim2011-12-093-2/+5
| | | | | | found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html MFC after: 1 week
* Make berase() work on platforms whose kernel lacks DIOCGDELETE ioctl.rmh2011-12-081-5/+48
| | | | Approved by: kib (mentor)
* Some fixes to the man pages for [at_]quick_exit(3)theraven2011-12-072-12/+17
| | | | | Reviewed by: pluknet Approved by: dim (mentor)
* style(9) cleanups.theraven2011-12-071-10/+7
| | | | Approved by: brooks (mentor)
* Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add atheraven2011-12-077-3/+204
| | | | | | | | | | | | | | | | __noreturn macro and modify the other exiting functions to use it. The __noreturn macro, unlike __dead2, must be used BEFORE the function. This is in line with the C and C++ specifications that place _Noreturn (c1x) and [[noreturn]] (C++11) in front of the functions. As with __dead2, this macro falls back to using the GCC attribute. Unfortunately, clang currently sets the same value for the C version macro in C99 and C1x modes, so these functions are hidden by default. At some point before 10.0, I need to go through the headers and clean up the C1x / C++11 visibility. Reviewed by: brooks (mentor)
* The NOTE_COPY should have been named NOTE_FFCOPY from the veryru2011-12-071-2/+2
| | | | | | beginning. Submitted by: Igor Sysoev
* libc: Eliminate 13 relative relocations in wctype().jilles2011-12-051-26/+45
|
* Simplify libusb_open_device_with_vid_pid(): Only sethselasky2011-12-031-4/+5
| | | | | | | | pdev to non-NULL on success instead of unconditonally setting it and maybe resetting it later. Submitted by: Christoph Mallon MFC after: 3 days
* libusb_open() sets the given device handle to NULL if ithselasky2011-12-031-2/+1
| | | | | | | fails, so there is no need to do it again after returning. Submitted by: Christoph Mallon MFC after: 3 days
* Revert r227812 and r227808 per discussioneadler2011-12-024-30/+18
| | | | | Reviewed by: many Approved by: des
* Split sentences at period boundaries.obrien2011-12-027-73/+93
|
* Tweak the r137233 fix to r136283 -- Code was making two send() attemptsobrien2011-12-021-3/+3
| | | | | | | | | | | | | vs. the comment documented "If we are working with a privileged socket, then take only one attempt". Make the code match. Furthermore, critical privileged applications that [over] log a vast amount can look like a DoS to this code. Given it's unlikely the single reattempted send() will succeeded, avoid usurping the scheduler in a library API for a single non-critical facility in critical applications. Obtained from: Juniper Networks Discussed with: glebius
* Use INCSLINKS so that "make installincludes" installs links during buildworld.fjoe2011-11-291-1/+1
|
* - Hide _rl_qsort_string_compare() that should be private to libreadline()fjoe2011-11-292-1/+1
| | | | | | | implementation. - Add symlink /usr/include/edit/readline/tilde.h -> readline.h All this makes it possible to build and link gdb with -ledit.
* .include <bsd.init.mk> instead of <bsd.own.mk>fjoe2011-11-281-3/+1
| | | | The former allows common settings from ../Makefile.inc to be used.
* Cross-reference capsicum.4 from cap_enter.2 and cap_new.2.rwatson2011-11-272-1/+3
| | | | | MFC after: 3 days Sponsored by: Google, Inc.
* Update libcxxrt to remove the pthread dependency.theraven2011-11-261-1/+0
| | | | | | Also add the license from upstream to contrib. Approved by: dim (mentor)
* style(9) fix.theraven2011-11-261-1/+1
| | | | Approved by: dim (mentor)
* Return not-implemented from pthread_once and pthread_key_create, rathertheraven2011-11-261-2/+10
| | | | | | | | | than silently failing and returning success. Without this, code calls pthread_once(), receives a return value of success, and thinks that the passed function has been called. Approved by: dim (mentor)
* Fix breakage after r227983; lib/libcxxrt still got built, because it wasdim2011-11-261-7/+8
| | | | | | | | not disabled in the usual way (by adding it to __DEFAULT_NO_OPTIONS in share/mk/bsd.own.mk), and because the test for MK_LIBCPLUSPLUS in Makefile.inc1 was incorrect. Pointy hat to: dim
* Import libc++ / libcxxrt into base. Not build by default yet (usetheraven2011-11-253-0/+187
| | | | | | | | | | | MK_LIBCPLUSPLUS=yes to enable). This is a work-in-progress. It works for me, but is not guaranteed to work for anyone else and may eat your dog. To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags. Bug reports welcome, bug fixes even more welcome... Approved by: dim (mentor)
* Revert r227841 and part of r227798. We still build libpam in two passes,des2011-11-241-1/+10
| | | | | | but we use STATIC_CFLAGS instead of our own private .c.o rule. MFC after: 3 weeks
* fdopendir(): Do not close the passed file descriptor on failure.jilles2011-11-221-4/+13
| | | | Reviewed by: delphij
* Now kvm_getenvv() and kvm_getargv() don't need procfs(5).trociny2011-11-222-341/+27
| | | | MFC after: 2 weeks
* Fix a crash when trying to duplicate a locale that contains some implicit C ↵theraven2011-11-221-1/+6
| | | | | | | locale components. Reported by: Michael Butler Approved by: dim (mentor)
* - fix some style(9) nits with my last commiteadler2011-11-222-3/+5
| | | | | | | - add a comment explaining why I used '|' instead of '||' Submitted by: danfe@ Approved by: emaste@
* - add check for pointer equality prior to performing the O(n) passeadler2011-11-224-18/+28
| | | | | | | | | - while here change 's' to 's1' in strcoll Submitted by: eadler@ Reviewed by: theraven@ Approved by: brooks@ MFC after: 2 weeks
* (Hopefully) Fix the build with clang by removing a typedef that's no longer ↵theraven2011-11-211-2/+0
| | | | | | needed. Approved by: brooks (mentor)
* Simplify the libpam build by removing the shared modules' dependencydes2011-11-212-13/+3
| | | | | | | on the shared library. The modules are loaded by the library, so we know it'll be there when we need it. MFC after: 3 weeks
* Add history for setsockopt(2).pluknet2011-11-211-2/+4
| | | | | | PR: docs/162719 Submitted by: Niclas Zeising <niclas at zeising gmail> MFC after: 1 week
* - Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate()lstewart2011-11-213-1/+183
| | | | | | | | | | | | | | | | | | | | system calls to provide feed-forward clock management capabilities to userspace processes. ffclock_getcounter() returns the current value of the kernel's feed-forward clock counter. ffclock_getestimate() returns the current feed-forward clock parameter estimates and ffclock_setestimate() updates the feed-forward clock parameter estimates. - Document the syscalls in the ffclock.2 man page. - Regenerate the script-derived syscall related files. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Submitted by: Julien Ridoux (jridoux at unimelb edu au)
* Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50nwhitehorn2011-11-211-1/+1
| | | | import, it works without issue.
* key_load_private() ignores the passphrase argument if the private keydes2011-11-201-7/+18
| | | | | | | | | | | | is unencrypted. This defeats the nullok check, because it means a non-null passphrase will successfully unlock the key. To address this, try at first to load the key without a passphrase. If this succeeds and the user provided a non-empty passphrase *or* nullok is false, reject the key. MFC after: 1 week Noticed by: Guy Helmer <guy.helmer@palisadesystems.com>
* Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.tuexen2011-11-201-0/+3
| | | | | | | Retire the the now unused sctp_udp_tunneling_for_client_enable sysctl variable. MFC after: 3 months.
OpenPOWER on IntegriCloud