Commit Graph

13259 Commits

Author SHA1 Message Date
christos
a687207309 Explain what REDIRECT is for. 2016-01-23 14:24:43 +00:00
dholland
7944f94c11 u_int -> unsigned int, in some of the output.
In the bulk of the output making this change would require reworking a
bunch of the internals to allow spaces in type names, which at the
moment doesn't seem worthwhile.
2016-01-23 02:33:09 +00:00
christos
59ef53c17c remove free NULL checks (Tilman Sauerbeck) 2016-01-17 17:45:21 +00:00
christos
9da037e3be provide missing FD_CLOEXEC for the havenots. 2016-01-17 15:32:38 +00:00
christos
43e2498875 Use FD_CLOEXEC (Tilman Sauerbeck) 2016-01-17 15:30:23 +00:00
wiz
cbba3dff68 Fix some macros. Sort stuff some more. 2016-01-17 11:24:28 +00:00
christos
6fee39189c Update documentation. 2016-01-16 21:15:51 +00:00
christos
24926742d3 fix the option string. 2016-01-16 21:12:27 +00:00
christos
ac2c28bce6 mention that nesting limit is unimplemented 2016-01-16 18:33:35 +00:00
christos
9c5ae85a12 add most gnu m4 long options 2016-01-16 18:31:29 +00:00
christos
42d917fdb8 add nesting_limit 2016-01-16 18:30:57 +00:00
christos
1e0a1203e1 record all input for fake freeze 2016-01-16 17:01:22 +00:00
christos
8178859046 Use hex for masks. 2016-01-16 17:01:01 +00:00
christos
59e8ea8f4c Add disabled support for saving and restoring the symbol table. 2016-01-16 17:00:07 +00:00
christos
8a4a35b9bc - don't eat the rest of the string when no match in patsubst
- include the pattern in the error printing of regex
- handle 3 argument and empty patterns the gnu way
- add support for freezing and thawing state (not working yet)
2016-01-16 16:59:18 +00:00
christos
bf45a83338 - declarations for real/fake freeze
- add new flags
2016-01-16 16:57:29 +00:00
christos
50b61022b2 More gnu compatibility:
- handle macros > $9
	- handle character remapping the the gnu way.
Add a shortcut for the "fake freeze" files to not expand include macros
during thawing.
2016-01-16 16:56:21 +00:00
christos
e4aa5bd87d this are our's not gnu 2016-01-14 04:27:26 +00:00
christos
9487d441fb Preserve $$ in := assignments..
FOO=\$$CRAP
BAR:=${FOO}

all:
	echo ${FOO}
	echo ${BAR}
2016-01-09 00:55:17 +00:00
wiz
30e99be8f8 Fix downloads of local files using file:// URLs
Previously it would error out in copyurlinfo() when copying a NULL port.
2016-01-05 11:41:00 +00:00
kamil
4929734205 Bump date for previous 2016-01-04 23:55:36 +00:00
kamil
1b333769e1 Add HISTORY and AUTHORS to jot
John A. Kunze requested to add himself as the author of jot
on the FreeBSD bugzilla with the following text:

  Please re-instate my name (as "John A. Kunze") as AUTHOR of the
  jot, rs, and lam utilities.  I wrote these in 1982, around or
  before the time that I worked with Jordan at UCB (he left to work
  at FreeBSD and later at Apple).  Thank you!

  -- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786

While there add a note that this tool first appeared in BSD 4.2.
This information is based on the FreeBSD manual pages.

Patch submitted by Michal Mazurek <akfaew AT jasminek.net>.

Reviewed by <dholland>
2016-01-04 23:32:45 +00:00
kamil
ce1283db22 Add HISTORY and AUTHORS to lam
John A. Kunze requested to add himself as the authord of rs
on the FreeBSD bugzilla with the following text:

  Please re-instate my name (as "John A. Kunze") as AUTHOR of the
  jot, rs, and lam utilities.  I wrote these in 1982, around or
  before the time that I worked with Jordan at UCB (he left to work
  at FreeBSD and later at Apple).  Thank you!

  -- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786

While there add a note that this tool first appeared in BSD 4.2.
This information is based on the FreeBSD manual pages.

Patch submitted by Michal Mazurek <akfaew AT jasminek.net>.

Reviewed by <dholland>
2016-01-04 23:31:44 +00:00
kamil
48345a429a Add HISTORY and AUTHORS to rs
John A. Kunze requested to add himself as the authord of rs
on the FreeBSD bugzilla with the following text:

  Please re-instate my name (as "John A. Kunze") as AUTHOR of the
  jot, rs, and lam utilities.  I wrote these in 1982, around or
  before the time that I worked with Jordan at UCB (he left to work
  at FreeBSD and later at Apple).  Thank you!

  -- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786

While there add a note that this tool first appeared in BSD 4.2.
This information is based on the FreeBSD manual pages.

Patch submitted by Michal Mazurek <akfaew AT jasminek.net>.

