aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Include <err.h>. On my system CVS Make(1) has an implicit declaration ofJuli Mallett2005-05-121-0/+1
| | | | | | | warnc(3) without it. Notes: svn path=/head/; revision=146160
* Still too early to bump WARNS - there are still warnings on 64bitHartmut Brandt2005-05-121-1/+1
| | | | | | | architectures. Notes: svn path=/head/; revision=146158
* Make sure machine is initialize before use. Also make two pointers constHartmut Brandt2005-05-121-4/+5
| | | | | | | to get rid of the last two const warnings. Notes: svn path=/head/; revision=146157
* Get rid of the warning about vfork() clobbering variables.Hartmut Brandt2005-05-121-4/+9
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.246) Notes: svn path=/head/; revision=146156
* Do mktemp() by hand to get rid of the mktemp() warning and theHartmut Brandt2005-05-121-17/+102
| | | | | | | | | possible associated security hole. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.245) Notes: svn path=/head/; revision=146155
* Use a variable initialized to a string instead of the string directlyHartmut Brandt2005-05-122-7/+8
| | | | | | | | | to get rid of a const warning. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.244) Notes: svn path=/head/; revision=146154
* Move code in CondToken() and get rid of a goto.Hartmut Brandt2005-05-121-12/+11
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.243) Notes: svn path=/head/; revision=146153
* Remove a useless else and un-indent the following code.Hartmut Brandt2005-05-121-377/+378
| | | | Notes: svn path=/head/; revision=146152
* Revert the previous accidential commit.Hartmut Brandt2005-05-121-1/+1
| | | | Notes: svn path=/head/; revision=146150
* Cleanup SuffFindArchDeps() to get rid of two const-warnings.Hartmut Brandt2005-05-122-12/+10
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.240) Notes: svn path=/head/; revision=146149
* The first element of the vector built by brk_string() is neverHartmut Brandt2005-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) Notes: svn path=/head/; revision=146147
* Cleanup. Move initialisation of file and program global variablesHartmut Brandt2005-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) Notes: svn path=/head/; revision=146146
* Replace a lot of Var_Set(..., VAR_GLOBAL) by Var_SetGlobal().Hartmut Brandt2005-05-123-18/+30
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.237) Notes: svn path=/head/; revision=146145
* Cleanup main(). Move catching SIGCHLD into job.c. Move unsetenv("ENV")Hartmut Brandt2005-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) Notes: svn path=/head/; revision=146144
* Reshuffle functions to get rid of prototypes.Hartmut Brandt2005-05-121-108/+102
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.235) Notes: svn path=/head/; revision=146143
* Compat_RunCommand is used only in job.c so make it static there.Hartmut Brandt2005-05-122-2/+2
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.234) Notes: svn path=/head/; revision=146142
* Move variable printing from main.c to var.cHartmut Brandt2005-05-123-29/+38
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.233) Notes: svn path=/head/; revision=146141
* Fix the fix for bin/72510 applied in job.c:1.70. Actually there haveHartmut Brandt2005-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 Notes: svn path=/head/; revision=146140
* Move some global variables to the correct files.Hartmut Brandt2005-05-124-10/+12
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.232) Notes: svn path=/head/; revision=146134
* Untwist the convoluted if() expressions in JobFinish(). TheyHartmut Brandt2005-05-121-106/+174
| | | | | | | | | could benefit from even more untwisting. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.23[01]) Notes: svn path=/head/; revision=146133
* Move some comments around to where they belong and remove some unneccessaryHartmut Brandt2005-05-122-48/+34
| | | | | | | | | gcc magic. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.229) Notes: svn path=/head/; revision=146132
* Convert Compat_RunCommand() to use ProcWait(). This also gives Cmd_Exec()Hartmut Brandt2005-05-121-73/+68
| | | | | | | | | the potential to handle interrupts which it doesn't currently. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.228) Notes: svn path=/head/; revision=146131
* Make a function ProcWait() that waits for the given process.Hartmut Brandt2005-05-121-20/+31
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.227) Notes: svn path=/head/; revision=146130
* Overhaul the fork(), exec() code. Put all the common handling thatHartmut Brandt2005-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> Notes: svn path=/head/; revision=146129
* - check for geom_uzip module presence using kldstat -m.Max Khon2005-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. Notes: svn path=/head/; revision=146107
* Spell 1 as SHUT_WR in argument to shutdown(2).Juli Mallett2005-05-111-2/+2
| | | | Notes: svn path=/head/; revision=146078
* Move the definitions of the OP_* constants from make.h into GNode.hHartmut Brandt2005-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) Notes: svn path=/head/; revision=146066
* Path_Expand() expects its first argument to be writeable so put theHartmut Brandt2005-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) Notes: svn path=/head/; revision=146064
* Move declarations of variables belonging to the variable moduleHartmut Brandt2005-05-102-6/+9
| | | | | | | | | from globals.h into var.h. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.209) Notes: svn path=/head/; revision=146062
* Style: remove spaces before tabs.Hartmut Brandt2005-05-101-31/+31
| | | | | | | | Patch: 7.207 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146061
* Move the remaining two prototypes from nonints.h to make.h andHartmut Brandt2005-05-105-53/+3
| | | | | | | | | | remove nonints.h. Patch: 7.204 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146060
* Make shellPath and shellName static - they're used in job.c only.Hartmut Brandt2005-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> Notes: svn path=/head/; revision=146059
* Make the three versions of fork() more uniform.Hartmut Brandt2005-05-101-63/+63
| | | | | | | | Patch: 7.201 (idea taken, but done differently) Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146058
* Move the defines for TMPPAT and KQUEUE from the public job.h into job.cHartmut Brandt2005-05-102-12/+12
| | | | | | | | | | since they are used only there. Patch: 7.200 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146057
* Merge compat.c into job.c. There is a lot in common between theseHartmut Brandt2005-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> Notes: svn path=/head/; revision=146056
* Add option -l, to make output line buffered.Gleb Smirnoff2005-05-102-5/+11
| | | | | | | | | PR: bin/78692 Submitted by: Eugene Grosbein MFC after: 2 weeks Notes: svn path=/head/; revision=146055
* Move Cmd_Exec() from main.c to job.c and fix its prototype. ThisHartmut Brandt2005-05-105-110/+114
| | | | | | | | | | results in a warning that will go away soon. Patch: 7.198 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146054
* Var_SubstOnly() is only used to subsitute a variable from the globalHartmut Brandt2005-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> Notes: svn path=/head/; revision=146048
* Move the declaration of VAR_CMD and VAR_GLOBAL from globals.h to var.hHartmut Brandt2005-05-102-6/+6
| | | | | | | | Patch: 7.196 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146047
* Clean up comments. No code changes.Hartmut Brandt2005-05-101-194/+128
| | | | | | | | Patch: 7.195 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146046
* Merge var_modify.c into var.c and move types and function declarationsHartmut Brandt2005-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> Notes: svn path=/head/; revision=146045
* Move some debugging code from targ.c to var.c where it actually belongs.Hartmut Brandt2005-05-103-10/+14
| | | | | | | | Patch: 7.192 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146039
* Make make a little bit more POSIXish with regard to option parsing:Hartmut Brandt2005-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> Notes: svn path=/head/; revision=146038
* Split Var_Subst() into two functions: Var_SubstOnly() which substitutesHartmut Brandt2005-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> Notes: svn path=/head/; revision=146027
* Clarify some error messages.Tim Kientzle2005-05-084-8/+8
| | | | Notes: svn path=/head/; revision=145997
* Introduce a new pseudo-target .EXPORTVAR which allows to put aHartmut Brandt2005-05-065-94/+119
| | | | | | | | | | | | | | | | | | | | | make macro into the environment of programs executed by make. This has approximately the same function as gmake's export directive. The form of a pseudo target was deliberately choosen to minimize work for POSIX compatibility (Makefiles are not allowed to use any targets starting with a dot and consisting only of uppercase letters except those specified in the standard when they want POSIX compatible behaviour, so such a Makefile can never contain .EXPORTVAR.) Change the handling of macros coming from the environment: instead of asking the environment for each variable we could not find otherwise put all the environment variables in a special variable environment just at start up. This has been tested on the ports cluster by kris. Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=145971
* Make smbfs capable to use 16bit char set in filenames.Takanori Watanabe2005-05-041-2/+2
| | | | | | | PR:78110 Notes: svn path=/head/; revision=145872
* Enabke mkuzip(1) on amd64.Maxim Sobolev2005-05-021-0/+1
| | | | | | | Submitted by: Matteo Riondato <rionda@gufi.org> Notes: svn path=/head/; revision=145809
* Make WARNS=6 clean, which should make it compiling on amd64.Maxim Sobolev2005-05-022-4/+4
| | | | | | | Submitted by: Matteo Riondato <rionda@gufi.org> Notes: svn path=/head/; revision=145808
* Make brandelf(1)'s -t "ABI format" case insensitive, as the ABI valueBrian Feldman2005-05-021-1/+1
| | | | | | | | | | | | given is looked up in a table and no longer stored literally in the header. Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz PR: 80499 MFC After: 1 month Notes: svn path=/head/; revision=145807