Commit Graph

4922 Commits

Author SHA1 Message Date
Shteryana Shopova
cf90ea94a0 Unbreak the build by temprorarily not using include directives in
bsnmpd(1)' def files, until bsd.snmpmod.mk & Makefiles are fixed to
pass proper include path flags to gensnmptree.
2010-12-20 22:56:50 +00:00
Shteryana Shopova
72cd7a520d Bring in a SNMP module that allows configuration of SNMPv3 Notification targets.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip
Approved by:	philip
2010-12-20 17:13:14 +00:00
Shteryana Shopova
2b8026620c Silence the compiler warnings in libbsnmp by removing several (now)
unsed parameters.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip@
2010-12-16 11:20:37 +00:00
Dimitry Andric
6d4b97158f Sync: merge r216133 through r216338 from ^/head. 2010-12-09 22:01:15 +00:00
Shteryana Shopova
e9a4946830 Add a forgotten file from r216294 and unbreak the build.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip@ (mostly)
Approved by:	philip@
2010-12-08 15:52:06 +00:00
Shteryana Shopova
135f7de5dd In bsnmpd(1) add support for SNMPv3 message processing model, including message authentication, packet encryption & view-based access control (RFC 3412, 3414, 3415).
Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip@ (mostly)
Approved by:	philip@
2010-12-08 13:51:38 +00:00
Nathan Whitehorn
aa2526259b Try a more generic version of the last two fixes. Assuming this is correct,
it should also be MI. The problem here arises when ld ends up linking a
link-once section with relocations against sections that point back to it
that are as yet unresolved. Instead of piecemeal finding sections we
think are potentially subject to this issue, just defer processing for
sections that have yet to be relocated instead of immediately bailing.
2010-12-07 23:44:07 +00:00
Nathan Whitehorn
215d29a201 Fix another .got references-in-linkonce-sections issue with C++. There are
remaining issues here, and a more general solution is probably called for.

Submitted by:	Jakob van Santen <vansanten@wisc.edu>
2010-12-07 23:14:00 +00:00
Dimitry Andric
e3c77b8170 For ia64, add a proper 'elf64-ia64-freebsd' output format to BFD, so the
ELF branding for FreeBSD is done in the same way as amd64, i386 and
sparc.  Something similar should probably also be done for arm, mips and
powerpc.
2010-12-05 20:24:22 +00:00
Ulrich Spörlein
f02cd756de traceroute(8): make WARNS=3 clean
Also fixes an operator precedence bug for TCP tracerouting
2010-12-04 14:19:27 +00:00
Doug Barton
c3c441cd46 Update to version 9.6-ESV-R3, the latest from ISC, which addresses
the following security vulnerabilities.

For more information regarding these issues please see:
http://www.isc.org/announcement/guidance-regarding-dec-1st-2010-security-advisories

1. Cache incorrectly allows ncache and rrsig for the same type

   http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-3613

   Affects resolver operators whose servers are open to potential
   attackers. Triggering the bug will cause the server to crash.

   This bug applies even if you do not have DNSSEC enabled.

2. Key algorithm rollover

   http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-3614

   Affects resolver operators who are validating with DNSSEC, and
   querying zones which are in a key rollover period. The bug will
   cause answers to incorrectly be marked as insecure.
2010-12-04 05:58:56 +00:00
Dimitry Andric
2006fbc8fe Sync: merge r215944 through r216132 from ^/head. 2010-12-02 22:00:57 +00:00
Ulrich Spörlein
d8e58d07b3 Remove unused traceroute(8) contrib code from head
It still lives on under vendor/traceroute.
2010-11-27 09:26:46 +00:00
Ulrich Spörlein
aa8f5ab65e Remove clause 3 and 4 from TNF licenses.
Obtained from:	NetBSD
Approved by:	core
2010-11-26 20:34:43 +00:00
Dimitry Andric
d8f878a1c5 Now that the fix for gcc PR 20218 is applied, and hidden attributes
actually work, linking of libgcc_s.so.1 on ia64 will fail with:

