From c74c464c4526232902264c66e8b52ebfbcc71e1b Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 4 Aug 2008 15:37:02 +0000 Subject: Fixing the win32 backport. --- src/plugin-luaconfigfiles.cc | 8 +++++++- src/plugin-luaftgl.cc | 8 +++++++- src/plugin-luagl.cc | 8 +++++++- src/plugin-luahandle.cc | 8 +++++++- src/plugin-luahttp.cc | 8 +++++++- src/plugin-lualibs.cc | 8 +++++++- src/plugin-luaocci.cc | 8 +++++++- src/plugin-luaregex.cc | 8 +++++++- src/plugin-luasql.cc | 8 +++++++- src/plugin-luatask.cc | 8 +++++++- src/plugin-luaxml.cc | 8 +++++++- 11 files changed, 77 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/plugin-luaconfigfiles.cc b/src/plugin-luaconfigfiles.cc index 9df08ab..196fed1 100644 --- a/src/plugin-luaconfigfiles.cc +++ b/src/plugin-luaconfigfiles.cc @@ -1,12 +1,18 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LuaConfigFile::pushstatics(L); } extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luaftgl.cc b/src/plugin-luaftgl.cc index 6cb0f0a..83f26f1 100644 --- a/src/plugin-luaftgl.cc +++ b/src/plugin-luaftgl.cc @@ -1,12 +1,18 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LuaFTFont::pushstatics(L); } extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luagl.cc b/src/plugin-luagl.cc index 34bdc2d..b319a85 100644 --- a/src/plugin-luagl.cc +++ b/src/plugin-luagl.cc @@ -1,5 +1,11 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { luaopen_opengl(L); L->pop(); @@ -7,7 +13,7 @@ static void _init_plugin(Lua * L) { extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luahandle.cc b/src/plugin-luahandle.cc index a1cf4ea..7e6b675 100644 --- a/src/plugin-luahandle.cc +++ b/src/plugin-luahandle.cc @@ -1,5 +1,11 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LuaInput::pushconstruct(L); LuaOutput::pushconstruct(L); @@ -9,7 +15,7 @@ static void _init_plugin(Lua * L) { extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luahttp.cc b/src/plugin-luahttp.cc index ae7ee34..ef3a5f4 100644 --- a/src/plugin-luahttp.cc +++ b/src/plugin-luahttp.cc @@ -1,12 +1,18 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LuaHttpResponse::pushstatics(L); } extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-lualibs.cc b/src/plugin-lualibs.cc index 8233f7d..36b866d 100644 --- a/src/plugin-lualibs.cc +++ b/src/plugin-lualibs.cc @@ -1,12 +1,18 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LoadLuaLibs(L); } extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luaocci.cc b/src/plugin-luaocci.cc index 841c6be..0cade24 100644 --- a/src/plugin-luaocci.cc +++ b/src/plugin-luaocci.cc @@ -1,12 +1,18 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LuaOCCI_pushstatics(L); } extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luaregex.cc b/src/plugin-luaregex.cc index 5f3a59e..13be506 100644 --- a/src/plugin-luaregex.cc +++ b/src/plugin-luaregex.cc @@ -1,12 +1,18 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LuaRegex::pushstatics(L); } extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luasql.cc b/src/plugin-luasql.cc index 4f94d78..19588fe 100644 --- a/src/plugin-luasql.cc +++ b/src/plugin-luasql.cc @@ -1,12 +1,18 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LuaSQLConnection::pushstatics(L); } extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luatask.cc b/src/plugin-luatask.cc index dce08f0..3fc2b3f 100644 --- a/src/plugin-luatask.cc +++ b/src/plugin-luatask.cc @@ -1,12 +1,18 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { LuaTaskMan::pushstatics(L); } extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } diff --git a/src/plugin-luaxml.cc b/src/plugin-luaxml.cc index 0e3ad06..b6ad423 100644 --- a/src/plugin-luaxml.cc +++ b/src/plugin-luaxml.cc @@ -1,5 +1,11 @@ #include +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + static void _init_plugin(Lua * L) { luaopen_xml(L); L->pop(); @@ -7,7 +13,7 @@ static void _init_plugin(Lua * L) { extern "C" { -__attribute__ ((weak)) void init_plugin(Lua * L) { +WEAK void init_plugin(Lua * L) { _init_plugin(L); } -- cgit v1.2.3