summaryrefslogtreecommitdiff
path: root/usr.bin/make
AgeCommit message (Collapse)Author
2000-03-26Remove idiotic, braindead casts T* -> void*Marc Espie
They serve no purpose, except hiding potential bugs. In particular, remove (ClientData) cast from macro, showing potentially troublesome use of Hashes to store time_t.
2000-03-26Passing an (int) instead of an (int*) won't work.Marc Espie
Those casts are evil...
2000-03-26Remove refCount for suffixes.Marc Espie
- suffixes can't be removed from suffList except when an explicit reset is seen, e.g., .SUFFIXES: This actually occurs seldom enough that the very small memory gain does not justify the extra code and added complexity. (Removing suffixes at other times, as the old code used to do, is a bug)
2000-03-14Disable suffix removal for now, as it's buggy.Marc Espie
*If* refcounting is to be useful, the actual erasure of suffixes data should occur when stuff is moved from the suffList to the cleanList, and it's not at all clear whether all the extra baggage is actually any use. How many suffixes are we talking about anyway ? This lets gnupg build correctly without gnu-make.
2000-03-11Various cleanups and standardizations.Aaron Campbell
2000-03-10Various cleanups and standardization.Aaron Campbell
2000-02-02Bug-fix: make should behave sensibly when presented with negative times...Marc Espie
- let *_MTime return booleans, as that's what they're used for, the time_t is set as a side effect. - use OUT_OF_DATE for a date starting point, set it at the origin of time.
2000-02-01no need to extern int errno if errno.h is includedTheo de Raadt
2000-01-25Kludge to fix timestamp bug.Marc Espie
2000-01-20Fix problem pointed out by FreeBSD, regen temp file name each time, toMarc Espie
avoid races. Make use of basic Unix semantics, namely you can unlink a file while holding open fd on the data. Avoid all the mess of having to track useless file names around.
2000-01-19.MAIN is nothing special.Marc Espie
Silently ignoring all commands but the first set in a normal dependency is a generic `feature' of make.
2000-01-08Silence gcc -Wall on alpha in enomem() printf via cast to u_long.Todd C. Miller
2000-01-08Finish changing all Var_Parse arguments to size_t. Thanks to millert@Marc Espie
for reminding me.
2000-01-02More bugs... fixes for most pending.Marc Espie
make needs quite a lot more of cleaning up yet.
1999-12-26For loops are no longer that bad.Marc Espie
However, I found some more oddities while going through the scanner...
1999-12-19Rearrange Lst_Find interface to conform better with other functions.Marc Espie
1999-12-18Nothing ever checks ReturnStatus on Lst_Insert, Lst_Append, Lst_AtFront,Marc Espie
Lst_AtEnd, Lst_Concat, Lst_Remove, Lst_Replace. Don't bother returning one.
1999-12-18Lst_DeQueue already checks for empty lists.Marc Espie
1999-12-18NIL, NILGNODE, etc, are only glorified NULL.Marc Espie
Get rid of them. Get rid of list.h, nothing uses it anyway.
1999-12-18make does not use circular lists, get rid of the extra weight.Marc Espie
1999-12-16Bugfix: execvp might fail for many reasons.Marc Espie
Perform an explicit ENOENT check to keep the same error message for known cases.
1999-12-16Var_Subst is actually two distinct functions folded into one:Marc Espie
split the function specific to for.c out, and give them more sensible arguments at the same time. This makes .for loop handling more efficient, as we have some heuristic to evaluate the size of the buffer needed...
1999-12-16remaining part of the previous patch... patch got confused somehow.Marc Espie
1999-12-16for.c becomes sane.Marc Espie
- split For_Eval into For_Eval (first line of loop) / For_Accumulate (remaining lines). - encapsulate state into a For structure, instead of brain damaged static variables that need copy. Very minor performance hit, specifically, For structure is allocated with malloc/free, instead of playing tricks with static/auto variables.
1999-12-16Allocate buffers as static data structures.Marc Espie
This cuts down quite a lot of malloc, since in actual use, buffer usage is mostly static.
1999-12-16Fix those two bugs in cond.c.Marc Espie
- CondGetArg needs to differentiate between empty strings and problems. Returning problems as a separate boolean is cleaner anyway. - Fix error in conditional parser which would overstep the ending 0, so that a second zero would be needed.
1999-12-16Remove unneeded extraneous zeros at the end of buffers.Marc Espie
Actually, one of these needs to be there, because of two bugs in cond.c
1999-12-16Remove redundant fields from struct Buffer.Marc Espie
1999-12-16Split Buf_GetAll into Buf_Retrieve/Buf_Size.Marc Espie
(idiotic to retrieve size every time when it's used half the time)
1999-12-16Start cleaning up buf.c in earnest.Marc Espie
- Buf_Discard is only used to remove all the bytes in a buffer, replace with Buf_Reset, - buffer values are not read unless accessed first through Buf_GetAll, no need to null-terminate it at every point. - Buf_Expand need not check if the expansion is needed. That's Buf_AddChar and Buf_AddChars responsability (otherwise, Buf_AddChar checks twice) - Buf_Overflow only handles overflow. Adding the character is done in every case anyway.
1999-12-09Split some allocation/error handling functions out of main.cMarc Espie
1999-12-09Introduce `common usage' buf patterns and use them.Marc Espie
1999-12-06main prototype properly in main.c, remove dup.Marc Espie
1999-12-06Extra parameter no longer needed, ditch.Marc Espie
1999-12-06Instead of retrieving var values from the environment again and again,Marc Espie
it is much better to keep them in the global context, marked read-only. This also makes the next simplification possible, since var values need no longer be free'd by client code. (reviewed by ho@, like other patches)
1999-12-06Clean up buffers interface somewhat:Marc Espie
- buf.c deals exclusively with chars. Be explicit about it, and remove extraneous dumb casts to char (can hide real type errors). - buffer sizes are size_t. Note that bp->left can never become NULL. - Buf_GetAll is happy with a NULL pointer for the size, remove unneeded extra pointers. - Propagate size_t to all places where buffer functions are used.
1999-12-06Fix handling ofMarc Espie
VAR!= specifically, properly distinguish between bad commands and empty results.
1999-12-06- introduce interval_dup in str.cMarc Espie
- use it to replace .for parsing with something approaching sanity. (this removes one of the few most blatant misuses of Bufs in make. More changes to come... patch reviewed by ho@
1999-12-06Somehow I didn't delete that file...Marc Espie
1999-11-14Fix erroneous free of static storage.Marc Espie
Problem reported by fgsch@.
1999-11-11extern.h is a better name than nonints.hMarc Espie
(cvs file was copied from nonints.h to give a better sense of history).
1999-11-11Close bugMarc Espie
1999-11-11Communicate line numbers between parse.c and for.c.Marc Espie
Parse_String starts in the current line, but at a given line number. .for loops yield correct line numbers, much easier to debug !
1999-11-11Lineno as unsigned long. Slightly easier for printf, and more sensible.Marc Espie
1999-11-11Kill Str_FindSubString, it's strstr.Marc Espie
1999-11-11Move all prototypes to nonints.h. Comment no longer reflects reality.Marc Espie
1999-11-10Turn on strict-prototypes, add missing prototypes.Marc Espie
Move main prototype to main.c, as this is not used from any other file. Close open bug.
1999-11-10Make ParseSkipLine more regular:Marc Espie
perform the exit tests before checking for EOF. This makes behavior while scanning tests more regular. e.g, .if defined(UVM) && ${UVM} == "yes" ... .endif without a final newline at the endif should always work, instead of being an error half the time...
1999-11-06Document a few of the problems I've found while revamping make.Marc Espie
Temporary solution, until Todd or somebody else *finally* starts reviewing the first patches of the 20,000 lines diff I currently have...
1999-11-06Bug-fix: when expanding a specific variable v in $A,Marc Espie
check that v is PRECISELY A. Other BSDs, take notice.