scilab: fix compilation error in scilab 5.3.3

This commit is contained in:
Simon Marchetto 2014-10-20 17:03:17 +02:00
commit d3afd65698
2 changed files with 13 additions and 11 deletions

View file

@ -12,13 +12,13 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "api_scilab.h"
#if SWIG_SCILAB_VERSION < 540 #if SWIG_SCILAB_VERSION < 540
#define __USE_DEPRECATED_STACK_FUNCTIONS__ #define __USE_DEPRECATED_STACK_FUNCTIONS__
#include "stack-c.h" #include "stack-c.h"
#endif #endif
#include "MALLOC.h" #include "MALLOC.h"
#include "Scierror.h" #include "Scierror.h"
#include "api_scilab.h"
#include "localization.h" #include "localization.h"
#include "freeArrayOfString.h" #include "freeArrayOfString.h"
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -1049,16 +1049,18 @@ public:
} }
emitBanner(gatewaySourceFile); emitBanner(gatewaySourceFile);
Printv(gatewaySourceFile, "#ifdef __cplusplus\n", NIL); String *gatewaySource = NewString("");
Printv(gatewaySourceFile, "extern \"C\" {\n", NIL); Printf(gatewaySource, "#ifdef __cplusplus\n");
Printv(gatewaySourceFile, "#endif\n", NIL); Printf(gatewaySource, "extern \"C\" {\n");
Printv(gatewaySourceFile, "\n", NIL); Printf(gatewaySource, "#endif\n");
Printv(gatewaySourceFile, "#include <mex.h>\n", NIL); Printf(gatewaySource, "\n");
Printv(gatewaySourceFile, "#include <sci_gateway.h>\n", NIL); Printf(gatewaySource, "#include <api_scilab.h>\n");
Printv(gatewaySourceFile, "#include <api_scilab.h>\n", NIL); Printf(gatewaySource, "#include <mex.h>\n");
Printv(gatewaySourceFile, "#include <MALLOC.h>\n", NIL); Printf(gatewaySource, "#include <sci_gateway.h>\n");
Printv(gatewaySourceFile, "\n", NIL); Printf(gatewaySource, "#include <MALLOC.h>\n");
Printv(gatewaySourceFile, "static int direct_gateway(char *fname, void F(void)) { F(); return 0; };\n", NIL); Printf(gatewaySource, "\n");
Printf(gatewaySource, "static int direct_gateway(char *fname, void F(void)) { F(); return 0; };\n");
Printv(gatewaySourceFile, gatewaySource, NIL);
gatewaySourceWrapperDeclaration = NewString(""); gatewaySourceWrapperDeclaration = NewString("");
} }