Reviewed by <dholland>
2016-01-04 23:30:57 +00:00
martin
c7acead6b8 Cast register_t to unsigned long before printf'ing it with %lx. 2016-01-04 08:24:42 +00:00
christos
149dca8a74 be a bit smarter about fcntl 2016-01-03 22:05:18 +00:00
christos
90c146a94b Put back -n 2016-01-03 15:38:29 +00:00
christos
a7dfd957d5 Handle function symbol renames. 2016-01-02 17:44:33 +00:00
christos
7e015f61f6 print the length on error. 2016-01-02 17:44:21 +00:00
dholland
9dc9693718 Avoid leaking a file handle on error opening the next file. From
David Binderman in PR 50577.
2015-12-31 01:16:47 +00:00
christos
2732a80b37 Add rnd ops. 2015-12-30 18:15:38 +00:00
christos
dade5d6c98 print the tag symbolically if we don't support it. 2015-12-22 23:35:21 +00:00
christos
4fff4f53aa From FreeBSD:
- Whitespace cleanup
- Pass a filename rather than fd to libarchive (should work with 2.8+)
- Accept zipfiles from stdin
- Extract common code from extract()/extract_stdout() to extract2fd() (pending)
2015-12-21 17:17:02 +00:00
christos
e9dcc55b7e switch to getline(3) 2015-12-21 16:17:09 +00:00
sjg
349257c593 Suff_ClearSuffixes() needs to re-initialize suffNull,
otherwise its children retain old suffixes.
Have Suff_Init() call Suff_ClearSuffixes() for consistency.
2015-12-20 22:44:10 +00:00
christos
8ef345bff8 sort properly. 2015-12-20 00:48:36 +00:00
christos
ff6e2ff2e8 Sort the subsections too... Hi Matt, you were right. 2015-12-20 00:40:44 +00:00
joerg
d8a9f2abfc Fix tools build. 2015-12-19 17:30:00 +00:00
wiz
c4edf3f3df Fix xrefs. 2015-12-19 00:25:16 +00:00
christos
088e556329 add sortinfo 2015-12-18 18:56:47 +00:00
christos
1f7a09da7b mark function as only needed with ssl. 2015-12-17 20:36:36 +00:00
christos
01e355354c Split the position/size parsing into a separate function. 2015-12-17 17:26:45 +00:00
christos
33fd699b86 Simplify and factor out connect message 2015-12-17 17:08:45 +00:00
nonaka
ac27abcc55 - Fix to connect https via proxy.
- Fix ttyout message.
2015-12-17 04:36:56 +00:00
christos
7a83389f23 make DPRINTF/DWARN always statements. 2015-12-16 23:00:39 +00:00
christos
17562cefd2 PR/50438: NONAKA Kimihiro: ftp(1): CONNECT method support
Please test!
2015-12-16 21:11:47 +00:00
christos
941a869c25 more refactoring:
- introduce authinfo and urlinfo structures
	- split negotiation code out.
2015-12-16 19:17:16 +00:00
nonaka
f6c8c6eefb Fix compile failure without WITH_SSL.
>    /tmp/bracket/build/2015.12.15.21.01.27-i386/src/usr.bin/ftp/fetch.c: In function 'fetch_url':
>    /tmp/bracket/build/2015.12.15.21.01.27-i386/src/usr.bin/ftp/fetch.c:823:18: error: 'HTTPS_URL_T' undeclared (first use in this function)
>           urltype == HTTPS_URL_T ? &ssl : NULL);
2015-12-16 01:20:05 +00:00
christos
82dbb89087 Factor the proxy handling code out. 2015-12-15 21:45:21 +00:00
christos
605492b2a8 Separate no_proxy handling. 2015-12-15 21:01:27 +00:00
christos
9444a4268c Try to factor out some code, this is completely out of control. 2015-12-15 20:49:49 +00:00
christos
093dea8259 use ecalloc 2015-12-14 03:15:10 +00:00
christos
c7fdb70dcd PR/50546: David Binderman: Fix bad sizeof 2015-12-13 18:09:00 +00:00
tron
ce945c29d6 (Hopefully) fix build without IPv6 support 2015-12-13 14:06:13 +00:00
dholland
67d56d848e Clarify that SCCS is a specific thing and not a generic thing. 2015-12-12 09:52:40 +00:00
dholland
cd705862bc Remove spurious ARGSUSED. 2015-12-12 09:50:12 +00:00
plunky
d82c710316 update several profiles, bringing up to date decoding of all the
Bluetooth 1.1->4.2 Service Discovery specifications I could find,
namely:

    Wireless Access Protocol
    Multi-Profile Specification
    Calendar, Tasks & Notes
    Message Access Profile
    Message Notification Service
    Global Navigation Satellite System
    Health Device Profile
    File Transfer Protocol
    3D Display
    General Access Profile
    Generic Attribute Server

all documentation is on bluetooth.org, under

    https://www.bluetooth.org/en-us/specification
