--- /dev/null
+#ifndef UAE_INLINE_H
+#define UAE_INLINE_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+// FIXME: could be named funcattr.h or something, perhaps
+// FIXME: move regparams here?
+
+#if defined(HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE)
+#define UAE_STATIC_INLINE static __inline__ __attribute__ ((always_inline))
+#elif defined(_MSC_VER)
+#define UAE_STATIC_INLINE static __forceinline
+#else
+#define UAE_STATIC_INLINE static inline
+#endif
+
+#if defined(HAVE_FUNC_ATTRIBUTE_NOINLINE)
+#define UAE_NOINLINE __attribute__ ((noinline))
+#elif defined(_MSC_VER)
+#define UAE_NOINLINE __declspec(noinline)
+#else
+#define UAE_NOINLINE
+#endif
+
+#if defined(HAVE_FUNC_ATTRIBUTE_NORETURN)
+#define UAE_NORETURN __attribute__ ((noreturn))
+#elif defined(_MSC_VER)
+#define UAE_NORETURN __declspec(noreturn)
+#else
+#define UAE_NORETURN
+#endif
+
+#ifndef STATIC_INLINE
+#define STATIC_INLINE UAE_STATIC_INLINE
+#endif
+
+#ifndef NOINLINE
+#define NOINLINE UAE_NOINLINE
+#endif
+
+#ifndef NORETURN
+#define NORETURN UAE_NORETURN
+#endif
+
+#endif /* UAE_INLINE_H */
-
-
+#include "uae/inline.h"
+#include "uae/likely.h"
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#define tostring(s) #s
#endif
-#ifndef likely
-#if __GNUC__ < 3
-#define __builtin_expect(x, n) (x)
-#endif
-#define likely(x) __builtin_expect(!!(x), 1)
-#define unlikely(x) __builtin_expect(!!(x), 0)
-#endif
-
typedef int ssize_t;
#ifdef _MSC_VER
#include "slirp_config.h"
#ifdef _WIN32
-# include <stdint.h>
+#include <stdint.h>
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;