unwind-ia64.So(.text+0x1762): In function `_Unwind_FindEnclosingFunction':
: undefined reference to `_Unwind_FindTableEntry'
unwind-ia64.So(.text+0x1d82): In function `uw_frame_state_for':
: undefined reference to `_Unwind_FindTableEntry'
/usr/bin/ld: libgcc_s.so.1: hidden symbol `_Unwind_FindTableEntry' isn't defined

Repair this by not hiding the _Unwind_FindTableEntry symbol; on FreeBSD,
it is in libc, not in libgcc.

Silence from:	current@
2010-11-25 20:35:49 +00:00
Dimitry Andric
0e1c5cba52 Apply backported fix for gcc PR 20218. This makes __attribute__
((visibility ("hidden"))) work properly, and fixes building devel/glib20
with newer binutils.

Silence from:	current@
2010-11-25 20:29:14 +00:00
Dimitry Andric
a35d3535ee Sync: merge r215464 through r215708 from ^/head. 2010-11-22 20:52:18 +00:00
Attilio Rao
7f08176ee8 Add the ability for GDB to printout the thread name along with other
thread specific informations.

In order to do that, and in order to avoid KBI breakage with existing
infrastructure the following semantic is implemented:
- For live programs, a new member to the PT_LWPINFO is added (pl_tdname)
- For cores, a new ELF note is added (NT_THRMISC) that can be used for
  storing thread specific, miscellaneous, informations. Right now it is
  just popluated with a thread name.

GDB, then, retrieves the correct informations from the corefile via the
BFD interface, as it groks the ELF notes and create appropriate
pseudo-sections.

Sponsored by:	Sandvine Incorporated
Tested by:	gianni
Discussed with:	dim, kan, kib
MFC after:	2 weeks
2010-11-22 14:42:13 +00:00
Dimitry Andric
678206c056 Revert patch for gcc PR 20218 for now, I hope it can land in head
soon, otherwise I'll just reapply it again.
2010-11-18 18:49:04 +00:00
Dimitry Andric
6b6403a102 Sync: merge r215396 through r215463 from ^/head. 2010-11-18 18:30:03 +00:00
Mark Murray
c268cdfc23 Fix paths for example files. 2010-11-18 18:22:58 +00:00
Dimitry Andric
c6d2d1b4ac Sync: merge r215189 through r215272 from ^/head. 2010-11-14 01:06:10 +00:00
Warner Losh
e07bbfac01 Default to little endian output when building for little endian. This
got lost as a result of a mismerge a few months back and I didn't
notice until I collapsed tbemd into -head.

Submitted by:	similar patch by kan@
2010-11-13 20:30:24 +00:00
Dimitry Andric
5fbbc222c8 Sync: merge r215141 through r215188 from ^/head. 2010-11-12 17:20:18 +00:00
Martin Matuska
542aef4874 Update xz to release 5.0.0
Approved by:	delphij (mentor)
MFC after:	1 week
2010-11-12 16:53:17 +00:00
Sergey Kandaurov
67fe5233fc Add 'jid' as a possible sort order to the help screen.
PR:		bin/150992
Submitted by:	Frederic Culot <frederic at culot dot org>
Approved by:	avg (mentor)
MFC after:	5 days
2010-11-12 16:50:11 +00:00
Dimitry Andric
1170f3d12e Sync: merge r214895 through r215140 from ^/head. 2010-11-11 20:52:24 +00:00
Ed Schouten
a189633748 Set symbol visibility to hidden.
Not doing so may cause all sorts of random libraries to expose
libcompiler_rt's functions, which should of course not be done.

Discussed with:	kan, kib
2010-11-11 16:53:25 +00:00
Ed Schouten
a3cf0ef5a2 Import libcompiler_rt into HEAD and add Makefiles.
Obtained from:	user/ed/compiler-rt
2010-11-11 15:13:11 +00:00
Colin Percival
4a56bb2033 Zero the buffer containing the .gnu_debuglink section before writing
into it.  Prior to this commit the .gnu_debuglink section can have up
to 3 bytes of uninitialized garbage; as a result, .ko files could
change vary between builds.

Approved by:	dim
MFC after:	7 days
2010-11-11 00:29:19 +00:00
David E. O'Brien
fb2971ccd2 Upgrade to Bzip2 version 1.0.6.
Reviewed by: SO (cperciva)
2010-11-09 18:32:57 +00:00
Oleksandr Tymoshenko
da6dbae49c Prevent endless loop by detecting broken MIPS.options 2010-11-07 20:44:46 +00:00
Oleksandr Tymoshenko
db09d96dcb Change register numbers according to current struct reg and
struct fpreg in src/sys/mips/include/reg.h
2010-11-07 20:40:00 +00:00
Oleksandr Tymoshenko
8d4844f1ab Calculate offset from frame top for registers saved on a stack frame. 2010-11-07 20:37:25 +00:00
Dimitry Andric
eef8b03ca0 Sync: merge r214649 through r214894 from ^/head. 2010-11-06 18:36:21 +00:00
Xin LI
584e07b573 Inverse display of top(1)'s table header when running in inactive mode.
MFC after:	2 weeks
2010-11-06 03:59:21 +00:00
Dimitry Andric
8aa660204b Backport a fix for binutils PR7093, which caused segfaults in ld
targeting arm, when attempting to create object files from arbitrary
binary file (e.g. firmware blobs).
2010-11-03 16:46:05 +00:00
Rui Paulo
b894cc9352 Remove unused files. 2010-11-03 10:46:39 +00:00
Rui Paulo
e28a4053b1 Merge wpa_supplicant and hostapd 0.7.3. 2010-11-03 10:43:38 +00:00
Edwin Groothuis
6a081b5f49 MFV of tzdata2010o, r214716
- Fiji moves to DST three weeks earlier in 2010.
2010-11-03 01:30:56 +00:00
Oleksandr Tymoshenko
ea84fab2ce - Add ELF core for FreeBSD/mips
- Register all known cores in init function
2010-11-02 01:26:21 +00:00
Oleksandr Tymoshenko
6c412cffd0 Fix reading of .debug_line on MIPS64, big-endian:
read_initial_length detects pointer size by checking first
    4 bytes of .debug_line and stores it in struct comp_unit_head *
    passed to it as second argument. By passing NULL to a
    read_initial_length we ignore actual pointer size (8 bytes) and
    use default (4 bytes) which results in wrong offsets of header fields.
2010-11-02 01:24:49 +00:00
Dimitry Andric
b9f2f8c36f Sync: merge r214353 through r214648 from ^/head. 2010-11-01 22:11:18 +00:00
Dimitry Andric
97d40d3d4a Merge ^/vendor/binutils/dist@214571 into contrib/binutils, which brings
us up to version 2.17.50.20070703, at the last GPLv2 commit.

Amongst others, this added upstream support for some FreeBSD-specific
things that we previously had to manually hack in, such as the OSABI
label support, and so on.

There are also quite a number of new files, some for cpu's (e.g. SPU)
that we may or may not be interested in, but those can be cleaned up
later on, if needed.
2010-11-01 19:35:33 +00:00
Doug Barton
34ceb982dc Update to 9.6-ESV-R2, the latest from ISC.
This version contains bug fixes that are relevant to any
caching/resolving name server; as well as DNSSEC-related
fixes.
2010-10-31 04:45:53 +00:00
Rui Paulo
be0479174b Use pcap's bpf header, not our own copy of it. 2010-10-29 21:23:34 +00:00
Rui Paulo
b436d954c4 Remove more unused files. 2010-10-29 18:56:51 +00:00
Rui Paulo
6aa7d503ce Remove unused files. 2010-10-29 18:50:38 +00:00
Rui Paulo
a0ee43a18d Merge libpcap-1.1.1. 2010-10-29 18:43:23 +00:00
Rui Paulo
c2ab553ee5 Remove useless stuff. 2010-10-28 19:10:15 +00:00
Rui Paulo
27df3f5ddd Merge tcpdump-4.1.1. 2010-10-28 19:06:17 +00:00
Edwin Groothuis
f8768d2a1a Sync code with tzcode2010m
asctime.c:
* Set errno to EINVAL and return "??? ??? ?? ??:??:?? ????\n" if
  asctime_r is called with a NULL struct tm pointer.  (Note that
  asctime_r is called by ctime_r and asctime; asctime is called by
  ctime.)

localtime.c:
* Set errno to EINVAL and return WRONG if time1 is called with a
  NULL struct tm pointer; avoid dereference if a NULL struct tm
  pointer is passed to timelocal, timegm, or timeoff.  (Note that
  time1 is called by mktime, timegm, and timeoff; mktime is called
  by timelocal.)
* more core-avoidance work
* Change to set timezone and altzone based on time types with
  greatest transition times (for the benefit of Asia/Seoul).

zic.8:
* Warning about case-sensitivity of names, but not of abbrevations

zic.c:
* Conditionally output extra types with most-recently-use offsets
  last (for use by systems with pre-2011 versions of localtime.c,
  helping to ensure that globals "altzone and "timezone" get set
  correctly).

The code has been running for nearly four weeks on my laptop running
FreeBSD 8.1 without a problem.

MFC after:	1 month
2010-10-27 07:14:46 +00:00
Nathan Whitehorn
0a0025449d Fix a manifestation of GCC bug 16625 that caused ld >= 2.17 to fail on
64-bit PowerPC when linking multiple C++ files referencing the same
method, defined in a common header, when that method had a switch
statement with more than 4 cases. This change fixes compilation of LLVM
tblgen on 64-bit PPC with binutils 2.17.

Lots of help from:	dim
Upstream after:		more testing
2010-10-25 21:49:59 +00:00
Dimitry Andric
51297f7d79 Sync: merge r214221 through r214352 from ^/head. 2010-10-25 19:58:28 +00:00
Dimitry Andric
e208fc20ab Apply commit f6c8fecc6fe3d5532691867a7f27820bb1c426a9 from upstream
(still under GPLv2 at that time):

Author: H.J. Lu <hjl@lucon.org>
Date:   Wed Sep 27 04:18:16 2006 +0000

PR ld/3223
PR ld/3267
* bfd/elf.c (assign_file_positions_for_non_load_sections): Don't warn
  zero size allocated sections.
* ld/ldlang.h (lang_output_section_statement_type): Add
  section_relative_symbol.
* ld/ldlang.c (strip_excluded_output_sections): Don't strip a section
  with a symbol relative to it.
  (lang_size_sections_1): Mark if an output section has a symbol symbol
  relative to it.

This prevents warnings like the following during stripping of debug info
from kernel modules on i386:

===> zlib (all)
...
objcopy --only-keep-debug zlib.ko.debug zlib.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=zlib.ko.symbols zlib.ko.debug zlib.ko
BFD: zlib.ko: warning: allocated section `.plt' not in segment
BFD: zlib.ko: warning: allocated section `.got' not in segment
2010-10-25 19:43:22 +00:00
Dimitry Andric
ae10dec363 Apply commit d3a5e914c6ff07c426b026b0cda8d044fd1cdabe from upstream
(still under GPLv2 at that time):

Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Aug 24 14:59:24 2006 +0000

* ldlang.c (lang_size_sections_1, lang_assignment_statement_enum):
  Adjust the current address of DEFAULT_MEMORY_REGION even when dot
  hasn't changed.

This is a prerequisite for the fix coming just after this.
2010-10-25 19:33:45 +00:00
Ulrich Spörlein
d9962dc588 Remove mention of non-existant -o flag for debugging options.
MFC after:	3 days
2010-10-23 12:27:39 +00:00
Dimitry Andric
8a8595146e Fix gdb compilation with new binutils:
bfd_get_section_size_before_reloc() has been renamed to
bfd_get_section_size().
2010-10-22 18:08:37 +00:00
Dimitry Andric
88afd39b79 Make contrib/binutils/opcodes/mips-dic.c compile without warnings. 2010-10-22 18:07:29 +00:00
Dimitry Andric
9be9d08fde Make contrib/binutils/bfd/coff-x86_64.c compile without warnings. 2010-10-22 18:06:58 +00:00
Dimitry Andric
dc9aea6cc4 Reapply change from r210245. In binutils 2.17, the code in question has
moved from ld/emultempl/elf32.em to ld/ldlang.c, so apply approximately
the same change as upstream, which has description:

* ldlang.c (lang_insert_orphan): Add __start_<section> symbol assignment
  inside output section statement.  Ensure only one set of symbols per
  output section.
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Add non-dollar
  sections before dollar sections.  Correct add_child list insertion.

Taken from upstream git commit 7e01d69a19a8fd079887f26853c8565da15ff340,
with permission to use it under GPLv2 from the author.
2010-10-21 19:27:27 +00:00
Dimitry Andric
dfd2f2d4bb Merge ^vendor/binutils/dist@214082 into contrib/binutils. 2010-10-21 19:11:14 +00:00
Dimitry Andric
7a815afd9b Import the binutils-2_17-branch from the sourceware CVS repository,
exactly as it was on Tue, 7 Aug 2007 00:00:13 +0000.

Corresponds to git commit b458c361f01f7a257f897d0961d0a379ee999aaa.

This is currently (and most likely forever :) the last commit on this
branch.
2010-10-19 21:13:25 +00:00
Dimitry Andric
ae36f9474f Sync: merge r213992 through r214076 from ^/head. 2010-10-19 21:02:05 +00:00
Dimitry Andric
c9a933bd0b Merge ^vendor/binutils/dist@214033 into contrib/binutils.
The change made to bfd/elf.c in upstream revision 1.217.4.3 (which was a
revert of an earlier change), caused objcopy on powerpc to fail to copy
debug info from kernel modules.  This had to be fixed by applying the
diff from upstream revision 1.243 on top of it.
2010-10-19 20:14:32 +00:00
Ulrich Spörlein
7cc1fde083 mdoc: drop even more redundant .Pp calls
No change in rendered output, less mandoc lint warnings.

Tool provided by:	Nobuyuki Koganemaru n-kogane at syd.odn.ne.jp
2010-10-19 12:35:40 +00:00
Xin LI
4f2bbc00f2 MFV: nc(1) from OpenBSD 4.8.
While I'm there, bump WARNS level to 2 as the vendor
have the right printf format string now.

MFC after:	1 month
Obtained from:	OpenBSD
2010-10-19 00:01:53 +00:00
Dimitry Andric
d1728c43cb Merge ^vendor/binutils/dist@213996 into contrib/binutils. Skip adding
any files we do not need, delete some files that were removed upstream,
but keep our own customizations and backports from later binutils.
2010-10-18 20:57:43 +00:00
Rebecca Cran
dadef94c7a Remove extra word, which looks like a left-over from a deleted sentence. 2010-10-18 14:35:21 +00:00
Roman Divacky
9221387423 Actually, check for any kind of "C string type".
Approved by:    rpaulo (mentor)
2010-10-13 17:01:33 +00:00
Roman Divacky
f18b8b6287 Extend this check for const unsigned char *.
Approved by:    rpaulo (mentor)
2010-10-13 14:27:47 +00:00
Martin Matuska
e0f0e66dfe Upgrade xz to git snapshot as of 20101010
Approved by:	delphij (mentor)
MFC after:	1 month
2010-10-11 21:16:50 +00:00
Dimitry Andric
361680a519 Remove more unneeded files and directories from contrib/llvm. This
still allows us to build tblgen and clang, and further reduces the
footprint in the tree.

Approved by:	rpaulo (mentor)
2010-10-11 17:22:16 +00:00
Rui Paulo
72578a23bf Rework the analysis of the 'r' specifier. It turns out that we can't
make it like xArg because they are different ('x' doesn't accept sign,
but 'r' does).
This fixes some warnings when building DDB with clang.

With help from:	rdivacky
2010-10-11 17:18:23 +00:00
Rui Paulo
921f8a1b40 Restore the support for the 'r' and the 'y' conversion specifiers, first
added on r208987.
These are undocumented but are part of printf(9).
2010-10-11 08:10:12 +00:00
Ed Schouten
7bf1ea9644 Import ee 1.5.2 into HEAD.
PR:		bin/145921
MFC after:	2 weeks
2010-10-08 09:43:06 +00:00
Dimitry Andric
14837164d2 Upgrade Clang and LLVM to the 2.8 release. See here for release notes:
http://llvm.org/releases/2.8/docs/ReleaseNotes.html

Approved by:	rpaulo (mentor)
2010-10-07 20:31:07 +00:00
Dimitry Andric
dba44734eb Apply r207674 from the clangbsd project branch:
Make "clang -print-multi-os-directory" return "." on amd64, matching
gcc's behaviour.  This is needed because some ports use the option to
determine the installation directory for their libraries.

Requested by:	kwm
Approved by:	rpaulo (mentor)
2010-10-06 20:35:07 +00:00
Dimitry Andric
fec07a7df1 Cleanup some example and empty directories that were left around after
the last import of contrib/llvm.

Suggested by:	obrien
Approved by:	rpaulo (mentor)
2010-10-02 11:45:18 +00:00
David E. O'Brien
5a93e3ae7b Flatten the bzip2 vendor area in preparations for the 1.0.6 import. 2010-10-02 06:54:59 +00:00
Edwin Groothuis
95aec0e66d MFV of 213310, tzdata2010m
- Fix historical data for Hongkong
- Fix location description for Antarctica/Vostok
2010-09-30 22:00:21 +00:00
Rui Paulo
c5c0eabc00 Add support for the BFD target efi-app-x86_64.
This uses only GPL2 source code and is a requirement for a 64 bit EFI
boot loader.
2010-09-29 14:41:03 +00:00
Nathan Whitehorn
a9f035fdd9 Check for NULL link registers as found in initial stack frames when doing
stack unwinding, instead of naively trying to check the instruction at
that location. This fixes signal handling in threaded applications after
recent changes regarding unwinding in libthr. While here, clean up our
MD_FROB_UPDATE_CONTEXT() implementation a little.
2010-09-26 14:20:09 +00:00
Dimitry Andric
e580952d8a Upgrade our Clang in base to r114020, from upstream's release_28 branch.
Approved-by:	rpaulo (mentor)
2010-09-20 16:43:17 +00:00
Colin Percival
66e576525d Fix an integer overflow in RLE length parsing when decompressing
corrupt bzip2 data.

Approved by:	so (cperciva)
Security:	FreeBSD-SA-10:08.bzip2
2010-09-20 14:58:08 +00:00
Ed Maste
8744fd1ce1 Remove libf2c. It hasn't been used for more than 11 years, since revision
1.90 (CVS; SVN r45770) of lib/Makefile.
2010-09-14 01:40:59 +00:00
Rui Paulo
ed5d030788 Mark __DTOR_LIST__, __EH_FRAME_BEGIN__ and __CTOR_END__ as used to avoid
segfaults when building with clang.

This comes (partly) from the LLVM svn r41105.
2010-08-26 13:04:16 +00:00
Rui Paulo
30ca19f436 Mark __JCR_LIST__, __DTOR_END__, __JCR_END__, __FRAME_END__ as used to
avoid segfaults when building with clang.

Permission to backport given by Jan hubicka <jh at suse.cz>.
2010-08-26 13:00:29 +00:00
Rui Paulo
1fdc87e76d Some fixes so we can build libstdc++ with clang:
o Make the value_type, vector_type, iterator, __mutex_type types of
free_list class so we can access them
o In some cases template keywords must be inserted to treat classes as
dependent template names
o Remove two 'inline' keywords where they do not make sense

Submitted by:	Dimitry Andric <dimitry at andric.com>
Reviewed by:	trema
2010-08-24 13:38:53 +00:00
Rui Paulo
0c898ccd30 Mark the following static variables as __used__ instead of __unused__:
o force_to_data
o __CTOR_LIST__
o __do_global_dtors_aux_fini_array_entry
o __frame_dummy_init_array_entry

This is necessary because Clang is smart enough to optimize out these
variables was they were marked as __unused__ (and they are also static).
The end result was programs segfaulting because these symbols weren't
present.

This follows the upstream revision 159228 and the author of that
revision (Jan Hubicka <jh at suse.de>) allowed us to backport this to our
GPLv2 GCC.

Discussed with:	core
2010-08-24 00:23:40 +00:00
Rui Paulo
2aedda247b Modify clang so that when TOOLS_PREFIX is defined we register the
CLANG_PREFIX macro. This changes the default header search path when we
are building clang as part of cross-tools.

Submitted by:	Dimitry Andric <dimitry at andric.com>
Reviewed by:	freebsd-current
2010-08-21 15:46:33 +00:00
Rui Paulo
28be8b2ba9 Revert part of r211505. Some of the removed casts are actually safe so
put them back in again. Also, clang only complained about the lvalue
cast.

Submitted by:	Dimitry Andric <dimitry at andric.com>
Pointed out:	bde
2010-08-21 10:31:26 +00:00
Rui Paulo
aeba5ab26b Remove unneeded casts in inline assembly in contrib/gcc/longlong.h,
which are apparently "heinous" GNU extensions, so clang can
compile this without using the -fheinous-gnu-extensions option.

Results in *no* binary change, neither with clang, nor with gcc.

Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-08-19 12:59:57 +00:00
Edwin Groothuis
7d2cde9fd9 MFV of r211420, tzdata2010l
- Fix start times of DST for Egypt.
- clocks were set back one hour at 2010-08-11 00:00:00 local time
  in Gaza and the West Bank.

Obtained from:  ftp://elsie.nci.nih.gov/pub/
2010-08-17 12:10:35 +00:00
Rebecca Cran
2ab8e45eb8 Since top displays the uptime including seconds, there is no need to add 30
onto it, which may have been used for rounding purposes in other utilities.

PR:	bin/147934
Submitted by:	Janne Snabb <snabb at epipe.com>
Approved by:	rrs (mentor)
MFC after:	2 weeks
2010-08-17 09:51:08 +00:00
Joel Dahl
54be88c948 Fix two minor typos. 2010-08-16 21:12:26 +00:00
Ulrich Spörlein
f239d44ec1 Bump document date after content changes.
Pointy hat to:	uqs
2010-08-16 19:05:10 +00:00
Ulrich Spörlein
e5cce4162a Wordsmithing of bsnmpd.1
PR:		docs/149157
Submitted by:	Warren Block <wblock@wonkity.com>
MFC after:	1 week
2010-08-16 18:47:35 +00:00
Ed Schouten
6f3e5db886 Remove unneeded struct timezone passed to gettimeofday(). 2010-08-08 08:22:53 +00:00
Pyun YongHyeon
869ae66dfc Fix a typo introduced in r210936 which broke build. 2010-08-06 18:44:07 +00:00
John Baldwin
d99d8e2e38 Ethernet vlan(4) interfaces have valid Ethernet link layer addresses but
use a different interface type (IFT_L2VLAN vs IFT_ETHER).  Treat IFT_L2VLAN
interfaces like IFT_ETHER interfaces when handling link layer addresses.

Reviewed by:	syrinx (bsnmpd)
MFC after:	1 week
2010-08-06 15:09:21 +00:00
Christian S.J. Peron
1a28a37578 Enable closefrom(2) here, as we have supported it for some time now.
Discussed with:	mlaier
MFC after:	2 weeks
2010-08-05 18:49:06 +00:00
Rui Paulo
91e3f06a9e Properly warp around more code under COMPILE_ONLY to recover from build
errors.
2010-08-02 13:05:12 +00:00
Edwin Groothuis
f2dd838ff1 MFV of r210716, tzdata2010k
- Daylight Saving Time will not be used in Egypt during Ramadan.
- Proper names for Pacific/Pohnpei and Pacific/Chuuk
- Fix historical information for Finland for 1981 and 1982
- No leap-second for December 2010.
- Fix historical information for Ontario (Canada)
2010-08-01 09:03:10 +00:00
Benedict Reuschling
bc6940585f Use "printf" instead of "echo -n" in an example because it
should be more compatible for most shells that are out there.

I contacted Philip Guenther at OpenBSD about this PR and he
corrected the issue in their tree pretty fast.

PR:			docs/142243
Submitted by:		Yasir (yasir27 at mail dot ru)
Obtained from:		OpenBSD
Discussed with:		delphij
MFC after:		7 days
2010-07-26 18:33:33 +00:00
Rong-En Fan
ba09753559 Merge r210464 from vendor/ncurses/dist:
- Fix wrong manpage title for keybound.3X

 PR:		docs/148864
 Obtained from: ncurses-5.7-20081213 snapshot
2010-07-25 11:48:27 +00:00
Rui Paulo
247cd15268 Make these files compile with clang.
Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-07-22 18:52:29 +00:00
Ed Schouten
ffd1746d03 Upgrade our Clang in base to r108428.
This commit merges the latest LLVM sources from the vendor space. It
also updates the build glue to match the new sources. Clang's version
number is changed to match LLVM's, which means /usr/include/clang/2.0
has been renamed to /usr/include/clang/2.8.

Obtained from:	projects/clangbsd
2010-07-20 17:16:57 +00:00
Andriy Gapon
517d9fc653 binutils/ld: fix incorrect placement of __start_SECNAME in some cases
__start_SECNAME and __stop_SECNAME symbols are automatically generated
by ld for orphan sections, i.e. those not explicitely referenced by a
linker script.  The symbols are supposed to be placed correspondingly
at the start and the end of the section in output file.  In some cases
__start_SECNAME may be placed at the address after the end of the
previous section (if any) and before the start the section.  This
happens when following conditions are met:
1. the orphan section is found in more than one input file
2. the orphan section has different alignment requirements across input
files
3. the first instance of the section encountered doesn't have the
greatest alignment requirement
In these conditions resulting output section will be placed at address
after the end of the previous section aligned to the greatest alignment
requirement in the inputs, but __start_SECNAME will be placed at address
after the end of the previous section aligned to the alignment
requirement of the first input in which the section is encountered.

See commit message of r196118 for a concrete example of problems caused
by this bug.

The fix is to place __start_SECNAME inside the section and use ABSOLUTE
directive, rather than placing __start_SECNAME outside the section and
trying to guess address alignment.

This fix is in line with upstream binutils change/fix made between
versions 2.19 and 2.20 in revision of 1.307 ldlang.c.

MFC after:	3 weeks
2010-07-19 18:20:44 +00:00
Nathan Whitehorn
2cf64c8006 Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.

Obtained from:	projects/ppc64
2010-07-10 02:29:22 +00:00
Andriy Gapon
3f8ed583e6 readelf.1: remove duplicate -u/--unwind option description
MFC after:	2 weeks
2010-06-22 07:31:05 +00:00
Edwin Groothuis
c9e4fb34cb Make mandoc/mdocml happy.
Submitted by:	Uli(?) via gmane.comp.time.tz
2010-06-15 11:37:33 +00:00
Rui Paulo
4f95cb6e9c Remove unused files. 2010-06-14 15:52:50 +00:00
Rui Paulo
3157ba2193 MFV hostapd & wpa_supplicant 0.6.10. 2010-06-14 15:37:48 +00:00
Ed Schouten
c1fe4c5343 Do the branding right this time.
I've looked at other places in the source tree where CLANG_VENDOR is
used and I suspect it might not be safe to use newlines here.
CLANG_VENDOR should just be defined to "FreeBSD ", just like the latest
Clang preview in OS X uses "Apple ". Properly use SVN_REVISION to define
it to the imported revision of Clang. I do want to have a date in there,
so slightly modify the code to support CLANG_VENDOR_SUFFIX.
2010-06-12 15:13:36 +00:00
Roman Divacky
1fbefe1829 Remove Xcode cmake win32 projects unittests from LLVM and
clang.xcodeproj INPUTS win32 from clang.

Requested by:	jkim
Approved by:	ed (mentor)
2010-06-10 19:59:23 +00:00
Roman Divacky
a08050302b Introduce -fformat-extensions. A local FreeBSD extension used
for additional printf modifiers in kernel.

Approved by:	ed (mentor)
2010-06-10 16:13:32 +00:00
Roman Divacky
e8e8a542a3 Remove the commented out piece that slipped as a mismerge.
Approved by:	ed (mentor)
2010-06-09 19:15:58 +00:00
Roman Divacky
35adf9fc8d Adjust include paths to FreeBSD. Remove /usr/local/include and
add /usr/include/clang/$VERSION (currently VERSION is 2.0).

Approved by:	ed (mentor)
2010-06-09 19:12:25 +00:00
Roman Divacky
ba34dbfff9 Change the default CPU to i486 on i386 (architecture).
Approved by:	ed (mentor)
2010-06-09 19:09:49 +00:00
Roman Divacky
29b430e5da Comment out piece of code using __clear_cache() which FreeBSD
does not have. This is only used for JIT on ARM so it's harmless.

Approved by:	ed (mentor)
2010-06-09 19:08:17 +00:00
Ed Schouten
bff23f82e5 Remove unneeded directories.
Even though Roman removed these directories in his working copy, they
weren't removed from the actual repository, also causing his working
copy to be corrupted.
2010-06-09 18:11:12 +00:00
Roman Divacky
f22ef01c33 Import LLVM/clang from vendor stripped of docs/ test/ website/ www/ examples/
in llvm/ and/or llvm/contrib/clang/ respectively.

Approved by:	ed (mentor)
Approved by:	core
2010-06-09 17:59:52 +00:00
Ulrich Spörlein
aa64588d28 Remove -mdoc macros from -man page
Neither groff nor mandoc render these when in -man mode.
This was introduced in r38083 as a local change, therefore no commit to
the vendor branch.
2010-06-09 08:53:50 +00:00
Ulrich Spörlein
cf7d8dea39 Add required header for isalnum(3) to quench compiler warnings
Forgotten in:	r174678
Submitted by:	Alexander Best alexbestms at wwu.de
Approved by:	das
2010-06-02 18:31:04 +00:00
Juli Mallett
5619a3e4bf Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain.
o) Add TARGET_ABI to the MIPS toolchain build process.  This sets the default
   ABI to one of o32, n32 or n64.  If it is not set, o32 is assumed as that is
   the current default.
o) Set the default GCC cpu type to any specified TARGET_CPUTYPE.  This is
   necessary to have a working "cc" if e.g. mips64 is specified, as binutils
   will refuse to link objects using different ISAs in some cases.
o) Add support for n32 and n64 ABIs to binutils and GCC.
o) Add additional required libgcc2 stubs for n32 and n64.
o) Add support for the "mips64r2" architecture to GCC.  Add the "octeon"
o) When static linking, wrap default libraries in --start-group and
   --end-group.  This is required for static linking to work on n64 with the
   interdependencies between libraries there.  This is what other OSes that
   support n64 seem to do, as well.
o) Fix our GCC spec to define __mips64 for 64-bit targets, not __mips64__, the
   former being what libgcc, etc., check and the latter seemingly being a
   misspelling of a hand merge from a Linux spec.
o) When no TARGET_CPUTYPE is specified at build time, make GCC take the default
   ISA from the ABI.  Our old defaults were too liberal and assumed that 64-bit
   ABIs should default to the MIPS64 ISA and that 32-bit ABIs should default to
   the MIPS32 ISA, when we are supporting or will support some systems based on
   earlier 32-bit and 64-bit ISAs, most notably MIPS-III.
o) Merge a new opcode file (and support code) from a later version of binutils
   and add flags and code necessary to support Octeon-specific instructions.
   This should also make merging opcodes for other modern architectures easier.

Reviewed by:	imp
2010-06-02 11:06:03 +00:00
Jaakko Heinonen
725f5cdb0d Fixes from NetBSD for nvi visual mode:
- Fix handling of ^@ when reading an ex command. Don't try to replay
  the previous input.
- Fix handling of ^C in insert mode and when reading an ex command.
  Repeating an interrupted input could cause a crash and interrupting
  ex command input could cause a file corruption.
- Fix a bug which causes crashes in file name completion when a file
  name is longer than the screen width.
- When an error occurs in v_txt(), leave the input mode.

PR:		bin/21089, bin/136393
Obtained from:	NetBSD
2010-05-28 09:30:13 +00:00
Jaakko Heinonen
da93e82d24 Fix misspelling of "substitution".
PR:		bin/130874
Submitted by:	Yoshihiro Ota
2010-05-28 09:26:53 +00:00
Colin Percival
8fd6c56d29 Change the current working directory to be inside the jail created by
the jail(8) command. [10:04]

Fix a one-NUL-byte buffer overflow in libopie. [10:05]

Correctly sanity-check a buffer length in nfs mount. [10:06]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-10:04.jail
Security:	FreeBSD-SA-10:05.opie
Security:	FreeBSD-SA-10:06.nfsclient
2010-05-27 03:15:04 +00:00
Ulrich Spörlein
4f13bbb691 mdoc: consistently spell our email addresses <foo@FreeBSD.org>
Reviewed by:	ru
Approved by:	harti
2010-05-24 06:26:38 +00:00
Doug Barton
e7493cfc51 Upgrade to 9.6.2-P2, which addresses the following;
Named could return SERVFAIL for negative responses
   from unsigned zones.
2010-05-20 08:15:06 +00:00
Christian Brueffer
26cad3b64f Comment in the BUGS section header. Matches what's in ipfilter 5.10.
PR:		144880
Submitted by:	Glen Barber <glen.j.barber@gmail.com>
MFC after:	1 week
2010-05-12 00:56:53 +00:00
Edwin Groothuis
910a59c4c3 MFV of tzdata2010j, r207896
- Bahia de Banderas (Mexican state of Nayarit) changed time zone
  UTC-7 to new time zone UTC-6 on April 4, 2010 (to share the same
  time zone as nearby city Puerto Vallarta, Jalisco).

Obtained from:	ftp://elsie.nci.nih.gov/pub/
2010-05-10 21:02:16 +00:00
Martin Matuska
81ad83880d Import of liblzma, xz, xzdec, lzmainfo from vendor branch
Add support for xz and lzma to lesspipe.sh (xzless, lzless)
Bump __FreeBSD_version

Approved by:	delphij (mentor)
MFC after:	2 weeks
2010-05-10 06:59:50 +00:00
Ed Maste
7775701f3a Update GRANDPARENTED text to match the contents of tzdata/factory r19879.
This eliminates "warning: time zone abbreviation differs from POSIX" on
installworld to an empty filesystem.

Reviewed by:	edwin
MFC after:	1 week
2010-05-03 22:32:26 +00:00
Jilles Tjoelker
524461f158 telnet: Fix infinite loop if local output generates SIGPIPE.
Instead of catching SIGPIPE and jumping out of the signal handler with
longjmp, ignore it and handle write errors to the local output by exiting
from there. I have changed the error message to mention the local output
instead of NetBSD's wrong "Connection closed by foreign host". Write errors
to the network were already handled by exiting immediately and this now
applies to EPIPE too.

The code assumed that SIGPIPE could only be generated by the network
connection; if it was generated by the local output, it would longjmp out of
the signal handler and write an error message which caused another SIGPIPE.

PR:		19773
Obtained from:	NetBSD
MFC after:	1 week
2010-04-30 19:52:35 +00:00
Edwin Groothuis
696dd8f41c MFV of tzdata2010i, r206865
- Marocco does have DST this year between May and August.
- Historical data for Taiwan
- Argentina / San Luis does not do DST this year.
2010-04-19 20:59:39 +00:00
Nathan Whitehorn
3560b8af1f Fix brokenness in top on big-endian 32-bit systems introduced when
changing format_k2 to take a long long. Because itoa is defined as a K&R
C function, without prototyping its arguments, format_k2 passed a 64-bit
value, but itoa() received only the first word, showing '0' in all memory
fields.
2010-04-19 14:34:44 +00:00
Xin LI
6856a5e345 Utilize IP_BINDANY which provided the same semantics of OpenBSD's
SO_BINDANY.
2010-04-15 23:21:24 +00:00
Xin LI
55e999851d Diff reduction with OpenBSD:
- Remove unused locally added variable;
 - Deprecate -o: it's the default behavior on OpenBSD.

X-MFC:	along with nc 4.7.
2010-04-15 19:15:05 +00:00
Ulrich Spörlein
aa12cea2cc mdoc: order prologue macros consistently by Dd/Dt/Os
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)
2010-04-14 19:08:06 +00:00
Warner Losh
8a07366ec2 Add armeb-*-freebsd* to the list of known architectures. This is like
arm-*-freebsd*, except it defaults to big endian builds instead of
little endian builds.
2010-04-14 19:03:27 +00:00
Edwin Groothuis
ce28d23b73 MFV of tzdata2010h:
From tzdata2010h:

- Tunis will not go into DST this year.
- Pakistan will not go into DST this year.

From tzdata2010g:

- Bangladesh cancels DST.
- Palestine goes into DST one day later than expected.

- Russian timezones update:
  Europe/Samara goes to Moscow time.
  Asia/Kamchatka goes to Moscow+8 time.
  Asia/Anadyr goes to Moscow+8 time.
2010-04-05 22:15:06 +00:00
Rebecca Cran
c4103be40d Specify the parameter in the format_k2 prototype.
This fixes top on ARM, which assumes that format_k2 takes an int.

Approved by:	rrs (mentor)
2010-04-01 21:20:19 +00:00
Antoine Brodin
5a64472b2a (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.

Approved by:	harti@
2010-03-27 13:43:18 +00:00
Xin LI
36e60cda45 Remove GNU cpio after fix of CVE-2010-0624.
Note that this is actually a no-op for most users, as this GNU
cpio was broken on -HEAD and 8-STABLE since last March until
the recent fix.

FreeBSD 8.0+ uses BSD cpio by default and the code is being
actively maintained.

Blessed by:	kientzle
With hat:	secteam
MFC after:	3 days
2010-03-26 17:02:32 +00:00
Xin LI
780179e871 The rmt client in GNU cpio could have a heap overflow when a malicious
remote tape service returns deliberately crafted packets containing
more data than requested.

Fix this by checking the returned amount of data and bail out when it
is more than what we requested.

PR:		gnu/145010
Submitted by:	naddy
Reviewed by:	imp
MFC after:	immediately
Security:	CVE-2010-0624
2010-03-25 20:02:54 +00:00
Xin LI
d6655439ed Update metadata information as well as upgrade instructions. 2010-03-23 23:56:22 +00:00
Xin LI
26bf9c3b54 MFV: Update nc to the version from OpenBSD 4.7.
MFC after:	1 month
2010-03-23 23:00:35 +00:00
Edwin Groothuis
74fd35aa61 MFV of tzdata2010f:
The Australian Antartic Division:
- Macquarie Island will stay on UTC+11 for winter and not switch back from DST.
- Casey station reverted to its normal time of UTC+8 on 5 March 2010.
- Davis station will revert to its normal time of UTC+7 at 10 March 2010
- Mawson station stays on UTC+5.

Syria will start DST on Thursday 1 April 2010 at midnight.

Correct Samao DST start date (26 Sep vs 24 Oct)
2010-03-22 21:27:51 +00:00