2015-12-11 21:05:18 +00:00
tron
0d7f9f570d Use the proper format "[IPv6 address]:port" when reporting connection
attempts to IPv6 endpoints.
2015-12-11 08:37:31 +00:00
christos
048e0d6b52 simplify. 2015-12-03 20:01:19 +00:00
christos
96135c5b6f PR/50496: Alex Kozlov: teach unzip to extract symlinks
Our libarchive does not handle symliks yet, but later versions do.
Set mode and times for symlinks. Finally handle hardlinks for
completion although they are not handled yet by librarchive.
2015-12-03 20:00:12 +00:00
sjg
b35a5f4c5f Fix evaluation of defined(FOO) and ${FOO} > 0
add a unit-test to catch it.
2015-12-02 00:28:24 +00:00
sjg
69ecbee5a0 Avoid calling brk_string() and hence Var_Export1() on
empty strings.
2015-12-01 07:26:08 +00:00
sjg
1c3d99f499 Use lstat(2) if we have a link, incase it is a symlink.
Patch from bdrewery at FreeBSD.org
2015-11-30 23:37:56 +00:00
sjg
bea1b39c5f Avoid accessing beyond end of empty string.
Detected by Address Sanitizer - dim at FreeBSD.org
2015-11-30 23:15:43 +00:00
sjg
8098e1a571 ParseTrackInput: do not access beyond end of buffer.
Detected by Address Sanitizer - dim at FreeBSD.org
2015-11-26 00:23:04 +00:00
christos
1ef9a127cf PR/50360: Thomas Klausner: Fix MKREPRO issue 2015-11-25 01:12:03 +00:00
uebayasi
e1ddff408d A few more. 2015-11-22 01:20:36 +00:00
christos
e9836e5e7e fix format 2015-11-21 15:22:17 +00:00
christos
301b67f323 WARNS=6 2015-11-21 15:01:43 +00:00
christos
2ea5bc272a PR/50454: Timo Buhrmester: Fix wrong allocation for wall(1) -g
Modernize.
2015-11-21 14:59:51 +00:00
christos
2e3d23cd2c redo previous, not needed. 2015-11-13 19:13:50 +00:00
christos
4ae24fd01a Handle 0b locally since anyway this is not portable. 2015-11-13 16:04:58 +00:00
christos
5e9bf06a78 Recognize binary constants 2015-11-12 17:34:01 +00:00
pooka
d0f0cf2fcb In ioconfname mode, #define IOCONF as the ioconf token.
Avoids having to retype the name to call config_init/fini_component().
2015-11-12 14:38:21 +00:00
christos
5851f02af6 Delete extra declaration of svc_fdset... And some commented out code.
This badly needs some modernization.
2015-11-08 01:59:31 +00:00
joerg
a08385b414 Explain what "-V none" does. 2015-11-07 18:26:55 +00:00
joerg
3f2a71f305 paths.h is not used. 2015-11-07 18:11:21 +00:00
jnemeth
3980f190ce typo 2015-11-06 12:49:06 +00:00
wiz
f46449d46b Sort options in SYNOPSIS.
Order is: 0123.9AaBbCc...Zz;
options without arguments in a block first, then the ones with arguments.
2015-11-05 14:02:07 +00:00
ozaki-r
a0fb6b682b Add missing options to SYNOPSIS and sort 2015-11-05 09:28:30 +00:00
joerg
772e6dc22c ' != " so make the condition actually work. 2015-11-02 12:06:33 +00:00
shm
c4764e65c8 - Added error checks for initgroups(3) and setgroups(2).
- Reorder functions in privilege regain - setgroups(2) should be called after
  seteuid(2).

OK christos@
2015-10-29 11:31:52 +00:00
shm
93eb731454 Added missing sa_mask initialization (CID 979636)
OK kamil@ mrg@
2015-10-28 08:15:53 +00:00
shm
39d8d23068 Fixed off-by-one in decode_ss (CID 977426)
OK kamil@
2015-10-28 07:27:24 +00:00
shm
805afefc0d Added namelen initialization in getpeername(3) call (CID 979631)
OK kamil@
2015-10-27 14:53:00 +00:00
shm
b1dc5cb72e Fixed memory leak (CID 978341)
OK kamil@
2015-10-27 14:47:45 +00:00
mrg
60c6cf919b port across the change from freebsd rev 290024:
In gunzip(1), treat trailing garbage as a warning and not an error.  This
allows scripts to distinguish it between real fatal errors, for instance a
CRC mismatch.

Update manual page for the behavior change.

PR:		bin/203873
Submitted by:	Eugene Grosbein <eugen grosbein net>
MFC after:	2 weeks
2015-10-27 07:36:18 +00:00
sjg
b690002e9b PrintOnError: fflush stdout before running .ERROR
produces more consistent results in unit-tests.
2015-10-25 05:24:44 +00:00
christos
354d41acbc simplify 2015-10-22 00:29:58 +00:00
sjg
80c2cdd094 Ensure emsg initialized 2015-10-20 21:30:57 +00:00
christos
96e2a4cea0 more descriptive errors 2015-10-14 18:31:52 +00:00
christos
29160715bc the next symbol should be a type. 2015-10-13 20:49:39 +00:00
christos
14356dd961 handle anonymous struct/union members. 2015-10-13 20:25:21 +00:00
christos
17f4a693be more descriptive aborts 2015-10-13 16:09:33 +00:00
sjg
19a6f2c62e Add unit-test for discarded :? 2015-10-12 17:09:29 +00:00
sjg
5a3dc2452c The conditional expressions used with ':?' can be expensive
eg. exists() does stat(2).
If 'wantit' is FALSE, we are going to discard everything anyway,
so skip evaluating the conditional and expanding either lhs or rhs.
2015-10-12 16:48:13 +00:00
pgoyette
b4d63f0a4b Fix typo - Bahamas starts with a 'B' not with a 'G' 2015-10-11 22:08:46 +00:00
sjg
c7f1b3e52d Avoid echo -n in unit-tests 2015-10-11 06:32:15 +00:00
sjg
df0424202d Add Boolean wantit to Var_Parse and Var_Subst
wantit will be FALSE when we are just consuming to discard
in which case we skip "expensive" things like Cmd_Exec.

