diff --git a/audio/drivers/xaudio.h b/audio/drivers/xaudio.h index 38c8fbf144..b2f2cb74cc 100644 --- a/audio/drivers/xaudio.h +++ b/audio/drivers/xaudio.h @@ -20,6 +20,8 @@ #ifndef XAUDIO2_STRIPPED_H #define XAUDIO2_STRIPPED_H +#include + // All structures defined in this file use tight field packing #pragma pack(push, 1) #define X2DEFAULT(x) = (x) @@ -254,7 +256,7 @@ DECLARE_INTERFACE_(IXAudio2, IUnknown) STDAPI XAudio2Create(__deref_out IXAudio2** ppXAudio2, UINT32 Flags X2DEFAULT(0), XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR)); #else -static inline HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32, XAUDIO2_PROCESSOR) +static INLINE HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32, XAUDIO2_PROCESSOR) { IXAudio2 *pXAudio2; diff --git a/frontend/drivers/platform_android.c b/frontend/drivers/platform_android.c index 1830a95087..07a7ebcfd5 100644 --- a/frontend/drivers/platform_android.c +++ b/frontend/drivers/platform_android.c @@ -24,6 +24,7 @@ #include "platform_android.h" #include "../../general.h" +#include struct android_app *g_android; static pthread_key_t thread_key; @@ -153,7 +154,7 @@ void engine_handle_cmd(void *data) } } -static inline void android_app_write_cmd(void *data, int8_t cmd) +static INLINE void android_app_write_cmd(void *data, int8_t cmd) { struct android_app *android_app = (struct android_app*)data; diff --git a/gfx/drivers/gx_gfx_inl.h b/gfx/drivers/gx_gfx_inl.h index 8a1b1b591a..a86f5097a3 100644 --- a/gfx/drivers/gx_gfx_inl.h +++ b/gfx/drivers/gx_gfx_inl.h @@ -1,3 +1,5 @@ +#include + #define STRUCT_REGDEF_SIZE 1440 #define WGPIPE (0xCC008000) @@ -357,7 +359,7 @@ static void __SETVCDATTR(struct __gx_regdef *__gx, u8 attr,u8 type) FIFO_PUTU16(vtxcnt) #ifdef HW_DOL -static inline void __GX_UpdateBPMask(struct __gx_regdef *__gx) +static INLINE void __GX_UpdateBPMask(struct __gx_regdef *__gx) { u32 i, nbmp, nres; u8 ntexmap; @@ -414,7 +416,7 @@ static inline void __GX_UpdateBPMask(struct __gx_regdef *__gx) GX_LOAD_XF_REG(0x100d,__gx->chnMatColor[1]); \ } -static inline void __GX_SetTexCoordGen(struct __gx_regdef *__gx) +static INLINE void __GX_SetTexCoordGen(struct __gx_regdef *__gx) { u32 i,mask; u32 texcoord; @@ -459,7 +461,7 @@ static void __SetSURegs(struct __gx_regdef *__gx, u8 texmap,u8 texcoord) GX_LOAD_BP_REG(__gx->suTsize[reg]); } -static inline void __GX_SetSUTexRegs(struct __gx_regdef *__gx) +static INLINE void __GX_SetSUTexRegs(struct __gx_regdef *__gx) { u32 i, indtev, dirtev, tevreg, tevm, texcm; u8 texcoord, texmap; @@ -747,7 +749,7 @@ static void __GX_SendFlushPrim(struct __gx_regdef *__gx) #define Y_FACTOR 342.0 #define ZFACTOR 16777215.0 -static inline void __GX_SetViewportJitter(f32 xOrig,f32 yOrig,f32 wd,f32 ht,f32 nearZ,f32 farZ,u32 field) +static INLINE void __GX_SetViewportJitter(f32 xOrig,f32 yOrig,f32 wd,f32 ht,f32 nearZ,f32 farZ,u32 field) { f32 x0,y0,x1,y1,n,f,z; static f32 Xfactor = 0.5; diff --git a/gfx/gl_common.h b/gfx/gl_common.h index 6b024ce458..30ed555f62 100644 --- a/gfx/gl_common.h +++ b/gfx/gl_common.h @@ -24,6 +24,7 @@ #include "font_gl_driver.h" #include #include "video_shader_driver.h" +#include #ifdef HAVE_CONFIG_H #include "../config.h" @@ -361,7 +362,7 @@ typedef struct gl GLuint vao; } gl_t; -static inline bool gl_check_error(void) +static INLINE bool gl_check_error(void) { int error = glGetError(); switch (error) diff --git a/hash.h b/hash.h index 49b5363064..8d3d23c58b 100644 --- a/hash.h +++ b/hash.h @@ -48,6 +48,8 @@ #include "config.h" #endif +#include + /** * sha256_hash: * @out : Output. @@ -61,12 +63,12 @@ void sha256_hash(char *out, const uint8_t *in, size_t size); #ifdef HAVE_ZLIB #include -static inline uint32_t crc32_calculate(const uint8_t *data, size_t length) +static INLINE uint32_t crc32_calculate(const uint8_t *data, size_t length) { return crc32(0, data, length); } -static inline uint32_t crc32_adjust(uint32_t crc, uint8_t data) +static INLINE uint32_t crc32_adjust(uint32_t crc, uint8_t data) { /* zlib and nall have different * assumptions on "sign" for this function. */ diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 6040a77fed..a3ecc97858 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -27,6 +27,8 @@ #include "../../general.h" #include "../../driver.h" +#include + #define MAX_TOUCH 16 #define MAX_PADS 8 @@ -325,7 +327,7 @@ static void *android_input_init(void) static int zeus_id = -1; static int zeus_second_id = -1; -static inline int android_input_poll_event_type_motion( +static INLINE int android_input_poll_event_type_motion( android_input_t *android, AInputEvent *event, int port, int source) { @@ -379,7 +381,7 @@ static inline int android_input_poll_event_type_motion( return 0; } -static inline void android_input_poll_event_type_key( +static INLINE void android_input_poll_event_type_key( android_input_t *android, struct android_app *android_app, AInputEvent *event, int port, int keycode, int source, int type_event, int *handled) diff --git a/input/drivers_joypad/gx_input_sicksaxis.c b/input/drivers_joypad/gx_input_sicksaxis.c index 01caf3f33c..95af8f5608 100644 --- a/input/drivers_joypad/gx_input_sicksaxis.c +++ b/input/drivers_joypad/gx_input_sicksaxis.c @@ -3,6 +3,8 @@ #include #include +#include + static uint8_t ATTRIBUTE_ALIGN(32) _ss_attributes_payload[] = { 0x52, @@ -181,13 +183,13 @@ static int _ss_send_attributes_payload(struct ss_device *dev) NULL, NULL); } -inline int ss_set_led(struct ss_device *dev, int led) +static INLINE int ss_set_led(struct ss_device *dev, int led) { dev->attributes.led = led; return _ss_send_attributes_payload(dev); } -inline int ss_set_rumble(struct ss_device *dev, uint8_t duration_right, +static INLINE int ss_set_rumble(struct ss_device *dev, uint8_t duration_right, uint8_t power_right, uint8_t duration_left, uint8_t power_left) { dev->attributes.rumble.duration_right = duration_right; diff --git a/input/drivers_joypad/ps3_input_joypad.c b/input/drivers_joypad/ps3_input_joypad.c index 5872262fc9..e3075f6411 100644 --- a/input/drivers_joypad/ps3_input_joypad.c +++ b/input/drivers_joypad/ps3_input_joypad.c @@ -16,6 +16,8 @@ #include "../input_autodetect.h" +#include + static uint64_t pad_state[MAX_PADS]; static int16_t analog_state[MAX_PADS][2][2]; static unsigned pads_connected; @@ -23,7 +25,7 @@ static unsigned pads_connected; sensor_t accelerometer_state[MAX_PADS]; #endif -static inline int16_t convert_u8_to_s16(uint8_t val) +static INLINE int16_t convert_u8_to_s16(uint8_t val) { if (val == 0) return -0x7fff; diff --git a/input/drivers_joypad/udev_joypad.c b/input/drivers_joypad/udev_joypad.c index e14a708d60..05a34fdffa 100644 --- a/input/drivers_joypad/udev_joypad.c +++ b/input/drivers_joypad/udev_joypad.c @@ -30,6 +30,8 @@ #include #include +#include + /* Udev/evdev Linux joypad driver. * More complex and extremely low level, * but only Linux driver which can support joypad rumble. @@ -74,7 +76,7 @@ static struct udev *g_udev; static struct udev_monitor *g_udev_mon; static struct udev_joypad udev_pads[MAX_USERS]; -static inline int16_t compute_axis(const struct input_absinfo *info, int value) +static INLINE int16_t compute_axis(const struct input_absinfo *info, int value) { int range = info->maximum - info->minimum; int axis = (value - info->minimum) * 0xffffll / range - 0x7fffll; diff --git a/input/drivers_joypad/winxinput_joypad.c b/input/drivers_joypad/winxinput_joypad.c index a0d85901c7..92577612e9 100644 --- a/input/drivers_joypad/winxinput_joypad.c +++ b/input/drivers_joypad/winxinput_joypad.c @@ -30,6 +30,8 @@ #include #include +#include + /* Check if the definitions do not already exist. * Official and mingw xinput headers have different include guards. */ @@ -120,7 +122,7 @@ static XINPUT_VIBRATION g_xinput_rumble_states[4]; static winxinput_joypad_state g_winxinput_states[4]; -static inline int pad_index_to_xuser_index(unsigned pad) +static INLINE int pad_index_to_xuser_index(unsigned pad) { return g_xinput_pad_indexes[pad]; } diff --git a/input/input_joypad.h b/input/input_joypad.h index f2d670c9f3..79f5fdc144 100644 --- a/input/input_joypad.h +++ b/input/input_joypad.h @@ -23,6 +23,7 @@ extern "C" { #include #include "../driver.h" +#include /** * input_conv_analog_id_to_bind_id: @@ -40,7 +41,7 @@ extern "C" { * Takes as input analog key identifiers and converts * them to corresponding bind IDs @ident_minus and @ident_plus. **/ -static inline void input_conv_analog_id_to_bind_id(unsigned idx, unsigned ident, +static INLINE void input_conv_analog_id_to_bind_id(unsigned idx, unsigned ident, unsigned *ident_minus, unsigned *ident_plus) { switch ((idx << 1) | ident) diff --git a/input/keyboard_event_x11.c b/input/keyboard_event_x11.c index dd035e273f..263ca09d6d 100644 --- a/input/keyboard_event_x11.c +++ b/input/keyboard_event_x11.c @@ -26,8 +26,9 @@ #include "../driver.h" #include "keyboard_line.h" #include "input_keymaps.h" +#include -static inline unsigned leading_ones(uint8_t c) +static INLINE unsigned leading_ones(uint8_t c) { unsigned ones = 0; while (c & 0x80) diff --git a/logger/ios_logger_override.h b/logger/ios_logger_override.h index e75c1df80c..a39c079031 100644 --- a/logger/ios_logger_override.h +++ b/logger/ios_logger_override.h @@ -26,8 +26,9 @@ #endif #include +#include -static inline void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap) +static INLINE void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap) { #if TARGET_IPHONE_SIMULATOR vprintf(fmt, ap); @@ -41,7 +42,7 @@ static inline void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap) #endif } -static inline void RARCH_LOG(const char *fmt, ...) +static INLINE void RARCH_LOG(const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -49,13 +50,13 @@ static inline void RARCH_LOG(const char *fmt, ...) va_end(ap); } -static inline void RARCH_LOG_OUTPUT_V(const char *tag, +static INLINE void RARCH_LOG_OUTPUT_V(const char *tag, const char *fmt, va_list ap) { RARCH_LOG_V(tag, fmt, ap); } -static inline void RARCH_LOG_OUTPUT(const char *fmt, ...) +static INLINE void RARCH_LOG_OUTPUT(const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -63,12 +64,12 @@ static inline void RARCH_LOG_OUTPUT(const char *fmt, ...) va_end(ap); } -static inline void RARCH_WARN_V(const char *tag, const char *fmt, va_list ap) +static INLINE void RARCH_WARN_V(const char *tag, const char *fmt, va_list ap) { RARCH_LOG_V(tag, fmt, ap); } -static inline void RARCH_WARN(const char *fmt, ...) +static INLINE void RARCH_WARN(const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -76,12 +77,12 @@ static inline void RARCH_WARN(const char *fmt, ...) va_end(ap); } -static inline void RARCH_ERR_V(const char *tag, const char *fmt, va_list ap) +static INLINE void RARCH_ERR_V(const char *tag, const char *fmt, va_list ap) { RARCH_LOG_V(tag, fmt, ap); } -static inline void RARCH_ERR(const char *fmt, ...) +static INLINE void RARCH_ERR(const char *fmt, ...) { va_list ap; va_start(ap, fmt); diff --git a/menu/menu_entries_cbs_iterate.c b/menu/menu_entries_cbs_iterate.c index 99411fc9a7..f327d1de4c 100644 --- a/menu/menu_entries_cbs_iterate.c +++ b/menu/menu_entries_cbs_iterate.c @@ -14,6 +14,7 @@ */ #include +#include #include "menu.h" #include "menu_entries_cbs.h" #include "menu_setting.h" @@ -140,7 +141,7 @@ static int load_or_open_zip_iterate(unsigned action) return 0; } -static inline struct video_shader *shader_manager_get_current_shader(const char *label, unsigned type) +static INLINE struct video_shader *shader_manager_get_current_shader(const char *label, unsigned type) { menu_handle_t *menu = menu_driver_resolve(); if (!menu) diff --git a/menu/menu_list.c b/menu/menu_list.c index a1a004eba2..f72e1ed0f6 100644 --- a/menu/menu_list.c +++ b/menu/menu_list.c @@ -20,6 +20,7 @@ #include "menu_navigation.h" #include "menu_entries.h" #include +#include /** * Before a refresh, we could have deleted a @@ -53,7 +54,7 @@ static void menu_entries_refresh(file_list_t *list) * * Returns: true (1) if entry is a directory, otherwise false (0). **/ -static inline bool menu_entries_list_elem_is_dir(file_list_t *list, +static INLINE bool menu_entries_list_elem_is_dir(file_list_t *list, unsigned offset) { const char *path = NULL; @@ -75,7 +76,7 @@ static inline bool menu_entries_list_elem_is_dir(file_list_t *list, * * Returns: first character of element in file list. **/ -static inline int menu_entries_list_get_first_char( +static INLINE int menu_entries_list_get_first_char( file_list_t *list, unsigned offset) { int ret; diff --git a/performance/performance_android.c b/performance/performance_android.c index 27651c8655..d98898f29c 100644 --- a/performance/performance_android.c +++ b/performance/performance_android.c @@ -56,6 +56,8 @@ #include #include +#include + static pthread_once_t g_once; static AndroidCpuFamily g_cpuFamily; static uint64_t g_cpuFeatures; @@ -70,7 +72,7 @@ static int g_cpuCount; #endif #ifdef __i386__ -static __inline__ void cpu_x86_cpuid(int func, int values[4]) +static INLINE void cpu_x86_cpuid(int func, int values[4]) { int a, b, c, d; /* We need to preserve ebx since we're compiling PIC code */ diff --git a/wii/mem2_manager.c b/wii/mem2_manager.c index 3bd212d54f..22bad62a13 100644 --- a/wii/mem2_manager.c +++ b/wii/mem2_manager.c @@ -10,34 +10,35 @@ #include #include #include "mem2_manager.h" +#include // Forbid the use of MEM2 through malloc u32 MALLOC_MEM2 = 0; /*** from libogc (lwp_heap.inl) ****/ -static inline heap_block *__lwp_heap_blockat(heap_block *block, u32 offset) +static INLINE heap_block *__lwp_heap_blockat(heap_block *block, u32 offset) { return (heap_block *) ((char *) block + offset); } -static inline heap_block *__lwp_heap_usrblockat(void *ptr) +static INLINE heap_block *__lwp_heap_usrblockat(void *ptr) { u32 offset = *(((u32 *) ptr) - 1); return __lwp_heap_blockat(ptr, -offset + -HEAP_BLOCK_USED_OVERHEAD); } -static inline bool __lwp_heap_blockin(heap_cntrl *heap, heap_block *block) +static INLINE bool __lwp_heap_blockin(heap_cntrl *heap, heap_block *block) { return ((u32) block >= (u32) heap->start && (u32) block <= (u32) heap->final); } -static inline bool __lwp_heap_blockfree(heap_block *block) +static INLINE bool __lwp_heap_blockfree(heap_block *block) { return !(block->front_flag & HEAP_BLOCK_USED); } -static inline u32 __lwp_heap_blocksize(heap_block *block) +static INLINE u32 __lwp_heap_blocksize(heap_block *block) { return (block->front_flag & ~HEAP_BLOCK_USED); } diff --git a/wii/vi_encoder.c b/wii/vi_encoder.c index b2fdf3729b..cb2e76572d 100644 --- a/wii/vi_encoder.c +++ b/wii/vi_encoder.c @@ -41,6 +41,7 @@ #include #include #include "../gfx/drivers/ppc_asm.h" +#include #include "vi_encoder.h" @@ -60,20 +61,20 @@ static u32 i2cIdentFirst = 0; static u32 i2cIdentFlag = 1; static vu32* const _i2cReg = (u32*)0xCD800000; -static inline void __viOpenI2C(u32 channel) +static INLINE void __viOpenI2C(u32 channel) { u32 val = ((_i2cReg[49]&~0x8000)|0x4000); val |= _SHIFTL(channel,15,1); _i2cReg[49] = val; } -static inline void __viSetSCL(u32 channel) +static INLINE void __viSetSCL(u32 channel) { u32 val = (_i2cReg[48]&~0x4000); val |= _SHIFTL(channel,14,1); _i2cReg[48] = val; } -static inline void __viSetSDA(u32 channel) +static INLINE void __viSetSDA(u32 channel) { u32 val = (_i2cReg[48]&~0x8000); val |= _SHIFTL(channel,15,1); diff --git a/xdk/xdk_resources.cpp b/xdk/xdk_resources.cpp index f3de97e2f2..1e775d6343 100644 --- a/xdk/xdk_resources.cpp +++ b/xdk/xdk_resources.cpp @@ -15,6 +15,7 @@ #include #include "xdk_resources.h" +#include #ifdef _XBOX360 struct XPR_HEADER @@ -46,7 +47,7 @@ PackedResource::~PackedResource() Destroy(); } -void *PackedResource::GetData( const char *strName ) const +void *PackedResource::GetData(const char *strName) const { if (m_pResourceTags == NULL || strName == NULL) return NULL; @@ -64,7 +65,7 @@ void *PackedResource::GetData( const char *strName ) const return NULL; } -static inline void* AllocateContiguousMemory( DWORD Size, DWORD Alignment) +static INLINE void* AllocateContiguousMemory(DWORD Size, DWORD Alignment) { #if defined(_XBOX1) return D3D_AllocContiguousMemory(Size, Alignment); @@ -74,7 +75,7 @@ static inline void* AllocateContiguousMemory( DWORD Size, DWORD Alignment) #endif } -static inline void FreeContiguousMemory( void* pData ) +static INLINE void FreeContiguousMemory(void* pData) { #if defined(_XBOX1) return D3D_FreeContiguousMemory(pData); @@ -87,7 +88,7 @@ static inline void FreeContiguousMemory( void* pData ) #ifdef _XBOX1 char g_strMediaPath[512] = "D:\\Media\\"; -static HRESULT FindMediaFile( char *strPath, const char *strFilename, size_t strPathsize) +static HRESULT FindMediaFile(char *strPath, const char *strFilename, size_t strPathsize) { // Check for valid arguments if( strFilename == NULL || strPath == NULL ) @@ -123,10 +124,10 @@ static HRESULT FindMediaFile( char *strPath, const char *strFilename, size_t str #endif #if defined(_XBOX1) -HRESULT PackedResource::Create( const char *strFilename, +HRESULT PackedResource::Create(const char *strFilename, DWORD dwNumResourceTags, XBRESOURCE* pResourceTags) #elif defined(_XBOX360) -HRESULT PackedResource::Create( const char *strFilename ) +HRESULT PackedResource::Create(const char *strFilename) #endif { #ifdef _XBOX1 @@ -269,8 +270,8 @@ HRESULT PackedResource::Create( const char *strFilename ) } #ifdef _XBOX360 -void PackedResource::GetResourceTags( DWORD* pdwNumResourceTags, - XBRESOURCE** ppResourceTags ) +void PackedResource::GetResourceTags(DWORD* pdwNumResourceTags, + XBRESOURCE** ppResourceTags) { if (pdwNumResourceTags) (*pdwNumResourceTags) = m_dwNumResourceTags;