summaryrefslogtreecommitdiff
path: root/mysys/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/hash.c')
-rw-r--r--mysys/hash.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mysys/hash.c b/mysys/hash.c
index 2ef17be5341..7707e7019c9 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -84,7 +84,12 @@ void hash_free(HASH *hash)
/* some helper functions */
-inline byte*
+/*
+ This function is char* instead of byte* as HPUX11 compiler can't
+ handle inline functions that are not defined as native types
+*/
+
+inline char*
hash_key(HASH *hash,const byte *record,uint *length,my_bool first)
{
if (hash->get_key)
@@ -105,7 +110,7 @@ static uint hash_rec_mask(HASH *hash,HASH_LINK *pos,uint buffmax,
uint maxlength)
{
uint length;
- byte *key=hash_key(hash,pos->data,&length,0);
+ byte *key= (byte*) hash_key(hash,pos->data,&length,0);
return hash_mask((*hash->calc_hashnr)(hash->charset,key,length),
buffmax,maxlength);
}
@@ -159,10 +164,10 @@ uint calc_hashnr(CHARSET_INFO *cs, const byte *key, uint len)
#ifndef __SUNPRO_C /* SUNPRO can't handle this */
inline
#endif
-uint rec_hashnr(HASH *hash,const byte *record)
+unsigned int rec_hashnr(HASH *hash,const byte *record)
{
uint length;
- byte *key=hash_key(hash,record,&length,0);
+ byte *key= (byte*) hash_key(hash,record,&length,0);
return (*hash->calc_hashnr)(hash->charset,key,length);
}
@@ -249,7 +254,7 @@ static void movelink(HASH_LINK *array,uint find,uint next_link,uint newlink)
static int hashcmp(HASH *hash,HASH_LINK *pos,const byte *key,uint length)
{
uint rec_keylength;
- byte *rec_key=hash_key(hash,pos->data,&rec_keylength,1);
+ byte *rec_key= (byte*) hash_key(hash,pos->data,&rec_keylength,1);
return (length && length != rec_keylength) ||
(hash->flags & HASH_CASE_INSENSITIVE ?
my_strncasecmp(hash->charset, rec_key,key,rec_keylength) :