Reviewed by: christos
2015-10-11 04:51:24 +00:00
dholland
1fb0cf16c7 Don't assume HAVE_POSIX_SPAWN when building a host prog. From Joachim
Kuebart in PR 50301. needs pullup-7
2015-10-10 22:54:03 +00:00
sjg
53b398eca4 Do not hard-code ingnoring of makeDependfile 2015-10-10 03:58:59 +00:00
christos
472bcd2198 PR/50322: Timo Buhrmester: tail -F <file> misbehaves with stdin closed
Compare fp with stdin not fileno(fp) with STDIN_FILENO, because if tail
is called with 0 closed, then we are not going to be setting event filters
for the file because we'll erroneously think it is stdin.
2015-10-09 17:51:26 +00:00
jnemeth
1b254ad09b note the release of NetBSD 7.0 2015-10-09 00:09:52 +00:00
christos
ebf0d565d5 don't check for NULL before free() (Tilman Sauerbeck) 2015-10-06 17:36:25 +00:00
christos
f05010c404 - PR/50291: Fix memory leak
- estrdup/emalloc
- use EXIT_FAILURE instead of 1
2015-09-29 14:27:00 +00:00
christos
20c3ea3d63 Kill sys/modctl.h which we don't need. 2015-09-27 03:37:16 +00:00
christos
c4bba3a5cb Put -Isys after the ioctl Makefile has a chance to add other paths first. 2015-09-26 13:31:27 +00:00
christos
f72496b8cd Add dtrace ioctls 2015-09-26 03:31:11 +00:00
mrg
e03a4ba241 add "-R <roundbeats>" option, to round beat counts to be aligned to
<roundbeats>, which defaults to 1.
2015-09-23 05:31:01 +00:00
jnemeth
f533a65c60 Adjust dates for floating holidays. Use 2015 for things happening from
mid-October onwards, and 2016 for things happening earlier.
2015-09-23 05:21:00 +00:00
pooka
bc0dc0b26e Add more compat defs for code compiled for !NetBSD targets.
At least GNU Hurd lacks MAXHOSTNAMELEN/MAXPATHLEN/PATH_MAX, so make sure
those have some arbitrary semi-sane values.

from Robert Millan in PR misc/50166, with some modifications from myself
2015-09-21 21:50:16 +00:00
kamil
21207296f6 Prefer error messages resolved from errno over handwritten ones. 2015-09-20 16:57:13 +00:00
kamil
ca8a5c231b Correct #ifdef/#endif header file guards generator for files with names
other than alphanumerical.

For example, for a file named config-subscriber.x we were generating a
symbol '_CONFIG-SUBSCRIBER_H'.

Since now all non alphanumerical characters will be converted to '_' and we
will prevent from generating symbols starting with "__", what's reserved
for the internal compiler code parsers and generators.
2015-09-20 16:39:04 +00:00
kamil
facb255330 Correct newstyle code generation
For newstyle we used to generate oldstyle code. This bug has been fixed in
FreeBSD on 13 Dec 1995 by wpaul.

15a1e09c3d

Reviewed by <christos>, <pgoyette>
2015-09-20 15:52:11 +00:00
kamil
29aa8e74c1 Fix NULL pointer dereference
After the last function improvements there is invalid plist dereference
at the beginning of the second for () external loop. Move the proper check
inside the internal secound for () loop, after plist reinitialization.
2015-09-20 15:45:07 +00:00
martin
48059d8422 Add tera- and peta-bytes. 2015-09-20 15:09:06 +00:00
mrg
5f8222cdb9 query the window size and use it instead of assuming 24 lines.
now the header isn't re-printed a lot of times in tall windows.
2015-09-20 00:30:04 +00:00
joerg
f66e764c57 Workaround const issues of SSL_set_tlsext_host_name. 2015-09-16 15:32:53 +00:00
wiz
c39756ad10 servername cannot be NULL here.
Noted by joerg@.
2015-09-12 20:23:27 +00:00
wiz
7a5da4c401 Bump version for SNI support. 2015-09-12 20:18:52 +00:00
wiz
f9b7d2341e Add Server Name Indication (SNI) support for https.
Needed for e.g. some github URLs.
2015-09-12 19:38:42 +00:00
joerg
2bb600f982 Negating an integer and comparing it to 1 is a fancy way of checking for
0, which in this case would be DEVI_ORPHAN. That clearly can't be the
intention here, so switch to using != as operation without negation
instead.
2015-09-12 19:11:13 +00:00
uebayasi
ba0b12db31 Libraries should be built in sub-make. libkern is polluting .PATH too much. 2015-09-11 02:26:22 +00:00
sjg
0173eb921e Output Entering/Leaving messages for objdir when != srcdir and -w flag
This helps ensure Emacs can find source of error.

