diff options
Diffstat (limited to 'devel/bmake/files/hash.h')
-rw-r--r-- | devel/bmake/files/hash.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/devel/bmake/files/hash.h b/devel/bmake/files/hash.h index 994f9336d94..5e5b9d949bc 100644 --- a/devel/bmake/files/hash.h +++ b/devel/bmake/files/hash.h @@ -1,4 +1,4 @@ -/* $NetBSD: hash.h,v 1.1.1.3 2009/09/18 20:55:26 joerg Exp $ */ +/* $NetBSD: hash.h,v 1.1.1.4 2020/05/24 05:35:52 nia Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -78,8 +78,8 @@ * which maintains hash tables. */ -#ifndef _HASH -#define _HASH +#ifndef _HASH_H +#define _HASH_H /* * The following defines one entry in the hash table. @@ -89,10 +89,7 @@ typedef struct Hash_Entry { struct Hash_Entry *next; /* Used to link together all the * entries associated with the same * bucket. */ - union { - void *clientPtr; /* Arbitrary pointer */ - time_t clientTime; /* Arbitrary Time */ - } clientInfo; + void *clientPtr; /* Arbitrary pointer */ unsigned namehash; /* hash value of key */ char name[1]; /* key string */ } Hash_Entry; @@ -125,8 +122,7 @@ typedef struct Hash_Search { * Hash_Entry *h; */ -#define Hash_GetValue(h) ((h)->clientInfo.clientPtr) -#define Hash_GetTimeValue(h) ((h)->clientInfo.clientTime) +#define Hash_GetValue(h) ((h)->clientPtr) /* * Hash_SetValue(h, val); @@ -134,8 +130,7 @@ typedef struct Hash_Search { * char *val; */ -#define Hash_SetValue(h, val) ((h)->clientInfo.clientPtr = (val)) -#define Hash_SetTimeValue(h, val) ((h)->clientInfo.clientTime = (val)) +#define Hash_SetValue(h, val) ((h)->clientPtr = (val)) /* * Hash_Size(n) returns the number of words in an object of n bytes @@ -151,4 +146,4 @@ void Hash_DeleteEntry(Hash_Table *, Hash_Entry *); Hash_Entry *Hash_EnumFirst(Hash_Table *, Hash_Search *); Hash_Entry *Hash_EnumNext(Hash_Search *); -#endif /* _HASH */ +#endif /* _HASH_H */ |