Fixed building with C++
authorSam Lantinga <slouken@libsdl.org>
Tue, 19 Mar 2019 10:56:46 -0700
changeset 12662bc56ab68fcc4
parent 12661 afa33c19cc67
child 12663 73499f0997d9
Fixed building with C++
include/SDL_main.h
     1.1 --- a/include/SDL_main.h	Tue Mar 19 08:29:34 2019 -0700
     1.2 +++ b/include/SDL_main.h	Tue Mar 19 10:56:46 2019 -0700
     1.3 @@ -86,12 +86,6 @@
     1.4  #endif
     1.5  #endif /* SDL_MAIN_HANDLED */
     1.6  
     1.7 -#ifdef __cplusplus
     1.8 -#define C_LINKAGE   "C"
     1.9 -#else
    1.10 -#define C_LINKAGE
    1.11 -#endif /* __cplusplus */
    1.12 -
    1.13  #ifndef SDLMAIN_DECLSPEC
    1.14  #define SDLMAIN_DECLSPEC
    1.15  #endif
    1.16 @@ -115,22 +109,19 @@
    1.17  #define main    SDL_main
    1.18  #endif
    1.19  
    1.20 -/**
    1.21 - *  The prototype for the application's main() function
    1.22 - */
    1.23 -#ifdef __cplusplus
    1.24 -extern "C"
    1.25 -#endif
    1.26 -typedef int (*SDL_main_func)(int argc, char *argv[]);
    1.27 -extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
    1.28 -
    1.29 -
    1.30  #include "begin_code.h"
    1.31  #ifdef __cplusplus
    1.32  extern "C" {
    1.33  #endif
    1.34  
    1.35  /**
    1.36 + *  The prototype for the application's main() function
    1.37 + */
    1.38 +typedef int (*SDL_main_func)(int argc, char *argv[]);
    1.39 +extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
    1.40 +
    1.41 +
    1.42 +/**
    1.43   *  This is called by the real SDL main function to let the rest of the
    1.44   *  library know that initialization was done properly.
    1.45   *