Commit Graph

2701 Commits

Author SHA1 Message Date
Dimitry Andric
b1dbb12c3a Add missing src.conf(5) fragments for WITHOUT_LIBCPLUSPLUS and WITH_GPL_DTC. 2013-02-02 22:42:46 +00:00
Dimitry Andric
df5d2454a3 Pull in r170135 from upstream clang trunk:
Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user
  specifies not to. Dont build ASTMatchers with Rewriter disabled and
  StaticAnalyzer when it's disabled.

  Without all those three, the clang binary shrinks (x86_64) from ~36MB
  to ~32MB (unstripped).

To disable these clang components, and get a smaller clang binary built
and installed, set WITHOUT_CLANG_FULL in src.conf(5).  During the
initial stages of buildworld, those extra components are already
disabled automatically, to save some build time.

MFC after:	1 week
2013-02-02 22:28:29 +00:00
Pietro Cerutti
71796d333c - Fix more style(9)-related issues (copyright header, spaces after function
names, unnecessary casts)
- Change type of boolean variable from char to bool

Suggested by:	jhb, zont, jmallett
Reviewed by:	cognet
Approved by:	cognet
2013-02-01 13:04:06 +00:00
Pietro Cerutti
646b68f04d - Remove underscores from the internal structure name, as it doesn't collide
with the user's namespace.

- Correct size and position variables type from long to size_t.

- Do not set errno to ENOMEM on malloc failure, as malloc already does so.

- Implement the concept of "buffer data length", which mandates what SEEK_END
  refers to and the allowed extent for a read.

- Use NULL as read-callback if the buffer is opened in write-only mode.
  Conversely, use NULL as write-callback when opened in read-only mode.

- Implement the handling of the ``b'' character in the mode argument. A binary
  buffer differs from a text buffer (default mode if ``b'' is omitted) in that
  NULL bytes are never appended to writes and that the "buffer data length"
  equals to the size of the buffer.

- Remove shall from the man page. Use indicative instead. Also, specify that
  the ``b'' flag does not conform with POSIX but is supported by glibc.

- Update the regression test so that the ``b'' functionality and the "buffer
  data length" concepts are tested.

- Minor style(9) corrections.

Suggested by:	jilles
Reviewed by:	cognet
Approved by:	cognet
2013-01-31 16:39:50 +00:00
Pietro Cerutti
96c95412ca Add fmemopen(3), an interface to get a FILE * from a buffer in memory, along
with the respective regression test.
See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html

Reviewed by:	cognet
Approved by:	cognet
2013-01-30 14:59:26 +00:00
Konstantin Belousov
9005607c8f Rework the handling of the children for the pthread_vfork_test. The
trivial handler for SIGCHLD is installed, and SIGCHLD is blocked, to
not abandon our zombies to init(8). This way, the zombies are around
slightly longer, allowing to actually exercise the logic for p_pwait
use by the test.

MFC after:	1 week
2013-01-30 13:14:34 +00:00
Gabor Kovesdan
2dd076b84b - Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from
DragonflyBSD and install it as bsdpatch.  WITH_BSD_PATCH makes it
  default and installs GNU patch as gnupatch.

Submitted by:	pfg
Obtained from:	The DragonflyBSD Project
2013-01-29 17:03:18 +00:00
Brooks Davis
6d12634cba Use = not == in test arguments.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2013-01-24 20:47:37 +00:00
Ed Maste
4673bd3950 Restore Python 2.6+ compatibility
SVN r245536 ported this to Python 3.  The major change was the use of the
print function.  Unfortunately this is incompatible with Python 2, which
is still the default version in the ports tree.

Use a __future__ import to make this compatible with Python 2.6 and later.
2013-01-22 18:02:48 +00:00
Brooks Davis
aaea79704b Implement the -l option using ln(1) to facilitate boostrapping.
Ignore the new options -D, -h, -T, and -U.  Adjust -M support to ignore
an argument.

