summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* Reindent and improve style(9) comformance.marcel2005-05-151-26/+26
|
* NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 definesume2005-05-131-2/+2
| | | | | NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special for it, now.
* Use the print_flags function to print the OP_ flags of a target.harti2005-05-134-41/+28
| | | | | Give the function one more argument to decide whether it should print the flags like a C-expression or just space-delimited.
* Move the Boolean and ReturnStatus stuff from sprite.h to util.h andharti2005-05-1316-81/+27
| | | | | | get rid of sprite.h. Obtained from: DragonFlyBSD
* Make Shell_Init() static - it's only used here.harti2005-05-132-10/+9
| | | | | | | | | Make sure we don't end up with shellPath beeing non-zero, but shellName beeing zero in the error case - back out cleanly from the error. When executing a command for macro assignment in Cmd_Exec() stuff the path of the shell into argv[0], not the name. This makes no difference from the functionality point of view, but allows the regression tests to determine whether make executes the correct shell.
* Add a flag (-q) which prints no header for the file and which doesn't indent thejmallett2005-05-122-33/+61
| | | | | match text; it also doesn't warn() for files which can't be opened. Remove global variables. Use bool. fopen(3) the files instead of freopen(3)ing stdin.
* Include <err.h>. On my system CVS Make(1) has an implicit declaration ofjmallett2005-05-121-0/+1
| | | | warnc(3) without it.
* Still too early to bump WARNS - there are still warnings on 64bitharti2005-05-121-1/+1
| | | | architectures.
* Make sure machine is initialize before use. Also make two pointers constharti2005-05-121-4/+5
| | | | to get rid of the last two const warnings.
* Get rid of the warning about vfork() clobbering variables.harti2005-05-121-4/+9
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.246)
* Do mktemp() by hand to get rid of the mktemp() warning and theharti2005-05-121-17/+102
| | | | | | possible associated security hole. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.245)
* Use a variable initialized to a string instead of the string directlyharti2005-05-122-7/+8
| | | | | | to get rid of a const warning. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.244)
* Move code in CondToken() and get rid of a goto.harti2005-05-121-12/+11
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.243)
* Remove a useless else and un-indent the following code.harti2005-05-121-377/+378
|
* Revert the previous accidential commit.harti2005-05-121-1/+1
|
* Cleanup SuffFindArchDeps() to get rid of two const-warnings.harti2005-05-122-12/+10
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.240)
* The first element of the vector built by brk_string() is neverharti2005-05-122-10/+15
| | | | | | | used so there is no need to stuff the value of .MAKE into it, which btw isn't set for quite a while already. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.239)
* Cleanup. Move initialisation of file and program global variablesharti2005-05-121-56/+56
| | | | | | | to top of main() and sort them. Make chdir_verify_path() static - it is used only here. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.238)
* Replace a lot of Var_Set(..., VAR_GLOBAL) by Var_SetGlobal().harti2005-05-123-18/+30
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.237)
* Cleanup main(). Move catching SIGCHLD into job.c. Move unsetenv("ENV")harti2005-05-123-53/+63
| | | | | | | | into job.c. Move retrieving of environment nearer to the place where it is actually used and invert the preprocessor conditionals to use positive logic. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.236)
* Reshuffle functions to get rid of prototypes.harti2005-05-121-108/+102
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.235)
* Compat_RunCommand is used only in job.c so make it static there.harti2005-05-122-2/+2
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.234)
* Move variable printing from main.c to var.charti2005-05-123-29/+38
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.233)
* Fix the fix for bin/72510 applied in job.c:1.70. Actually there haveharti2005-05-125-8/+13
| | | | | | | | | | been two maxJobs variables: one static in job.c and one global used in main.c and parse.c. Makeing one global out of these was the wrong way to fix the problem. Instead rename the global one to jobLimit and keep maxJobs static in job.c. Suggested by: rwatson PR: bin/72510
* Move some global variables to the correct files.harti2005-05-124-10/+12
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.232)
* Untwist the convoluted if() expressions in JobFinish(). Theyharti2005-05-121-106/+174
| | | | | | could benefit from even more untwisting. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.23[01])
* Move some comments around to where they belong and remove some unneccessaryharti2005-05-122-48/+34
| | | | | | gcc magic. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.229)
* Convert Compat_RunCommand() to use ProcWait(). This also gives Cmd_Exec()harti2005-05-121-73/+68
| | | | | | the potential to handle interrupts which it doesn't currently. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.228)
* Make a function ProcWait() that waits for the given process.harti2005-05-121-20/+31
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.227)
* Overhaul the fork(), exec() code. Put all the common handling thatharti2005-05-121-167/+222
| | | | | | | | | | | | | | takes place in the child process in a function ProcExec(). Make sure, that the child does not call malloc() or other potential dangerous functions (there are still calls to Punt() in the error case that should go away). Allocate the argv string via malloc to overcome the non-constness bug of the execvp prototype. Change the handling of shell meta-characters and move the builtin list near the list of shell builtins. Both of these lists should actuall be configurable by the .SHELL target since they depend on the shell used. Patch: 7.21[2-9], 7.22[0-46] Submitted by: Max Okumoto <okumoto@ucsd.edu>
* - check for geom_uzip module presence using kldstat -m.fjoe2005-05-112-6/+4
| | | | | | | kldstat -m finds geom_uzip module even if it is compiled in statically. - create output file with x bit set. - build mkuzip on all architectures (verified with "make universe"). - fix typo in info message.
* Spell 1 as SHUT_WR in argument to shutdown(2).jmallett2005-05-111-2/+2
|
* Move the definitions of the OP_* constants from make.h into GNode.hharti2005-05-105-79/+86
| | | | | | | | where they actually belong to. Move the definitions of the strings for special macros like "$*" from make.h to parse.h - they're used only in the parser. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.211)
* Path_Expand() expects its first argument to be writeable so put theharti2005-05-101-1/+2
| | | | | | | default system directory into a writeable character array before passing it to Path_Expand(). Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.210)
* Move declarations of variables belonging to the variable moduleharti2005-05-102-6/+9
| | | | | | from globals.h into var.h. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.209)
* Style: remove spaces before tabs.harti2005-05-101-31/+31
| | | | | Patch: 7.207 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Move the remaining two prototypes from nonints.h to make.h andharti2005-05-105-53/+3
| | | | | | | remove nonints.h. Patch: 7.204 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Make shellPath and shellName static - they're used in job.c only.harti2005-05-104-12/+10
| | | | | | | Move definition of parsing error levels from make.h into parse.h. Patches: 7.202,7.203 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Make the three versions of fork() more uniform.harti2005-05-101-63/+63
| | | | | Patch: 7.201 (idea taken, but done differently) Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Move the defines for TMPPAT and KQUEUE from the public job.h into job.charti2005-05-102-12/+12
| | | | | | | since they are used only there. Patch: 7.200 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Merge compat.c into job.c. There is a lot in common between theseharti2005-05-106-820/+709
| | | | | | | files and we are going to factor this out. Patch: 7.199 (slightly changed) Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Add option -l, to make output line buffered.glebius2005-05-102-5/+11
| | | | | | PR: bin/78692 Submitted by: Eugene Grosbein MFC after: 2 weeks
* Move Cmd_Exec() from main.c to job.c and fix its prototype. Thisharti2005-05-105-110/+114
| | | | | | | results in a warning that will go away soon. Patch: 7.198 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Var_SubstOnly() is only used to subsitute a variable from the globalharti2005-05-103-4/+4
| | | | | | | | context (and only in one place to substitute the .for variable). Therefor there is no need to pass the context as a parameter. Patch: 7.197 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Move the declaration of VAR_CMD and VAR_GLOBAL from globals.h to var.hharti2005-05-102-6/+6
| | | | | Patch: 7.196 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Clean up comments. No code changes.harti2005-05-101-194/+128
| | | | | Patch: 7.195 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Merge var_modify.c into var.c and move types and function declarationsharti2005-05-104-691/+602
| | | | | | | that are now used only in var.c from var.h to var.c Patches: 7.193,7.194 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Move some debugging code from targ.c to var.c where it actually belongs.harti2005-05-103-10/+14
| | | | | Patch: 7.192 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Make make a little bit more POSIXish with regard to option parsing:harti2005-05-103-12/+64
| | | | | | | | | | | | | | | take everything after -- as either a macro assignment or a target. Note that make still reorders arguments before --: anything starting with a dash is considered an option, anything which contains an equal sign is considered a macro assignment and everything else a target. This still is not POSIX with regard to the options, but it will probably not change because it has been make's behaviour for ages. Add a new function Var_Match() that correctly skips a macro call by just doing the same as Var_Subst() but without producing output. This will help making the parser more robust. Patches: 7.190,7.191 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Split Var_Subst() into two functions: Var_SubstOnly() which substitutesharti2005-05-099-163/+174
| | | | | | | | | | only one variable and Var_Subst() which substitutes all. Split out the test whether a variable should not be expanded into match_var(). Make access to the input string consistently using str[]. Remove two unused functions: Var_GetTail() and Var_GetHead(). Patches: 7.184-7.189 Submitted by: Max Okumoto <okumoto@ucsd.edu>
OpenPOWER on IntegriCloud