diff options
-rw-r--r-- | include/my_atomic.h | 10 | ||||
-rw-r--r-- | include/my_bit.h | 6 | ||||
-rw-r--r-- | mysys/my_create.c | 1 | ||||
-rw-r--r-- | mysys/my_delete.c | 1 |
4 files changed, 11 insertions, 7 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h index a1347d26401..ed439e5fe87 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -35,7 +35,7 @@ #ifdef HAVE_INLINE #define make_atomic_add(S) \ -static inline int ## S my_atomic_add ## S( \ +STATIC_INLINE int ## S my_atomic_add ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_add_body(S); \ @@ -43,7 +43,7 @@ static inline int ## S my_atomic_add ## S( \ } #define make_atomic_swap(S) \ -static inline int ## S my_atomic_swap ## S( \ +STATIC_INLINE int ## S my_atomic_swap ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_swap_body(S); \ @@ -51,7 +51,7 @@ static inline int ## S my_atomic_swap ## S( \ } #define make_atomic_cas(S) \ -static inline int my_atomic_cas ## S(int ## S volatile *a, \ +STATIC_INLINE int my_atomic_cas ## S(int ## S volatile *a, \ int ## S *cmp, int ## S set) \ { \ int8 ret; \ @@ -60,7 +60,7 @@ static inline int my_atomic_cas ## S(int ## S volatile *a, \ } #define make_atomic_load(S) \ -static inline int ## S my_atomic_load ## S(int ## S volatile *a) \ +STATIC_INLINE int ## S my_atomic_load ## S(int ## S volatile *a) \ { \ int ## S ret; \ make_atomic_load_body(S); \ @@ -68,7 +68,7 @@ static inline int ## S my_atomic_load ## S(int ## S volatile *a) \ } #define make_atomic_store(S) \ -static inline void my_atomic_store ## S( \ +STATIC_INLINE void my_atomic_store ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_store_body(S); \ diff --git a/include/my_bit.h b/include/my_bit.h index 58e8bb39683..2e464e89049 100644 --- a/include/my_bit.h +++ b/include/my_bit.h @@ -2,6 +2,7 @@ Some useful bit functions */ +C_MODE_START #ifdef HAVE_INLINE extern const char _my_bits_nbits[256]; @@ -97,11 +98,12 @@ STATIC_INLINE uint32 my_reverse_bits(uint32 key) _my_bits_reverse_table[(key>>24) ]; } -#else +#else /* HAVE_INLINE */ extern uint my_bit_log2(ulong value); extern uint32 my_round_up_to_next_power(uint32 v); uint32 my_clear_highest_bit(uint32 v); uint32 my_reverse_bits(uint32 key); extern uint my_count_bits(ulonglong v); extern uint my_count_bits_ushort(ushort v); -#endif +#endif /* HAVE_INLINE */ +C_MODE_END diff --git a/mysys/my_create.c b/mysys/my_create.c index 454ccf6ab7d..7c97ef0201a 100644 --- a/mysys/my_create.c +++ b/mysys/my_create.c @@ -17,6 +17,7 @@ #include <my_dir.h> #include "mysys_err.h" #include <errno.h> +#include <my_sys.h> #if defined(__WIN__) #include <share.h> #endif diff --git a/mysys/my_delete.c b/mysys/my_delete.c index 14374fd3fa8..6487ab4d6b8 100644 --- a/mysys/my_delete.c +++ b/mysys/my_delete.c @@ -15,6 +15,7 @@ #include "mysys_priv.h" #include "mysys_err.h" +#include <my_sys.h> int my_delete(const char *name, myf MyFlags) { |