Sponsored by:	DARPA, AFRL
Reviewed by:	ian, ray, rpaulo
2013-01-21 22:32:00 +00:00
Eitan Adler
38d90616e6 Add option to make pc-sysinstall optional
Approved by:	cperciva
2013-01-18 15:57:09 +00:00
Adrian Chadd
3301ff5648 Add extra debugging fields. 2013-01-17 17:12:44 +00:00
Andrew Turner
1992e9a10c Add compiler support for the ARM EABI.
ARM EABI support is disabled by default and can be enabled by setting
WITH_ARM_EABI when building, however only the kernel-toolchain target will
work with this flag until the rest of the support is added.
2013-01-17 05:56:28 +00:00
Eitan Adler
6b1897b2ad Convert to Python 3
Approved by:	cperciva
2013-01-17 04:20:53 +00:00
Bjoern A. Zeeb
e6a64a84ea Add a src.conf(5) option to allow users to compile in the "NONE cipher",
which, only after authentication, disables crypto, and only for sessions
without a terminal.

Submitted by:	Jeremy Chadwick (freebsd jdc.parodius.com)
PR:		bin/163095
MFC after:	10 days
2013-01-17 01:51:04 +00:00
Navdeep Parhar
bfc486325b Allow "ivlan" (inner VLAN) to be used as an alias for "vlan" when
specifying match criteria.  "vlan" continues to be valid here, and it
continues to be valid when deleting, rewriting, inserting, or stacking
an 802.1q tag to a matching packet.

MFC after:	3 days
2013-01-17 00:21:45 +00:00
Brooks Davis
3258649e41 Remember the . in .\" in the WITH_NMTREE file and regenerate the output.
Reported by:	joeld
2013-01-14 20:38:32 +00:00
Jilles Tjoelker
925420d09c sh: Pass $? to command substitution containing compound/multiple commands.
Example:
  false; echo $(echo $?; :)
2013-01-14 12:20:55 +00:00
Jilles Tjoelker
e1e1f0e44f sh: Add testcase that $? is preserved into a simple command substitution.
The test builtins/trap6.0 already uses this but having it separate eases
diagnosis if this would break.
2013-01-13 22:35:51 +00:00
Jilles Tjoelker
f897e827b9 sh: Add some testcases related to subshells.
These failed in earlier attempts to execute more subshells without forking.
The patches are uncommitted.
2013-01-13 19:39:13 +00:00
Jilles Tjoelker
31d396587e sh: Fix crash when parsing '{ } &'.
MFC after:	1 week
2013-01-13 19:26:33 +00:00
Jilles Tjoelker
2c090c7168 sh: Don't lose $? when backquoted command ends with semicolon or newline.
An empty simple command was added and overwrote the exit status with 0.

This affects `...` but not $(...).

Example:
  v=`false;`; echo $?
2013-01-13 19:19:40 +00:00
Brooks Davis
79626055e3 Add pwcache(3) and vis(3) to libegacy as install(1) is about to grow a
dependency on them.

Sponsored by:	DARPA, AFRL
2013-01-11 20:51:02 +00:00
Brooks Davis
624c4889c7 Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default.

Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked
as /usr/sbin/mtree as well as /usr/sbin/nmtree.
2013-01-09 21:07:08 +00:00
Adrian Chadd
1efdee81a9 Add the "enable at reset" functionality to trigger spectral scan upon
a channel change/reset.
2013-01-09 18:50:06 +00:00
David E. O'Brien
9b6b681624 Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".
Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255.

