Commit Graph

5260 Commits

Author SHA1 Message Date
Joel Dahl
5febe54f25 Remove superfluous paragraph macro. 2012-06-17 11:04:38 +00:00
Marius Strobl
d2a3fae7ec Merge r236137 from x86:
Enable GNU hash generation for dynamic ELF binaries.
2012-06-14 20:29:49 +00:00
Pedro F. Giffuni
a6c34d9e26 Revert r236962 - Experimental amdfam10/barcelona support.
The patches are unexpectedly causing gcc to fail while
building ports/graphics/ImageMagick even when the cpu
flags are not used.

Reported by:	Andreas Tobler
2012-06-13 20:21:08 +00:00
Pedro F. Giffuni
d3d19ef9c2 Space mismatch - typo in r236962.
Found by:	Dima Panov
Approved by:	jhb (mentor)
MFC after:	2 weeks
2012-06-12 16:07:03 +00:00
Pedro F. Giffuni
b28518a59a Add experimental support for amdfam10/barcelona from the GCC 4.3 branch.
Initial support for the AMD barcelona chipsets has been available in the
gcc43 branch under GPLv2 but was not included when the Core 2 support
was brought to the system gcc.

AMD and some linux distributions (OpenSUSE) did a backport of the amdfam10
support and made them available. Unfortunately this is still experimental
and while it can improve performance, enabling the CPUTYPE may break some
C++ ports (like clang).

Special care was taken to make sure that the patches predate the GPLv3
switch upstream.

Tested by:	Vladimir Kushnir
Reviewed by:	mm
Approved by:	jhb (mentor)
MFC after:	2 weeks
2012-06-12 15:04:18 +00:00
Pedro F. Giffuni
dc3fe0ff0e Bring a couple of libstdc++ patches from Apple's llvm-gcc project.
Modified Fri Jul 10 07:44:34 2009 CDT by rafael
backport part of
http://gcc.gnu.org/ml/gcc-cvs/2007-10/msg00118.html

The patch is for libstdc++ and it was GPL2 at the time.

Modified Tue Apr 29 01:20:19 2008 CDT by asl
Backport from mainline (pre-GPLv3).
Fix for sizeof(const void*) > sizeof(unsigned long).

Approved by:	jhb (mentor)
MFC after:	2 weeks
2012-06-10 02:04:11 +00:00
Maksim Yevmenkin
6c9707c3b2 Count both IPv4 and IPv6 TCP connections in tcpCurrEstab
Timeout from:	current, syrinx
MFC after:	1 week
2012-06-06 18:00:38 +00:00
Doug Barton
fe5cfeb46b Upgrade to 9.8.3-P1, the latest from ISC. This version contains
a critical bugfix:

  Processing of DNS resource records where the rdata field is zero length
  may cause various issues for the servers handling them.

  Processing of these records may lead to unexpected outcomes. Recursive
  servers may crash or disclose some portion of memory to the client.
  Secondary servers may crash on restart after transferring a zone
  containing these records. Master servers may corrupt zone data if the
  zone option "auto-dnssec" is set to "maintain". Other unexpected
  problems that are not listed here may also be encountered.

All BIND users are strongly encouraged to upgrade.
2012-06-04 22:11:20 +00:00
Dimitry Andric
e3726a671a Fix dangling else in libc++'s __bit_reference header. This has also
been sent upstream.

MFC after:	3 days
2012-06-01 06:55:01 +00:00
Dimitry Andric
3e2e1f1f0a Pull in r155978 from upstream llvm trunk:
Fix unintentional use of operator bool.

This enables llvm's bugpoint tool to build with libc++.

MFC after:	3 days
2012-06-01 06:50:37 +00:00
Marius Strobl
a985a6f303 Merge r236137 from x86:
Enable GNU hash generation for dynamic ELF binaries.

While at it, sync the order of options with x86 and pass along the verbose
flag.
2012-05-30 20:13:49 +00:00
Dimitry Andric
96ccbf68a6 Pull in r156591 from upstream llvm trunk:
Allow unique_file to take a mode for file permissions, but default
  to user only read/write.

and r156592 from upstream clang trunk:

  For final output files create them with mode 0664 to match other
  compilers and expected defaults.

This should fix clang creating files with mode 0600.

Reported by:	James <james@hicag.org>
MFC after:	3 days
2012-05-29 21:59:09 +00:00
Dimitry Andric
baa749209e For clang, similar to r236137, enable gnu hash generation for dynamic
ELF binaries on x86.
2012-05-29 20:21:24 +00:00
David E. O'Brien
585ed8cb79 Add the latest FreeBSD versions. 2012-05-29 19:49:52 +00:00
Doug Barton
687aeb3821 Upgrade to BIND version 9.8.3, the latest from ISC.
Feature Change

*  BIND now recognizes the TLSA resource record type, created to
   support IETF DANE (DNS-based Authentication of Named Entities)

Bug Fix

*  The locking strategy around the handling of iterative queries
   has been tuned to reduce unnecessary contention in a multi-
   threaded environment.

Other critical bug fixes are included.

All BIND users are encouraged to upgrade.
2012-05-28 19:47:56 +00:00
Dimitry Andric
1cbbf59138 Pull in r157212 from upstream clang trunk:
Revert r115805. An array type is required to have a range type,
  however, the range can be unknown for the upper bound.

  Testcase to follow.

  Part of rdar://11457152

This should fix ctfconvert producing error messages during kernel
builds, similar to:

  ERROR: scsi_all.c: die 24561: failed to retrieve array bounds

These were caused by incorrect debug information for flexible array
members of structs.

MFC after:	3 days
2012-05-27 13:33:54 +00:00
Konstantin Belousov
c5ec8d1ddd Enable gnu hash generation for dynamic ELF binaries on x86.
Reviewed by:	kan
2012-05-27 05:27:47 +00:00
Dag-Erling Smørgrav
73c77d2614 OpenPAM Micrampelis was re-rolled due to a showstopper bug. 2012-05-26 23:10:21 +00:00
Dag-Erling Smørgrav
2f3ed61901 Update to OpenPAM Micrampelis. 2012-05-26 17:10:16 +00:00
David E. O'Brien
41d25f72a0 Revert r235797. GCC's mis-assumptions has led to incorrect usage of
"%q[diouxX]" within FreeBSD sources.
2012-05-23 23:43:55 +00:00
Dimitry Andric
64cc5073b2 Upgrade our copy of llvm/clang to 3.1 release. Release notes can be
found at: http://llvm.org/releases/3.1/docs/ReleaseNotes.html

MFC after:	3 days
2012-05-23 21:48:49 +00:00
David E. O'Brien
08c5bca9c7 Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms. 2012-05-22 18:18:06 +00:00
Dimitry Andric
db763e7cdf Correct use_screen() and use_window() prototypes in curs_threads(3x).
Submitted by:	Yanhui Shen <shen.elf@gmail.com>
MFC after:	3 days
2012-05-22 06:28:53 +00:00
Baptiste Daroussin
98e903e7a0 Import byacc from invisible island, it brings us lots of compatibilities with
bison, keeping full compatibility with our previous yacc implementation.

Also bring the ability to create reentrant parser

This fix bin/140309 [1]

PR:		bin/140309 [1]
Submitted by:	Philippe Pepiot <ksh@philpep.org> [1]
Approved by:	des (mentor)
MFC after:	1 month
2012-05-21 13:31:26 +00:00
Stanislav Sedov
50c9ba2c76 - On FreeBSD, com_err.h is installed into /usr/include, not /usr/include/krb5.
Reflect that in the manpage.

PR:		bin/167986
Reported by:	truckman@
2012-05-21 04:29:11 +00:00
Pedro F. Giffuni
c6e2105845 Bring in a subset of gcc fixes that were back ported to
the GCC 4.1 branch and are available under GPLv2.

