diff --git a/cheevos.h b/cheevos.h index 91fbfb2996..8642f7cc57 100644 --- a/cheevos.h +++ b/cheevos.h @@ -19,9 +19,9 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif +#include + +RETRO_BEGIN_DECLS typedef struct cheevos_ctx_desc { @@ -48,8 +48,6 @@ bool cheevos_set_cheats(void); void cheevos_set_support_cheevos(bool state); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif /* __RARCH_CHEEVOS_H */ diff --git a/dynamic.h b/dynamic.h index 4fe1152614..9ea5a6cce0 100644 --- a/dynamic.h +++ b/dynamic.h @@ -18,6 +18,7 @@ #define __DYNAMIC_H #include +#include #include #include "core_type.h" @@ -26,9 +27,7 @@ #include "config.h" #endif -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS /** * libretro_get_environment_info: @@ -182,9 +181,7 @@ void init_libretro_sym(enum rarch_core_type type, **/ void uninit_libretro_sym(struct retro_core_t *core); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/movie.h b/movie.h index 1e5d4f4d05..91a40c218c 100644 --- a/movie.h +++ b/movie.h @@ -17,14 +17,13 @@ #ifndef __RARCH_MOVIE_H #define __RARCH_MOVIE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#include + +RETRO_BEGIN_DECLS #define BSV_MAGIC 0x42535631 @@ -80,9 +79,6 @@ bool bsv_movie_ctl(enum bsv_ctl_state state, void *data); bool bsv_movie_init_handle(const char *path, enum rarch_movie_type type); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif - diff --git a/msg_hash.h b/msg_hash.h index eee52ab551..5d5d7fe692 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -20,6 +20,8 @@ #include #include +#include + #define MSG_UNKNOWN 0x3a834e55U #define MSG_PROGRAM 0xc339565dU #define MSG_FOUND_SHADER 0x817f42b7U @@ -157,9 +159,7 @@ #define MSG_DOWNLOADING 0x465305dbU #define MSG_EXTRACTING 0x25a4c19eU -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS const char *msg_hash_to_str(uint32_t hash); @@ -187,10 +187,7 @@ const char *msg_hash_to_str_us(uint32_t hash); uint32_t msg_hash_calculate(const char *s); -#ifdef __cplusplus -} -#endif - +RETRO_END_DECLS #endif diff --git a/playlist.h b/playlist.h index aaf1934521..1df6751b57 100644 --- a/playlist.h +++ b/playlist.h @@ -20,9 +20,9 @@ #include -#ifdef __cplusplus -extern "C" { -#endif +#include + +RETRO_BEGIN_DECLS typedef struct playlist_entry playlist_entry_t; typedef struct content_playlist playlist_t; @@ -124,9 +124,6 @@ void playlist_write_file(playlist_t *playlist); void playlist_qsort(playlist_t *playlist, playlist_sort_fun_t *fn); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif - diff --git a/retroarch.h b/retroarch.h index c5cf0f8317..d580200834 100644 --- a/retroarch.h +++ b/retroarch.h @@ -19,11 +19,11 @@ #include +#include + #include "core_type.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS #define MENU_VALUE_FILE_WEBM 0x7ca00b50U #define MENU_VALUE_FILE_F4F 0x0b886be5U @@ -178,8 +178,6 @@ bool retroarch_main_init(int argc, char *argv[]); void retroarch_main_quit(void); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif