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
christos
b921b70209
remove stray newlines from errors/warnings
2015-06-16 21:12:19 +00:00
christos
561ef1fe67
- improve error printing
...
- deduplicate run functions and don't use the shell so that we handle
filenames with spaces and metacharacters consistently.
2015-06-15 16:33:38 +00:00
martin
61f9154cab
Add optional support for posix_spawn (instead of vfork) and enable it for
...
the in-tree build.
2015-06-15 07:05:09 +00:00
martin
25ed20a82e
Do not set MLIBDIR if MKCOMPAT=no
2015-06-13 20:38:52 +00:00
gson
cebb0ef7cc
Don't call exit() from a signal handler, as it's not async-signal-safe;
...
use _exit() instead.
2015-06-11 18:12:00 +00:00
mrg
9c78f1be19
midirecord first appears in netbsd 7.
2015-06-08 06:33:35 +00:00
joerg
fc207b9190
Format-string related warnings work fine now with both GCC 4.8 and
...
Clang.
2015-06-06 13:48:37 +00:00
joerg
d88f290a56
Drop assignment from uninitialized and otherwise unused variable.
2015-06-06 13:08:31 +00:00
wiz
b96dc7bfa6
Drop trailing whitespace.
2015-06-05 07:33:40 +00:00
sjg
fab1dc5098
Document .OBJDIR target.
2015-06-05 05:37:42 +00:00
enami
aeb1240e20
Fix expand() to process successive escape sequences correctly.
2015-06-03 23:15:22 +00:00
wiz
9424727910
Add missing .El and other minor fixes.
2015-06-03 14:38:38 +00:00
christos
c3b6f86ce5
Add a gettext implementation from William Orr.
2015-06-03 14:32:16 +00:00
manu
41797faa82
Fix warning about uninitialized variable
...
This warning gets fatal when including make(1) as a crunchgen(1) binary.
2015-05-25 09:01:06 +00:00
manu
cbae0e6269
Make sure netstat builds with -DSMALL
...
src/usr.bin/netstat relies on code from src/sbin/route. WHen building
with -DSMALL, some functions such as mpls_ntoa() or p_rtrmx() are not
built in src/sbin/route. We therefore have to make sure they are not
used in src/usr.bin/netstat.
2015-05-25 03:56:20 +00:00
christos
2dad2d2d11
Add -N (VIS_NOLOCALE), sort.
2015-05-24 19:42:39 +00:00
matt
2a4267c6e4
#include <sys/exec_elf.h> for ksyms
2015-05-20 07:16:15 +00:00
matt
cac6d59cc3
Use :Q instead of " to quote make vars DBG and LDSTATIC
2015-05-16 02:33:12 +00:00
ozaki-r
6011d36bd6
Fix rump.{netstat,route} shows host's interface names in link local addresses
...
Interface names of IPv6 link local addresses are resolved
by getnameinfo(3). So we need to rump-ify it as well as
if_indextoname and getifaddrs.
2015-05-15 06:58:59 +00:00
joerg
1d5828794c
Mark error as dead.
2015-05-13 20:13:21 +00:00
christos
cd5bb2fe49
handle compound literals with a trailing comma
2015-05-11 17:20:06 +00:00
dholland
5a52d2d51f
Remove pointless casts.
2015-05-09 23:29:51 +00:00
dholland
90a10bbb8a
Make error() printflike instead of using sprintf before calling it.
2015-05-09 23:28:43 +00:00
dholland
98fbb52a77
Use proper (enough) parentheses in macro expansion.
2015-05-09 23:19:34 +00:00
dholland
86f52a859f
Use errx when malloc fails, and also don't cast the return value of
...
malloc/realloc.
2015-05-09 23:16:51 +00:00