2007-11-07  Eric Botcazou  <ebotcazou@libertysurf.fr>

	PR rtl-optimization/33822
	* rtl.h (REG_OFFSET): Fix comment.
	* var-tracking.c (INT_MEM_OFFSET): New macro.
	(var_mem_set): Use it.
	(var_mem_delete_and_set): Likewise.
	(var_mem_delete): Likewise.
	(vt_get_decl_and_offset): Likewise.
	(offset_valid_for_tracked_p): New predicate.
	(count_uses): Do not track locations with invalid offsets.
	(add_uses): Likewise.
	(add_stores): Likewise.
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129972

2007-11-16  Richard Guenther  <rguenther@suse.de>
	PR middle-end/34030
	* fold-const.c (fold_binary): Use correct types for folding
	1 << X & Y to Y >> X & 1.
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130242

2008-01-14  Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/31944
	* cse.c (remove_pseudo_from_table): New function.
	(merge_equiv_classes): Use above function to remove pseudo-registers.
	(invalidate): Likewise
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131524

2008-01-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

        Backport:
	2007-11-07  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR middle-end/33826
	* ipa-pure-const (static_execute): Added code to keep recursive
	functions from being marked as pure or const.
	* ipa-utils (searchc): Fixed comment.
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131807

2008-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	Backport:
	2007-08-02  Nathan Froyd  <froydnj@codesourcery.com>

	PR middle-end/25445
	* varasm.c (default_binds_local_p_1): Consult flag_whole_program
	if we are compiling with -fPIC.
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132061

2008-02-04  Richard Guenther  <rguenther@suse.de>

	PR middle-end/33631
	* expr.c (count_type_elements): Give for unions instead of
	guessing.
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132101

2008-02-14  Alan Modra  <amodra@bigpond.net.au>

	PR target/34393
	* config/rs6000/rs6000.md (restore_stack_block): Force operands[1]
	to a reg.
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132309

2008-03-25  Richard Guenther  <rguenther@suse.de>

	Backport from mainline:
	2008-02-12  Richard Guenther  <rguenther@suse.de>

	PR middle-end/35163
	* fold-const.c (fold_widened_comparison): Use get_unwidened in
	value-preserving mode.  Disallow final truncation.
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133509

2008-11-30  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/38287
	* config/sparc/sparc.md (divsi3 expander): Remove constraints.
	(divsi3_sp32): Add new alternative with 'K' for operand #2.
	(cmp_sdiv_cc_set): Factor common string.
	(udivsi3_sp32): Add new alternative with 'K' for operand #2.
	Add TARGET_V9 case.
	(cmp_udiv_cc_set): Factor common string.
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142298

Reviewed by:	mm
Approved by:	jhb (mentor)
MFC after:	1 week
2012-05-18 19:02:39 +00:00
Xin LI
cac3dcd5f9 Merge tcpdump 4.2.1.
MFC after:	2 weeks
2012-05-17 05:11:57 +00:00
Xin LI
206a88b211 Add 3 missing files that was generated but not included with the initial
commit.

Reported by:	buganini via IRC
MFC after:	2 weeks
2012-05-14 09:32:10 +00:00
Xin LI
d1e8733132 Merge from vendor branch: update libpcap to 1.2.1.
MFC after:	2 weeks
2012-05-14 05:12:56 +00:00
Marius Strobl
0837ca3329 Regenerate after r235388. 2012-05-13 05:09:36 +00:00
Marius Strobl
2040613422 - Get rid of debugging support in order to get rid of the V8-specific C
compiler frame size used there so this whole thing is V8/V9-agnostic.
- Use 32-bit function alignment as GCC does when using UltraSPARC I or
  higher optimizations.
- Don't waste delay slots when possible.

