summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libihash/ChangeLog10
-rw-r--r--libihash/ihash.c4
-rw-r--r--libihash/ihash.h8
3 files changed, 16 insertions, 6 deletions
diff --git a/libihash/ChangeLog b/libihash/ChangeLog
index 5e662950..1d71c115 100644
--- a/libihash/ChangeLog
+++ b/libihash/ChangeLog
@@ -1,3 +1,13 @@
+2004-03-07 Marcus Brinkmann <marcus@gnu.org>
+
+ * ihash.h (HURD_IHASH_NO_LOCP): Change to INTPTR_MIN.
+ (struct hurd_ihash): Change type of locp_offset from off_t to
+ intptr_t.
+ (hurd_ihash_init): Likewise in prototype.
+ (hurd_ihash_create): Likewise in prototype.
+ * ihash.c (hurd_ihash_init): Likewise in definition.
+ (hurd_ihash_create): Likewise in definition.
+
2003-08-17 Marcus Brinkmann <marcus@gnu.org>
* ihash.c: Rewritten.
diff --git a/libihash/ihash.c b/libihash/ihash.c
index 51cca82b..a6b96376 100644
--- a/libihash/ihash.c
+++ b/libihash/ihash.c
@@ -166,7 +166,7 @@ locp_remove (hurd_ihash_t ht, hurd_ihash_locp_t locp)
/* Initialize the hash table at address HT. */
void
-hurd_ihash_init (hurd_ihash_t ht, off_t locp_offs)
+hurd_ihash_init (hurd_ihash_t ht, intptr_t locp_offs)
{
ht->nr_items = 0;
ht->size = 0;
@@ -199,7 +199,7 @@ hurd_ihash_destroy (hurd_ihash_t ht)
/* Create a hash table, initialize it and return it in HT. If a
memory allocation error occurs, ENOMEM is returned, otherwise 0. */
error_t
-hurd_ihash_create (hurd_ihash_t *ht, off_t locp_offs)
+hurd_ihash_create (hurd_ihash_t *ht, intptr_t locp_offs)
{
*ht = malloc (sizeof (struct hurd_ihash));
if (*ht == NULL)
diff --git a/libihash/ihash.h b/libihash/ihash.h
index 11092532..8f537edb 100644
--- a/libihash/ihash.h
+++ b/libihash/ihash.h
@@ -77,7 +77,7 @@ struct hurd_ihash
size_t size;
/* The offset of the location pointer from the hash value. */
- off_t locp_offset;
+ intptr_t locp_offset;
/* The maximum load factor in percent. */
int max_load;
@@ -97,7 +97,7 @@ typedef struct hurd_ihash *hurd_ihash_t;
#define HURD_IHASH_MAX_LOAD_DEFAULT 80
/* The LOCP_OFFS to use if no location pointer is available. */
-#define HURD_IHASH_NO_LOCP INT_MIN
+#define HURD_IHASH_NO_LOCP INTPTR_MIN
/* The static initializer for a struct hurd_ihash. */
#define HURD_IHASH_INITIALIZER(locp_offs) \
@@ -110,7 +110,7 @@ typedef struct hurd_ihash *hurd_ihash_t;
address of a hash value where a location pointer can be found. The
location pointer must be of type hurd_ihash_locp_t and can be used
for fast removal with hurd_ihash_locp_remove(). */
-void hurd_ihash_init (hurd_ihash_t ht, off_t locp_offs);
+void hurd_ihash_init (hurd_ihash_t ht, intptr_t locp_offs);
/* Destroy the hash table at address HT. This first removes all
elements which are still in the hash table, and calling the cleanup
@@ -124,7 +124,7 @@ void hurd_ihash_destroy (hurd_ihash_t ht);
hurd_ihash_locp_t and can be used for fast removal with
hurd_ihash_locp_remove(). If a memory allocation error occurs,
ENOMEM is returned, otherwise 0. */
-error_t hurd_ihash_create (hurd_ihash_t *ht, off_t locp_offs);
+error_t hurd_ihash_create (hurd_ihash_t *ht, intptr_t locp_offs);
/* Destroy the hash table HT and release the memory allocated for it
by hurd_ihash_create(). */