Commit graph

90 commits

Author SHA1 Message Date
Warner Losh 4d65a7c695 usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Kyle Evans 123ae3045d build: remove LIBPTHREAD/LIBTHR build options
WITHOUT_LIBTHR has been broken for a little over five years now, since the
xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building
a useful system without threading support is becoming increasingly more
difficult.

Additionally, in the five plus years that it's been broken more reverse
dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among
others) that make it more and more difficult to reconcile the effort needed
to fix these options.

Remove the broken options.

PR:		252760
Reviewed by:	brooks, emaste, kib
Differential Revision:	https://reviews.freebsd.org/D28263
2021-01-22 12:33:27 -06:00
Kyle Evans 8073c947c7 ngctl: add -c (compact output) for the dot command
The output of "ngctl dot" is suitable for small netgraph networks. Even
moderate complex netgraph setups (about a dozen nodes) are hard to
understand from the .dot output, because each node and each hook are shown
as a full blown structure.

This patch allows to generate much more compact output and graphs by
omitting the extra structures for the individual hooks. Instead the names of
the hooks are labels to the edges.

Submitted by:	Lutz Donnerhacke <lutz_donnerhacke.de>
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D21965
2020-10-04 17:07:13 +00:00
Simon J. Gerraty 2c9a9dfc18 Update Makefile.depend files
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22494
2019-12-11 17:37:53 +00:00
Simon J. Gerraty 5ab1c5846f Add Makefile.depend.options
Leaf directories that have dependencies impacted
by options need a Makefile.depend.options file
to avoid churn in Makefile.depend

DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc
can be set in local.dirdeps-options.mk
which can add to those set in Makefile.depend.options

See share/mk/dirdeps-options.mk

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22469
2019-12-11 17:37:37 +00:00
Warner Losh 6c35c7d1b6 Replace complicated expression to disable libedit when no libthr is being built
with a simpler one.
2019-07-15 14:23:51 +00:00
Devin Teske bb22479803 Add blank line after each item in "ngctl ls -l"
The output of "ngctl ls -l" is hard to read. To make it easier, add a blank
line after each listed item much how traditional "ls -l" does when listing
the contents of multiple directories.

Sponsored by:	Smule, Inc.
2018-10-26 19:16:17 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Conrad Meyer 2889bad81c ngctl dot: Drop invalid trailing semi-colon
PR:		203257
Submitted by:	Daniel O'Connor
Sponsored by:	EMC / Isilon Storage Division
2015-09-22 01:31:01 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Gleb Smirnoff 61b6fd5ab2 Plug mutex leak.
MFC after:	1 week
Sponsored by:	Nginx, Inc.
2015-01-16 18:51:26 +00:00
Baptiste Daroussin c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Brooks Davis 80189b3b09 Replace all uses of libncurses and libtermcap with their wide character
variants.  This allows usable file system images (i.e. those with both a
shell and an editor) to be created with only one copy of the curses library.

Exp-run:	antoine
PR:		189842
Discussed with:	bapt
Sponsored by:	DARPA, AFRL
2014-07-17 18:24:34 +00:00
Baptiste Daroussin 01c2b8ac0d use .Mt to mark up email addresses consistently (part2)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:57:27 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Philippe Charnier d31ff7a8fb Add __unused. Ansi prototypes. 2010-12-20 09:36:54 +00:00
Dag-Erling Smørgrav c540146463 Add volatile to sig_atomic_t where it was missing.
MFC after:	1 week
2009-06-14 21:39:52 +00:00
Mike Makonnen 48b5fd636e Modify the DoParseCommand() to work on (const char *) instead of just
(char *). This is a slightly simplified version of the patch in the PR. It
fixes compilitation issues with -O3.

PR: misc/124385
2008-06-28 12:31:30 +00:00
Ruslan Ermilov dbdb679c6f Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longer
build libkse.  This should fix WITHOUT_LIBTHR builds as a side effect.
2008-03-29 17:44:40 +00:00
David E. O'Brien 946367b8e2 Tweak the handling of "WITHOUT_LIBPTHREAD". Also remove the accidental
treatment of 'LIBKSE' as an "old style" knob.

