From 8841e0f3c12a9b7b0470919d721bbe443dbae3bd Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Sun, 30 May 2004 23:23:05 +0000 Subject: [PATCH] Updated projects for windows to generate dlls. --- luasocket.sln | 20 ++++--- luasocket.vcproj | 65 ++++++++++----------- mime.vcproj | 144 ++++++++++++++++++++++++++++++++++++++++++++++ src/mime.c | 2 +- src/mime.h | 9 ++- test/mimetest.lua | 2 +- 6 files changed, 200 insertions(+), 42 deletions(-) create mode 100644 mime.vcproj diff --git a/luasocket.sln b/luasocket.sln index 25fe127d..6a1d0b89 100644 --- a/luasocket.sln +++ b/luasocket.sln @@ -1,5 +1,9 @@ Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luasocket", "luasocket.vcproj", "{4FAAB633-F0E7-4D12-B680-D150A0DD7268}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luasocket", "luasocket.vcproj", "{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mime", "mime.vcproj", "{128E8BD0-174A-48F0-8771-92B1E8D18713}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject @@ -9,12 +13,14 @@ Global Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {4FAAB633-F0E7-4D12-B680-D150A0DD7268}.Debug.ActiveCfg = Debug|Win32 - {4FAAB633-F0E7-4D12-B680-D150A0DD7268}.Debug.Build.0 = Debug|Win32 - {4FAAB633-F0E7-4D12-B680-D150A0DD7268}.Release.ActiveCfg = Release|Win32 - {4FAAB633-F0E7-4D12-B680-D150A0DD7268}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionItems) = postSolution + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug.ActiveCfg = Debug|Win32 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug.Build.0 = Debug|Win32 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release.ActiveCfg = Release|Win32 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release.Build.0 = Release|Win32 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug.ActiveCfg = Debug|Win32 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug.Build.0 = Debug|Win32 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release.ActiveCfg = Release|Win32 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/luasocket.vcproj b/luasocket.vcproj index 73d83222..f998a8db 100644 --- a/luasocket.vcproj +++ b/luasocket.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="7.10" Name="luasocket" - ProjectGUID="{4FAAB633-F0E7-4D12-B680-D150A0DD7268}" + ProjectGUID="{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}" Keyword="Win32Proj"> @@ -65,13 +63,13 @@ Name="Release|Win32" OutputDirectory="." IntermediateDirectory="." - ConfigurationType="1" + ConfigurationType="2" CharacterSet="2"> @@ -121,6 +119,9 @@ + + @@ -130,15 +131,9 @@ - - - - @@ -169,13 +164,10 @@ RelativePath=".\auxiliar.h"> - - + RelativePath=".\base.h"> + RelativePath=".\buffer.h"> @@ -186,14 +178,17 @@ + + + RelativePath=".\smtp.h"> + RelativePath=".\socket.h"> @@ -213,6 +208,12 @@ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + + + + diff --git a/mime.vcproj b/mime.vcproj new file mode 100644 index 00000000..95d38889 --- /dev/null +++ b/mime.vcproj @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mime.c b/src/mime.c index 8cfcd26d..966509b0 100644 --- a/src/mime.c +++ b/src/mime.c @@ -74,7 +74,7 @@ static UC b64unbase[256]; /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ -int luaopen_mime(lua_State *L) +MIME_API int luaopen_mime(lua_State *L) { lua_pushstring(L, MIME_LIBNAME); lua_setglobal(L, "MIME_LIBNAME"); diff --git a/src/mime.h b/src/mime.h index fee4e5e3..35389f02 100644 --- a/src/mime.h +++ b/src/mime.h @@ -12,7 +12,14 @@ \*=========================================================================*/ #include -int luaopen_mime(lua_State *L); +/*-------------------------------------------------------------------------*\ +* This macro prefixes all exported API functions +\*-------------------------------------------------------------------------*/ +#ifndef MIME_API +#define MIME_API extern +#endif + +MIME_API int luaopen_mime(lua_State *L); /*-------------------------------------------------------------------------*\ * Library's namespace diff --git a/test/mimetest.lua b/test/mimetest.lua index d0921755..30bfca1e 100644 --- a/test/mimetest.lua +++ b/test/mimetest.lua @@ -8,7 +8,7 @@ local qptest = "qptest.bin" local eqptest = "qptest.bin2" local dqptest = "qptest.bin3" -local b64test = "libluasocket.dylib" +local b64test = "libluasocket.so" local eb64test = "b64test.bin" local db64test = "b64test.bin2"