Reviewed by: christos
2015-09-10 17:15:11 +00:00
jnemeth
7c8eb9ef85 Pretty difficult for a TV show (Star Trek) to have a first airing
on two different dates.  Dump the erroneous one.
2015-09-08 11:07:37 +00:00
uebayasi
6639db6cc2 About ${CTFCONVERT}. 2015-09-08 05:48:07 +00:00
uebayasi
fe281df765 ${MD_OBJS} and friends. 2015-09-08 02:23:34 +00:00
uebayasi
0e43d38dc2 ${LD} input files and library (*.a) support. 2015-09-08 00:53:39 +00:00
sevan
9f88c39420 Switch from a mixture of tabs & 3 spaces to a single style, 3 spaces 2015-09-07 12:29:19 +00:00
sevan
b62382f11c Add pkgsrc/Bitrig 2015-09-07 12:20:32 +00:00
uebayasi
82a183dddd Fix previous. 2015-09-04 21:32:54 +00:00
uebayasi
cea9d6a0de Fix segmentation fault. 2015-09-04 15:50:48 +00:00
uebayasi
9b48d49489 Sort files in ${ALLFILES} in the order of parsing of `files.*'.
config(1) reads the first `files.${MACHINE}' when it encounters `machine'.
Then it includes common `files.${MACHINE_SUBARCH}', `files.${MACHINE_ARCH}',
and MI `sys/conf/files' at last.  This change makes the first "file" in
`files.${MACHINE}' appear first in ${ALLFILES}.
2015-09-04 10:16:35 +00:00
uebayasi
ce4642ec41 Make config(1) output only ${ALLFILES}, selected input files, and pass it to
Makefile.kern.inc, where files are filtered by suffix.
2015-09-04 06:10:47 +00:00
uebayasi
ca8d7a3596 *.o files don't need special handling at all now. Makefile.kern.inc knows
*.o input files don't need to get compiled, but need to get linked.
2015-09-04 06:01:40 +00:00
uebayasi
5b92bb3c7a Output ${ALLFILES}, the list of selected *.[csSo] files, sorted in the exact
order config(1) parses "file ..." commands in config(5) files.  Define
${CFILES}, ${SFILES}, and ${OFILES} as subset of ${ALLFILES} selected by
suffix.
2015-09-04 05:52:15 +00:00
uebayasi
bc2bf167eb Now Makefile.kern.inc handles swap<kernel>.c compiling/linking nicely,
config(1) can become less hackish.
2015-09-04 05:13:32 +00:00
uebayasi
dc9cfb5d59 Share more code by making *.o handling less special. 2015-09-04 01:24:01 +00:00
uebayasi
bc619545b7 Add generated *.c files (devsw.c and ioconf.c) to ${CFILES} by config(1)
internally.  ${MI_CFILES} in Makefile.kern.inc is no longer needed.
2015-09-03 14:23:52 +00:00
uebayasi
b5b4952dae After thought, revert "Generate *.c files under conf/". Generate *.c files
under top build directory.  *.c files are never placed just under $S/.  Keep
this exclusiveness.
2015-09-03 13:53:36 +00:00
uebayasi
9d10d0209d Pretty-print `Makefile' output. 2015-09-03 13:32:07 +00:00
uebayasi
eaa72931c4 Move `all' target definition to Makefile.kern.inc. 2015-09-03 09:28:00 +00:00
uebayasi
d891b756ba Define kernel dependency in Makefile.kern.inc. 2015-09-03 06:09:46 +00:00
uebayasi
dfa246e2cf Fix build. 2015-09-03 06:08:38 +00:00
mrg
aa0a9ba7c2 remove these items:
o Disallow unknown options.
 o Kill makeoptions.

because they're overly strict and i use these both regularly
to do stuff that isn't in the base src, and i'm quite sure
i am not the only one.
2015-09-03 05:45:16 +00:00
uebayasi
77d324a2b9 In `-S' mode, create symlinks from outside of $S to build directory, for
files that are placed outside of $S, so that `Makefile.kern.inc' can see all
files under either $S or build directory.
2015-09-03 02:45:24 +00:00
uebayasi
a453d60989 Fix build. 2015-09-02 16:29:44 +00:00
uebayasi
7a8426662a Define ${OBJS} in `Makefile.kern.inc'. Relative paths are not truncated
(a/b/c/x.c -> x.c) in `-S' mode.  Don't provide some explicit rules for `-S'
mode for safety.
2015-09-02 14:17:03 +00:00
uebayasi
558aab1be0 Output relative path for ${CFILES} and ${SFILES} in generated `Makefile'.
`Makefile.kern.inc' knows how to deal with $S prefix, so don't bother it in
config(1).
2015-09-02 13:42:14 +00:00
uebayasi
7db0c115b3 Simplify generated `Makefile' by calculating ${OBJS} from merging ${CFILES},
${SFILES}, and ${OFILES} except swap<kernel>.o excluded.
2015-09-02 13:06:06 +00:00
uebayasi
dccd2cf552 In `-S' mode, generate *.c files under conf/ subdirectory. Register generated
.c files to the `files' list internally.
2015-09-02 05:09:25 +00:00
uebayasi
e53d4b70ba Fix build. 2015-09-01 20:18:41 +00:00
uebayasi
b06817457f Experimental ``suffix rules + subdirectories'' build support (-S). 2015-09-01 16:01:23 +00:00
uebayasi
64903d9c8f Prepare to build subdirectories. Not enabled yet. 2015-09-01 14:32:20 +00:00
uebayasi
57eaa88e97 Bump version for "buildprefix". 2015-09-01 13:45:52 +00:00
uebayasi
2cb009cdd9 Introduce a new syntax, "buildprefix", to specify prefix of files under kernel
build subdirectory.  This is not used now that everything is built at the
top of kernel build directory.  It will become mandatory for source/object
files put out of kernel source tree to specify corresponding build subdirectory.
Only ``no dots''  relative path is accepted as "buildprefix".
2015-09-01 13:42:48 +00:00
uebayasi
974426dd69 Keep track of directory of files internally. 2015-09-01 12:46:20 +00:00
uebayasi
3f0546850b Clean up struct files. 2015-09-01 12:32:26 +00:00
uebayasi
3374c75eeb Use per-suffix lists where appropriate. 2015-09-01 12:10:56 +00:00
uebayasi
f5d74fcda3 Abstract struct filetype is no longer needed. 2015-09-01 11:35:46 +00:00
uebayasi
0b130540fb Merge struct objects into struct files. Keep per-suffix file lists. 2015-09-01 11:22:59 +00:00
uebayasi
a0ed6f857a Start merging struct files and struct objects. 2015-09-01 10:37:48 +00:00
pgoyette
06cd199b91 Allow redefinition of options (with only a warning message). Removal
of non-included options was already only a warning.

