diff --git a/Makefile b/Makefile index 92d67c2d..6dc7d154 100644 --- a/Makefile +++ b/Makefile @@ -352,7 +352,7 @@ ifeq ($(SINGLE_THREAD), 1) COREFLAGS += -DSINGLE_THREAD endif -COREFLAGS += -D__LIBRETRO__ -DINLINE="inline" -DM64P_PLUGIN_API -DM64P_CORE_PROTOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY +COREFLAGS += -D__LIBRETRO__ -DM64P_PLUGIN_API -DM64P_CORE_PROTOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY ifeq ($(HAVE_OPENGL),1) diff --git a/gles2n64/src/3DMath.h b/gles2n64/src/3DMath.h index f6c48878..96736c8f 100644 --- a/gles2n64/src/3DMath.h +++ b/gles2n64/src/3DMath.h @@ -1,10 +1,12 @@ #ifndef _3DMATH_H #define _3DMATH_H -#include #include +#include #include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/gles2n64/src/RDP.c b/gles2n64/src/RDP.c index a7b3d9b4..2e23a8d3 100644 --- a/gles2n64/src/RDP.c +++ b/gles2n64/src/RDP.c @@ -1,6 +1,8 @@ #include #include +#include + #include "N64.h" #include "RSP.h" #include "GBI.h" diff --git a/gles2n64/src/Textures.h b/gles2n64/src/Textures.h index a7528e6d..03b9efe9 100644 --- a/gles2n64/src/Textures.h +++ b/gles2n64/src/Textures.h @@ -1,6 +1,8 @@ #ifndef TEXTURES_H #define TEXTURES_H +#include + #include #include "convert.h" diff --git a/gles2n64/src/convert.h b/gles2n64/src/convert.h index adfeff51..1d52a6fc 100644 --- a/gles2n64/src/convert.h +++ b/gles2n64/src/convert.h @@ -1,6 +1,9 @@ #ifndef CONVERT_H #define CONVERT_H +#include +#include + #if !defined(__MACH__) && !defined(__ppc__) && defined(__GNUC__) #define HAVE_BSWAP #endif @@ -8,7 +11,6 @@ #ifdef HAVE_BSWAP #define bswap_32 __builtin_bswap32 #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) -#include #define bswap_32(x) _byteswap_ulong(x) #else #define bswap_32(x) (((x) << 24) & 0xff000000) \ diff --git a/glide2gl/src/Glide64/MiClWr.c b/glide2gl/src/Glide64/MiClWr.c index 0d54fdf6..270e746b 100644 --- a/glide2gl/src/Glide64/MiClWr.c +++ b/glide2gl/src/Glide64/MiClWr.c @@ -39,6 +39,8 @@ #include #include +#include + /* 8-bit Horizontal Mirror */ static void Mirror8bS (uint8_t *tex, uint32_t mask, uint32_t max_width, uint32_t real_width, uint32_t height) diff --git a/glide2gl/src/Glide64/rdp.h b/glide2gl/src/Glide64/rdp.h index db1c4c22..ddd650b2 100644 --- a/glide2gl/src/Glide64/rdp.h +++ b/glide2gl/src/Glide64/rdp.h @@ -40,6 +40,8 @@ #ifndef RDP_H #define RDP_H +#include + #include "rdp_common/gdp.h" #include "Gfx_1.3.h" #include "../Glitch64/glide.h" diff --git a/libretro/brumme_crc.c b/libretro/brumme_crc.c index 44fc1ace..7c1e6a17 100644 --- a/libretro/brumme_crc.c +++ b/libretro/brumme_crc.c @@ -49,7 +49,9 @@ #include #include -#include + +#include +#include #ifdef _MSC_VER typedef unsigned __int8 uint8_t; diff --git a/mupen64plus-core/src/main/list.h b/mupen64plus-core/src/main/list.h index 7c62bd41..d2436ef8 100644 --- a/mupen64plus-core/src/main/list.h +++ b/mupen64plus-core/src/main/list.h @@ -27,60 +27,60 @@ extern "C" { #endif #include -#include "osal/preproc.h" + +#include struct list_head { struct list_head *prev; struct list_head *next; }; -#define LIST_HEAD(list) \ - struct list_head list = { &(list), &(list) } +#define LIST_HEAD(list) struct list_head list = { &(list), &(list) } -static osal_inline void INIT_LIST_HEAD(struct list_head *head) +static INLINE void INIT_LIST_HEAD(struct list_head *head) { - head->next = head; - head->prev = head; + head->next = head; + head->prev = head; } -static osal_inline void list_add(struct list_head *new_item, struct list_head *head) +static INLINE void list_add(struct list_head *new_item, struct list_head *head) { - struct list_head *next = head->next; + struct list_head *next = head->next; - next->prev = new_item; - new_item->next = next; - new_item->prev = head; - head->next = new_item; + next->prev = new_item; + new_item->next = next; + new_item->prev = head; + head->next = new_item; } -static osal_inline void list_add_tail(struct list_head *new_item, struct list_head *head) +static INLINE void list_add_tail(struct list_head *new_item, struct list_head *head) { - struct list_head *prev = head->prev; + struct list_head *prev = head->prev; - prev->next = new_item; - new_item->next = head; - new_item->prev = prev; - head->prev = new_item; + prev->next = new_item; + new_item->next = head; + new_item->prev = prev; + head->prev = new_item; } -static osal_inline void list_del(struct list_head *entry) +static INLINE void list_del(struct list_head *entry) { - struct list_head *next = entry->next; - struct list_head *prev = entry->prev; + struct list_head *next = entry->next; + struct list_head *prev = entry->prev; - next->prev = prev; - prev->next = next; + next->prev = prev; + prev->next = next; } -static osal_inline void list_del_init(struct list_head *entry) +static INLINE void list_del_init(struct list_head *entry) { - list_del(entry); - INIT_LIST_HEAD(entry); + list_del(entry); + INIT_LIST_HEAD(entry); } -static osal_inline int list_empty(const struct list_head *head) +static INLINE int list_empty(const struct list_head *head) { - return (head->next == head); + return (head->next == head); } #ifdef __GNUC__ diff --git a/mupen64plus-core/src/main/util.h b/mupen64plus-core/src/main/util.h index f25bde57..e31e8311 100644 --- a/mupen64plus-core/src/main/util.h +++ b/mupen64plus-core/src/main/util.h @@ -28,7 +28,8 @@ extern "C" { #endif #include -#include "osal/preproc.h" + +#include /********************** Byte swap utilities @@ -43,42 +44,42 @@ extern "C" { #define BUILTIN_BSWAP64 _byteswap_uint64 #endif -static osal_inline unsigned short m64p_swap16(unsigned short x) +static INLINE unsigned short m64p_swap16(unsigned short x) { - #ifdef BUILTIN_BSWAP16 - return BUILTIN_BSWAP16(x); - #else - return ((x & 0x00FF) << 8) | - ((x & 0xFF00) >> 8); - #endif +#ifdef BUILTIN_BSWAP16 + return BUILTIN_BSWAP16(x); +#else + return ((x & 0x00FF) << 8) | + ((x & 0xFF00) >> 8); +#endif } -static osal_inline unsigned int m64p_swap32(unsigned int x) +static INLINE unsigned int m64p_swap32(unsigned int x) { - #ifdef BUILTIN_BSWAP32 - return BUILTIN_BSWAP32(x); // long is always 32-bit in Windows - #else - return ((x & 0x000000FF) << 24) | - ((x & 0x0000FF00) << 8) | - ((x & 0x00FF0000) >> 8) | - ((x & 0xFF000000) >> 24); - #endif +#ifdef BUILTIN_BSWAP32 + return BUILTIN_BSWAP32(x); // long is always 32-bit in Windows +#else + return ((x & 0x000000FF) << 24) | + ((x & 0x0000FF00) << 8) | + ((x & 0x00FF0000) >> 8) | + ((x & 0xFF000000) >> 24); +#endif } -static osal_inline unsigned long long int m64p_swap64(unsigned long long int x) +static INLINE unsigned long long int m64p_swap64(unsigned long long int x) { - #ifdef BUILTIN_BSWAP64 - return BUILTIN_BSWAP64(x); - #else - return ((x & 0x00000000000000FFULL) << 56) | - ((x & 0x000000000000FF00ULL) << 40) | - ((x & 0x0000000000FF0000ULL) << 24) | - ((x & 0x00000000FF000000ULL) << 8) | - ((x & 0x000000FF00000000ULL) >> 8) | - ((x & 0x0000FF0000000000ULL) >> 24) | - ((x & 0x00FF000000000000ULL) >> 40) | - ((x & 0xFF00000000000000ULL) >> 56); - #endif +#ifdef BUILTIN_BSWAP64 + return BUILTIN_BSWAP64(x); +#else + return ((x & 0x00000000000000FFULL) << 56) | + ((x & 0x000000000000FF00ULL) << 40) | + ((x & 0x0000000000FF0000ULL) << 24) | + ((x & 0x00000000FF000000ULL) << 8) | + ((x & 0x000000FF00000000ULL) >> 8) | + ((x & 0x0000FF0000000000ULL) >> 24) | + ((x & 0x00FF000000000000ULL) >> 40) | + ((x & 0xFF00000000000000ULL) >> 56); +#endif } #ifdef MSB_FIRST diff --git a/mupen64plus-core/src/osal/preproc.h b/mupen64plus-core/src/osal/preproc.h index 75bc8226..acbc36cf 100644 --- a/mupen64plus-core/src/osal/preproc.h +++ b/mupen64plus-core/src/osal/preproc.h @@ -35,7 +35,6 @@ #endif #define ALIGN(BYTES,DATA) __declspec(align(BYTES)) DATA - #define osal_inline __inline /* string functions */ #define osal_insensitive_strcmp(x, y) _stricmp(x, y) @@ -54,7 +53,6 @@ // macros #define OSAL_BREAKPOINT_INTERRUPT __asm__(" int $3; "); #define ALIGN(BYTES,DATA) DATA __attribute__((aligned(BYTES))) - #define osal_inline inline // string functions #define osal_insensitive_strcmp(x, y) strcasecmp(x, y) diff --git a/mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h b/mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h index 712999a3..45262205 100644 --- a/mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h +++ b/mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h @@ -30,6 +30,8 @@ #include #include +#include + #ifdef __x86_64__ extern int64_t reg[32]; typedef uint64_t native_type; diff --git a/mupen64plus-core/src/rdp_common/gdp.c b/mupen64plus-core/src/rdp_common/gdp.c index 6bd5eb34..8ac877b7 100644 --- a/mupen64plus-core/src/rdp_common/gdp.c +++ b/mupen64plus-core/src/rdp_common/gdp.c @@ -1,4 +1,3 @@ - #include "gdp.h" #include "../plugin/plugin.h" diff --git a/mupen64plus-core/src/rdp_common/gdp.h b/mupen64plus-core/src/rdp_common/gdp.h index d3fc8ca6..3520a83c 100644 --- a/mupen64plus-core/src/rdp_common/gdp.h +++ b/mupen64plus-core/src/rdp_common/gdp.h @@ -3,6 +3,8 @@ #include +#include + #ifndef DP_INTERRUPT #define DP_INTERRUPT 0x20 #endif diff --git a/mupen64plus-rsp-cxd4/rsp.c b/mupen64plus-rsp-cxd4/rsp.c index 68e7ed5f..e1673a72 100644 --- a/mupen64plus-rsp-cxd4/rsp.c +++ b/mupen64plus-rsp-cxd4/rsp.c @@ -14,6 +14,8 @@ unsigned char rsp_conf[32]; +#include + #include "config.h" #include diff --git a/mupen64plus-rsp-hle/src/arithmetics.h b/mupen64plus-rsp-hle/src/arithmetics.h index f4b7a4a3..a939e82c 100644 --- a/mupen64plus-rsp-hle/src/arithmetics.h +++ b/mupen64plus-rsp-hle/src/arithmetics.h @@ -22,6 +22,8 @@ #ifndef ARITHMETICS_H #define ARITHMETICS_H +#include + #include static INLINE int16_t clamp_s16(int_fast32_t x) diff --git a/mupen64plus-rsp-hle/src/memory.h b/mupen64plus-rsp-hle/src/memory.h index b703de34..2b431fc9 100644 --- a/mupen64plus-rsp-hle/src/memory.h +++ b/mupen64plus-rsp-hle/src/memory.h @@ -27,6 +27,8 @@ #include #include +#include + #include "hle_internal.h" #ifdef MSB_FIRST diff --git a/mupen64plus-video-angrylion/z64.h b/mupen64plus-video-angrylion/z64.h index 479b1ca1..de189676 100644 --- a/mupen64plus-video-angrylion/z64.h +++ b/mupen64plus-video-angrylion/z64.h @@ -4,6 +4,8 @@ #include #include +#include + typedef uint64_t UINT64; typedef int64_t INT64; typedef uint32_t UINT32;