Submitted by:	ru
Approved by:	re(kensmith)
2007-10-09 23:31:11 +00:00
David E. O'Brien 65c045e964 Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by:	re(kensmith)
2007-10-09 13:42:34 +00:00
Ruslan Ermilov 152f2a4a96 Always install libpthread.* symlinks if at least one of
the threading libraries is built.  This simplifies the
logic in makefiles that need to check if the pthreads
support is present.  It also fixes a bug where we would
build a threading library that we shouldn't have built:
for example, building with WITHOUT_LIBTHR and the default
value of DEFAULT_THREADING_LIB (libthr) would mistakenly
build the libthr library, but not install it.

Approved by:	re (kensmith)
2007-10-01 18:22:32 +00:00
Gleb Smirnoff 611619b338 The last change is not needed for HEAD.
Explained by:	ru
2007-03-30 08:23:59 +00:00
Gleb Smirnoff 3cb88013ba Do not build the libedit support if NO_LIBPTHREAD is defined.
PR:		bin/104478
Submitted by:	Mike Durian <durian shadetreesoftware.com>
2007-03-28 14:04:35 +00:00
Kevin Lo 9c20ad30e0 getopt(3) returns -1, not EOF. 2007-02-06 08:48:28 +00:00
Ruslan Ermilov 968ed7eedb Push the detection of threading libs support down to ngctl/Makefile
as the latter can be built without threading (with the loss of line
editing functionality).

Pointed by:	glebius
2006-11-27 16:55:14 +00:00
Ruslan Ermilov 1d5dd15d75 Fix "make checkdpadd". 2006-11-26 14:43:03 +00:00
Alexander Kabaev 9a4194814d Silence GCC4 signed/unsigned pointer mismatch warning. 2006-09-21 01:48:47 +00:00
Gleb Smirnoff eac2afced2 - Pass pointer to fd_set in ReadSockets.
- style(9) nits.

Submitted by:	ru
2006-08-08 07:04:40 +00:00
Gleb Smirnoff b9124a7354 Add line edit and history support to ngctl(8) via editline(3).
Details:
- The main thread runs editline(3) functions, that can block.
- A separate thread is launched to monitor netgraph sockets.
- The access to the descriptors is protected by a mutex. At
  runtime the monitoring thread owns the mutex. When the main
  thread reads a command from el_gets() it asks the monitoring
  thread to release a mutex and sleep until the main thread
  processes the command.

This makes ngctl(8) depend on libedit, and libpthread. Thus, the
new functionality isn't compiled in if release is being built
with -DRELEASE_CRUNCH.

PR:		bin/87352
Reviewed by:	ru, Nuno Antunes <nuno.antunes gmail.com>
2006-08-07 14:17:05 +00:00
Stefan Farfeleder c3759b3a3f Don't use empty braces ("{}") to initialise arrays. This is a syntax
error in ISO C (both 90 and 99).
2006-07-17 08:35:47 +00:00
Gleb Smirnoff 9caee2ece7 Style: space after "return". 2006-06-28 10:38:38 +00:00
Gleb Smirnoff 78cdd8ed1b Unnest includes before forthcoming editing. 2006-05-24 14:46:55 +00:00
Ruslan Ermilov 62f8299baa - Reduce the number of netgraph messages when listing
nodes from (N + 1) to 1, where N is the number of
  nodes in the system.

- Implement "ls -l" which runs the "show" command for
  each node.

In collaboration with:	glebius
2005-02-09 16:17:33 +00:00
Maxim Konovalov c44e20ebec Backout rev. 1.17 per ru@ request: there are net.graph.recvspace and
net.graph.maxdgram sysctls.
2005-02-04 20:09:11 +00:00
Ruslan Ermilov a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00