This also affects redefinition and removal of file-system and makeoption
entries.

Reviewed and OKd by uebayasi@
2015-09-01 01:50:14 +00:00
uebayasi
5f38d8b6fe Properly handle absolute prefix. 2015-09-01 01:17:56 +00:00
jnemeth
cd3c3a4632 If we're going to note the USSR shooting down civilian airliners,
we should be fair and pick on the USA as well.
2015-09-01 00:56:17 +00:00
uebayasi
4c482b808f Refactor emit file functions. No functional changes. 2015-09-01 00:38:30 +00:00
pgoyette
b899b8fdca Need to read closer - there was another occurrence of the same tyepo 2015-08-31 12:00:12 +00:00
pgoyette
2ff0a553cb Tyepo 2015-08-31 11:52:37 +00:00
uebayasi
b877b4042a Restore the old behavior of "maxusers" to allow the value to be overriden.
Problem reported by John D. Baker.
2015-08-31 02:58:25 +00:00
uebayasi
cf356c3efd Revert "Accept only relative paths ...". This will be redone in much better,
stricter way.
2015-08-30 21:58:19 +00:00
wiz
7cb8e9f6ca Fix a macro usage. Add more markup. 2015-08-30 06:57:51 +00:00
uebayasi
623bd6b2aa Define compile rules in sys/conf/Makefile.kern.inc except those overriden by
"file ... compile-with ...".  As rules are still explicit, be careful to not
override by checking .if !target(xxx.o).
2015-08-30 05:12:00 +00:00
uebayasi
0fac7c8310 Define `makeoptions' values as parameters with "makeoptions_" prefix too.
C sources are encouraged to include relevant opt_*.h files rather than relying
on -DXXX passed via makefiles.
2015-08-30 01:33:20 +00:00
uebayasi
8c9276859d No need to define swap<kernel>.o build rule. 2015-08-29 17:42:05 +00:00
uebayasi
b6c3503b87 Define ``normal'' .c/.S rules as .for loops. Still explicit and ugly, but
these will be eventually replaced with suffix rules.  Tested x68k where .c/.S
rules are overriden with "compile-with".
2015-08-29 17:35:23 +00:00
uebayasi
75298111a7 Convert MAXUSERS, take 2.
Define MAXUSERS in opt_param.h and include it from sys/param.h, for more
accurate dependency.  Don't define -DMAXUSERS and add it to ${CPPFLAGS}.
config(5)'s "maxusers" syntax doesn't change.

(The version just before revert was OK, but I had something bad in my obj
dirs.)
2015-08-29 14:07:45 +00:00
uebayasi
95712061f0 Revert MAXUSERS. CVS is hard. 2015-08-29 13:34:21 +00:00
uebayasi
9d7c5e580c Revert MAXUSERS changes. Need fresh air. 2015-08-29 07:33:18 +00:00
uebayasi
8b68b0de02 Fix previous. 2015-08-29 07:24:49 +00:00
uebayasi
4401376950 Define MAXUXERS in opt_param.h. Bump config(1) version. 2015-08-29 07:08:38 +00:00
uebayasi
ca847f032e Revert "Retire optional rule' argument of file' command". It is still used
in m68k ports.
2015-08-29 02:54:07 +00:00
joerg
0555fac4ac ~0 and -1 are the same for two-complement machines. ISO C says left
shifts of negative values are UB, so do the shift for the unsigned
equivalent and cast to int afterwards.
2015-08-28 09:42:07 +00:00
uebayasi
b5595827d0 Simplify. 2015-08-28 09:16:29 +00:00
uebayasi
54e231918a Retire optional rule' argument of file' command.
This has existed since Rev. 1.1 of Torek's config(8) [1], but probably has
never been used by anyone.

(I can not imagine how a `file' like look like if `rule' is specified.)

[1] http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.sbin/config.new/Attic/files.c?rev=1.1
2015-08-28 09:04:02 +00:00
uebayasi
36644ae2ff Error out if a given path is absolute. 2015-08-28 08:56:39 +00:00
uebayasi
47065f5afc Accept only relative paths (from $S) for file' and object'. Simplify code.
config(1) does not need to be super-smart about path handling, because it is
usually used with make(1), that is much smarter.

