Portability: Use AC_C_INLINE to check for availability of the inline keyword

This commit is contained in:
Joel Rosdahl 2010-02-28 00:07:52 +01:00
parent 8ce0a8475f
commit 6256d04b04
3 changed files with 8 additions and 1 deletions

View File

@ -114,6 +114,8 @@ else
mkdir -p zlib
fi
AC_C_INLINE
AC_CONFIG_FILES([Makefile dev.mk])
AC_OUTPUT

View File

@ -32,6 +32,8 @@
#ifndef __HASHTABLE_CWC22_H__
#define __HASHTABLE_CWC22_H__
#include "config.h"
struct hashtable;
/* Example of use:

View File

@ -29,7 +29,10 @@ hash(struct hashtable *h, void *k);
/*****************************************************************************/
/* indexFor */
#define indexFor(tablelength, hashvalue) ((hashvalue) % (tablelength))
static inline unsigned int
indexFor(unsigned int tablelength, unsigned int hashvalue) {
return (hashvalue % tablelength);
}
/* Only works if tablelength == 2^N */
/*static inline unsigned int