Obtained from:	Juniper Networks
2013-01-08 18:37:12 +00:00
Adrian Chadd
21eec1f68e Disable clang for athstats for now. 2013-01-02 18:49:40 +00:00
Adrian Chadd
1984dd520b Add missing err() format string. 2013-01-02 18:33:48 +00:00
Adrian Chadd
9de4b9861e Fix missing err() format string. 2013-01-02 18:29:54 +00:00
Adrian Chadd
b920ab488c Fix some conversions to keep clang happy. 2013-01-02 18:29:11 +00:00
Adrian Chadd
5e951af2b6 Fix some clang warnings! 2013-01-02 18:26:32 +00:00
Adrian Chadd
5205fa3436 Fix up some warnings from clang.
This still triggers a bug in clang..
2013-01-02 18:21:24 +00:00
Adrian Chadd
c6b1b4562c Add missing err() format strings.
Thanks to: clang
2013-01-02 18:14:26 +00:00
Adrian Chadd
e337f1ac1d * Add missing err() string formats;
* Fix up a printf() type mismatch.

Thanks to: clang
2013-01-02 18:12:06 +00:00
Adrian Chadd
6029f436bb * Add missing format specifier for err()
* add missing exit(0)
* Fix some operator evaluation complaints.

Thanks to: clang
2013-01-02 18:09:30 +00:00
Adrian Chadd
0f7918149a Fix some printf() formats.
Found by:	clang
2013-01-02 18:05:31 +00:00
Adrian Chadd
a0eb0f26ef Fix incorrect format string. 2013-01-02 18:03:19 +00:00
Adrian Chadd
c8308f78aa Add a very skeletal spectral scan control application.
The main use for this is to manually trigger spectral scan operations
(athspectral -i athX start) whilst doing debugging.
2013-01-02 04:02:27 +00:00
Luigi Rizzo
9aff36d897 use nanosecond resolution, make sure gettimeofday
is called at most every 100 packets.
2012-12-27 09:15:21 +00:00
Luigi Rizzo
f7a1732204 various connections to last commit 2012-12-25 07:29:25 +00:00
Luigi Rizzo
6750270f23 small cleanup of the code, and add support for running multiple
threads on each socket.
2012-12-23 23:03:45 +00:00
Baptiste Daroussin
616d12b739 Add etc/periodic/daily/220.backup-pkgdb to OptionalObsoleteFiles.inc 2012-12-20 22:07:47 +00:00
Eitan Adler
ad9d6ff06a Add an additional regression tests for other cases to ensure these do not get fixed by accident. 2012-12-18 21:42:45 +00:00
Eitan Adler
2f01c791e9 POSIX requires that non-existent or null arguments be treated as if a
zero argument were supplied.

Add a regression test to catch this case as well.

PR:		bin/174521
Submitted by:	Daniel Shahaf <danielsh@elego.de> (pr)
Submitted by:	Mark Johnston <markjdb@gmail.com> (initial patch)
Reviewed by:	jilles
Approved by:	cperciva (implicit)
MFC after:	3 weeks
2012-12-18 21:02:38 +00:00
Poul-Henning Kamp
efe3d4d7c9 Update to the new and brighter pkg world 2012-12-15 17:54:29 +00:00
Jilles Tjoelker
d6d66cfc00 sh: Detect and flag write errors on stdout in builtins.
If there is a write error on stdout, a message will be printed (to stderr)
and the exit status will be changed to 2 if it would have been 0 or 1.

PR:		bin/158206
2012-12-12 22:01:10 +00:00
Eitan Adler
839f11a4fe A number of places in the source tree still reference cuad.* after
sio(4) was deprecated by uart(4).

s/cuad/cuau/g/

PR:		docs/171533
Reviewed by:	imp
Approved by:	cperciva (implicit)
MFC after:	3 weeks
2012-12-08 22:16:36 +00:00
Jilles Tjoelker
b731376e8c libc: Add a missing header to a test program.
Usage of dup(), mkstemp() and unlink() needs <unistd.h>.
2012-12-08 19:42:15 +00:00
Dimitry Andric
3861d79fd7 Upgrade our copy of llvm/clang to r168974, from upstream's release_32
branch.  This is effectively llvm/clang 3.2 RC2; the 3.2 release is
coming soon.
2012-12-03 19:24:08 +00:00
Dimitry Andric
13cc256e40 Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
2012-12-02 13:20:44 +00:00