Pre-compiled object files, specified using `object', are regarded as read-only
input, thus they should be put under $S (or $S/..), as part of a source tree.
2015-08-28 08:31:28 +00:00
uebayasi
50408f97eb Global paths looked up at output stage (mk*()) are relative to `srcdir'.
Ignore "prefix" by not calling sourcepath().
2015-08-28 03:55:15 +00:00
uebayasi
0b9ddf3cc0 Paths given to "file" and "object" are relative from "prefix" if defined. 2015-08-28 02:59:09 +00:00
uebayasi
a72d45f1a5 + suffix rules 2015-08-28 01:01:57 +00:00
uebayasi
5e9af25b8a + copy symtab 2015-08-27 10:22:12 +00:00
uebayasi
1e1f20e153 One more about linker script, another about genassym. 2015-08-26 06:38:57 +00:00
uebayasi
14880f9a49 I don't like -Ttext . 2015-08-25 13:13:54 +00:00
uebayasi
39d2263741 + kill makeoptions 2015-08-25 09:01:28 +00:00
mrg
ef363e2dc9 if you change display types, the "Showing %s, refresh every %d seconds."
message is retained, and you can't get rid of it.  since it's dispalyed
in inverse, it feels like there's always an error happening (which is
really what the code has -- the above string is displayed via the error()
function.)  for several types of key press that largely are just "redraw"
operation (space, ^L, etc.), clear the error string as well.
2015-08-23 18:33:15 +00:00
uebayasi
7722a65218 TODOs about kernel options. 2015-08-23 01:30:21 +00:00
uebayasi
9c743328e7 Linker script TODO items. 2015-08-22 14:47:05 +00:00
jnemeth
b4ea321c71 - sort
- add a bunch of missing release
2015-08-21 02:32:24 +00:00
christos
92a97b467e move driver attach declarations to ioconf.h 2015-08-20 09:44:24 +00:00
pgoyette
b0e637a9da Insert comment regarding PR/48571 so it doesn't get lost.
config(1) ioconf is insufficient for pseudo-devices

config_{init,fini}_component
2015-08-19 03:39:45 +00:00
uebayasi
3dbb19470d + pseudo(dev) attach 2015-08-19 03:23:34 +00:00
shm
675ae4bd49 Remove unnecessary fclose(3) call 2015-08-09 09:49:25 +00:00
shm
7a0fcb9b1d Do not use pamh after pam_end. It's cosmetic change since pam_strerror
ignores that parameter.
2015-08-09 09:39:21 +00:00
shm
13fc423c66 Add missed munmap(2) in extract_config 2015-08-08 15:52:41 +00:00
mrg
366296f5a8 add a description about what was being attempted to failed writes messages. 2015-08-05 07:10:03 +00:00
mrg
a0e3e3912d rename struct write_info as struct track_info, and the variable name 'wi'
as 'ti', as this info is useful for reading as well.
2015-08-05 06:54:39 +00:00
wiz
282efd00b8 Fix two typos. 2015-08-02 12:19:12 +00:00
christos
429d474275 remove reference to SCCS which is not supported anymore.
XXX: pullup-7
2015-08-02 03:19:02 +00:00
christos
e139f8ac36 from bitrieg:
Substitution commands might contain a newline in the replacement pattern
(escaped with a backslash before it), causing patch's understanding of
the state the ed child process is in to diverge from reality. This can
lead to patch unwillingly feeding '!' (execute shell command) lines to
ed. Finding out how to do this is left as an exercise to the reader.

XXX: pullup-7
2015-07-30 21:47:51 +00:00
christos
0bc60106c2 Make the return type of "? type1 : void *" or "? void * : type1" to be type1
instead of void *.
2015-07-29 18:23:32 +00:00
christos
38c355353a Be more specific about the type errors 2015-07-29 18:22:06 +00:00
christos
8d365aaee5 revert previous, will fix differently. 2015-07-28 19:46:42 +00:00
christos
9495115b2a fix build (stdbool lossage) 2015-07-28 19:32:07 +00:00
christos
afb2c8bbbf handle c99 nested struct initialization { .data.foo[0] = 1 } 2015-07-28 17:56:56 +00:00
christos
4de23ec610 fix member list deallocation; remove #if 0'ed code. 2015-07-28 17:55:13 +00:00
christos
2703f4af80 Use absolute paths for RCS commands (Martin Natano) 2015-07-24 18:56:44 +00:00
christos
8bfaa68572 From Martin Natano @bitrig: Use execve(2) instead of system to apply patches
that require rcs command execution instead system(3) to avoid malicious
filenames in patches causing bad things to happen. In the process, lose SCCS
support. It is not like we are shipping sccs commands for that to work.
2015-07-24 18:56:00 +00:00
dholland
7fee31e593 Document previously secret -d debug option. Bump date. 2015-07-16 08:42:53 +00:00
christos
ea87266e4c From William Orr:
- add long options
- print usage on invalid command line args
2015-07-12 11:40:52 +00:00
nakayama
dafd5f4472 zgrep(1): suppress the prefixing of filename on output when only
one file is specified to match the grep(1)'s output.
2015-07-06 12:05:40 +00:00
christos
da9061f1c7 fix infinite loop 2015-07-04 22:45:08 +00:00
christos
eeda512b55 If we fail 5 times in a row, fail correctly (Steffen Nurpmeso). 2015-07-04 15:09:49 +00:00
christos
fc4b744883 Fix segmentation fault caused by freeing prematurely function parameter types
inside cast expressions.
2015-07-01 15:34:30 +00:00
dholland
3b1701b0a5 Repair accidental regression in -r1.49: for -a mode, don't allow
calendars to be other than regular files unless the -x option is in
effect.

