Commit Graph

5260 Commits

Author SHA1 Message Date
Dimitry Andric
d2e1803774 Pull in r163967 from upstream llvm trunk:
X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe
  fp math.

This should make clang emit calls to libm for sinf/cosf by default.

MFC after:	1 week
2012-09-15 17:02:05 +00:00
Baptiste Daroussin
3e06602220 update to version 20120526 2012-09-14 21:17:53 +00:00
Gleb Smirnoff
3b3a8eb937 o Create directory sys/netpfil, where all packet filters should
reside, and move there ipfw(4) and pf(4).

o Move most modified parts of pf out of contrib.

Actual movements:

sys/contrib/pf/net/*.c		-> sys/netpfil/pf/
sys/contrib/pf/net/*.h		-> sys/net/
contrib/pf/pfctl/*.c		-> sbin/pfctl
contrib/pf/pfctl/*.h		-> sbin/pfctl
contrib/pf/pfctl/pfctl.8	-> sbin/pfctl
contrib/pf/pfctl/*.4		-> share/man/man4
contrib/pf/pfctl/*.5		-> share/man/man5

sys/netinet/ipfw		-> sys/netpfil/ipfw

The arguable movement is pf/net/*.h -> sys/net. There are
future plans to refactor pf includes, so I decided not to
break things twice.

Not modified bits of pf left in contrib: authpf, ftp-proxy,
tftp-proxy, pflogd.

The ipfw(4) movement is planned to be merged to stable/9,
to make head and stable match.

Discussed with:		bz, luigi
2012-09-14 11:51:49 +00:00
Edwin Groothuis
3797824c98 MFV of 240454, tzdata2012f
- Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013.
- Fix offset for Pacific/Tokelau.
- Gaza and West Bank had DST from 29 March to 28 September 2012.
- Syria has DST from April till October
- Morocco had DST from April to September 2012 except for 20 July to 20 August.
- Cuba changed to DST from 1 April 2012 only.
- Haiti has DST between 8 March and 1 November in 2012.

Obtained from:	ftp://ftp.iana.org/tz/releases/
2012-09-13 10:17:01 +00:00
Xin LI
f5f47d5068 Remove a few files that are not needed for FreeBSD.
PR:		bin/171555
Approved by:	obrien
2012-09-11 21:16:22 +00:00
Gregory Neil Shapiro
0d3a0b40cd Properly define true/false when defining __bool_true_false_are_defined
for filters which pull in mfapi.h before stdbool.h.  Issue reported by
Petr Rehor, maintainer of amavisd-milter port.

MFC after:	3 days
2012-09-10 01:15:51 +00:00
Gleb Smirnoff
f2ddd22eac For UDP transport set IP_RECVDSTADDR sockopt on the socket, and provide
IP_SENDSRCADDR control with datagram message we reply with. This makes
bsnmpd reply from exactly same address that request was sent to, thus
successfully bypassing stateful firewalls or other kinds of strict checking.

PR:		bin/171279
2012-09-09 09:46:48 +00:00
Gleb Smirnoff
0cf0d912b7 The first part of check_priv() function, that attempts to obtain creds
from the control message, actually never worked. This means check_priv()
didn't work for local dgram sockets.

The SCM_CREDS control messages is received only in two cases:

1) If we did setsockopt(LOCAL_CREDS) on our socket, and in this case
   the message is struct sockcred.
2) If sender did supplied SCM_CREDS control message in his sendmsg()
   syscall. In this case the message is struct cmsgcred.

We can't rely on 2), so we will use 1) for dgram sockets. For stream
sockets it is more reliable to obtain accept-time credentials, since
SCM_CREDS control message is attached only on first read. Thus:

o Do setsockopt(LOCAL_CREDS) on local dgram sockets.
o Split check_priv() into check_priv_stream() and check_priv_dgram(),
  and call them from recv_stream() and recv_dgram() respectively.
o Don't provide space for SCM_CREDS control message in recv_stream().
o Provide space for SCM_CREDS control message in recv_dgram(), but there
  is no need to initialize anything in it.
o In recv_dgram() do not blindly expect that first message is SCM_CREDS,
  instead use correct search cycle through control messages.
2012-09-08 07:12:00 +00:00
Gleb Smirnoff
d6d3f01e0a Merge the projects/pf/head branch, that was worked on for last six months,
into head. The most significant achievements in the new code:

 o Fine grained locking, thus much better performance.
 o Fixes to many problems in pf, that were specific to FreeBSD port.

New code doesn't have that many ifdefs and much less OpenBSDisms, thus
is more attractive to our developers.

  Those interested in details, can browse through SVN log of the
projects/pf/head branch. And for reference, here is exact list of
revisions merged:

r232043, r232044, r232062, r232148, r232149, r232150, r232298, r232330,
r232332, r232340, r232386, r232390, r232391, r232605, r232655, r232656,
r232661, r232662, r232663, r232664, r232673, r232691, r233309, r233782,
r233829, r233830, r233834, r233835, r233836, r233865, r233866, r233868,
r233873, r234056, r234096, r234100, r234108, r234175, r234187, r234223,
r234271, r234272, r234282, r234307, r234309, r234382, r234384, r234456,
r234486, r234606, r234640, r234641, r234642, r234644, r234651, r235505,
r235506, r235535, r235605, r235606, r235826, r235991, r235993, r236168,
r236173, r236179, r236180, r236181, r236186, r236223, r236227, r236230,
r236252, r236254, r236298, r236299, r236300, r236301, r236397, r236398,
r236399, r236499, r236512, r236513, r236525, r236526, r236545, r236548,
r236553, r236554, r236556, r236557, r236561, r236570, r236630, r236672,
r236673, r236679, r236706, r236710, r236718, r237154, r237155, r237169,
r237314, r237363, r237364, r237368, r237369, r237376, r237440, r237442,
r237751, r237783, r237784, r237785, r237788, r237791, r238421, r238522,
r238523, r238524, r238525, r239173, r239186, r239644, r239652, r239661,
r239773, r240125, r240130, r240131, r240136, r240186, r240196, r240212.

I'd like to thank people who participated in early testing:

Tested by:	Florian Smeets <flo freebsd.org>
Tested by:	Chekaluk Vitaly <artemrts ukr.net>
Tested by:	Ben Wilber <ben desync.com>
Tested by:	Ian FREISLICH <ianf cloudseed.co.za>
2012-09-08 06:41:54 +00:00
Kevin Lo
31f7ba0295 Fully initialize the stack-allocated "struct sockaddr_in sa" structure. 2012-09-07 08:58:30 +00:00
Ed Maste
448ba34319 Fix "Corrupted DWARF expression" from (k)gdb.
Google turned up Debian bug 405116, which describes the problem in
sufficient detail to identify the overflowing variables.

MFC after:	1 week
2012-09-06 13:47:42 +00:00
Marcel Moolenaar
b514734386 Update to a pruned 0.16. 2012-09-05 16:01:08 +00:00
Marcel Moolenaar
451f0851c2 Add headers created by running configure. 2012-09-04 23:27:07 +00:00
Marcel Moolenaar
c243e4902b Merge ATF 0.16 from vendor/atf/dist.
Provenance: http://code.google.com/p/kyua
Discussed with: gibbs, gnn, keramida, mdf, mlaier,
Discussed with: Garrett Cooper
2012-09-04 23:16:58 +00:00
Andrew Turner
f1f92378c1 Fix a logic inversion in an assert to allow us to use dts files that
include other files.
2012-09-02 01:48:47 +00:00
Dimitry Andric
6a1fba3556 Fix a twelve year old bug in readelf: when process_dynamic_segment()
encounters a DT_RUNPATH entry, the global dynamic_info[] array is
overrun, causing some other global variable to be overwritten.

In my testcase, this was the section_headers variable, leading to
segfaults or jemalloc assertions when it was freed later on.

Thanks to Koop Mast for providing samples of a few "bad" .so files.

MFC after:	1 week
2012-08-31 23:28:41 +00:00
Dimitry Andric
ff3657eeaf Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn't
error out on files that contain it.  (This attribute can be emitted by
newer versions of clang.)

MFC after:	2 weeks
2012-08-29 18:37:10 +00:00
Martin Matuska
7ceb94332b Apply fix for vendor pull request #17:
Support appending to empty archives

References:
  https://github.com/libarchive/libarchive/pull/17

Submitted by:	myself
Obtained from:	libarchive master branch on github
2012-08-23 19:40:28 +00:00
Dimitry Andric
3ed7dc5f46 Pull in r162360 from upstream clang trunk:
Merge existing attributes before processing pragmas in friend template
  declarations.
  Fixes pr13662.

This should help when building Firefox with libc++.
2012-08-23 18:14:59 +00:00
Dimitry Andric
5948d40700 Since our clang now supports the tls_model attribute, remove the
workaround for it in jemalloc_FreeBSD.h.

Reviewed by:	jasone
2012-08-23 17:58:22 +00:00
Andrey A. Chernov
27c9070e7e According to resolvconf.conf(5) manpage and sources, there is no
'nameservers' option which used in examples in resolvconf.conf(5),
it spelled 'name_servers', so fix examples.
2012-08-21 06:14:08 +00:00
Dimitry Andric
7ae0e2c9f0 Upgrade our copy of llvm/clang to trunk r162107. With thanks to
Benjamin Kramer and Joerg Sonnenberger for their input and fixes.
2012-08-20 18:33:03 +00:00
David E. O'Brien
6f5e32433e Catch up with the subversion conversion and apply these build-time patches. 2012-08-17 18:20:38 +00:00
Stephen McKay
a0ebde2020 Correct a regression introduced during the import of file(1) 5.11.
Magic tests containing "search" or "regex" directives were incorrectly
compiled by "mkmagic" and were effectively ignored.  This caused troff
files (for example) to be detected as simply "ASCII text" instead of
as "troff or preprocessor input, ASCII text".

PR:		bin/170415
Approved by:	consensus on developers@
MFC after:	3 days
2012-08-17 02:27:17 +00:00
Oleksandr Tymoshenko
4da573d910 Merging of projects/armv6, part 3
r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions.  In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
 * GCC to default to arm1176jz-s
 * GCC to predefine __FreeBSD_ARCH_armv6__
 * gas to default to ARM_ARCH_V6K
 * uname -p to return 'armv6'
 * make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by:	Tim Kientzle <kientzle@freebsd.org>
2012-08-15 03:21:56 +00:00
Xin LI
9776cb63ad RFC 2289 requires all hashes be stored in little endian format before
folding to 64 bits, while SHA1 code is big endian.  Therefore, a bswap32
is required before using the value.

Without this change, the implementation does not conform to test vector
found in RFC 2289.

PR:		bin/170519
Submitted by:	Arthur Mesh <arthurmesh gmail com> (with changes)
MFC after:	1 week
2012-08-10 04:48:58 +00:00
Andrew Turner
fdc8ba5e71 Import compiler-rt r160957.
This is mostly a no-op other than for ARM where it adds missing
__aeabi_mem* and __aeabi_*divmod functions. Even on ARM these will remain
unused until the rest of the ARM EABI code is merged.
2012-08-08 09:42:44 +00:00
Martin Matuska
10ed66fdf8 Backport NFSv4 ACL fix from libarchive master branch.
Source:
https://github.com/libarchive/libarchive/commit/f67370d5

Obtained from:	libarchive (master branch)
2012-07-30 14:47:35 +00:00
Martin Matuska
88b860fc7a Fix endless loop if reading unsupported ACL type.
Apply fix from vendor's master branch.

References:
https://github.com/libarchive/libarchive/commit/d8b9dbd

Reported on:	freebsd-current@
Obtained from:	libarchive
2012-07-29 06:33:27 +00:00
Dimitry Andric
e07d856055 Similar to what is already done for Linux, make clang not complain about
unused -g, -emit-llvm or -w arguments when doing linking.  E.g. invoking
"clang -g foo.o -o foo" will now be silent.

Reported by:	Jakub Lach <jakub_lach@mailplus.pl>
MFC after:	1 week
2012-07-28 13:12:57 +00:00
Dimitry Andric
38bce0dde0 Similar to r238472, let clang pass --enable-new-dtags to the linker
invocation by default.  Also make sure --hash-style=both is passed for
the same arches as gcc, e.g. arm, sparc and x86.

X-MFC-with:	r238472
2012-07-28 12:50:25 +00:00
Martin Matuska
fd082e96c4 Update libarchive to 3.0.4 2012-07-28 06:38:44 +00:00
Martin Matuska
48cbf1ba5b Update information on obtaining libarchive sources and FreeBSD-Xlist 2012-07-27 08:28:44 +00:00
Ruslan Ermilov
ca0a2184d6 Pull up vendor changes to mdoc(7). 2012-07-26 11:12:38 +00:00
Ruslan Ermilov
a16720da65 Backed out r228904, and added libstdthreads support to mdoc(7) to where
it belongs.
2012-07-26 11:10:25 +00:00
Ruslan Ermilov
770b69c0b7 Backed out r236255, and added FreeBSD 9.1 support to mdoc(7) to where
it belongs.
2012-07-26 10:58:30 +00:00
Warner Losh
6c889456a8 Preen unused Makefiles, programs and ftdump.c which has been renamed
to fdtdump.c in the upstream repo.  This escaped my attention in the
import.
2012-07-25 06:04:38 +00:00
Doug Barton
dae131adad Heavy DNSSEC Validation Load Can Cause a "Bad Cache" Assertion Failure
in BIND9

High numbers of queries with DNSSEC validation enabled can cause an
assertion failure in named, caused by using a "bad cache" data structure
before it has been initialized.

CVE: CVE-2012-3817
Posting date: 24 July, 2012
2012-07-24 18:53:28 +00:00
Warner Losh
52baf267be Update to latest git version of dtc to get new dtsv2 support,
including the include directive.

Fix minor build issue corrected by converting yypush_buffer_state and
yypop_buffer_state to yy_set_buffer_state and a hard-coded 100-deep
stack.  It was easier to fix it here than to import that support into
our flex.

The new tools and test hardness remain unsupported at the moment.
2012-07-24 16:29:33 +00:00
Xin LI
e24497193b MFV: less v451. 2012-07-24 01:09:11 +00:00
Konstantin Belousov
b375a6d71d Pass --enable-new-dtags to the linker invocation by default. If
desired, one can turn off the generation of post-ELF standard dtags by
overriding it with --disable-new-dtags after the default switch.

Immediate effect of the change is that -rpath path is now stored both
in DT_RPATH and DT_RUNPATH tags, which is the right way to provide
rpath for dynamic linker supporting DT_RUNPATH per specification.

Reviewed by:	kan
MFC after:	1 month
2012-07-15 10:54:10 +00:00
Dimitry Andric
f8079271e6 Pull in r159895 from upstream clang trunk:
When marking virtual functions as used for a class' vtable, mark all functions
  which will appear in the vtable as used, not just those ones which were
  declared within the class itself. Fixes an issue reported as comment#3 in
  PR12763 -- we sometimes assert in codegen if we try to emit a reference to a
  function declaration which we've not marked as referenced. This also matches
  gcc's observed behavior.

This should fix clang assertions when building certain components of the
LibreOffice port.

MFC after:	3 days
2012-07-13 21:48:01 +00:00
John Baldwin
11a08d62da Add support for the 'invept' and 'invvpid' instructions. Beyond simply
adding appropriate table entries, the assembler had to be adjusted as
these are the first non-SSE instructions to use a 3-byte opcode (and a
mandatory prefix to boot).

MFC after:	1 month
2012-07-06 14:28:18 +00:00
John Baldwin
22f9e86238 Add support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv'
instructions.  I reimplemented this from scratch based on the Intel
manuals and the existing support for handling the fxsave and fxrstor
instructions.  This will let us use these instructions natively with GCC
rather than hardcoding the opcodes in hex.

Reviewed by:	kib
MFC after:	1 month
2012-07-04 22:12:10 +00:00
John Baldwin
2e52fb92ff Add a new line to top that provides a brief summary of the ZFS ARC memory
usage on hosts using ZFS.  The new line displays the total amount of RAM
used by the ARC along with the size of MFU, MRU, anonymous (in flight),
headers, and other (miscellaneous) sub-categories.  The line is not
displayed on systems that are not using ZFS.

Reviewed by:	avg, fs@
MFC after:	3 days
2012-06-27 18:08:48 +00:00
Joel Dahl
49074c51cc mdocify and update the traceroute(8) manual page.
Reviewed by:	brueffer
No objection:	ru, uqs
2012-06-27 07:41:21 +00:00
Xin LI
96e55cc72d MFV: less v449. 2012-06-26 23:17:33 +00:00
Pedro F. Giffuni
5917560e17 Bring a couple of fixes for gcc optimizations.
The GCC4.3 branch contains some optimization fixes
that were not considered regressions and therefore
were never backported. We are bringing a couple of
them that are under GPLv2 since they were made
before the license switch upstream.

While here, add the GCC revision numbers in the
log.

Discussed with: jkim
MFC after:	1 week
2012-06-21 16:49:20 +00:00
Joel Dahl
bef04523e3 Remove end of line whitespace. 2012-06-17 11:36:28 +00:00
Joel Dahl
0aa9c2d892 Minor mdoc fixes. 2012-06-17 11:33:55 +00:00
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