Fixed building with C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
diff --git a/include/SDL_main.h b/include/SDL_main.h
index 7a17ede..b367488 100644
--- a/include/SDL_main.h
+++ b/include/SDL_main.h
@@ -86,12 +86,6 @@
#endif
#endif /* SDL_MAIN_HANDLED */
-#ifdef __cplusplus
-#define C_LINKAGE "C"
-#else
-#define C_LINKAGE
-#endif /* __cplusplus */
-
#ifndef SDLMAIN_DECLSPEC
#define SDLMAIN_DECLSPEC
#endif
@@ -115,21 +109,18 @@
#define main SDL_main
#endif
+#include "begin_code.h"
+#ifdef __cplusplus
+extern "C" {
+#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"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* This is called by the real SDL main function to let the rest of the
* library know that initialization was done properly.