From ff8d00e12b1eba2e9d53c9c5125053cfb9b2bc89 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 3 Jun 2016 03:22:35 +0200 Subject: [PATCH] Use RETRO_BEGIN_DECLS/RETRO_END_DECLS in more files --- autosave.h | 12 +++++------- command.h | 10 +++------- configuration.h | 9 +++------ content.h | 9 +++------ core.h | 11 ++++------- core_info.h | 9 +++------ database_info.h | 9 +++------ driver.h | 9 +++------ patch.h | 6 ++++++ runloop.h | 9 +++------ system.h | 9 +++------ verbosity.h | 10 +++------- 12 files changed, 42 insertions(+), 70 deletions(-) diff --git a/autosave.h b/autosave.h index 2385115671..f0a207ac47 100644 --- a/autosave.h +++ b/autosave.h @@ -17,12 +17,12 @@ #ifndef __RARCH_AUTOSAVE_H #define __RARCH_AUTOSAVE_H -#ifdef __cplusplus -extern "C" { -#endif - #include +#include + +RETRO_BEGIN_DECLS + typedef struct autosave autosave_t; /** @@ -43,8 +43,6 @@ void autosave_init(void); void autosave_deinit(void); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/command.h b/command.h index 72db37ab67..59e6b4dfbc 100644 --- a/command.h +++ b/command.h @@ -23,10 +23,9 @@ #include #include +#include -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS typedef struct command command_t; @@ -244,9 +243,6 @@ bool command_free(command_t *handle); **/ bool command_event(enum event_command action, void *data); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif - diff --git a/configuration.h b/configuration.h index 32ca1bc2a3..4dea82b897 100644 --- a/configuration.h +++ b/configuration.h @@ -20,6 +20,7 @@ #include #include +#include #include "gfx/video_driver.h" #include "driver.h" @@ -28,9 +29,7 @@ #define MAX_USERS 16 #endif -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS /* All config related settings go here. */ @@ -571,8 +570,6 @@ void config_free(void); settings_t *config_get_ptr(void); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/content.h b/content.h index a2f040715e..1bf0282447 100644 --- a/content.h +++ b/content.h @@ -23,12 +23,11 @@ #include #include +#include #include "frontend/frontend_driver.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS typedef struct ram_type ram_type_t; @@ -68,8 +67,6 @@ void content_deinit(void); * selected libretro core. */ bool content_init(void); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/core.h b/core.h index d969e82138..87cdf282e5 100644 --- a/core.h +++ b/core.h @@ -18,15 +18,14 @@ #ifndef _LIBRETRO_CORE_IMPL_H #define _LIBRETRO_CORE_IMPL_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include +#include #include "core_type.h" +RETRO_BEGIN_DECLS + enum { /* Polling is performed before @@ -183,8 +182,6 @@ bool core_uninit_libretro_callbacks(void); void core_set_input_state(retro_ctx_input_state_info_t *info); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/core_info.h b/core_info.h index 502248ce69..5ce4bc593a 100644 --- a/core_info.h +++ b/core_info.h @@ -21,10 +21,9 @@ #include #include +#include -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS typedef struct { @@ -120,8 +119,6 @@ bool core_info_find(core_info_ctx_find_t *info); bool core_info_load(core_info_ctx_find_t *info); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif /* CORE_INFO_H_ */ diff --git a/database_info.h b/database_info.h index 4cd4e16962..f7c04ff8db 100644 --- a/database_info.h +++ b/database_info.h @@ -22,12 +22,11 @@ #include #include +#include #include "libretro-db/libretrodb.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS enum database_status { @@ -120,8 +119,6 @@ int database_info_build_query( * memory after it is no longer required. */ char *bin_to_hex_alloc(const uint8_t *data, size_t len); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif /* CORE_INFO_H_ */ diff --git a/driver.h b/driver.h index c87cf4dfe1..7d604dd251 100644 --- a/driver.h +++ b/driver.h @@ -22,6 +22,7 @@ #include #include +#include #include #ifdef HAVE_CONFIG_H @@ -30,9 +31,7 @@ #include "input/input_defines.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS #define DRIVERS_CMD_ALL \ ( DRIVER_AUDIO \ @@ -171,8 +170,6 @@ typedef struct driver_ctx_info bool driver_ctl(enum driver_ctl_state state, void *data); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/patch.h b/patch.h index e797ccb760..9311b555ac 100644 --- a/patch.h +++ b/patch.h @@ -20,6 +20,10 @@ #include #include +#include + +RETRO_BEGIN_DECLS + /* BPS/UPS/IPS implementation from bSNES (nall::). * Modified for RetroArch. */ @@ -34,4 +38,6 @@ **/ void patch_content(uint8_t **buf, ssize_t *size); +RETRO_END_DECLS + #endif diff --git a/runloop.h b/runloop.h index e4ea026d01..9ab66a5549 100644 --- a/runloop.h +++ b/runloop.h @@ -17,12 +17,11 @@ #define __RETROARCH_RUNLOOP_H #include +#include #include "configuration.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS enum runloop_ctl_state { @@ -317,8 +316,6 @@ char* runloop_msg_queue_pull(void); bool runloop_ctl(enum runloop_ctl_state state, void *data); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/system.h b/system.h index 96b4ed00da..3ee1113fbe 100644 --- a/system.h +++ b/system.h @@ -17,6 +17,7 @@ #define __RARCH_SYSTEM_H #include +#include #include #include "driver.h" @@ -25,9 +26,7 @@ #define MAX_USERS 16 #endif -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS typedef struct rarch_system_info { @@ -58,8 +57,6 @@ typedef struct rarch_system_info struct retro_memory_map mmaps; } rarch_system_info_t; -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/verbosity.h b/verbosity.h index 124b58026b..48e2cd54f7 100644 --- a/verbosity.h +++ b/verbosity.h @@ -20,12 +20,11 @@ #include #include +#include #include #include -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS bool verbosity_is_enabled(void); @@ -140,9 +139,6 @@ void RARCH_ERR_V(const char *tag, const char *fmt, va_list ap); void RARCH_ERR(const char *fmt, ...); #endif - -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif