Fixed building with C++

This commit is contained in:
Sam Lantinga 2019-03-19 10:56:46 -07:00
parent 8177388e5e
commit 03fc5eebcb
1 changed files with 7 additions and 16 deletions

View File

@ -86,12 +86,6 @@
#endif #endif
#endif /* SDL_MAIN_HANDLED */ #endif /* SDL_MAIN_HANDLED */
#ifdef __cplusplus
#define C_LINKAGE "C"
#else
#define C_LINKAGE
#endif /* __cplusplus */
#ifndef SDLMAIN_DECLSPEC #ifndef SDLMAIN_DECLSPEC
#define SDLMAIN_DECLSPEC #define SDLMAIN_DECLSPEC
#endif #endif
@ -115,21 +109,18 @@
#define main SDL_main #define main SDL_main
#endif #endif
/**
* The prototype for the application's main() function
*/
#ifdef __cplusplus
extern "C"
#endif
typedef int (*SDL_main_func)(int argc, char *argv[]);
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
#include "begin_code.h" #include "begin_code.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/**
* The prototype for the application's main() function
*/
typedef int (*SDL_main_func)(int argc, char *argv[]);
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
/** /**
* This is called by the real SDL main function to let the rest of the * This is called by the real SDL main function to let the rest of the
* library know that initialization was done properly. * library know that initialization was done properly.