diff --git a/Examples/test-suite/char_strings.i b/Examples/test-suite/char_strings.i index 9a87df4e3..aa3b125ce 100644 --- a/Examples/test-suite/char_strings.i +++ b/Examples/test-suite/char_strings.i @@ -11,6 +11,7 @@ below. %{ #include +#include #define OTHERLAND_MSG "Little message from the safe world." #define CPLUSPLUS_MSG "A message from the deep dark world of C++, where anything is possible." @@ -150,11 +151,11 @@ const char global_const_char_array2[sizeof(CPLUSPLUS_MSG)+1] = CPLUSPLUS_MSG; %inline { struct Formatpos; struct OBFormat; - + static int GetNextFormat(Formatpos& itr, const char*& str,OBFormat*& pFormat) { return 0; } - + } diff --git a/Examples/test-suite/threads_exception.i b/Examples/test-suite/threads_exception.i index 4708633db..776e84231 100644 --- a/Examples/test-suite/threads_exception.i +++ b/Examples/test-suite/threads_exception.i @@ -13,6 +13,7 @@ %} %{ +#include struct A {}; %} diff --git a/Examples/test-suite/varargs.i b/Examples/test-suite/varargs.i index dd56cb073..b4143da7c 100644 --- a/Examples/test-suite/varargs.i +++ b/Examples/test-suite/varargs.i @@ -7,6 +7,10 @@ %varargs(int mode = 0) Foo::statictest(const char*fmt, ...); %varargs(2, int mode = 0) test_plenty(const char*fmt, ...); +%{ +#include +%} + %inline %{ char *test(const char *fmt, ...) { return (char *) fmt; diff --git a/Lib/cdata.i b/Lib/cdata.i index e058fe28b..e82843b3a 100644 --- a/Lib/cdata.i +++ b/Lib/cdata.i @@ -4,6 +4,8 @@ * SWIG library file containing macros for manipulating raw C data as strings. * ----------------------------------------------------------------------------- */ +%include + %{ typedef struct SWIGCDATA { char *data; diff --git a/Lib/swig.swg b/Lib/swig.swg index c215e8d89..d719a139c 100644 --- a/Lib/swig.swg +++ b/Lib/swig.swg @@ -442,10 +442,6 @@ namespace std { * Default char * and C array typemaps * ----------------------------------------------------------------------------- */ -%fragment("", "runtime") %{ -#include -%} - /* Set up the typemap for handling new return strings */ #ifdef __cplusplus diff --git a/Lib/swigfragments.swg b/Lib/swigfragments.swg index 63bb6c8f4..a2b467bce 100644 --- a/Lib/swigfragments.swg +++ b/Lib/swigfragments.swg @@ -29,6 +29,10 @@ #include %} +%fragment("", "header") %{ +#include +%} + %fragment("", "header") %{ #include %}