Commit 972eca70 authored by Matthias Braun's avatar Matthias Braun
Browse files

- remove some now unnecessary firm_config.h

- move some nonportable bitfiddle stuff to sources

[r22707]
parent fcb579b8
......@@ -29,7 +29,6 @@
#include <assert.h>
#include <stddef.h>
#include "firm_config.h"
#include "obst.h"
#include "fourcc.h"
#include "align.h"
......@@ -283,7 +282,7 @@ typedef int (ir_arr_cmp_func_t)(const void *a, const void *b);
* @note The differences to bsearch(3) which does not give proper insert locations
* in the case that the element is not conatined in the array.
*/
static INLINE __attribute__((const, unused)) int
static inline __attribute__((const, unused)) int
ir_arr_bsearch(const void *arr, size_t elm_size, ir_arr_cmp_func_t *cmp, const void *elm)
{
int hi = ARR_LEN(arr);
......
......@@ -26,16 +26,13 @@
#ifndef FIRM_ADT_HASHPTR_H
#define FIRM_ADT_HASHPTR_H
#include "firm_config.h"
#include "compiler.h"
#define _FIRM_FNV_OFFSET_BASIS 2166136261U
#define _FIRM_FNV_FNV_PRIME 16777619U
/* Computing x * _FIRM_FNV_FNV_PRIME */
#define _FIRM_FNV_TIMES_PRIME(x) ((x) * _FIRM_FNV_FNV_PRIME)
static INLINE unsigned firm_fnv_hash(const unsigned char *data, unsigned bytes)
static inline unsigned firm_fnv_hash(const unsigned char *data, unsigned bytes)
{
unsigned i;
unsigned hash = _FIRM_FNV_OFFSET_BASIS;
......@@ -48,7 +45,7 @@ static INLINE unsigned firm_fnv_hash(const unsigned char *data, unsigned bytes)
return hash;
}
static INLINE unsigned firm_fnv_hash_str(const char *data)
static inline unsigned firm_fnv_hash_str(const char *data)
{
unsigned i;
unsigned hash = _FIRM_FNV_OFFSET_BASIS;
......@@ -79,7 +76,7 @@ static INLINE unsigned firm_fnv_hash_str(const char *data)
#pragma warning(disable:4307)
#endif /* _MSC_VER */
static INLINE unsigned _hash_combine(unsigned x, unsigned y)
static inline unsigned _hash_combine(unsigned x, unsigned y)
{
unsigned hash = _FIRM_FNV_TIMES_PRIME(_FIRM_FNV_OFFSET_BASIS);
hash ^= x;
......
......@@ -15,7 +15,6 @@
#ifndef FIRM_ADT_LIST_H
#define FIRM_ADT_LIST_H
#include "firm_config.h"
#include <stdlib.h>
typedef struct list_head list_head;
......@@ -44,7 +43,7 @@ struct list_head {
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
static INLINE void __list_add(struct list_head *new_node,
static inline void __list_add(struct list_head *new_node,
struct list_head *prev,
struct list_head *next)
{
......@@ -62,7 +61,7 @@ static INLINE void __list_add(struct list_head *new_node,
* Insert a new entry after the specified head.
* This is good for implementing stacks.
*/
static INLINE void list_add(struct list_head *new_node, struct list_head *head)
static inline void list_add(struct list_head *new_node, struct list_head *head)
{
__list_add(new_node, head, head->next);
}
......@@ -75,7 +74,7 @@ static INLINE void list_add(struct list_head *new_node, struct list_head *head)
* Insert a new entry before the specified head.
* This is useful for implementing queues.
*/
static INLINE void list_add_tail(struct list_head *new_node, struct list_head *head)
static inline void list_add_tail(struct list_head *new_node, struct list_head *head)
{
__list_add(new_node, head->prev, head);
}
......@@ -87,7 +86,7 @@ static INLINE void list_add_tail(struct list_head *new_node, struct list_head *h
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
static INLINE void __list_del(struct list_head * prev, struct list_head * next)
static inline void __list_del(struct list_head * prev, struct list_head * next)
{
next->prev = prev;
prev->next = next;
......@@ -101,7 +100,7 @@ static INLINE void __list_del(struct list_head * prev, struct list_head * next)
* list_empty on entry does not return true after this, the entry is
* in an undefined state.
*/
static INLINE void list_del(struct list_head *entry)
static inline void list_del(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
entry->next = NULL;
......@@ -113,7 +112,7 @@ static INLINE void list_del(struct list_head *entry)
* list_del_init - deletes entry from list and reinitialize it.
* @param entry the element to delete from the list.
*/
static INLINE void list_del_init(struct list_head *entry)
static inline void list_del_init(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
INIT_LIST_HEAD(entry);
......@@ -124,7 +123,7 @@ static INLINE void list_del_init(struct list_head *entry)
* @param list the entry to move
* @param head the head that will precede our entry
*/
static INLINE void list_move(struct list_head *list, struct list_head *head)
static inline void list_move(struct list_head *list, struct list_head *head)
{
__list_del(list->prev, list->next);
list_add(list, head);
......@@ -135,7 +134,7 @@ static INLINE void list_move(struct list_head *list, struct list_head *head)
* @param list the entry to move
* @param head the head that will follow our entry
*/
static INLINE void list_move_tail(struct list_head *list,
static inline void list_move_tail(struct list_head *list,
struct list_head *head)
{
__list_del(list->prev, list->next);
......@@ -146,12 +145,12 @@ static INLINE void list_move_tail(struct list_head *list,
* list_empty - tests whether a list is empty
* @param head the list to test.
*/
static INLINE int list_empty(const struct list_head *head)
static inline int list_empty(const struct list_head *head)
{
return head->next == head;
}
static INLINE void __list_splice(struct list_head *list,
static inline void __list_splice(struct list_head *list,
struct list_head *head)
{
struct list_head *first = list->next;
......@@ -170,7 +169,7 @@ static INLINE void __list_splice(struct list_head *list,
* @param list the new list to add.
* @param head the place to add it in the first list.
*/
static INLINE void list_splice(struct list_head *list, struct list_head *head)
static inline void list_splice(struct list_head *list, struct list_head *head)
{
if (!list_empty(list))
__list_splice(list, head);
......@@ -183,7 +182,7 @@ static INLINE void list_splice(struct list_head *list, struct list_head *head)
*
* The list at list is reinitialized
*/
static INLINE void list_splice_init(struct list_head *list,
static inline void list_splice_init(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list)) {
......
......@@ -59,7 +59,7 @@ typedef unsigned int rawbs_base_t;
*
* @return the new bitset
*/
static INLINE unsigned *rbitset_malloc(unsigned size) {
static inline unsigned *rbitset_malloc(unsigned size) {
unsigned size_bytes = BITSET_SIZE_BYTES(size);
unsigned *res = xmalloc(size_bytes);
memset(res, 0, size_bytes);
......@@ -88,7 +88,7 @@ do { \
*
* @return the new bitset
*/
static INLINE unsigned *rbitset_obstack_alloc(struct obstack *obst, unsigned size) {
static inline unsigned *rbitset_obstack_alloc(struct obstack *obst, unsigned size) {
unsigned size_bytes = BITSET_SIZE_BYTES(size);
unsigned *res = obstack_alloc(obst, size_bytes);
memset(res, 0, size_bytes);
......@@ -105,7 +105,7 @@ static INLINE unsigned *rbitset_obstack_alloc(struct obstack *obst, unsigned siz
*
* @return the new bitset
*/
static INLINE unsigned *rbitset_w_size_obstack_alloc(struct obstack *obst, unsigned size) {
static inline unsigned *rbitset_w_size_obstack_alloc(struct obstack *obst, unsigned size) {
unsigned size_bytes = BITSET_SIZE_BYTES(size);
unsigned *res = obstack_alloc(obst, size_bytes + sizeof(unsigned));
*res = size;
......@@ -127,7 +127,7 @@ static INLINE unsigned *rbitset_w_size_obstack_alloc(struct obstack *obst, unsig
*
* @return the new bitset
*/
static INLINE
static inline
unsigned *rbitset_duplicate_obstack_alloc(struct obstack *obst,
const unsigned *old_bitset,
unsigned size)
......@@ -142,7 +142,7 @@ unsigned *rbitset_duplicate_obstack_alloc(struct obstack *obst,
/**
* Check if a bitset is empty, ie all bits cleared.
*/
static INLINE int rbitset_is_empty(unsigned *bitset, unsigned size) {
static inline int rbitset_is_empty(unsigned *bitset, unsigned size) {
unsigned i, size_bytes = BITSET_SIZE_BYTES(size);
for (i = 0; i < size_bytes; ++i)
if (bitset[i]) return 0;
......@@ -155,7 +155,7 @@ static INLINE int rbitset_is_empty(unsigned *bitset, unsigned size) {
* @param bitset the bitset
* @param pos the position of the bit to be set
*/
static INLINE void rbitset_set(unsigned *bitset, unsigned pos) {
static inline void rbitset_set(unsigned *bitset, unsigned pos) {
BITSET_ELEM(bitset,pos) |= 1 << (pos % BITS_PER_ELEM);
}
......@@ -165,7 +165,7 @@ static INLINE void rbitset_set(unsigned *bitset, unsigned pos) {
* @param bitset the bitset
* @param pos the position of the bit to be clear
*/
static INLINE void rbitset_clear(unsigned *bitset, unsigned pos) {
static inline void rbitset_clear(unsigned *bitset, unsigned pos) {
BITSET_ELEM(bitset, pos) &= ~(1 << (pos % BITS_PER_ELEM));
}
......@@ -175,7 +175,7 @@ static INLINE void rbitset_clear(unsigned *bitset, unsigned pos) {
* @param bitset the bitset
* @param size number of bits in the bitset
*/
static INLINE void rbitset_clear_all(unsigned *bitset, unsigned size) {
static inline void rbitset_clear_all(unsigned *bitset, unsigned size) {
unsigned size_bytes = BITSET_SIZE_BYTES(size);
memset(bitset, 0, size_bytes);
}
......@@ -186,7 +186,7 @@ static INLINE void rbitset_clear_all(unsigned *bitset, unsigned size) {
* @param bitset the bitset
* @param pos the position of the bit to check
*/
static INLINE int rbitset_is_set(const unsigned *bitset, unsigned pos) {
static inline int rbitset_is_set(const unsigned *bitset, unsigned pos) {
return BITSET_ELEM(bitset, pos) & (1 << (pos % BITS_PER_ELEM));
}
......@@ -195,7 +195,7 @@ static INLINE int rbitset_is_set(const unsigned *bitset, unsigned pos) {
*
* @param bitset the bitset
*/
static INLINE unsigned rbitset_popcnt(const unsigned *bitset, unsigned size) {
static inline unsigned rbitset_popcnt(const unsigned *bitset, unsigned size) {
unsigned pos;
unsigned n = BITSET_SIZE_ELEMS(size);
unsigned res = 0;
......@@ -209,7 +209,7 @@ static INLINE unsigned rbitset_popcnt(const unsigned *bitset, unsigned size) {
return res;
}
static INLINE unsigned rbitset_next(const unsigned *bitset, unsigned pos, int set) {
static inline unsigned rbitset_next(const unsigned *bitset, unsigned pos, int set) {
unsigned p;
unsigned elem_pos = pos / BITS_PER_ELEM;
unsigned bit_pos = pos % BITS_PER_ELEM;
......@@ -251,7 +251,7 @@ static INLINE unsigned rbitset_next(const unsigned *bitset, unsigned pos, int se
/**
* Inplace Intersection of two sets.
*/
static INLINE void rbitset_and(unsigned *bitset1, const unsigned *bitset2,
static inline void rbitset_and(unsigned *bitset1, const unsigned *bitset2,
unsigned size)
{
unsigned i, n = BITSET_SIZE_ELEMS(size);
......@@ -264,7 +264,7 @@ static INLINE void rbitset_and(unsigned *bitset1, const unsigned *bitset2,
/**
* Inplace Union of two sets.
*/
static INLINE void rbitset_or(unsigned *bitset1, const unsigned *bitset2,
static inline void rbitset_or(unsigned *bitset1, const unsigned *bitset2,
unsigned size)
{
unsigned i, n = BITSET_SIZE_ELEMS(size);
......@@ -277,7 +277,7 @@ static INLINE void rbitset_or(unsigned *bitset1, const unsigned *bitset2,
/**
* Remove all bits in bitset2 from bitset 1.
*/
static INLINE void rbitset_andnot(unsigned *bitset1, const unsigned *bitset2,
static inline void rbitset_andnot(unsigned *bitset1, const unsigned *bitset2,
unsigned size)
{
unsigned i, n = BITSET_SIZE_ELEMS(size);
......@@ -290,7 +290,7 @@ static INLINE void rbitset_andnot(unsigned *bitset1, const unsigned *bitset2,
/**
* Xor of two bitsets.
*/
static INLINE void rbitset_xor(unsigned *bitset1, const unsigned *bitset2,
static inline void rbitset_xor(unsigned *bitset1, const unsigned *bitset2,
unsigned size)
{
unsigned i, n = BITSET_SIZE_ELEMS(size);
......@@ -300,7 +300,7 @@ static INLINE void rbitset_xor(unsigned *bitset1, const unsigned *bitset2,
}
}
static INLINE int rbitset_equal(const unsigned *bitset1,
static inline int rbitset_equal(const unsigned *bitset1,
const unsigned *bitset2, size_t size)
{
unsigned i, n = BITSET_SIZE_ELEMS(size);
......@@ -317,7 +317,7 @@ static INLINE int rbitset_equal(const unsigned *bitset1,
*
* @deprecated
*/
static INLINE void rbitset_copy_to_bitset(const unsigned *rbitset, bitset_t *bitset) {
static inline void rbitset_copy_to_bitset(const unsigned *rbitset, bitset_t *bitset) {
// TODO optimize me (or remove me)
unsigned i, n = bitset_size(bitset);
for(i = 0; i < n; ++i) {
......
......@@ -41,7 +41,7 @@
* @param from The first element that should be initialized
* @param to the index of the first element which is not initialized anymore
*/
static INLINE void uf_init(int* data, int from, int to) {
static inline void uf_init(int* data, int from, int to) {
int i;
for(i = from; i < to; ++i) {
data[i] = -1;
......@@ -58,7 +58,7 @@ static INLINE void uf_init(int* data, int from, int to) {
* @return 0 if the new union set is represented by set1, 1 if it is
* represented by set2
*/
static INLINE int uf_union(int* data, int set1, int set2) {
static inline int uf_union(int* data, int set1, int set2) {
int d1 = data[set1];
int d2 = data[set2];
int newcount;
......@@ -91,7 +91,7 @@ static INLINE int uf_union(int* data, int set1, int set2) {
* @param e The element
* @return The representative of the set that contains @p e
*/
static INLINE int uf_find(int* data, int e) {
static inline int uf_find(int* data, int e) {
/* go through list to find representative */
int repr = e;
while(data[repr] >= 0) {
......
......@@ -26,8 +26,6 @@
#ifndef FIRM_ADT_UTIL_H
#define FIRM_ADT_UTIL_H
#include "firm_config.h"
/**
* Get the offset of a member of a struct.
* @param type The type of the struct member is in.
......
......@@ -28,8 +28,6 @@
#ifndef FIRM_IR_IRCGCONS_H
#define FIRM_IR_IRCGCONS_H
#include "firm_config.h"
#ifdef INTERPROCEDURAL_VIEW
#include "firm_types.h"
......
......@@ -28,7 +28,6 @@
#include <stddef.h>
#include "firm_config.h"
#include "firm_types.h"
#include "irop.h"
#include "iropt.h"
......
......@@ -26,7 +26,6 @@
#ifndef FIRM_IR_IRHOOKS_H
#define FIRM_IR_IRHOOKS_H
#include "firm_config.h"
#include "irop.h"
#include "irnode.h"
#include "irgraph.h"
......
......@@ -27,8 +27,6 @@
#ifndef FIRM_IR_IRPRINTF_H
#define FIRM_IR_IRPRINTF_H
#include "firm_config.h"
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
......
......@@ -27,11 +27,10 @@
#ifndef FIRM_ADT_BITFIDDLE_H
#define FIRM_ADT_BITFIDDLE_H
#include "firm_config.h"
#include "compiler.h"
#include <limits.h>
#include <assert.h>
#include "compiler.h"
/* some functions here assume ints are 32 bit wide */
#define HACKDEL_WORDSIZE 32
......@@ -46,7 +45,7 @@ COMPILETIME_ASSERT(UINT_MAX == 4294967295U, uintmax)
*
* @note See hacker's delight, page 27.
*/
static INLINE PURE
static inline
int add_saturated(int x, int y)
{
int sum = x + y;
......@@ -75,7 +74,7 @@ int add_saturated(int x, int y)
* @param x A 32-bit word.
* @return The number of bits set in x.
*/
static INLINE PURE
static inline
unsigned popcnt(unsigned x) {
x -= ((x >> 1) & 0x55555555);
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
......@@ -90,7 +89,7 @@ unsigned popcnt(unsigned x) {
* @param x The word.
* @return The number of leading (from the most significant bit) zeros.
*/
static INLINE PURE
static inline
unsigned nlz(unsigned x) {
#ifdef USE_X86_ASSEMBLY
unsigned res;
......@@ -119,7 +118,7 @@ unsigned nlz(unsigned x) {
* @param x The word.
* @return The number of trailing zeros.
*/
static INLINE PURE
static inline
unsigned ntz(unsigned x) {
#ifdef USE_X86_ASSEMBLY
unsigned res;
......@@ -163,7 +162,7 @@ unsigned ntz(unsigned x) {
* Returns the biggest power of 2 that is equal or smaller than @p x
* (see hackers delight power-of-2 boundaries, page 48)
*/
static INLINE PURE
static inline
unsigned floor_po2(unsigned x)
{
#ifdef USE_X86_ASSEMBLY // in this case nlz is fast
......@@ -186,7 +185,7 @@ unsigned floor_po2(unsigned x)
* @remark x has to be <= 0x8000000 of course
* @note see hackers delight power-of-2 boundaries, page 48
*/
static INLINE PURE
static inline
unsigned ceil_po2(unsigned x)
{
if(x == 0)
......@@ -210,7 +209,7 @@ unsigned ceil_po2(unsigned x)
/**
* Tests whether @p x is a power of 2
*/
static INLINE PURE
static inline
int is_po2(unsigned x)
{
return (x & (x-1)) == 0;
......
......@@ -77,7 +77,7 @@ typedef struct _bitset_t {
* @param size The size of the bitset in bits.
* @return A pointer to the initialized bitset.
*/
static INLINE bitset_t *_bitset_prepare(void *area, bitset_pos_t size)
static inline bitset_t *_bitset_prepare(void *area, bitset_pos_t size)
{
bitset_t *ptr = area;
memset(ptr, 0, BS_TOTAL_SIZE(size));
......@@ -92,7 +92,7 @@ static INLINE bitset_t *_bitset_prepare(void *area, bitset_pos_t size)
* @param bs The bitset.
* @return The masked bitset.
*/
static INLINE bitset_t *_bitset_mask_highest(bitset_t *bs)
static inline bitset_t *_bitset_mask_highest(bitset_t *bs)
{
bitset_pos_t rest = bs->size & BS_UNIT_MASK;
if (rest)
......@@ -154,7 +154,7 @@ static INLINE bitset_t *_bitset_mask_highest(bitset_t *bs)
* @param bit The bit.
* @return A pointer to the unit containing the bit.
*/
static INLINE bitset_unit_t *_bitset_get_unit(const bitset_t *bs, bitset_pos_t bit)
static inline bitset_unit_t *_bitset_get_unit(const bitset_t *bs, bitset_pos_t bit)
{
assert(bit <= bs->size && "Bit to large");
return BS_DATA(bs) + bit / BS_UNIT_SIZE_BITS;
......@@ -165,7 +165,7 @@ static INLINE bitset_unit_t *_bitset_get_unit(const bitset_t *bs, bitset_pos_t b
* @param bs The bitset.
* @param bit The bit to set.
*/
static INLINE void bitset_set(bitset_t *bs, bitset_pos_t bit)
static inline void bitset_set(bitset_t *bs, bitset_pos_t bit)
{
bitset_unit_t *unit = _bitset_get_unit(bs, bit);
_bitset_inside_set(unit, bit & BS_UNIT_MASK);
......@@ -176,7 +176,7 @@ static INLINE void bitset_set(bitset_t *bs, bitset_pos_t bit)
* @param bs The bitset.
* @param bit The bit to clear.
*/
static INLINE void bitset_clear(bitset_t *bs, bitset_pos_t bit)
static inline void bitset_clear(bitset_t *bs, bitset_pos_t bit)
{
bitset_unit_t *unit = _bitset_get_unit(bs, bit);
_bitset_inside_clear(unit, bit & BS_UNIT_MASK);
......@@ -188,7 +188,7 @@ static INLINE void bitset_clear(bitset_t *bs, bitset_pos_t bit)
* @param bit The bit to check for.
* @return 1, if the bit was set, 0 if not.
*/
static INLINE int bitset_is_set(const bitset_t *bs, bitset_pos_t bit)
static inline int bitset_is_set(const bitset_t *bs, bitset_pos_t bit)
{
bitset_unit_t *unit = _bitset_get_unit(bs, bit);
return _bitset_inside_is_set(unit, bit & BS_UNIT_MASK);
......@@ -199,7 +199,7 @@ static INLINE int bitset_is_set(const bitset_t *bs, bitset_pos_t bit)
* @param bs The bitset.
* @param bit The bit to flip.
*/
static INLINE void bitset_flip(bitset_t *bs, bitset_pos_t bit)
static inline void bitset_flip(bitset_t *bs, bitset_pos_t bit)
{
bitset_unit_t *unit = _bitset_get_unit(bs, bit);
_bitset_inside_flip(unit, bit & BS_UNIT_MASK);
......@@ -209,7 +209,7 @@ static INLINE void bitset_flip(bitset_t *bs, bitset_pos_t bit)
* Flip the whole bitset.
* @param bs The bitset.
*/
static INLINE void bitset_flip_all(bitset_t *bs)
static inline void bitset_flip_all(bitset_t *bs)
{
bitset_pos_t i;
for(i = 0; i < bs->units; i++)
......@@ -223,7 +223,7 @@ static INLINE void bitset_flip_all(bitset_t *bs)
* @param src The source bitset.
* @return The target bitset.
*/
static INLINE bitset_t *bitset_copy(bitset_t *tgt, const bitset_t *src)
static inline bitset_t *bitset_copy(bitset_t *tgt, const bitset_t *src)
{
bitset_pos_t tu = tgt->units;
bitset_pos_t su = src->units;
......@@ -242,7 +242,7 @@ static INLINE bitset_t *bitset_copy(bitset_t *tgt, const bitset_t *src)
* @return The next set bit from pos on, or -1, if no set bit was found
* after pos.
*/
static INLINE bitset_pos_t _bitset_next(const bitset_t *bs,
static inline bitset_pos_t _bitset_next(const bitset_t *bs,
bitset_pos_t pos, int set)
{
bitset_pos_t unit_number = pos / BS_UNIT_SIZE_BITS;
......@@ -315,7 +315,7 @@ static INLINE bitset_pos_t _bitset_next(const bitset_t *bs,
* @param bs The bitset.
* @return The number of bits set in the bitset.
*/
static INLINE unsigned bitset_popcnt(const bitset_t *bs)
static inline unsigned bitset_popcnt(const bitset_t *bs)
{
bitset_pos_t i;
bitset_unit_t *unit;
......@@ -332,7 +332,7 @@ static INLINE unsigned bitset_popcnt(const bitset_t *bs)
* This sets all bits to zero.
* @param bs The bitset.
*/
static INLINE bitset_t *bitset_clear_all(bitset_t *bs)
static inline bitset_t *bitset_clear_all(bitset_t *bs)
{
memset(BS_DATA(bs), 0, BS_UNIT_SIZE * bs->units);
return bs;
......@@ -343,7 +343,7 @@ static INLINE bitset_t *bitset_clear_all(bitset_t *bs)
* This sets all bits to one.
* @param bs The bitset.
*/
static INLINE bitset_t *bitset_set_all(bitset_t *bs)
static inline bitset_t *bitset_set_all(bitset_t *bs)
{
memset(BS_DATA(bs), -1, bs->units * BS_UNIT_SIZE);
return _bitset_mask_highest(bs);
......@@ -356,7 +356,7 @@ static INLINE bitset_t *bitset_set_all(bitset_t *bs)
* @param rhs Another bitset.
* @return 1, if all bits in lhs are also set in rhs, 0 otherwise.
*/
static INLINE int bitset_contains(const bitset_t *lhs, const bitset_t *rhs)
static inline int bitset_contains(const bitset_t *lhs, const bitset_t *rhs)
{
bitset_pos_t n = lhs->units < rhs->units ? lhs->units : rhs->units;
bitset_pos_t i;
......@@ -388,7 +388,7 @@ static INLINE int bitset_contains(const bitset_t *lhs, const bitset_t *rhs)
* @param bs The bitset.
* @return The same bitset.
*/
static INLINE void bitset_minus1(bitset_t *bs)
static inline void bitset_minus1(bitset_t *bs)
{
#define _SH (sizeof(bitset_unit_t) * 8 - 1)
......@@ -412,7 +412,7 @@ static INLINE void bitset_minus1(bitset_t *bs)
* @param b The second bitset.
* @return 1 if they have a bit in common, 0 if not.
*/
static INLINE int bitset_intersect(const bitset_t *a, const bitset_t *b)
static inline int bitset_intersect(const bitset_t *a, const bitset_t *b)
{
bitset_pos_t n = a->units < b->units ? a->units : b->units;
bitset_pos_t i;
......@@ -431,7 +431,7 @@ static INLINE int bitset_intersect(const bitset_t *a, const bitset_t *b)
* @param to The last index plus one to set to one.
* @param do_set If 1 the bits are set, if 0, they are cleared.
*/
static INLINE void bitset_mod_range(bitset_t *a, bitset_pos_t from, bitset_pos_t to, int do_set)
static inline void bitset_mod_range(bitset_t *a, bitset_pos_t from, bitset_pos_t to, int do_set)
{
bitset_pos_t from_unit, to_unit, i;
bitset_unit_t from_unit_mask, to_unit_mask;
......@@ -505,7 +505,7 @@ static INLINE void bitset_mod_range(bitset_t *a, bitset_pos_t from, bitset_pos_t
* @param a The bitset.
* @return 1, if the bitset is empty, 0 if not.
*/
static INLINE int bitset_is_empty(const bitset_t *a)
static inline int bitset_is_empty(const bitset_t *a)
{
bitset_pos_t i;
for (i = 0; i < a->units; ++i)
......@@ -520,7 +520,7 @@ static INLINE int bitset_is_empty(const bitset_t *a)
* @param file The stream.
* @param bs The bitset.
*/
static INLINE void bitset_fprint(FILE *file, const bitset_t *bs)
static inline void bitset_fprint(FILE *file, const bitset_t *bs)
{
const char *prefix = "";
int i;
......@@ -533,7 +533,7 @@ static INLINE void bitset_fprint(FILE *file, const bitset_t *bs)
putc('}', file);
}
static INLINE void bitset_debug_fprint(FILE *file, const bitset_t *bs)
static inline void bitset_debug_fprint(FILE *file, const bitset_t *bs)
{
bitset_pos_t i;
......@@ -548,7 +548,7 @@ static INLINE void bitset_debug_fprint(FILE *file, const bitset_t *bs)
* @param src The source bitset.
* @return the tgt set.