The NetBSD Project

CVS log for src/usr.bin/make/hash.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Apr 22 19:28:50 2025 UTC (5 days, 19 hours ago) by rillig
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +15 -15 lines
make: clean up

Replace 'unsigned int' with simply 'unsigned'.

In compat.c, skipping whitespace is not needed, as the loop above
already skips it.

In job.c, remove the unused header <sys/file.h>.

Inline the TMPPAT macro, as it is only needed in a single place.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Jul 7 09:37:00 2024 UTC (9 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +20 -13 lines
make: don't track hash table chain lengths during lookup

The chain lengths are only used for debugging purposes, so avoid the
extra cost at each lookup.  Instead, calculate the maximum chain length
only when it is actually requested in -dh mode.

The reported number changes slightly: Before, it was the length of the
chain that was actually traversed to find an entry, up to that entry,
now it is the length of the largest chain in the table, no matter if it
was actually accessed or not.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Wed Jun 5 22:06:53 2024 UTC (10 months, 3 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +4 -4 lines
make: sync comments with reality

Revision 1.77: download - view: text, markup, annotated - select for diffs
Fri May 31 07:11:12 2024 UTC (10 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -3 lines
make: simplify expression in iteration over hash tables

Revision 1.76: download - view: text, markup, annotated - select for diffs
Fri May 31 05:50:11 2024 UTC (10 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +5 -5 lines
make: clean up API for iterating over hash tables

Revision 1.75: download - view: text, markup, annotated - select for diffs
Fri May 24 22:54:07 2024 UTC (11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +7 -12 lines
make: remove dead code from HashTable_DeleteEntry

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Dec 19 19:33:39 2023 UTC (16 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +4 -4 lines
make: clean up comments

No binary change, except for line numbers in assertions.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sun Dec 17 08:53:55 2023 UTC (16 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +12 -12 lines
make: clean up names of local variables

No binary change.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Wed Feb 9 21:09:24 2022 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3 lines
make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Thu Jan 27 11:00:07 2022 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +19 -40 lines
make: merge duplicate code for finding an entry in a hash table

No functional change.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Thu Jan 27 10:45:36 2022 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +5 -15 lines
make: replace HashEntry_KeyEquals with strncmp

No functional change.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Mon Dec 27 19:06:07 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +7 -7 lines
make: replace __func__ with actual strings

Make is supposed to be C90-compatible, and __func__ is from C99.

No functional change.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Wed Dec 15 12:24:13 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -3 lines
make: use consistent indentation for statements and continuations

No binary change, except for line numbers in assertions in suff.c.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed Dec 15 10:07:53 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -4 lines
make: change return type of HashTable_Set to void

None of the callers needs the HashEntry for further manipulation.

No functional change.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Tue Dec 7 21:58:01 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +2 -11 lines
make: inline HashIter_Init

It is only used in non-critical code paths, but the generated code gets
smaller by inlining.

No functional change.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sun Sep 12 08:36:14 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +3 -3 lines
make: fix build for DEBUG_HASH_LOOKUP

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Apr 11 12:46:54 2021 UTC (4 years ago) by rillig
Branches: MAIN
CVS tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +51 -9 lines
make: avoid allocating memory for simple variable names

The main change is in ParseVarname, where a Buffer is replaced with the
newly introduced LazyBuf.  LazyBuf is inspired by
https://golang.org/src/path/path.go.

In CanonicalVarname, the pre-comparison of the first letter of the
variable name is no longer necessary.  GCC 9 optimizes a fixed-length
memcmp so well that the code can finally be written to target human
readers, leaving the optimization to the compiler.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Apr 3 14:39:02 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +3 -3 lines
make: backport to C90

In the past few months I had accidentally used C99 features in the make
code.  According to tools/README, tools that are used in the build
system should restrict themselves to C90.

This allows make to build with GCC's options "-pedantic
-Wno-system-headers -Dinline= -Wno-error=cast-qual".

I didn't notice anyone actively complaining though, I just wanted to see
how much work this backporting would be.  The identifier __func__ is
still used, as in other tools.

No functional change.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Apr 3 11:08:40 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +5 -5 lines
make: use C99 bool type instead of defining its own

No functional change.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Mon Feb 1 17:32:10 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +8 -5 lines
make: clean up comments in hash.c

Revision 1.60: download - view: text, markup, annotated - select for diffs
Wed Dec 30 10:03:16 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +18 -10 lines
make(1): format multi-line comments

Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Dec 15 15:20:05 2020 UTC (4 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +9 -6 lines
make(1): clean up hash function for HashTable

Expressing a multiplication as a bit shifts and subtraction is the job
of the compiler.  For humans, a multiplication is easier to read.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Mon Nov 23 17:59:21 2020 UTC (4 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -3 lines
make(1): use tabs for indentation in hash.h and hash.c

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Nov 14 21:29:44 2020 UTC (4 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +10 -2 lines
make(1): replace a few HashTable_CreateEntry with HashTable_Set

Instead of HashTable_CreateEntry and HashEntry_Set, several places just
need the HashEntry for storing a value in it.  This makes the calling
code simpler to understand.

These parts of the code are already hard enough to understand since they
are about memory management and aliasing.  Having a too detailed API for
the HashTable only distracts from these topics.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Thu Nov 5 17:27:16 2020 UTC (4 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +5 -5 lines
make(1): remove redundant parentheses from sizeof operator

The parentheses are only needed if the argument is a type, not an
expression.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sun Oct 25 19:28:44 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +6 -8 lines
make(1): print hash in debug log with fixed width

This way all the keys are nicely aligned in the debug log.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Oct 25 19:19:07 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +24 -42 lines
make(1): rename hash functions to identify the type name

This makes it easier to spot mismatches between the function name and
its first parameter, although the compiler should already catch most of
them.  Except for void pointers.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Oct 25 18:40:00 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +4 -9 lines
make(1): clean up comments in hash.c

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sun Oct 25 18:37:08 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +37 -48 lines
make(1): clean up hash table functions

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Oct 25 18:12:35 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +10 -8 lines
make(1): refactor Hash_DeleteTable

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Oct 25 18:03:59 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +8 -8 lines
make(1): refactor Hash_InitTable

First prepare all the data, then initialize the fields in declaration
order.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Oct 25 17:58:53 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +25 -23 lines
make(1): clean up RebuildTable for hash tables

The previous code used ++ and -- a lot, it also reused variables a lot
for different purposes.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Oct 25 17:01:05 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +15 -2 lines
make(1): reduce amount of string hashing

In pkgsrc, running "bmake show-all" in pkgtools/pkglint called the hash
function 249130 times before, and only 115502 times after.

Still, a single call to Var_Set hashes the same string 3 times.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Oct 18 12:47:43 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +7 -7 lines
make(1): rename HashEntry.name to key

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Oct 18 12:36:43 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +29 -29 lines
make(1): remove underscore from Hash_Table and Hash_Entry

For consistency with the other type names, such as GNodeListNode.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Oct 18 10:44:25 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +16 -42 lines
make(1): make API for iterating over hash tables simpler

Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Oct 5 20:21:30 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +15 -14 lines
make(1): make dir.c, for.c and hash.c ready for WARNS=6

Some types have changed from int to unsigned int, size_t or time_t.

The variable i in hash.c has been kept as int since it counts down to
-1, which generates efficient machine code, at least on x86_64.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Oct 5 19:27:47 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +82 -110 lines
make(1): revert previous commit

It had accidentally reverted all the work from the past few days.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Oct 5 19:24:29 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +110 -82 lines
make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25.  In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath.  Dir_ClearPath takes full ownership of the given list and
empties it.  This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table.  This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes.  This by itself
was not a problem since the hash table would be freed afterwards.  But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again.  Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Oct 4 18:16:09 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +31 -39 lines
make(1): merge duplicate code in Hash_FindEntry and Hash_CreateEntry

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Oct 4 17:50:41 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +40 -48 lines
make(1): avoid forward declaration for RebuildTable

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sun Oct 4 17:21:28 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -5 lines
make(1): remove dead code from Hash_FindEntry

All callers pass a properly initialized table.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Oct 3 23:16:28 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -3 lines
make(1): replace strcpy with memcpy in Hash_CreateEntry

The string length is already known, no need to recalculate it.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Oct 3 22:33:26 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -5 lines
make(1): remove unnecessary code from Hash_DeleteEntry

This function is only called 2 times, and both callers pass valid
arguments.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Oct 3 22:25:04 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +24 -30 lines
make(1): clean up hash table implementation

Having the hash function potentially redefined is a bit too much
flexibility.  If actually needed, this should be done using a patch, not
using the C preprocessor.

Converting the macro to a function made the control flow easier to
understand.  It also revealed that the variable p was unnecessary in
both Hash_FindEntry and Hash_CreateEntry.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon Sep 28 20:46:11 2020 UTC (4 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +8 -14 lines
make(1): make debugging code shorter

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Sep 27 21:35:16 2020 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +8 -8 lines
make(1): normalize whitespace in source code

There is no more space tab.  Either only tabs or only spaces or tabs
followed by spaces, but not spaces followed by tabs.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat Sep 26 14:48:31 2020 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +9 -2 lines
make(1): add Hash_FindValue, for direct access to hash table data

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Sep 13 15:15:51 2020 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -14 lines
make(1): clean up RCSID blocks

These blocks mostly consisted of redundant structure, following the same
#ifndef pattern over and over, with only minimal variation.

It's easier to maintain if the common structure is only written once and
encapsulated in a macro.

To avoid "defined but unused" warnings from GCC in the case where
MAKE_NATIVE is not defined, I had to add volatile.  Adding
MAKE_ATTR_UNUSED alone would not preserve the rcsid variable in the
resulting binary.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Sep 5 13:55:08 2020 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +10 -23 lines
make(1): remove initial size argument from Hash_InitTable

In all but one case this argument was set to auto-detect anyway.  The
one case where it was set was not worth keeping this complicated API.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sat Sep 5 13:36:25 2020 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -4 lines
make(1): make Hash_Table independent from -funsigned-char

This only makes a difference for Hash_Table keys outside the ASCII
character set, and these are barely used in practice, if at all.

The effects of this change can only be seen in debug mode, when printing
the full contents of the variable namespaces.  In this output, the order
of the entries might change.

All other use cases stay the same as before.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Tue Sep 1 21:11:31 2020 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +33 -33 lines
make(1): rename Hash_Table fields

Back in the 1980s it made sense to have the type information encoded in
the variable names.  At the time when make was imported into the NetBSD
tree (1993-03-21), the functions did indeed not have prototypes, they
only had return types.  The void type was already invented at that time.
Since the compiler could not verify the types of function parameters, it
made perfect sense to have each variable tell whether it was a pointer
or not.

Since ISO C90 this is no longer necessary since the compiler checks
this.  The variable names can now focus on the application level and
their high-level meaning, expressing the relationship to other
variables instead of encoding redundant type information.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Aug 28 20:16:19 2020 UTC (4 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +21 -137 lines
make(1): remove redundant comments from hash.c

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Aug 26 23:00:47 2020 UTC (4 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -5 lines
make(1): remove header sprite.h

Make is independent of the Sprite operating system.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Aug 1 14:47:49 2020 UTC (4 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -4 lines
make(1): use consistent indentation in source code

Tabs for multiples of 8, then spaces.

The usage string has been kept as-is since the spaces there are
indentional and do influence the output.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Jul 20 18:12:48 2020 UTC (4 years, 9 months ago) by sjg
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +29 -14 lines
Make DEBUG_HASH less of a fire-hose.

Reporting keys on every lookup is overkill unless
playing with a new HASH, so wrap in #ifdef DEBUG_HASH_LOOKUP
Also add some stats at the end so we can see
final size and max chain length - maxchain is a better
variable name than maxlen.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun Jul 19 15:42:25 2020 UTC (4 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +4 -4 lines
Nix trailing whitespace.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Jul 18 21:37:38 2020 UTC (4 years, 9 months ago) by sjg
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +42 -12 lines
Add -dh for DEBUG_HASH

Allow tracking of max chain length, to see how well the hash
tables are working.
Pull the actual hash operation into a marco so it can be
easily changed - for experimenting.

The current hash, is pretty good.

Reviewed by: christos

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Jul 3 17:03:09 2020 UTC (4 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +14 -3 lines
make(1): add Hash_ForEach to avoid duplicate code

Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri Jul 3 08:02:55 2020 UTC (4 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -7 lines
make(1): remove redundant parentheses around return values

Revision 1.19.14.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:05:00 2014 UTC (10 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19: +6 -3 lines
Rebase to HEAD as of a few days ago.

Revision 1.19.8.1: download - view: text, markup, annotated - select for diffs
Thu May 22 11:42:45 2014 UTC (10 years, 11 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19: +6 -3 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Nov 14 00:27:05 2013 UTC (11 years, 5 months ago) by sjg
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +6 -3 lines
Don't SEGV when Hash_Table is uninitialized

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Jan 24 10:59:09 2009 UTC (16 years, 3 months ago) by dsl
Branches: MAIN
CVS tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-premerge-20091211, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, dholland-make-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +4 -4 lines
Don't cast 'time_t' to 'void *' and back it will lose precision.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Dec 13 15:19:29 2008 UTC (16 years, 4 months ago) by dsl
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +5 -5 lines
Use NULL instead of -1 cast to the relavant type (usually via NIL).
This was a suggestion from christos - so blame him if there is a deep
reason for using -1 :-)

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Oct 6 22:09:21 2008 UTC (16 years, 6 months ago) by joerg
Branches: MAIN
CVS tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +6 -6 lines
Don't use emalloc and friends directly, but call them consistently
bmake_malloc and friends. Implement them via macros for the native case
and provide fallback implementations otherwise. Avoid polluting the
namespace by not defining enomem globally. Don't bother to provide
strdup and strndup, they were only used for the estrdup and estrndup
comapt code.

This addresses the presence of emalloc in system libraries on A/UX and
resulted strange issues as reported by Timothy E. Larson.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Aug 4 00:20:12 2005 UTC (19 years, 8 months ago) by christos
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, mjf-devfs2-base, mjf-devfs2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, christos-broken, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +9 -9 lines
remove unnecessary casts to void * functions (Max Okumoto)

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Jul 25 22:55:58 2005 UTC (19 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -6 lines
Whitespace KNF cleanup from Max Okumoto

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Feb 16 15:11:52 2005 UTC (20 years, 2 months ago) by christos
Branches: MAIN
CVS tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +4 -4 lines
PR/29203, PR/29204: Max Okumoto: KNF changes to make [no functional changes]

Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Mon May 10 15:43:39 2004 UTC (20 years, 11 months ago) by tron
Branches: netbsd-2-0
CVS tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +4 -4 lines
Pull up revision 1.13 (requested by sjg in ticket #282):
Simplify build, no functional changes.
Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().
It's now possible to build make on some hosts with: cc *.c */*.c

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri May 7 00:04:38 2004 UTC (20 years, 11 months ago) by ross
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -4 lines
Simplify build, no functional changes.

Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().

It's now possible to build make on some hosts with: cc *.c */*.c

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Aug 7 11:14:51 2003 UTC (21 years, 8 months ago) by agc
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +34 -3 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Jul 14 18:19:12 2003 UTC (21 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +7 -7 lines
Pass WARNS=3

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Jun 15 18:24:56 2002 UTC (22 years, 10 months ago) by wiz
Branches: MAIN
CVS tags: fvdl_fs64_base
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +51 -48 lines
Remove !__STDC__ stuff, de-__P(), ANSIfy, and de-register.

Revision 1.8.10.1: download - view: text, markup, annotated - select for diffs
Fri Jun 23 16:39:42 2000 UTC (24 years, 10 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +4 -4 lines
Sync w/ netbsd-1-5-base.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Jun 11 07:54:32 2000 UTC (24 years, 10 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -4 lines
Use a lower threshold for rebuilding hash tables.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Sep 28 03:31:04 1997 UTC (27 years, 7 months ago) by lukem
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, minoura-xpg4dl-base, comdex-fall-1999-base, comdex-fall-1999
Branch point for: minoura-xpg4dl
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +6 -2 lines
wrap #include <sys/cdefs.h>, __RCSID(...) stuff in #ifndef MAKE_BOOTSTRAP

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Jul 1 21:17:21 1997 UTC (27 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -2 lines
Add WARNS=1
RCSID police

Revision 1.5.6.1: download - view: text, markup, annotated - select for diffs
Sun Jan 26 05:51:37 1997 UTC (28 years, 3 months ago) by rat
Branches: netbsd-1-2
CVS tags: netbsd-1-2-PATCH001
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +14 -14 lines
Update make(1) from trunk, by request from Christos Zoulas.  Fixes many bugs.

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Sat Dec 28 04:41:02 1996 UTC (28 years, 4 months ago) by tls
Branches: WFJ-920714, CSRG
CVS tags: lite-2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +8 -8 lines
Import 4.4BSD-Lite2 sources onto CSRG branch (already merged at head)

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Nov 6 17:59:06 1996 UTC (28 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +14 -14 lines
- Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
  be considered to be out of date, since it does not have a TOC.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Jun 14 15:19:15 1995 UTC (29 years, 10 months ago) by christos
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Branch point for: netbsd-1-2
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +7 -2 lines
- $NetBSD$ rcsids
- Fixed so that .[A-Z]* targets that do not match keywords are ignored as
  Posix mandates
- Added .PHONY target keyword

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Mar 5 00:34:45 1994 UTC (31 years, 2 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +7 -10 lines
fixes/improvements from Christos Zoulas <christos@deshaw.com>.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jan 13 21:01:49 1994 UTC (31 years, 3 months ago) by jtc
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -1 lines
Include appropriate header files to bring prototypes into scope.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Aug 1 18:11:50 1993 UTC (31 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -1 lines
Add RCS identifiers.

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (32 years, 1 month ago) by cgd
Branches: WFJ-920714, CSRG
CVS tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, netbsd-0-8, WFJ-386bsd-01
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
initial import of 386bsd-0.1 sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (32 years, 1 month ago) by cgd
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>