aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-05-30 23:23:05 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-05-30 23:23:05 +0000
commit8841e0f3c12a9b7b0470919d721bbe443dbae3bd (patch)
treefbf218822785634d80f329e33dc7e98c4219e321
parent5ca1049ab47f3f9ff9157f71af9072f04a637500 (diff)
downloadluasocket-8841e0f3c12a9b7b0470919d721bbe443dbae3bd.tar.gz
luasocket-8841e0f3c12a9b7b0470919d721bbe443dbae3bd.tar.bz2
luasocket-8841e0f3c12a9b7b0470919d721bbe443dbae3bd.zip
Updated projects for windows to generate dlls.
-rw-r--r--luasocket.sln20
-rw-r--r--luasocket.vcproj65
-rw-r--r--mime.vcproj144
-rw-r--r--src/mime.c2
-rw-r--r--src/mime.h9
-rw-r--r--test/mimetest.lua2
6 files changed, 200 insertions, 42 deletions
diff --git a/luasocket.sln b/luasocket.sln
index 25fe127..6a1d0b8 100644
--- a/luasocket.sln
+++ b/luasocket.sln
@@ -1,5 +1,9 @@
1Microsoft Visual Studio Solution File, Format Version 8.00 1Microsoft Visual Studio Solution File, Format Version 8.00
2Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luasocket", "luasocket.vcproj", "{4FAAB633-F0E7-4D12-B680-D150A0DD7268}" 2Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luasocket", "luasocket.vcproj", "{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}"
3 ProjectSection(ProjectDependencies) = postProject
4 EndProjectSection
5EndProject
6Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mime", "mime.vcproj", "{128E8BD0-174A-48F0-8771-92B1E8D18713}"
3 ProjectSection(ProjectDependencies) = postProject 7 ProjectSection(ProjectDependencies) = postProject
4 EndProjectSection 8 EndProjectSection
5EndProject 9EndProject
@@ -9,12 +13,14 @@ Global
9 Release = Release 13 Release = Release
10 EndGlobalSection 14 EndGlobalSection
11 GlobalSection(ProjectConfiguration) = postSolution 15 GlobalSection(ProjectConfiguration) = postSolution
12 {4FAAB633-F0E7-4D12-B680-D150A0DD7268}.Debug.ActiveCfg = Debug|Win32 16 {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug.ActiveCfg = Debug|Win32
13 {4FAAB633-F0E7-4D12-B680-D150A0DD7268}.Debug.Build.0 = Debug|Win32 17 {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug.Build.0 = Debug|Win32
14 {4FAAB633-F0E7-4D12-B680-D150A0DD7268}.Release.ActiveCfg = Release|Win32 18 {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release.ActiveCfg = Release|Win32
15 {4FAAB633-F0E7-4D12-B680-D150A0DD7268}.Release.Build.0 = Release|Win32 19 {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release.Build.0 = Release|Win32
16 EndGlobalSection 20 {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug.ActiveCfg = Debug|Win32
17 GlobalSection(SolutionItems) = postSolution 21 {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug.Build.0 = Debug|Win32
22 {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release.ActiveCfg = Release|Win32
23 {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release.Build.0 = Release|Win32
18 EndGlobalSection 24 EndGlobalSection
19 GlobalSection(ExtensibilityGlobals) = postSolution 25 GlobalSection(ExtensibilityGlobals) = postSolution
20 EndGlobalSection 26 EndGlobalSection
diff --git a/luasocket.vcproj b/luasocket.vcproj
index 73d8322..f998a8d 100644
--- a/luasocket.vcproj
+++ b/luasocket.vcproj
@@ -3,7 +3,7 @@
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="7.10" 4 Version="7.10"
5 Name="luasocket" 5 Name="luasocket"
6 ProjectGUID="{4FAAB633-F0E7-4D12-B680-D150A0DD7268}" 6 ProjectGUID="{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}"
7 Keyword="Win32Proj"> 7 Keyword="Win32Proj">
8 <Platforms> 8 <Platforms>
9 <Platform 9 <Platform
@@ -12,18 +12,17 @@
12 <Configurations> 12 <Configurations>
13 <Configuration 13 <Configuration
14 Name="Debug|Win32" 14 Name="Debug|Win32"
15 OutputDirectory="." 15 OutputDirectory="Debug"
16 IntermediateDirectory="." 16 IntermediateDirectory="Debug"
17 ConfigurationType="1" 17 ConfigurationType="2"
18 CharacterSet="2"> 18 CharacterSet="2">
19 <Tool 19 <Tool
20 Name="VCCLCompilerTool" 20 Name="VCCLCompilerTool"
21 Optimization="0" 21 Optimization="0"
22 AdditionalIncludeDirectories="net/include" 22 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_EXPORTS"
23 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE, LUASOCKET_DEBUG"
24 MinimalRebuild="TRUE" 23 MinimalRebuild="TRUE"
25 BasicRuntimeChecks="3" 24 BasicRuntimeChecks="3"
26 RuntimeLibrary="5" 25 RuntimeLibrary="1"
27 UsePrecompiledHeader="0" 26 UsePrecompiledHeader="0"
28 WarningLevel="3" 27 WarningLevel="3"
29 Detect64BitPortabilityProblems="TRUE" 28 Detect64BitPortabilityProblems="TRUE"
@@ -32,13 +31,12 @@
32 Name="VCCustomBuildTool"/> 31 Name="VCCustomBuildTool"/>
33 <Tool 32 <Tool
34 Name="VCLinkerTool" 33 Name="VCLinkerTool"
35 AdditionalDependencies="lua.lib lualib.lib ws2_32.lib" 34 OutputFile="$(OutDir)/luasocket.dll"
36 OutputFile="$(OutDir)/luasocket.exe"
37 LinkIncremental="2" 35 LinkIncremental="2"
38 AdditionalLibraryDirectories="net/lib"
39 GenerateDebugInformation="TRUE" 36 GenerateDebugInformation="TRUE"
40 ProgramDatabaseFile="$(OutDir)/luasocket.pdb" 37 ProgramDatabaseFile="$(OutDir)/luasocket.pdb"
41 SubSystem="1" 38 SubSystem="2"
39 ImportLibrary="$(OutDir)/luasocket.lib"
42 TargetMachine="1"/> 40 TargetMachine="1"/>
43 <Tool 41 <Tool
44 Name="VCMIDLTool"/> 42 Name="VCMIDLTool"/>
@@ -65,13 +63,13 @@
65 Name="Release|Win32" 63 Name="Release|Win32"
66 OutputDirectory="." 64 OutputDirectory="."
67 IntermediateDirectory="." 65 IntermediateDirectory="."
68 ConfigurationType="1" 66 ConfigurationType="2"
69 CharacterSet="2"> 67 CharacterSet="2">
70 <Tool 68 <Tool
71 Name="VCCLCompilerTool" 69 Name="VCCLCompilerTool"
72 AdditionalIncludeDirectories="net/include" 70 AdditionalIncludeDirectories="H:\include"
73 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE, LUASOCKET_DEBUG, LUASOCKET_COMPILED" 71 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_EXPORTS;LUASOCKET_API=__declspec(dllexport); LUASOCKET_COMPILED; LUASOCKET_DEBUG"
74 RuntimeLibrary="4" 72 RuntimeLibrary="0"
75 UsePrecompiledHeader="0" 73 UsePrecompiledHeader="0"
76 WarningLevel="3" 74 WarningLevel="3"
77 Detect64BitPortabilityProblems="TRUE" 75 Detect64BitPortabilityProblems="TRUE"
@@ -80,14 +78,14 @@
80 Name="VCCustomBuildTool"/> 78 Name="VCCustomBuildTool"/>
81 <Tool 79 <Tool
82 Name="VCLinkerTool" 80 Name="VCLinkerTool"
83 AdditionalDependencies="lua.lib lualib.lib ws2_32.lib" 81 AdditionalDependencies="ws2_32.lib"
84 OutputFile="$(OutDir)/luasocket.exe" 82 OutputFile="$(OutDir)/luasocket.dll"
85 LinkIncremental="1" 83 LinkIncremental="1"
86 AdditionalLibraryDirectories="net/lib"
87 GenerateDebugInformation="TRUE" 84 GenerateDebugInformation="TRUE"
88 SubSystem="1" 85 SubSystem="2"
89 OptimizeReferences="2" 86 OptimizeReferences="2"
90 EnableCOMDATFolding="2" 87 EnableCOMDATFolding="2"
88 ImportLibrary="$(OutDir)/luasocket.lib"
91 TargetMachine="1"/> 89 TargetMachine="1"/>
92 <Tool 90 <Tool
93 Name="VCMIDLTool"/> 91 Name="VCMIDLTool"/>
@@ -122,6 +120,9 @@
122 RelativePath=".\auxiliar.c"> 120 RelativePath=".\auxiliar.c">
123 </File> 121 </File>
124 <File 122 <File
123 RelativePath=".\base.c">
124 </File>
125 <File
125 RelativePath=".\buffer.c"> 126 RelativePath=".\buffer.c">
126 </File> 127 </File>
127 <File 128 <File
@@ -131,15 +132,9 @@
131 RelativePath=".\io.c"> 132 RelativePath=".\io.c">
132 </File> 133 </File>
133 <File 134 <File
134 RelativePath=".\lua.c">
135 </File>
136 <File
137 RelativePath=".\luasocket.c"> 135 RelativePath=".\luasocket.c">
138 </File> 136 </File>
139 <File 137 <File
140 RelativePath=".\mime.c">
141 </File>
142 <File
143 RelativePath=".\options.c"> 138 RelativePath=".\options.c">
144 </File> 139 </File>
145 <File 140 <File
@@ -169,13 +164,10 @@
169 RelativePath=".\auxiliar.h"> 164 RelativePath=".\auxiliar.h">
170 </File> 165 </File>
171 <File 166 <File
172 RelativePath=".\buffer.h"> 167 RelativePath=".\base.h">
173 </File>
174 <File
175 RelativePath=".\code.h">
176 </File> 168 </File>
177 <File 169 <File
178 RelativePath=".\error.h"> 170 RelativePath=".\buffer.h">
179 </File> 171 </File>
180 <File 172 <File
181 RelativePath=".\inet.h"> 173 RelativePath=".\inet.h">
@@ -187,13 +179,16 @@
187 RelativePath=".\luasocket.h"> 179 RelativePath=".\luasocket.h">
188 </File> 180 </File>
189 <File 181 <File
182 RelativePath=".\options.h">
183 </File>
184 <File
190 RelativePath=".\select.h"> 185 RelativePath=".\select.h">
191 </File> 186 </File>
192 <File 187 <File
193 RelativePath=".\socket.h"> 188 RelativePath=".\smtp.h">
194 </File> 189 </File>
195 <File 190 <File
196 RelativePath=".\stdafx.h"> 191 RelativePath=".\socket.h">
197 </File> 192 </File>
198 <File 193 <File
199 RelativePath=".\tcp.h"> 194 RelativePath=".\tcp.h">
@@ -213,6 +208,12 @@
213 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" 208 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
214 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> 209 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
215 </Filter> 210 </Filter>
211 <File
212 RelativePath="..\..\lib\lua.lib">
213 </File>
214 <File
215 RelativePath="..\..\lib\lualib.lib">
216 </File>
216 </Files> 217 </Files>
217 <Globals> 218 <Globals>
218 </Globals> 219 </Globals>
diff --git a/mime.vcproj b/mime.vcproj
new file mode 100644
index 0000000..95d3888
--- /dev/null
+++ b/mime.vcproj
@@ -0,0 +1,144 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="7.10"
5 Name="mime"
6 ProjectGUID="{128E8BD0-174A-48F0-8771-92B1E8D18713}"
7 Keyword="Win32Proj">
8 <Platforms>
9 <Platform
10 Name="Win32"/>
11 </Platforms>
12 <Configurations>
13 <Configuration
14 Name="Debug|Win32"
15 OutputDirectory="Debug"
16 IntermediateDirectory="Debug"
17 ConfigurationType="2"
18 CharacterSet="2">
19 <Tool
20 Name="VCCLCompilerTool"
21 Optimization="0"
22 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MIME_EXPORTS"
23 MinimalRebuild="TRUE"
24 BasicRuntimeChecks="3"
25 RuntimeLibrary="1"
26 UsePrecompiledHeader="0"
27 WarningLevel="3"
28 Detect64BitPortabilityProblems="TRUE"
29 DebugInformationFormat="4"/>
30 <Tool
31 Name="VCCustomBuildTool"/>
32 <Tool
33 Name="VCLinkerTool"
34 OutputFile="$(OutDir)/mime.dll"
35 LinkIncremental="2"
36 GenerateDebugInformation="TRUE"
37 ProgramDatabaseFile="$(OutDir)/mime.pdb"
38 SubSystem="2"
39 ImportLibrary="$(OutDir)/mime.lib"
40 TargetMachine="1"/>
41 <Tool
42 Name="VCMIDLTool"/>
43 <Tool
44 Name="VCPostBuildEventTool"/>
45 <Tool
46 Name="VCPreBuildEventTool"/>
47 <Tool
48 Name="VCPreLinkEventTool"/>
49 <Tool
50 Name="VCResourceCompilerTool"/>
51 <Tool
52 Name="VCWebServiceProxyGeneratorTool"/>
53 <Tool
54 Name="VCXMLDataGeneratorTool"/>
55 <Tool
56 Name="VCWebDeploymentTool"/>
57 <Tool
58 Name="VCManagedWrapperGeneratorTool"/>
59 <Tool
60 Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
61 </Configuration>
62 <Configuration
63 Name="Release|Win32"
64 OutputDirectory="."
65 IntermediateDirectory="."
66 ConfigurationType="2"
67 CharacterSet="2">
68 <Tool
69 Name="VCCLCompilerTool"
70 AdditionalIncludeDirectories="H:\include"
71 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MIME_EXPORTS; MIME_API=__declspec(dllexport)"
72 RuntimeLibrary="0"
73 UsePrecompiledHeader="0"
74 WarningLevel="3"
75 Detect64BitPortabilityProblems="TRUE"
76 DebugInformationFormat="3"/>
77 <Tool
78 Name="VCCustomBuildTool"/>
79 <Tool
80 Name="VCLinkerTool"
81 OutputFile="$(OutDir)/mime.dll"
82 LinkIncremental="1"
83 GenerateDebugInformation="TRUE"
84 SubSystem="2"
85 OptimizeReferences="2"
86 EnableCOMDATFolding="2"
87 ImportLibrary="$(OutDir)/mime.lib"
88 TargetMachine="1"/>
89 <Tool
90 Name="VCMIDLTool"/>
91 <Tool
92 Name="VCPostBuildEventTool"/>
93 <Tool
94 Name="VCPreBuildEventTool"/>
95 <Tool
96 Name="VCPreLinkEventTool"/>
97 <Tool
98 Name="VCResourceCompilerTool"/>
99 <Tool
100 Name="VCWebServiceProxyGeneratorTool"/>
101 <Tool
102 Name="VCXMLDataGeneratorTool"/>
103 <Tool
104 Name="VCWebDeploymentTool"/>
105 <Tool
106 Name="VCManagedWrapperGeneratorTool"/>
107 <Tool
108 Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
109 </Configuration>
110 </Configurations>
111 <References>
112 </References>
113 <Files>
114 <Filter
115 Name="Source Files"
116 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
117 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
118 <File
119 RelativePath=".\mime.c">
120 </File>
121 </Filter>
122 <Filter
123 Name="Header Files"
124 Filter="h;hpp;hxx;hm;inl;inc;xsd"
125 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
126 <File
127 RelativePath=".\mime.h">
128 </File>
129 </Filter>
130 <Filter
131 Name="Resource Files"
132 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
133 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
134 </Filter>
135 <File
136 RelativePath="..\..\lib\lua.lib">
137 </File>
138 <File
139 RelativePath="..\..\lib\lualib.lib">
140 </File>
141 </Files>
142 <Globals>
143 </Globals>
144</VisualStudioProject>
diff --git a/src/mime.c b/src/mime.c
index 8cfcd26..966509b 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -74,7 +74,7 @@ static UC b64unbase[256];
74/*-------------------------------------------------------------------------*\ 74/*-------------------------------------------------------------------------*\
75* Initializes module 75* Initializes module
76\*-------------------------------------------------------------------------*/ 76\*-------------------------------------------------------------------------*/
77int luaopen_mime(lua_State *L) 77MIME_API int luaopen_mime(lua_State *L)
78{ 78{
79 lua_pushstring(L, MIME_LIBNAME); 79 lua_pushstring(L, MIME_LIBNAME);
80 lua_setglobal(L, "MIME_LIBNAME"); 80 lua_setglobal(L, "MIME_LIBNAME");
diff --git a/src/mime.h b/src/mime.h
index fee4e5e..35389f0 100644
--- a/src/mime.h
+++ b/src/mime.h
@@ -12,7 +12,14 @@
12\*=========================================================================*/ 12\*=========================================================================*/
13#include <lua.h> 13#include <lua.h>
14 14
15int luaopen_mime(lua_State *L); 15/*-------------------------------------------------------------------------*\
16* This macro prefixes all exported API functions
17\*-------------------------------------------------------------------------*/
18#ifndef MIME_API
19#define MIME_API extern
20#endif
21
22MIME_API int luaopen_mime(lua_State *L);
16 23
17/*-------------------------------------------------------------------------*\ 24/*-------------------------------------------------------------------------*\
18* Library's namespace 25* Library's namespace
diff --git a/test/mimetest.lua b/test/mimetest.lua
index d092175..30bfca1 100644
--- a/test/mimetest.lua
+++ b/test/mimetest.lua
@@ -8,7 +8,7 @@ local qptest = "qptest.bin"
8local eqptest = "qptest.bin2" 8local eqptest = "qptest.bin2"
9local dqptest = "qptest.bin3" 9local dqptest = "qptest.bin3"
10 10
11local b64test = "libluasocket.dylib" 11local b64test = "libluasocket.so"
12local eb64test = "b64test.bin" 12local eb64test = "b64test.bin"
13local db64test = "b64test.bin2" 13local db64test = "b64test.bin2"
14 14