Unfortunately, this still doesn't make libcompiler_rt a viable replacement
for libgcc on sparc64 though as once installed instead, buildworld times
increase by nearly 60% (which isn't related to these assembler functions).
2012-05-13 05:08:13 +00:00
Jason Evans
edaa25bdae Fix config_lazy_lock so that thread caching isn't used for
single-threaded applications.
2012-05-13 01:33:28 +00:00
Jason Evans
35dad07381 Import jemalloc 3.0.0. This fixes memory zeroing bugs that manifested as
jemalloc assertion failures for debug builds, or as calloc() sometimes
returning non-zeroed memory for production builds.
2012-05-12 05:26:49 +00:00
Glen Barber
a3fb6da9ba General mdoc(7) and typo fixes.
PR:		167734
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-11 20:06:46 +00:00
Jason Evans
e722f8f8ac Import jemalloc 37b6f95dcd866f51c91488531a2efc3ed4c2b754 (dev branch,
prior to 3.0.0 release).  This version is likely very close to what will be
3.0.0.
2012-05-10 18:29:40 +00:00
Dimitry Andric
400b97c789 Revert r234656, and apply a proper fix for binutils PR 10474, which
caused linking clang on 32-bit PowerPC to fail with "relocation
truncated to fit: R_PPC_REL24" errors.

Original diffs (relicensed under GPLv2 with permission from author):
http://sourceware.org/git/?p=binutils.git;a=commit;h=1fd262ff7d7ea5adf4894c6b960e092e7e43e3cd
http://sourceware.org/git/?p=binutils.git;a=commit;h=053c49fbff58bd33bd0d12200ea61302f92caceb

Tested by:	andreast
MFC after:	1 week
2012-05-07 17:13:36 +00:00
Xin LI
0426af06b1 Update FREEBSD-vendor to reflect the current version. 2012-05-04 21:06:53 +00:00
Xin LI
ac3ea9104e Merge from OpenBSD 5.1.
MFC after:	3 weeks
2012-05-04 21:03:39 +00:00
Dimitry Andric
cb4dff8563 Upgrade our copy of llvm/clang to r155985, from upstream's release_31
branch.  This brings us very close to the 3.1 release, which is planned
for May 14th.

MFC after:	2 weeks
2012-05-03 20:41:21 +00:00
David Chisnall
b03f91a837 Import new version of libc++. Among other improvements, this comes with an
<atomic> header that works with clang 3.1 (and, importantly, the pre-3.1
snapshot currently in head)
2012-05-03 17:44:07 +00:00
Oleksandr Tymoshenko
b3f67bed16 Unbreak jemalloc build with MALLOC_PRODUCTION set. New jemalloc version
uncovered MIPS-related gcc bug described in
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256

The patch was obtained from r128198 in gcc-4_1-branch, which is GPLv2,
so it's OK to merge it.
2012-04-30 22:46:09 +00:00
Dag-Erling Smørgrav
9342e1b15c r234173 missed one instance of FREE(line).
Noticed by:	glebius@
2012-04-27 11:29:09 +00:00
Michael Tuexen
7a7a6331a9 Fix a bug in the TCP tracerouting which resulted in not accepting any
incoming packets. So all packets seemed to be lost.

MFC after: 1 week
2012-04-26 13:45:17 +00:00
Dimitry Andric
4fdb8d2aae Work around llvm PR 12623, which makes variables declared with .symver
sometimes disappear from the resulting object file, if compiled with
clang.  In particular, this can lead to errors when building world with
clang and -g, similar to:

  /usr/obj/usr/src/tmp/usr/lib/libc.so: undefined reference to `_malloc_options'

Reported by:	Conrad J. Sabatier <conrads@.no.cox.net>
Reviewed by:	jasone
2012-04-24 18:41:17 +00:00
Jayachandran C.
79656e93c2 jemalloc: pointer size definition for 64-bit mips platforms
LG_SIZEOF_PTR has to be defined as 3 when jemalloc is compiled for
64 bit platforms.

Reviewed by:	juli
Approved by:	jasone
2012-04-24 11:42:48 +00:00
Jason Evans
4bcb1430a8 Import jemalloc a8f8d7540d66ddee7337db80c92890916e1063ca (dev branch,
prior to 3.0.0 release).  This fixes several bugs related to memory
initialization.

Mangle __jemalloc_a0{malloc,calloc,free}() just like all the other
library-internal symbols in jemalloc, and adjust the tls allocation code
in libc to use the mangled names.
2012-04-22 08:49:13 +00:00
Jason Evans
8ed34ab00d Import jemalloc 606f1fdc3cdbc700717133ca56685313caea24bb (dev branch,
prior to 3.0.0 release), and mangle internal symbols.
2012-04-21 15:09:22 +00:00
David E. O'Brien
80c86c3659 Update file(1) to version 5.11. 2012-04-19 03:20:13 +00:00
Jason Evans
c92c6224f9 Import jemalloc b57d3ec571c6551231be62b7bf92c084a8c8291c (dev branch,
prior to 3.0.0 release), which supports atomic operations based on atomic(9).
This should fix build failures for several platforms.
2012-04-17 22:05:55 +00:00
Jason Evans
a4bd5210d5 Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch,
prior to 3.0.0 release) as contrib/jemalloc, and integrate it into libc.
The code being imported by this commit diverged from
lib/libc/stdlib/malloc.c in March 2010, which means that a portion of
the jemalloc 1.0.0 ChangeLog entries are relevant, as are the entries
for all subsequent releases.
2012-04-17 07:22:14 +00:00
Dimitry Andric
dff0c46c97 Upgrade our copy of llvm/clang to trunk r154661, in preparation of the
upcoming 3.1 release (expected in a few weeks).  Preliminary release
notes can be found at: <http://llvm.org/docs/ReleaseNotes.html>

MFC after:	2 weeks
2012-04-16 21:23:25 +00:00
Dag-Erling Smørgrav
a7216790d8 Keep a copy of the original pointer returned by openpam_readline() so
we can free it later, instead of trying to free a pointer that points
to the end of the buffer.

Committed to head because this code no longer exists upstream.

Submitted by:	jasone@
2012-04-12 11:23:24 +00:00
Doug Barton
3ad4cbcf20 The BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes.
This change was noticed by ISC at:

https://lists.isc.org/pipermail/bind-users/2012-April/087345.html

and verified by me both by comparing the contents of the old and new
distfiles and by verifying the PGP signature on the new distfile.
2012-04-12 01:53:33 +00:00
Robert Watson
3ee3cd17f6 Merge a local fix to OpenBSM's libauditd to avoid a directory descriptor
leak when iterating over possible audit trail directories.  This fix will
be merged upstream in an identical form, but hasn't yet appeared in an
OpenBSM release.

Submitted by:	guido
Obtained from:	TrustedBSD Project
MFC after:	3 days
2012-04-08 11:05:22 +00:00
Stanislav Sedov
3ef51c5fb9 - Do not use deprecated krb5 error message reporting functions in libtelnet. 2012-04-06 00:03:45 +00:00
Pedro F. Giffuni
a90710e961 Fix a typo in GCC affecting calculations with -ffast-math.
The fix is similar to the one applied in GCC-4.3 in
GCCSVN-r117929 under the GPLv2.

Submitted by:	Andrey Simonenko
Reviewed by:	mm
Approved by:	jhb (mentor)
MFC after:	3 days
2012-04-05 15:16:51 +00:00
Doug Barton
d0f6280db7 Update to version 9.8.2, the latest from ISC, which contains numerous bug fixes. 2012-04-05 04:29:35 +00:00
David Chisnall
52076325c4 Undo the earlier revert of the ABI change in libsupc++. On further discussion,
posting an errata notice with 9.1 is the less painful solution.

Approved by:	dim (mentor)
2012-03-30 12:48:36 +00:00
Edwin Groothuis
aad8a35cb3 MFV of 233442, tzdata2012a
- Updates to various locations in Antarctica.
- Armenia will abolish DST this year.
- Not only Samoa has moved to UTC+14, also Fakaofo did.
- There will be a leap second in 30 June 2012.
- Historical updates of 1918 to Canada, Winn, Regina, Edm, Vanc, Creston.
- Chili stays on DST until 28 April 2012
- The Falkland islands will stay on DST this year.
2012-03-25 02:10:31 +00:00
Oleksandr Tymoshenko
59e1f8ae92 Disable IRIX compatibility flags for DWARF code generator. IRIX-compatible
DWARF code is not compatible with CTF tools
2012-03-23 21:07:10 +00:00
David Chisnall
a45e9cc023 Revert ABI breakage in libsupc++.
Unfortunately, the ABI was broken upstream for the 4.2 release, which we
imported.  We then shipped the broken version for several years and certain
ports (e.g. libobjc2) depend on it, so we're stuck with it for now...

We should revisit this for 10.0, since we're allowed to break the ABI then, but
until then we should keep the ABI we shipped with 8.x and 9.x.

Reviewed by:	kan
Approved by:	dim (mentor)
MFC after:	1 week
2012-03-23 20:10:56 +00:00
Stanislav Sedov
ae77177087 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
David Chisnall
c725650d64 Import new version of libcxxrt. Now works correctly with libobjc2 to implement
the unified exception model for Objective-C++.

Approved by:	dim (mentor)
2012-03-20 17:58:15 +00:00
Dimitry Andric
5b1df4530b Add explicit braces to avoid dangling else in stl_tree.h. This silences
the following warning produced by clang trunk:

  In file included from /usr/src/sbin/devd/devd.cc:91:
  In file included from /usr/obj/usr/src/tmp/usr/include/c++/4.2/map:64:
  /usr/obj/usr/src/tmp/usr/include/c++/4.2/bits/stl_tree.h:987:2: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
	  else
	  ^

MFC after:	3 days
2012-03-19 19:01:34 +00:00
Oleksandr Tymoshenko
2de64e71fe fix ABI detection logic: for 64-bit elf objects set default ABI to n64. 2012-03-19 03:27:08 +00:00
Hartmut Brandt
9972acaa15 memset() wants the size of the structure to clear, not the size
of the pointer to it.

Submitted by:	Pawel Worach
2012-03-18 19:28:52 +00:00
David Chisnall
5cd6937330 Import a slightly newer libc++, with some bugs fixed that were found by running
the test suite on FreeBSD.

Approved by:	dim (mentor)
2012-03-14 14:40:22 +00:00
David Chisnall
94e3ee44c3 Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!

Approved by:	dim (mentor)
2012-03-14 00:09:36 +00:00
Dimitry Andric
9c5cee130f Pull in a fix (still under GPLv2) for a double free in gdb, leading to
an assert, which can occur if you repeatedly dlopen() and dlclose() a
.so file in a tight loop.  This was reported on freebsd-current@ by
Alexandre Martins, with a sample to reproduce the behaviour.

Obtained from:	http://sourceware.org/git/?p=gdb.git;a=commit;h=a6f2cbb341520f8e100f4b8305979dd6207a79e8
2012-03-13 19:40:56 +00:00
Juli Mallett
07257b7e1c Note two shortcomings of GDB on MIPS that should be addressed. 2012-03-13 04:50:41 +00:00
Dimitry Andric
937b9d55e7 Pull in r145194 from upstream clang trunk:
Make our handling of MMX x SSE closer to what gcc does:

  * Enabling sse enables mmx.
  * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already).
  * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse.

Some configure scripts depend on this.

PR:		i386/165968
MFC after:	3 days
2012-03-12 21:07:22 +00:00
Ed Maste
2dd1401878 Remove extraneous log message
When ntp switched between PLL and FLL mode it produced a log message
"kernel time sync status change %04x".  This issue is reported in ntp
bug 452[1] which claims that this behaviour is normal and the log
message isn't necessary.  I'm not sure exactly when it was removed, but
it's gone in the latest ntp release (4.2.6p5).

[1] http://bugs.ntp.org/show_bug.cgi?id=452

Approved by:    roberto
2012-03-12 01:06:29 +00:00
Gavin Atkinson
49e49bdbc1 Move determination of socket buffer sizes from startup to the first time a
socket is used.  The previous code structure assumed that AF_INET sockets
were always available, which is an invalid assumption on IPv6-only systems.

This merges the fololowing revisions from NetBSD:
src/usr.bin/ftp/main.c 1.120
src/usr.bin/ftp/util.c 1.156

PR:		bin/162661
Tested by:	bz
Obtained from:	NetBSD
MFC after:	1 week
2012-03-10 11:25:53 +00:00
Konstantin Belousov
d9514f6739 In batch mode, exit after receiving SIGINT, instead of immediate
output of the next display.

Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-03-07 18:05:45 +00:00
Konstantin Belousov
963a74f13c Fix a race in top non-interactive mode. Use plain sleep(3) call instead
of arming timer and then pausing.  If SIGALRM is delivered before pause(3)
is entered, top hangs.

Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-02-27 20:52:20 +00:00
Martin Matuska
6c95142e79 Update libarchive to 3.0.3
Some of new features:
  - New readers: RAR, LHA/LZH, CAB reader, 7-Zip
  - New writers: ISO9660, XAR
  - Improvements to many formats, especially including ISO9660 and Zip
  - Stackable write filters to write, e.g., tar.gz.uu in a single pass
  - Exploit seekable input; new "seekable" Zip reader can exploit the Zip
    Central Directory when it's available; the old "streamable" Zip reader
    is still fully supported for cases where seeking is not possible.

Full release notes available at:
	https://github.com/libarchive/libarchive/wiki/ReleaseNotes
2012-02-25 10:58:02 +00:00
Mark Peek
9ccc37e320 Update to tcsh 6.18.01. 2012-02-22 03:36:15 +00:00
Bjoern A. Zeeb
9dba179d5e IFC @231845
Sponsored by:	Cisco Systems, Inc.
2012-02-17 00:27:48 +00:00
Bjoern A. Zeeb
aaf04b7cb6 Switch from setfib(2) moving the process to a different FIB to setsockopt(2)
with SO_SETFIB to only tag the socket with the right FIB.

That way either setfib(1) or nc -V can be used depending on what wants to be
achieved.  This also allows nc to be used for simple regression testing of
either feature.

Sponsored by:	Cisco Systems, Inc.
2012-02-14 11:37:04 +00:00
Tim Kientzle
acf8ebb0e9 Implement -print-file-name=include (which is undocumented
but used by some Linux boot loaders).  This option prints
out the directory holding the include files needed by
a freestanding program.  The default implementation of
this doesn't work on FreeBSD because of the different
include file layout.  But it's easy to implement:
just return /usr/include (or the cross-compiling equivalent).

Reviewed by:	kan
MFC after:	1 week
2012-02-10 05:05:42 +00:00
Martin Matuska
17993d47e9 Update vendor libarchive dist to new "release" branch (post 3.0.3)
Git branch:	release
Git commit:	9af87742342aa4f37a22ec12c4cc1c82e00ffa2f

Obtained from:	https://github.com/libarchive/libarchive.git
2012-02-08 12:53:14 +00:00
Dimitry Andric
6bb1cadd56 Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

MFC after:	2 weeks
2012-02-05 23:56:22 +00:00
Bjoern A. Zeeb
bb4b19cae2 Fix the upper limit bounds checking for the "rtables" keyword wrapping
it in a function to dynamically query the currently supported number
of FIBs by the kernel for FreeBSD.

Sponsored by:	Cisco Systems, Inc.
2012-02-03 13:54:25 +00:00
Martin Matuska
e60867e953 Uupdate code to vendor rev. 4183 (release/2.8)
Fixes vendor issue 224:
"Mishandling CD9660 images with RockRidge extensions from FreeBSD makefs"

References:
http://code.google.com/p/libarchive/issues/detail?id=224

MFC after:	1 week
2012-01-29 22:20:28 +00:00
Dimitry Andric
462386c6b1 Pull in r148240 from upstream llvm trunk:
Make sure the non-SSE lowering for fences correctly clobbers EFLAGS.
  PR11768.

In particular, this fixes segfaults during the build of devel/icu on
i386.  The __sync_synchronize() builtin used for implementing icu's
internal barrier could lead to incorrect behaviour.

MFC after:	3 days
2012-01-20 19:18:11 +00:00
Ed Schouten
848933e870 Add SPARC64 version of div/mod written in assembly.
This version is similar to the code shipped with libgcc. It is based on
the code from the SPARC64 architecture manual, provided without any
restrictions.

Tested by:	flo@
2012-01-12 17:55:22 +00:00
Ed Schouten
a8c104fbb0 Add a workaround to prevent endless recursion in compiler-rt.
SPARC and MIPS CPUs don't have special instructions to count
leading/trailing zeroes. The compiler-rt library provides fallback
rountines for these. The 64-bit routines, __clzdi2 and __ctzdi2, are
implemented as simple wrappers around the compiler built-in
__builtin_clz(), assuming these will expand to either 32-bit
CPU instructions or calls to __clzsi2 and __ctzsi2.

Unfortunately, our GCC 4.2 probably thinks that because the operand is
stored in a 64-bit register, it might just be a better idea to invoke
its 64-bit equivalent, simply resulting into endless recursion. Fix this
by defining __builtin_clz and __builtin_ctz to __clzsi2 and __ctzsi2
explicitly.
2012-01-12 16:51:56 +00:00
Andreas Tobler
ca3759b5de Silence a warning about redefinition of TARGET_ELF on powerpc. 2012-01-06 18:37:49 +00:00
Robert Watson
460b3e8f1d Replace an OpenBSDism with a FreeBSDism in the pfctl(8) man page: we put
configuration file man pages in section 5, and we prefer rc.conf to
rc.conf.local.

MFC after:	3 days
2012-01-05 23:11:05 +00:00
Ulrich Spörlein
cabdddae57 Pull up vendor changes to mdoc(7)
This switches us to using -isoC-2011 as the symbol name which is used by
groff and mdocml. It follows the change to 4 digit years as done with
IEEE Std 1003 post-1999.

MFC after:	2 weeks (groff changes only)
2012-01-05 21:36:12 +00:00
Ed Schouten
30293fda4b Import compiler-rt r147467.
The compiler-rt shipped with FreeBSD is now based on unmodified upstream
sources.
2012-01-03 19:41:36 +00:00
Dimitry Andric
80acde97f1 Redo r228645, but instead of casting away const conversion warnings in
contrib/less, add a few const qualifiers in the right places.

Suggested by:	das
MFC after:	1 week
2012-01-01 20:13:02 +00:00
Dimitry Andric
dd3bd0ed42 Revert r228645, which casts away a number of const conversion warnings
in contrib/less.  I will fix those more properly in the next commit.
2012-01-01 20:09:05 +00:00
Ed Schouten
7686ff743c Upgrade libcompiler_rt to upstream revision 147390.
This version of libcompiler_rt adds support for __mulo[sdt]i4(), which
computes a multiply and its overflow flag. There are also a lot of
cleanup fixes to headers that don't really affect us.

Updating to this revision should make it a bit easier to contribute
changes back to the LLVM developers.
2011-12-31 19:01:48 +00:00
Kevin Lo
5610c31cb2 Fix incorrect uses of sizeof().
The details of the fix can be found in the tcpdump git repository:
commit 684955d58611ee94eccdc34e82b32e676337188c
2011-12-28 05:58:31 +00:00
Martin Matuska
73278c5812 Update to vendor revision 4016.
Vendor has integrated most of our local changes in revisions 3976-3979 so
future updates are going to be easier.
Thanks to Tim Kientzle <kientzle@FreeBSD.org>.

MFC after:	8 days
2011-12-27 10:36:56 +00:00
Ed Schouten
fc6f0665ba Add libstdthreads.
This library implements the C11 threads interface on top of the pthreads
library.  As discussed on the lists, the preferred way to implement
this, is as a separate library.

It is unlikely that these functions will be used a lot in the future. It
would have been easier if the C11 working group standardized (a subset
of) pthreads and clock_nanosleep(). Having it as a separate library
allows the embedded people to omit it from their system.

Discussed on:	arch@, threads@
2011-12-26 21:51:53 +00:00
Xin LI
42821a2fc9 Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not
apply to us).
2011-12-26 09:07:08 +00:00
Ed Schouten
5b7b8966c1 Add the C11 standard to groff. This allows us to refer to C11 as -isoC-11.
MFC after:	2 months
2011-12-25 22:05:33 +00:00
Colin Percival
3e65b9c6e6 Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]
Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]

Fix a buffer overflow in telnetd. [11:08]

Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]

Add sanity checking of service names in pam_start. [11:10]

Approved by:    so (cperciva)
Approved by:    re (bz)
Security:       FreeBSD-SA-11:06.bind
Security:       FreeBSD-SA-11:07.chroot
Security:       FreeBSD-SA-11:08.telnetd
Security:       FreeBSD-SA-11:09.pam_ssh
Security:       FreeBSD-SA-11:10.pam
2011-12-23 15:00:37 +00:00
Martin Matuska
cfd8eb6299 Fix typo s/xz/libarchive/
Reported by:	Emil Mikulic (private e-mail)
MFC after:	12 days
2011-12-23 08:50:26 +00:00
Dag-Erling Smørgrav
d9ecbdf39e Merge upstream r509: don't log an error in the common case (ENOENT). 2011-12-22 18:12:51 +00:00
Pedro F. Giffuni
05a636f0bd Update libstdc++ with small updates from the latest rev. (135556)
from the gcc 4.2 branch.
The libraries in the gcc-4_2-branch remained under the LGPLv2.

The changes can be reproduced with the following command:

svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch/libstdc++-v3
 -r 127959:135556

Reviewed by:	mm
Approved by:	jhb (mentor)
MFC after:	2 weeks
2011-12-21 16:36:07 +00:00
Martin Matuska
584ad8fd32 Merge FreeBSD changes from usr.bin/cpio to contrib/libarchive/cpio:
r204111 (uqs):
Fix common misspelling of hierarchy

r211054 (kientzle);
Fix -R when used with -p.  Previously, the
uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again.  Clearing the uname
and gname prevents this.

r212263 (gjb):
Fix typo in bsdcpio manual:
s/libarchive_formats/libarchive-formats

MFC after:	2 weeks
2011-12-21 15:33:13 +00:00
Martin Matuska
c5d360f82a Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/tar:
r204111 (uqs):
Fix common misspelling of hierarchy

r207786 (kientzle):
Various manpage updates, including many long-option synonyms that were
previously undocumented.

r208028 (uqs):
mdoc: move remaining sections into consistent order

This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.

r209152 (kientzle):
If the compressed data is larger than the uncompressed,
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow.  This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.

r210720 (joel):
Fix typos.

r223541 (kientzle):
If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.

If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.

r223573 (kientzle):
The --newer-than test should descend into old
directories to look for new files.

r226636 (kientzle):
Typo from previous commit. Urgh.

r224153 (mm, partial):
Update bsdtar.1 manpage

MFC after:	2 weeks
2011-12-21 15:30:49 +00:00
Martin Matuska
e9dd49674a Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/libarchive_fe:
r213469:
Recognize both ! and ^ as markers for negated character classes.

MFC after:	2 weeks
2011-12-21 15:22:05 +00:00
Martin Matuska
457fe389bb Add $FreeBSD$ to libarchive_fe headers where missing.
MFC after:	2 weeks
2011-12-21 15:20:17 +00:00
Martin Matuska
e2f3482b4e Merge FreeBSD changes from lib/libarchive to contrib/libarchive:
r204111 (uqs):
Fix common misspelling of hierarchy

r208027 (uqs):
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

r208291 (uqs):
mdoc: consistently spell our email addresses <foo@FreeBSD.org>

r209031 (uqs):
mdoc nitpicking: the title argument shall be uppercase

r214822 (kientzle):
Clarify the naming:  Methods that free an object should
be called "free".  Retain the old "finish" names to preserve
source compatibility for now.

r214905 (kientzle):
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one.  This allows us to handle a lot
of Zip archives that have been modified in-place.

Thanks to: Gleb Kurtsou for sending me a sample archive

r216258 (kientzle):
Don't write data into an empty "file."

In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.

r225525 (kientzle):
Fix cpio on ARM.

MFC after:	2 weeks
2011-12-21 15:18:52 +00:00
Martin Matuska
1aafefdbe8 Add missing integer casts to comparsions in libarchive read.
MFC after:	2 weeks
2011-12-21 15:06:01 +00:00
Martin Matuska
05c7cce2cc Partial merge of r224691 from lib/libarchive:
Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

MFC after:	2 weeks
2011-12-21 15:02:37 +00:00
Martin Matuska
81e77e7031 Remove libarchive/archive_entry_copy_bhfi.c and libarchive/mtree.5
Add these files to FREEBSD-Xlist

MFC after:	2 weeks
2011-12-21 14:58:44 +00:00
Martin Matuska
6151a4093b Remove config_freebsd.h and add to FREEBSD-Xlist
This file is common for libarchive, cpio and tar and is going to be located
outside of contrib (lib/libarchive)
2011-12-21 12:59:09 +00:00
Martin Matuska
76c1e34f2e Strip unnecessary files and directories from contrib/libarchive
according to FREEBSD-Xlist

MFC after:	2 weeks
2011-12-21 11:18:49 +00:00
Martin Matuska
6c22d9efb7 Set svn:keywords to FreeBSD=%H for contrib/libarchive
MFC after:	2 weeks
2011-12-21 11:13:29 +00:00
Martin Matuska
bc951bc441 Add FREEBSD-Xlist and FREEBSD-upgrade to contrib/libarchive
MFC after:	2 weeks
2011-12-21 11:11:51 +00:00
Martin Matuska
caf54c4f6c Copy libarchive from vendor branch to contrib
MFC after:	2 weeks
2011-12-21 11:09:24 +00:00
Pedro F. Giffuni
4ee8547efb Clean an inconsistency with -ffinite-math-only.
Backported from the gcc-4_3-branch, revision 118001,
under the GPLv2.

This issue was also fixed in Apple's gcc.

PR:		157025
Reviewed by:	mm
Approved by:	jhb (mentor)
MFC:		2 weeks
2011-12-21 01:58:35 +00:00
Martin Matuska
35fa5e2f58 Vendor import of libarchive (release/2.8, r3824)
Obtained from:	http://libarchive.googlecode.com/svn/release/2.8
2011-12-20 22:47:56 +00:00
Gleb Smirnoff
f08535f872 Restore a feature that was present in 5.x and 6.x, and was cleared in
7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP
preemption, while it is running its bulk update.

However, reimplement the feature in more elegant manner, that is
partially inspired by newer OpenBSD:

- Rename term "suppression" to "demotion", to match with OpenBSD.
- Keep a global demotion factor, that can be raised by several
  conditions, for now these are:
  - interface goes down
  - carp(4) has problems with ip_output() or ip6_output()
  - pfsync performs bulk update
- Unlike in OpenBSD the demotion factor isn't a counter, but
  is actual value added to advskew. The adjustment values for
  particular error conditions are also configurable, and their
  defaults are maximum advskew value, so a single failure bumps
  demotion to maximum. This is for POLA compatibility, and should
  satisfy most users.
- Demotion factor is a writable sysctl, so user can do
  foot shooting, if he desires to.
2011-12-20 13:53:31 +00:00
Gleb Smirnoff
df6faa4c5c - Fix examples to show new CARP style.
- Remove OpenBSDisms, add FreeBSDisms.
2011-12-20 13:32:56 +00:00
Dimitry Andric
3803473797 In contrib/tcpdump/print-icmp6.c, fix a problem where the comparison
against icmp6_hdr::icmp6_type is done incorrectly.  (This fix has
already been applied upstream, but we do not have the latest version of
tcpdump.)

MFC after:	1 week
2011-12-19 17:32:54 +00:00
Dag-Erling Smørgrav
7f106882fe Upgrade to OpenPAM Lycopsida. 2011-12-18 17:22:45 +00:00
Dimitry Andric
6d683f9dfa In contrib/pnpinfo/pnpinfo.c, remove an extraneous parameter from the
call to isolation_protocol().

MFC after:	1 week
2011-12-17 23:43:40 +00:00
Dimitry Andric
e9db6b2474 In contrib/telnet/telnet/utilities.c, fix a few warnings about format
strings not being literals.

MFC after:	1 week
2011-12-17 18:18:36 +00:00
Dimitry Andric
8ee4178c4c In contrib/less, cast away const a bunch of times, to make it build
without conversion warnings.  This code desparately needs a good dose of
const poison, but fixing all the issues would be rather disruptive.

MFC after:	1 week
2011-12-17 16:10:14 +00:00
Dimitry Andric
8f04da68ad In contrib/ee/ee.c, fix a few warnings about format strings not being
literals.  Also, change the direction argument to move_rel() from char
to int; K&R function definions cause it to be promoted to an int anyway,
and this way we avoid clang warning about it.

MFC after:	1 week
2011-12-17 14:26:16 +00:00
Dimitry Andric
586f63035f In contrib/bzip2/bzip2recover.c, use the correct printf length modifier
for unsigned long long.

MFC after:	1 week
2011-12-17 12:52:58 +00:00
Bjoern A. Zeeb
1e629ba90f Adter r228571 unbreak architectures with strict alignment rules
by copying rather than casting.
2011-12-17 11:06:22 +00:00
Dimitry Andric
cf87966cfd In contrib/gperf/src/output.cc, use the correct printf length modifier
for a ptrdiff_t.

MFC after:	1 week
2011-12-16 23:15:11 +00:00
Dimitry Andric
1f8811efbc In contrib/telnet/telnetd/utility.c, fix a few warnings about format
strings not being literals.

MFC after:	1 week
2011-12-16 16:53:54 +00:00
Dimitry Andric
675be9115a In contrib/telnet/libtelnet/sra.c, use the correct number of bytes to
zero the password buffer.

MFC after:	1 week
2011-12-16 00:48:53 +00:00
Dimitry Andric
0adb64b5d9 In contrib/file/softmagic.c, fix a potential format string security
problem.  (This fix has already been applied upstream, but we do not
have the latest version of file in the tree at the moment.)

MFC after:	1 week
2011-12-15 23:28:17 +00:00
Ed Schouten
bdc971eb19 Add support for __COUNTER__.
__COUNTER__ allows one to obtain incrementing (read: unique) numbers
from the C preprocesor. This is useful when implementing things like a
robust implementation of CTASSERT(), which currently fails when using
it more than once on a single line of code. Probably not likely to cause
any breakage, but still.

__COUNTER__ was also added to GCC 4.3, but since that implementation is
GPLv3 licensed, I took the liberty of implementing it without looking at
any upstream sources. Therefore, this version is licensed under the same
license as the rest of the code; GPLv2.
2011-12-13 17:34:47 +00:00
Mikolaj Golub
b2b91ddf9d Include sys/queue.h: snmpmod.h uses TAILQ.
PR:		bin/153153
MFC after:	2 weeks
2011-12-11 17:10:33 +00:00
Dag-Erling Smørgrav
4125bad6b4 Add minimal validation of the service name to fend off at least one
attack vector against applications that allow the applicant to specify
which policy to apply.

Submitted by:	Matthias Drochner <drochner@netbsd.org>
MFC after:	1 week
2011-12-10 01:44:24 +00:00
Dimitry Andric
f8254f43c5 Upgrade our copy of llvm/clang to 3.0 release. Release notes can be
found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html

MFC after:	1 week
2011-12-09 22:23:45 +00:00
Ruslan Ermilov
dd5e6f8a24 Pull up vendor changes to mdoc(7). 2011-12-08 13:54:06 +00:00
Eitan Adler
b5828c5723 - set progname for use in usage()
PR:		bin/162908
Submitted by:	Oleg Ginzburg <olevole@olevole.ru>
Approved by:	sbruno@
MFC after:	3 days
2011-12-08 02:40:46 +00:00
Dimitry Andric
2c4ebe03a0 Make it possible to use the debug versions of std::map and std::multimap
with clang, by removing two unneeded using declarations.  Otherwise, you
would get errors similar to:

/usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename'
      using _Base::value_compare;
                   ^

N.B.: Take care when you actually use the debug versions of any
libstdc++ header.  They are more likely to contain problems, because
they are exercised far less often, and since the standard library
complexity guarantees don't always apply anymore, compile times can
drastically increase.

MFC after:	2 weeks
2011-12-07 21:00:33 +00:00
Baptiste Daroussin
b9f9c1ef99 Reimport .texi and .texinfo necessary to build the info documentation.
Reported by:	flo
Approved by:	cognet
2011-11-28 14:23:09 +00:00
Baptiste Daroussin
acca521c82 upgrade gperf to the last GPLv2 version (3.0.3)
Reviewed by:	cognet
Approved by:	cognet
2011-11-28 12:29:16 +00:00
David Chisnall
db47c4bf21 Update libcxxrt to remove the pthread dependency.
Also add the license from upstream to contrib.

Approved by:	dim (mentor)
2011-11-26 18:46:33 +00:00
David Chisnall
7a98470824 Import libc++ / libcxxrt into base. Not build by default yet (use
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)
2011-11-25 20:59:04 +00:00
David Chisnall
3c87aa1d3d Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)
2011-11-20 14:45:42 +00:00
Andreas Tobler
6bac4c3e6a Rename the linker emulation name for powerpc and powerc64. This is needed that
we can also use the upstream binutils linker where we have to have a unique
name for the FreeBSD emulation.
2011-11-19 19:25:57 +00:00
Dimitry Andric
4b146ddfab Pull in r144505 from upstream clang trunk:
Fix the signature of the getcontext builtin, eliminating incorrect
warnings about its prototype.

This also adds a -W(no-)builtin-requires-header option, which can be
used to enable or disable warnings of this kind.

MFC after:	1 week
2011-11-19 18:01:14 +00:00
Dimitry Andric
a8c61d8787 Pull in r144237 from upstream clang trunk:
Fix the signature of __sigsetjmp and sigsetjmp.  This eliminates
incorrect warnings about the prototypes of these functions.

MFC after:	1 week
2011-11-19 17:15:20 +00:00
Dimitry Andric
65b2c60c75 Pull in r144110 from upstream clang trunk:
Mark the overloaded atomic builtins as having custom type checking,
which they do. This avoids all of the default argument promotions that
we (1) don't want, and (2) undo during that custom type checking, and
makes sure that we don't run into trouble during template
instantiation. Fixes llvm/clang PR11320.

MFC after:	1 week
2011-11-19 17:09:36 +00:00
Doug Barton
b62e898e00 Upgrade to BIND 9.8.1-P1 to address the following DDOS bug:
Recursive name servers are failing with an assertion:
INSIST(! dns_rdataset_isassociated(sigrdataset))

At this time it is not thought that authoritative-only servers
are affected, but information about this bug is evolving rapidly.

Because it may be possible to trigger this bug even on networks
that do not allow untrusted users to access the recursive name
servers (perhaps via specially crafted e-mail messages, and/or
malicious web sites) it is recommended that ALL operators of
recursive name servers upgrade immediately.

For more information see:
https://www.isc.org/software/bind/advisories/cve-2011-tbd
which will be updated as more information becomes available.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4313
2011-11-17 00:25:35 +00:00
Andreas Tobler
8e803f5a7c Copy over the ASM_DECLARE_FUNCTION_SIZE macro from linux64.h. This macro
declares the proper size of a function. Without this macro recent GNU as will
complain about with:
'Error: .size expression for main does not evaluate to a constant.'

Up to now we produce this:

.L.main:
 	....
	.size   main, .-main

With the macro defined the output is this:

.L.main:
 	....
	.size   main,.-.L.main

This affects only the 64-bit compiler.
Tested with world and kernel on both, 32 and 64-bit powerpc.
2011-11-16 21:22:51 +00:00
Fabien Thomas
da5a448eb2 Import gcc fix for -fstack-protector that produces segfaulting
binaries on arm/armel.

Related gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35965

PR: 161128
MFC after: 1 week
2011-11-09 15:59:02 +00:00
Edwin Groothuis
550d397e7d MFV of r226974, tzdata2011n
- Fiji will end DST on 22 January 2012.
- Moldova split into two timezones has been cancelled.
- Cuba will end DST on 13 November 2011

Obtained from:	ftp://ftp.iana.org/tz/releases/
2011-11-01 02:01:55 +00:00
Dimitry Andric
d883a297a1 Pull in r143305 and r143312 from upstream clang trunk, so using "clang
-march=native" on AMD K10 family processors no longer errors out with
"unknown target CPU 'amdfam10'".  This also enables use of SSE4A.

Reported by:	David Marec <david.marec@davenulle.org>
MFC after:	3 days
2011-10-30 22:20:17 +00:00
Mikolaj Golub
1ed9dc778b Fix a memory leak in tzload().
Reported by:	valgrind
Reviewed by:	kib
MFC after:	3 days
2011-10-27 08:44:07 +00:00
Edwin Groothuis
5e6f40a264 Fix breakage in tzsetup:
MD      +4700+02850     Europe/Chisinau most locations
2011-10-26 01:56:22 +00:00
Edwin Groothuis
d6dddab8dd MFV of r226750, tzdata2011m
Europe:
- Pridnestrovian Moldavian Republic (PMR, also known as
  "Pridnestrovie") has abolished seasonal clock change (no transition
  to the Winter Time).
- The recent change to the Ukranian time zone (Europe/Kiev) to
  introduce permanent daylight saving time (similar to Russia) was
  reverted.

South America:
- Bahia: The President signed a decree that includes Bahia in summer
  time.

zone.tab:
- Add Europe/Tiraspol Pridnestrovie

Obtained from:  ftp://ftp.iana.org/tz/releases/
2011-10-25 21:53:43 +00:00
David E. O'Brien
d65033b604 * Don't give the impression that this compiler is GPLv3.
(It is "well known" that GCC 4.2.2 is GPLv3.)
* Don't give the impression that this compiler isn't "trustable".
* Fix dependency nit.
2011-10-24 20:52:41 +00:00
Dimitry Andric
6122f3e60d Upgrade our copy of llvm/clang to r142614, from upstream's release_30
branch.  This brings us very close to the 3.0 release, which is expected
in a week or two.

MFC after:	1 week
2011-10-22 14:08:43 +00:00
Dimitry Andric
450e27da75 Fix breakage introduced by r226518.
Spotted by:	tinderbox, yanefbsd at gmail.com
Pointy hat to:	dim
2011-10-19 06:24:53 +00:00
Dimitry Andric
486b1da765 Fix the way clang retrieves the major FreeBSD release number from the
target triple, so that the __FreeBSD__ and __FreeBSD_cc_version builtin
macros return the expected results.

Spotted by:	nalitoja at gmail.com
2011-10-18 17:37:18 +00:00
Stefan Farfeleder
0c60230835 Adjust posix_memalign() prototype to match what we define in stdlib.h for
C++ compilation.

PR:	standards/147210
2011-10-16 10:14:33 +00:00
Edwin Groothuis
958890b7a9 MFV of tzdata2011l, r226279
Changes in 2011i:

    Africa
    - Added South Sudan: Africa/Juba

    Australasia:
    - Samoa will go forward 24 hours at 30 December 2011 to better match
      the day of the week with its neighbours.

    Europe:
    - Europe/Kaliningrad will have the timezone KALT.

    North America:
    - Updates to Metlakatla historical data
    - Newfoundland, Labrador and Resolute will do something which I
      can't figure out.

    iso3166tab;
    - Add SS for South Sudan.

Changes in 2011j:

    - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
    - Samoa DST will end on 1 April 2012

Changes in 2011k:

    - Gaza / West Bank goes back to standard time on 02 August 2011.
    - West Bank went bac kto DST on 30 August 2011.
    - Lots of changes in Minsk (GMT+3 without DST) and other Russian
      regions. A new timezone has been created for them, FET: Further-eastern
      European Time aka GMT+3.
    - Add Asian/Hebron to the zone.tab file.

Changes in 2011l:

    - West Bank came out of DST on 30 September 2011.
    - Fiji will g oin DST on 23 October and out of it on 26 Februari
    - State Bahia might go back to DST in 16 October 2011

    Due to legal problems, ado and Paul Eggert have to temporary suspend
    their work on the timezone database
    (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
    been continued by volunteers on the tz community and the hosting
    of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.

Obtained from:	ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/
2011-10-12 09:13:16 +00:00
Hajimu UMEMOTO
35954bbaba Shut up warnings with Cyrus SASL 2.1.25.
Spotted by:	ache
Tested by:	ache
2011-10-01 18:20:10 +00:00
Dimitry Andric
324d7156d7 Revive the LLVM and Clang license files, which were removed in my
too-thorough cleanup of unused files, in r213695.  Also make sure these
get installed under /usr/share/doc.

Submitted by:	rwatson, brooks
Pointy hat to:	dim
MFC after:	3 days
2011-09-29 18:12:40 +00:00
Konstantin Belousov
8046e2fda0 Do not overallocate on the stack. Threaded code might use custom stack
size.

Reported by:	many
Tested by:	Jeremie Le Hen <jeremie@le-hen.org> (previous version)
Reviewed by:	jilles
Approved by:	re (bz)
MFC after:	2 weeks
2011-09-19 22:35:54 +00:00
Xin LI
f3ae23b34b Bump .Dd date for previous revision.
Approved by:	re (follow up commit fixing trivial issue)
2011-09-17 22:53:05 +00:00
Xin LI
cdbc601be1 Change the example of using smbfs in fstab to a password-less one,
which is less likely to block a remote system from boot.

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
PR:		doc/160775
MFC after:	1 month
Approved by:	re (kib)
2011-09-17 22:17:31 +00:00
Hiroki Sato
a02aba5f3c Merge from openresolv 3.4.4 in the vendor branch.
Approved by:	re (kib)
2011-09-13 02:46:22 +00:00
Doug Barton
6fae67da24 Upgrade to BIND version 9.8.1. Release notes at:
https://deepthought.isc.org/article/AA-00446/81/
or
/usr/src/contrib/bind9/

Approved by:	re (kib)
2011-09-03 07:13:45 +00:00
Ruslan Ermilov
aa0da2e494 - Merged awk upstream that includes a fix for a bug exposed by kmod_syms.mk.
- Provide a build aid for those who already have a buggy awk(1) installed.

Approved by:	re (kib)
2011-08-11 10:29:10 +00:00
Ruslan Ermilov
d86a0988d2 Update to a 7-Aug-2011 release.
Approved by:	re (kib)
2011-08-09 12:54:43 +00:00
Marius Strobl
6055164bb1 Implement functions necessary for compiling fbsd-threads.c.
Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:52:25 +00:00
Ulrich Spörlein
f0720ed5f8 Fix broken mdoc.
Found by:	manlint
Approved by:	re (kib)
2011-08-01 22:21:18 +00:00
Martin Matuska
b8596ed3ac Fix accidential dos-style endings to unix-style line endings
from last commit (r224523) to match the version approved by re@

Approved by:	re (implicit)
2011-07-30 17:40:11 +00:00
Martin Matuska
6cf3367c6d Fix invalid assertion of C++ external static data member declarations
as anonymous namespaces are local to the current translation.

GCC PR:		c++/33094

Reviewed by:	uqs
Approved by:	re (kib)
Obtained from:	gcc (branches/redhat/gcc-4_1-branch, rev. 129554, GPLv2)
MFC after:	1 week
2011-07-30 17:27:29 +00:00
John Baldwin
fcc3d62fa5 Rework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'
to the maximum number of CPUs to ensure that lcpustates[] array is always
allocated to the maximum size.  Previously, if top was started without
per-CPU stats it would allocate a smaller lcpustates[] array.  When
per-CPU stats were then enabled, it would overflow the array and trash
the cpustates_columns[] array causing the CPU stats to be printed in the
wrong locations.

Approved by:	re (kib)
MFC after:	1 week
2011-07-18 21:15:47 +00:00
John Baldwin
834377fe2d Tweak the interactive description of CPU vs WCPU.
PR:		bin/158819
Submitted by:	arundel
Approved by:	re (kib)
2011-07-18 21:08:14 +00:00
Dimitry Andric
17a519f92f Upgrade our copy of llvm/clang to r135360, from upstream's trunk. 2011-07-17 19:51:40 +00:00
Bjoern A. Zeeb
5847215098 Correct the description of struct pfioc_state_kill.
PR:		kern/158997
Submitted by:	ohauer
2011-07-17 17:33:39 +00:00
Doug Barton
7afecc12f4 Upgrade to version 9.8.0-P4
This version has many new features, see /usr/share/doc/bind9/README
for details.
2011-07-16 11:12:09 +00:00
Nathan Whitehorn
682c9e0fed Update dialog to 1.1-20110707. 2011-07-14 14:01:36 +00:00
John Baldwin
4702b8d2c0 Add a leading space to the status messages output after toggling the
'C' and 'H' flags at runtime.  This matches messages output for other
toggles which leave the first column in the message blank to hold the
cursor.

PR:		bin/158775
Submitted by:	arundel
MFC after:	3 days
2011-07-11 16:51:29 +00:00
John Baldwin
51f202e9ed Allow per-CPU statistics to be toggled at runtime via the 'P' key.
While here, make -P a toggle similar to other options such as -I.

Reviewed by:	arundel
MFC after:	1 week
2011-07-11 16:48:52 +00:00
Martin Matuska
e24134bc0e Update xz to git snapshot of v5.0 branch as of 20110711 (post-5.0.3)
For architectures with __NO_STRICT_ALIGNMENT
define TUKLIB_FAST_UNALIGNED_ACCESS

MFC after:	2 weeks
2011-07-11 14:15:27 +00:00
John Baldwin
18abed0c9b Note that -a, -C, -H, -j, and -z are also toggles.
PR:		bin/158682
Reported by:	arundel
MFC after:	3 days
2011-07-08 13:45:53 +00:00
David E. O'Brien
cd2809fc68 Note the PF version.
Discussed with:	bz
2011-07-07 23:17:56 +00:00
Doug Barton
7c9d9e417a Update to version 9.6-ESV-R4-P3
ALL BIND USERS ARE ENCOURAGED TO UPGRADE IMMEDIATELY

This update addresses the following vulnerability:

CVE-2011-2464
=============
Severity:	High
Exploitable:	Remotely

Description:

A defect in the affected BIND 9 versions allows an attacker to remotely
cause the "named" process to exit using a specially crafted packet. This
defect affects both recursive and authoritative servers. The code location
of the defect makes it impossible to protect BIND using ACLs configured
within named.conf or by disabling any features at compile-time or run-time.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2464
https://www.isc.org/software/bind/advisories/cve-2011-2464
2011-07-06 00:48:31 +00:00
Doug Barton
09103e4808 Apply bug fixes
Submitted by:	marius
2011-07-06 00:47:27 +00:00
Ulrich Spörlein
d218e1127b - Fix typo in check_for_nested_with_variably_modified present
- Implement -Wvariable-decl.
- Port -Wtrampolines support from gcc3.
(all three also via OpenBSD)

PR:		gnu/127136, gnu/157019
Submitted by:	Henning Petersen, Pedro Giffuni
MFC after:	6 weeks
2011-07-01 20:45:55 +00:00
Edward Tomasz Napierala
1bb71a0d86 Make lukemftpd properly set login class and cpumask. 2011-06-30 20:58:38 +00:00
Edward Tomasz Napierala
906a940ee5 Make Sendmail properly set login class and cpumask. 2011-06-30 20:55:16 +00:00
Bjoern A. Zeeb
2bddeb8538 In case ntp cannot resolve a hostname on startup it will queue the entry
for resolving by a child process that, upon success, will add the entry
to the config of the running running parent process.

Unfortunately there are a couple of bugs with this, fixed in various
later versions of upstream in potentially different ways due to other
code changes:

1) Upon server [-46] <FQDN> the [-46] are used as FQDN for later resolving
   which does not work.  Make sure we always pass the name (or IP there).

2) The intermediate file to carry the information to the child process
   does not know about -4/-6 restrictions, so that a dual-stacked host
   could resolve to an IPv6 address but that might be unreachable (see
   r223626) leading to no working synchronization ignoring a IPv4 record.
   Thus alter the intermediate format to also pass the address family
   (AF_UNSPEC (default), AF_INET or AF_INET6) to the child process
   depending on -4 or -6.

3) Make the child process to parse the new intermediate file format and
   save the address family for getaddrinfo() hints flags.

4) Change child to always reload resolv.conf calling res_init() before
   trying to resolve names.  This will pick up resolv.conf changes or
   new resolv.confs should they have not existed or been empty or
   unusable on ntp startup.  This fix is more conditional in upstream
   versions but given FreeBSD has res_init there is no need for the
   configure logic as well.

Approved by:	roberto
Sponsored by:	Sandvine Incorporated
MFC after:	9 days
2011-06-29 13:01:10 +00:00
Bjoern A. Zeeb
e0bfbfce79 Update packet filter (pf) code to OpenBSD 4.5.
You need to update userland (world and ports) tools
to be in sync with the kernel.

Submitted by:	mlaier
Submitted by:	eri
2011-06-28 11:57:25 +00:00
Edwin Groothuis
14808f1355 MFV of tzdata2011h, r223627
- Russia scraps DST in 2011
- Remove Netherlands Antilles, add Bonaire, Curacao, Sint Maarten
2011-06-28 10:24:01 +00:00
Bjoern A. Zeeb
a9b3947837 Compare port numbers correctly. They are stored by SRCPORT()
in host byte order, so we need to compare them as such.
Properly compare IPv6 addresses as well.

This allows the, by default, 8 badaddrs slots per address
family to work correctly and only print sendto() errors once.

The change is no longer applicable to any latest upstream versions.

Approved by:	roberto
Sponsored by:	Sandvine Incorporated
MFC after:	1 week
2011-06-28 09:46:25 +00:00
Xin LI
c62908a982 Incorporate vendor commit ecdc5c0a7f7591a7cd4a:
In userland, sign extend the offset for JA instructions.

We currently use that to implement "ip6 protochain", and "pc" might be
wider than "pc->k", in which case we need to arrange that "pc->k" be
sign-extended, by casting it to bpf_int32.

PR:		kern/157188
Submitted by:	plosher
MFC after:	2 weeks
2011-06-28 00:58:12 +00:00
Dimitry Andric
4b9414ab92 For some reason, contrib/traceroute/traceroute.c ensures MAXHOSTNAMELEN
is defined, but then proceeds to use a hardcoded maximum hostname length
of 64 anyway.  Fix this by checking against MAXHOSTNAMELEN instead.

PR:		bin/157732
MFC after:	3 days
2011-06-26 19:03:33 +00:00
Dimitry Andric
6a4ba2279d Make GNU as recognize the ARM 'rrx' mnemonic, which can be generated by
clang for certain expressions.  Code taken from Apple cctools (GPLv2).

Submitted by:	damjan.marion@gmail.com
2011-06-23 20:54:44 +00:00
Xin LI
7afed3bf78 Revert r214857 pursudant to 9.0-RELEASE cycle.
Requested by:	jh
2011-06-20 16:48:00 +00:00
Gavin Atkinson
cc361f6598 Merge tnftp-20100108 from the vendor branch into head.
PR:		bin/112288 bin/120256 bin/129014 bin/145528
MFC after:	1 month
2011-06-20 08:00:32 +00:00