diff options
author | rubidium <rubidium@openttd.org> | 2014-09-16 20:14:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-16 20:14:03 +0000 |
commit | 0291a1be11a87e083778de790a7f9a168c3d40f0 (patch) | |
tree | af9235087fb9d154fa76a98ee523cecb885d8e33 /src/3rdparty | |
parent | 74ceffd3c56838c60191ce2c3e9f3391c29d2619 (diff) | |
download | openttd-0291a1be11a87e083778de790a7f9a168c3d40f0.tar.xz |
(svn r26838) -Fix (r26831): attempt to make MSVC like the code again
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqcompiler.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqcompiler.h b/src/3rdparty/squirrel/squirrel/sqcompiler.h index e384b3b0a..b29917390 100644 --- a/src/3rdparty/squirrel/squirrel/sqcompiler.h +++ b/src/3rdparty/squirrel/squirrel/sqcompiler.h @@ -71,7 +71,12 @@ struct SQVM; #define TK_ENUM 323 #define TK_CONST 324 - +/* MSVC doesn't like NORETURN for function prototypes, but we kinda need it for GCC. */ +#if defined(_MSC_VER) +typedef void(*CompilerErrorFunc)(void *ud, const SQChar *s); +#else typedef NORETURN void(*CompilerErrorFunc)(void *ud, const SQChar *s); +#endif + bool Compile(SQVM *vm, SQLEXREADFUNC rg, SQUserPointer up, const SQChar *sourcename, SQObjectPtr &out, bool raiseerror, bool lineinfo); #endif //_SQCOMPILER_H_ |