(If not in -a mode, we're running purely as the user whose calendar it
is and if they want to DoS themselves with named pipes it's their own
lookout.)
2015-07-01 06:48:25 +00:00
dholland
c1180ac6a1 Correct privilege handling problems in calendar -a (which runs as root
from /etc/daily); do not exec other programs while the real uid is
still 0.

Also, clear the supplementary groups list up front and call initgroups
when becoming another user, to avoid leaking any extra group
privileges that we might have.

And finally, don't silently ignore errors changing uid and gid; those
are serious if they happen.
2015-07-01 06:45:51 +00:00
christos
627745abcd remove <sys/cdefs.h> for portability reasons 2015-06-21 20:26:02 +00:00
wiz
4175efc234 filesystem -> file system. 2015-06-21 12:05:11 +00:00
mlelstv
9b4eccc9c7 Restore logic for setting the VERASE character.
- use terminfo _unless_ the terminal does overstrike.
- use terminfo data not only for an unset tty.
2015-06-21 08:23:22 +00:00
mrg
3a70beec89 separate the 3 functions midirecord uses from libaudio.a into its own
file and link it directly, instead of having an (implicit) dependancy
on usr.bin/audio/common being built before usr.bin/midirecord is linked.
2015-06-21 06:06:01 +00:00
mrg
0602c83b22 fix the log message typo. 2015-06-21 06:04:45 +00:00
hubertf
30d2284760 There was a pilot flying a small single engine charter plane, with
a couple of very important executives on board. He was coming into
the Berkeley airport through thick fog with less than 10 miles
visibility when his instruments went out.

He began circling around looking for a landmark. Finally, a small
opening in the fog appears and he sees a tall building with a guy
working alone on the fifth floor. He banks the plane around, rolls
down the window and shouts to the guy, "Hey where am I?"

The man replies, "You're in an airplane." The pilot rolls up the
window, executes a 275 degree turn and proceeds to perform a
perfect blind landing on the airport runway 5 miles away. Just as
the plane stops, so does the engine as the fuel has run out.

The passengers are amazed and one asks how he did it.

"Quite easy," replies the pilot, "I asked the guy in that building
a simple question. The answer he gave me was 100 percent correct
but absolutely useless, therefore, that must be NetBSD's
support office and from there the airport is just five miles due
East." (Credits:
http://www.techsupportforum.com/forums/f289/microsoft-joke-404432.html)

Seriously: give the reader of the manpage an idea on what this program
is for without forcing them to Google or read another manpage.
2015-06-20 16:42:32 +00:00
christos
be0200b5b7 remove unused label 2015-06-19 17:20:02 +00:00
christos
43fc769556 remove useless assignment and explain why. 2015-06-19 17:17:24 +00:00
christos
a038441bc0 restore use of whitespace needing shell. 2015-06-19 14:32:56 +00:00
christos
0002ddbc7d make needshell customizable, so that xinstall can use it. 2015-06-19 14:32:04 +00:00
christos
3f6f33cbde create needshell so we don't scan the string multiple times. 2015-06-19 14:25:34 +00:00
christos
fc12b1912c use isspace() 2015-06-19 14:25:16 +00:00
mlelstv
75fd2a8412 Adjust metachar handling to previous behaviour:
- space and tab are no shell metachars, remove them from generic
  metachar function
- add space and tab as to-be-quoted characters for :Q modifier
- add = and : as characters that require command handling by the shell
2015-06-19 08:03:35 +00:00
christos
12ca937409 grr too many different compilation options. 2015-06-18 19:49:08 +00:00
christos
e02fe630ea this is not buf.c 2015-06-18 15:51:57 +00:00
justin
a9e309ea46 Fix non native build on metachar.c 2015-06-18 15:34:44 +00:00
christos
9beb5dadf3 Centralize the "is a meta char" test, instead of using two different arrays. 2015-06-17 17:43:23 +00:00
christos
5e58d82807 restore unlink file if strip fails (from Takeshi Nakayama) 2015-06-17 15:52:37 +00:00
christos
b1e483495a centralize shell metachar handling. 2015-06-17 15:34:55 +00:00
christos
e9677ce525 Use the bourne shell if the after command has shell metachars. 2015-06-17 15:34:08 +00:00
christos
62c8098c95 add missing quote, remove some braces. 2015-06-17 01:38:02 +00:00
christos
7d718eded8 one more stray \n 2015-06-17 00:03:42 +00:00
christos
afe59ce9dc more stray \n 2015-06-17 00:01:59 +00:00
christos
b72399dd23 fix error statement 2015-06-16 23:44:44 +00:00
christos
616ae4c0ec fix printf statement 2015-06-16 23:42:08 +00:00
christos
ff53269704 fix some error handling. 2015-06-16 22:54:10 +00:00