diff options
author | unknown <diego.nehab@gmail.com> | 2013-05-27 20:30:06 +0800 |
---|---|---|
committer | unknown <diego.nehab@gmail.com> | 2013-05-27 20:30:06 +0800 |
commit | 26704061a4e28eff573f02297e6da045d166afa4 (patch) | |
tree | 7ac69229fc585e03a887a94a7d4793576245b0c5 | |
parent | fbe184f28af85cda61394790e8114c6143057364 (diff) | |
download | luasocket-26704061a4e28eff573f02297e6da045d166afa4.tar.gz luasocket-26704061a4e28eff573f02297e6da045d166afa4.tar.bz2 luasocket-26704061a4e28eff573f02297e6da045d166afa4.zip |
Fix Visual Studio 2012 projects
-rw-r--r-- | .gitignore | 12 | ||||
-rw-r--r-- | Lua51.props | 28 | ||||
-rw-r--r-- | Lua52.props | 28 | ||||
-rwxr-xr-x | mime.vcxproj | 54 | ||||
-rw-r--r-- | mime.vcxproj.filters | 16 | ||||
-rwxr-xr-x | socket.vcxproj | 133 | ||||
-rw-r--r-- | socket.vcxproj.filters | 51 | ||||
-rw-r--r-- | src/inet.c | 4 | ||||
-rw-r--r-- | src/inet.h | 7 | ||||
-rw-r--r-- | src/makefile | 39 |
10 files changed, 316 insertions, 56 deletions
@@ -1,4 +1,16 @@ | |||
1 | *.o | 1 | *.o |
2 | *.so | 2 | *.so |
3 | *.so.* | 3 | *.so.* |
4 | *.obj | ||
5 | *.lib | ||
6 | *.dll* | ||
7 | *.user | ||
8 | *.sdf | ||
9 | Lua.props | ||
10 | Debug | ||
11 | Release | ||
12 | *.manifest | ||
13 | *.swp | ||
14 | *.suo | ||
15 | x64 | ||
4 | 16 | ||
diff --git a/Lua51.props b/Lua51.props new file mode 100644 index 0000000..1bd6256 --- /dev/null +++ b/Lua51.props | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | <ImportGroup Label="PropertySheets" /> | ||
4 | <PropertyGroup Label="UserMacros"> | ||
5 | <LUABIN_PATH>..\build\vc12\bin\lua\5.1\</LUABIN_PATH> | ||
6 | <LUALIB_PATH>..\build\vc12\bin\lua\5.1\</LUALIB_PATH> | ||
7 | <LUAINC_PATH>..\build\vc12\include\lua\5.1\</LUAINC_PATH> | ||
8 | <LUALIB>lua51.lib</LUALIB> | ||
9 | </PropertyGroup> | ||
10 | <PropertyGroup> | ||
11 | <_PropertySheetDisplayName>Lua51</_PropertySheetDisplayName> | ||
12 | </PropertyGroup> | ||
13 | <ItemDefinitionGroup /> | ||
14 | <ItemGroup> | ||
15 | <BuildMacro Include="LUALIB_PATH"> | ||
16 | <Value>$(LUALIB_PATH)</Value> | ||
17 | </BuildMacro> | ||
18 | <BuildMacro Include="LUABIN_PATH"> | ||
19 | <Value>$(LUABIN_PATH)</Value> | ||
20 | </BuildMacro> | ||
21 | <BuildMacro Include="LUAINC_PATH"> | ||
22 | <Value>$(LUAINC_PATH)</Value> | ||
23 | </BuildMacro> | ||
24 | <BuildMacro Include="LUALIB"> | ||
25 | <Value>$(LUALIB)</Value> | ||
26 | </BuildMacro> | ||
27 | </ItemGroup> | ||
28 | </Project> | ||
diff --git a/Lua52.props b/Lua52.props new file mode 100644 index 0000000..01afcfa --- /dev/null +++ b/Lua52.props | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | <ImportGroup Label="PropertySheets" /> | ||
4 | <PropertyGroup Label="UserMacros"> | ||
5 | <LUABIN_PATH>..\build\vc12\bin\lua\5.2\</LUABIN_PATH> | ||
6 | <LUALIB_PATH>..\build\vc12\bin\lua\5.2\</LUALIB_PATH> | ||
7 | <LUAINC_PATH>..\build\vc12\include\lua\5.2\</LUAINC_PATH> | ||
8 | <LUALIB>lua52.lib</LUALIB> | ||
9 | </PropertyGroup> | ||
10 | <PropertyGroup> | ||
11 | <_PropertySheetDisplayName>Lua52</_PropertySheetDisplayName> | ||
12 | </PropertyGroup> | ||
13 | <ItemDefinitionGroup /> | ||
14 | <ItemGroup> | ||
15 | <BuildMacro Include="LUALIB_PATH"> | ||
16 | <Value>$(LUALIB_PATH)</Value> | ||
17 | </BuildMacro> | ||
18 | <BuildMacro Include="LUABIN_PATH"> | ||
19 | <Value>$(LUABIN_PATH)</Value> | ||
20 | </BuildMacro> | ||
21 | <BuildMacro Include="LUAINC_PATH"> | ||
22 | <Value>$(LUAINC_PATH)</Value> | ||
23 | </BuildMacro> | ||
24 | <BuildMacro Include="LUALIB"> | ||
25 | <Value>$(LUALIB)</Value> | ||
26 | </BuildMacro> | ||
27 | </ItemGroup> | ||
28 | </Project> | ||
diff --git a/mime.vcxproj b/mime.vcxproj index 95781f2..63f5452 100755 --- a/mime.vcxproj +++ b/mime.vcxproj | |||
@@ -21,6 +21,19 @@ | |||
21 | <ItemGroup> | 21 | <ItemGroup> |
22 | <ClCompile Include="src\mime.c" /> | 22 | <ClCompile Include="src\mime.c" /> |
23 | </ItemGroup> | 23 | </ItemGroup> |
24 | <ItemGroup> | ||
25 | <CustomBuild Include="src\mime.lua"> | ||
26 | <FileType>Document</FileType> | ||
27 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)</Command> | ||
28 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
29 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)</Command> | ||
30 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
31 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUALIB_PATH)$(Platform)\$(Configuration)</Command> | ||
32 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUALIB_PATH)$(Platform)\$(Configuration)</Command> | ||
33 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
34 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
35 | </CustomBuild> | ||
36 | </ItemGroup> | ||
24 | <PropertyGroup Label="Globals"> | 37 | <PropertyGroup Label="Globals"> |
25 | <ProjectGuid>{128E8BD0-174A-48F0-8771-92B1E8D18713}</ProjectGuid> | 38 | <ProjectGuid>{128E8BD0-174A-48F0-8771-92B1E8D18713}</ProjectGuid> |
26 | <Keyword>Win32Proj</Keyword> | 39 | <Keyword>Win32Proj</Keyword> |
@@ -52,25 +65,29 @@ | |||
52 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 65 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
53 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 66 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
54 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 67 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
68 | <Import Project="Lua.props" /> | ||
55 | </ImportGroup> | 69 | </ImportGroup> |
56 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 70 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
57 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 71 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
58 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 72 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
73 | <Import Project="Lua.props" /> | ||
59 | </ImportGroup> | 74 | </ImportGroup> |
60 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 75 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
61 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 76 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
62 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 77 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
78 | <Import Project="Lua.props" /> | ||
63 | </ImportGroup> | 79 | </ImportGroup> |
64 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 80 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
65 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 81 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
66 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 82 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
83 | <Import Project="Lua.props" /> | ||
67 | </ImportGroup> | 84 | </ImportGroup> |
68 | <PropertyGroup Label="UserMacros" /> | 85 | <PropertyGroup Label="UserMacros" /> |
69 | <PropertyGroup> | 86 | <PropertyGroup> |
70 | <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion> | 87 | <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion> |
71 | </PropertyGroup> | 88 | </PropertyGroup> |
72 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 89 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
73 | <OutDir>$(SolutionDir)\$(Configuration)\mime\</OutDir> | 90 | <OutDir>$(LUABIN_PATH)$(Configuration)\mime\</OutDir> |
74 | <IntDir>$(Configuration)\</IntDir> | 91 | <IntDir>$(Configuration)\</IntDir> |
75 | <LinkIncremental>true</LinkIncremental> | 92 | <LinkIncremental>true</LinkIncremental> |
76 | <TargetName>core</TargetName> | 93 | <TargetName>core</TargetName> |
@@ -78,23 +95,23 @@ | |||
78 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 95 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
79 | <LinkIncremental>true</LinkIncremental> | 96 | <LinkIncremental>true</LinkIncremental> |
80 | <TargetName>core</TargetName> | 97 | <TargetName>core</TargetName> |
81 | <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\mime\</OutDir> | 98 | <OutDir>$(LUABIN_PATH)$(Platform)\$(Configuration)\mime\</OutDir> |
82 | </PropertyGroup> | 99 | </PropertyGroup> |
83 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 100 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
84 | <OutDir>$(SolutionDir)\$(Configuration)\mime\</OutDir> | 101 | <OutDir>$(LUABIN_PATH)$(Configuration)\mime\</OutDir> |
85 | <IntDir>$(Configuration)\</IntDir> | 102 | <IntDir>$(Configuration)\</IntDir> |
86 | <LinkIncremental>false</LinkIncremental> | 103 | <LinkIncremental>false</LinkIncremental> |
87 | <TargetName>core</TargetName> | 104 | <TargetName>core</TargetName> |
88 | </PropertyGroup> | 105 | </PropertyGroup> |
89 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 106 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
90 | <LinkIncremental>false</LinkIncremental> | 107 | <LinkIncremental>false</LinkIncremental> |
91 | <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\mime\</OutDir> | 108 | <OutDir>$(LUABIN_PATH)$(Platform)\$(Configuration)\mime\</OutDir> |
92 | <TargetName>core</TargetName> | 109 | <TargetName>core</TargetName> |
93 | </PropertyGroup> | 110 | </PropertyGroup> |
94 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 111 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
95 | <ClCompile> | 112 | <ClCompile> |
96 | <Optimization>Disabled</Optimization> | 113 | <Optimization>Disabled</Optimization> |
97 | <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 114 | <AdditionalIncludeDirectories>$(LUAINC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
98 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 115 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
99 | <MinimalRebuild>true</MinimalRebuild> | 116 | <MinimalRebuild>true</MinimalRebuild> |
100 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 117 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
@@ -102,11 +119,12 @@ | |||
102 | <PrecompiledHeader /> | 119 | <PrecompiledHeader /> |
103 | <WarningLevel>Level3</WarningLevel> | 120 | <WarningLevel>Level3</WarningLevel> |
104 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 121 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
122 | <ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName> | ||
105 | </ClCompile> | 123 | </ClCompile> |
106 | <Link> | 124 | <Link> |
107 | <AdditionalDependencies>lualib.lib;%(AdditionalDependencies)</AdditionalDependencies> | 125 | <AdditionalDependencies>$(LUALIB);%(AdditionalDependencies)</AdditionalDependencies> |
108 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> | 126 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> |
109 | <AdditionalLibraryDirectories>..\bin\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 127 | <AdditionalLibraryDirectories>$(LUALIB_PATH)$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
110 | <GenerateDebugInformation>true</GenerateDebugInformation> | 128 | <GenerateDebugInformation>true</GenerateDebugInformation> |
111 | <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> | 129 | <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> |
112 | <SubSystem>Windows</SubSystem> | 130 | <SubSystem>Windows</SubSystem> |
@@ -114,12 +132,13 @@ | |||
114 | <DataExecutionPrevention /> | 132 | <DataExecutionPrevention /> |
115 | <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> | 133 | <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> |
116 | <TargetMachine>MachineX86</TargetMachine> | 134 | <TargetMachine>MachineX86</TargetMachine> |
135 | <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> | ||
117 | </Link> | 136 | </Link> |
118 | </ItemDefinitionGroup> | 137 | </ItemDefinitionGroup> |
119 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 138 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
120 | <ClCompile> | 139 | <ClCompile> |
121 | <Optimization>Disabled</Optimization> | 140 | <Optimization>Disabled</Optimization> |
122 | <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 141 | <AdditionalIncludeDirectories>$(LUAINC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
123 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 142 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
124 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 143 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
125 | <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> | 144 | <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> |
@@ -127,11 +146,12 @@ | |||
127 | </PrecompiledHeader> | 146 | </PrecompiledHeader> |
128 | <WarningLevel>Level3</WarningLevel> | 147 | <WarningLevel>Level3</WarningLevel> |
129 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 148 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
149 | <ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName> | ||
130 | </ClCompile> | 150 | </ClCompile> |
131 | <Link> | 151 | <Link> |
132 | <AdditionalDependencies>lualib.lib;%(AdditionalDependencies)</AdditionalDependencies> | 152 | <AdditionalDependencies>$(LUALIB);%(AdditionalDependencies)</AdditionalDependencies> |
133 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> | 153 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> |
134 | <AdditionalLibraryDirectories>..\bin\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 154 | <AdditionalLibraryDirectories>$(LUALIB_PATH)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
135 | <GenerateDebugInformation>true</GenerateDebugInformation> | 155 | <GenerateDebugInformation>true</GenerateDebugInformation> |
136 | <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> | 156 | <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> |
137 | <SubSystem>Windows</SubSystem> | 157 | <SubSystem>Windows</SubSystem> |
@@ -143,17 +163,18 @@ | |||
143 | </ItemDefinitionGroup> | 163 | </ItemDefinitionGroup> |
144 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 164 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
145 | <ClCompile> | 165 | <ClCompile> |
146 | <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 166 | <AdditionalIncludeDirectories>$(LUAINC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
147 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 167 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
148 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> | 168 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> |
149 | <PrecompiledHeader /> | 169 | <PrecompiledHeader /> |
150 | <WarningLevel>Level4</WarningLevel> | 170 | <WarningLevel>Level4</WarningLevel> |
151 | <DebugInformationFormat /> | 171 | <DebugInformationFormat /> |
172 | <ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName> | ||
152 | </ClCompile> | 173 | </ClCompile> |
153 | <Link> | 174 | <Link> |
154 | <AdditionalDependencies>lualib.lib;%(AdditionalDependencies)</AdditionalDependencies> | 175 | <AdditionalDependencies>$(LUALIB);%(AdditionalDependencies)</AdditionalDependencies> |
155 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> | 176 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> |
156 | <AdditionalLibraryDirectories>..\bin\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 177 | <AdditionalLibraryDirectories>$(LUALIB_PATH)$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
157 | <GenerateDebugInformation>true</GenerateDebugInformation> | 178 | <GenerateDebugInformation>true</GenerateDebugInformation> |
158 | <SubSystem>Windows</SubSystem> | 179 | <SubSystem>Windows</SubSystem> |
159 | <OptimizeReferences>true</OptimizeReferences> | 180 | <OptimizeReferences>true</OptimizeReferences> |
@@ -166,7 +187,7 @@ | |||
166 | </ItemDefinitionGroup> | 187 | </ItemDefinitionGroup> |
167 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 188 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
168 | <ClCompile> | 189 | <ClCompile> |
169 | <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 190 | <AdditionalIncludeDirectories>$(LUAINC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
170 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 191 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
171 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> | 192 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> |
172 | <PrecompiledHeader> | 193 | <PrecompiledHeader> |
@@ -174,11 +195,12 @@ | |||
174 | <WarningLevel>Level4</WarningLevel> | 195 | <WarningLevel>Level4</WarningLevel> |
175 | <DebugInformationFormat> | 196 | <DebugInformationFormat> |
176 | </DebugInformationFormat> | 197 | </DebugInformationFormat> |
198 | <ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName> | ||
177 | </ClCompile> | 199 | </ClCompile> |
178 | <Link> | 200 | <Link> |
179 | <AdditionalDependencies>lualib.lib;%(AdditionalDependencies)</AdditionalDependencies> | 201 | <AdditionalDependencies>$(LUALIB);%(AdditionalDependencies)</AdditionalDependencies> |
180 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> | 202 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> |
181 | <AdditionalLibraryDirectories>..\bin\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 203 | <AdditionalLibraryDirectories>$(LUALIB_PATH)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
182 | <GenerateDebugInformation>true</GenerateDebugInformation> | 204 | <GenerateDebugInformation>true</GenerateDebugInformation> |
183 | <SubSystem>Windows</SubSystem> | 205 | <SubSystem>Windows</SubSystem> |
184 | <OptimizeReferences>true</OptimizeReferences> | 206 | <OptimizeReferences>true</OptimizeReferences> |
diff --git a/mime.vcxproj.filters b/mime.vcxproj.filters new file mode 100644 index 0000000..621215b --- /dev/null +++ b/mime.vcxproj.filters | |||
@@ -0,0 +1,16 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | <ItemGroup> | ||
4 | <ClCompile Include="src\mime.c" /> | ||
5 | </ItemGroup> | ||
6 | <ItemGroup> | ||
7 | <Filter Include="cdir"> | ||
8 | <UniqueIdentifier>{fad87a86-297c-4881-a114-73b967bb3c92}</UniqueIdentifier> | ||
9 | </Filter> | ||
10 | </ItemGroup> | ||
11 | <ItemGroup> | ||
12 | <CustomBuild Include="src\mime.lua"> | ||
13 | <Filter>cdir</Filter> | ||
14 | </CustomBuild> | ||
15 | </ItemGroup> | ||
16 | </Project> \ No newline at end of file | ||
diff --git a/socket.vcxproj b/socket.vcxproj index 0256c90..53c5539 100755 --- a/socket.vcxproj +++ b/socket.vcxproj | |||
@@ -32,6 +32,98 @@ | |||
32 | <ClCompile Include="src\udp.c" /> | 32 | <ClCompile Include="src\udp.c" /> |
33 | <ClCompile Include="src\wsocket.c" /> | 33 | <ClCompile Include="src\wsocket.c" /> |
34 | </ItemGroup> | 34 | </ItemGroup> |
35 | <ItemGroup> | ||
36 | <CustomBuild Include="src\ltn12.lua"> | ||
37 | <FileType>Document</FileType> | ||
38 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)</Command> | ||
39 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)</Command> | ||
40 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)</Command> | ||
41 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)</Command> | ||
42 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
43 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
44 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
45 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
46 | </CustomBuild> | ||
47 | <CustomBuild Include="src\socket.lua"> | ||
48 | <FileType>Document</FileType> | ||
49 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)</Command> | ||
50 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)</Command> | ||
51 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)</Command> | ||
52 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)</Command> | ||
53 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
54 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
55 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
56 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs> | ||
57 | </CustomBuild> | ||
58 | </ItemGroup> | ||
59 | <ItemGroup> | ||
60 | <CustomBuild Include="src\ftp.lua"> | ||
61 | <FileType>Document</FileType> | ||
62 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
63 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
64 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
65 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
66 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
67 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
68 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
69 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
70 | </CustomBuild> | ||
71 | <CustomBuild Include="src\headers.lua"> | ||
72 | <FileType>Document</FileType> | ||
73 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
74 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
75 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
76 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
77 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
78 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
79 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
80 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
81 | </CustomBuild> | ||
82 | <CustomBuild Include="src\http.lua"> | ||
83 | <FileType>Document</FileType> | ||
84 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
85 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
86 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
87 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
88 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
89 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
90 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
91 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
92 | </CustomBuild> | ||
93 | <CustomBuild Include="src\smtp.lua"> | ||
94 | <FileType>Document</FileType> | ||
95 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
96 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
97 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
98 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
99 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
100 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
101 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
102 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
103 | </CustomBuild> | ||
104 | <CustomBuild Include="src\tp.lua"> | ||
105 | <FileType>Document</FileType> | ||
106 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
107 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
108 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
109 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
110 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
111 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
112 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
113 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
114 | </CustomBuild> | ||
115 | <CustomBuild Include="src\url.lua"> | ||
116 | <FileType>Document</FileType> | ||
117 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
118 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
119 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
120 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LUABIN_PATH)$(Configuration)\socket\%(Filename)%(Extension)</Outputs> | ||
121 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
122 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(LUABIN_PATH)$(Platform)\$(Configuration)\socket</Command> | ||
123 | <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
124 | <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(LUABIN_PATH)$(Configuration)\socket</Command> | ||
125 | </CustomBuild> | ||
126 | </ItemGroup> | ||
35 | <PropertyGroup Label="Globals"> | 127 | <PropertyGroup Label="Globals"> |
36 | <ProjectGuid>{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}</ProjectGuid> | 128 | <ProjectGuid>{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}</ProjectGuid> |
37 | <Keyword>Win32Proj</Keyword> | 129 | <Keyword>Win32Proj</Keyword> |
@@ -63,25 +155,29 @@ | |||
63 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 155 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
64 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 156 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
65 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 157 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
158 | <Import Project="Lua.props" /> | ||
66 | </ImportGroup> | 159 | </ImportGroup> |
67 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 160 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
68 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 161 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
69 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 162 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
163 | <Import Project="Lua.props" /> | ||
70 | </ImportGroup> | 164 | </ImportGroup> |
71 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 165 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
72 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 166 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
73 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 167 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
168 | <Import Project="Lua.props" /> | ||
74 | </ImportGroup> | 169 | </ImportGroup> |
75 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 170 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
76 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 171 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
77 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 172 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
173 | <Import Project="Lua.props" /> | ||
78 | </ImportGroup> | 174 | </ImportGroup> |
79 | <PropertyGroup Label="UserMacros" /> | 175 | <PropertyGroup Label="UserMacros" /> |
80 | <PropertyGroup> | 176 | <PropertyGroup> |
81 | <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion> | 177 | <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion> |
82 | </PropertyGroup> | 178 | </PropertyGroup> |
83 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 179 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
84 | <OutDir>$(SolutionDir)\$(Configuration)\socket\</OutDir> | 180 | <OutDir>$(LUALIB_PATH)$(Configuration)\socket\</OutDir> |
85 | <IntDir>$(Configuration)\</IntDir> | 181 | <IntDir>$(Configuration)\</IntDir> |
86 | <LinkIncremental>true</LinkIncremental> | 182 | <LinkIncremental>true</LinkIncremental> |
87 | <TargetName>core</TargetName> | 183 | <TargetName>core</TargetName> |
@@ -89,23 +185,23 @@ | |||
89 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 185 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
90 | <LinkIncremental>true</LinkIncremental> | 186 | <LinkIncremental>true</LinkIncremental> |
91 | <TargetName>core</TargetName> | 187 | <TargetName>core</TargetName> |
92 | <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\socket\</OutDir> | 188 | <OutDir>$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\</OutDir> |
93 | </PropertyGroup> | 189 | </PropertyGroup> |
94 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 190 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
95 | <OutDir>$(SolutionDir)\$(Configuration)\socket\</OutDir> | 191 | <OutDir>$(LUALIB_PATH)$(Configuration)\socket\</OutDir> |
96 | <IntDir>$(Configuration)\</IntDir> | 192 | <IntDir>$(Configuration)\</IntDir> |
97 | <LinkIncremental>false</LinkIncremental> | 193 | <LinkIncremental>false</LinkIncremental> |
98 | <TargetName>core</TargetName> | 194 | <TargetName>core</TargetName> |
99 | </PropertyGroup> | 195 | </PropertyGroup> |
100 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 196 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
101 | <LinkIncremental>false</LinkIncremental> | 197 | <LinkIncremental>false</LinkIncremental> |
102 | <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\socket\</OutDir> | 198 | <OutDir>$(LUABIN_PATH)$(Platform)\$(Configuration)\socket\</OutDir> |
103 | <TargetName>core</TargetName> | 199 | <TargetName>core</TargetName> |
104 | </PropertyGroup> | 200 | </PropertyGroup> |
105 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 201 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
106 | <ClCompile> | 202 | <ClCompile> |
107 | <Optimization>Disabled</Optimization> | 203 | <Optimization>Disabled</Optimization> |
108 | <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 204 | <AdditionalIncludeDirectories>$(LUAINC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
109 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;LUASOCKET_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 205 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;LUASOCKET_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
110 | <MinimalRebuild>true</MinimalRebuild> | 206 | <MinimalRebuild>true</MinimalRebuild> |
111 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 207 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
@@ -113,11 +209,12 @@ | |||
113 | <PrecompiledHeader /> | 209 | <PrecompiledHeader /> |
114 | <WarningLevel>Level3</WarningLevel> | 210 | <WarningLevel>Level3</WarningLevel> |
115 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 211 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
212 | <ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName> | ||
116 | </ClCompile> | 213 | </ClCompile> |
117 | <Link> | 214 | <Link> |
118 | <AdditionalDependencies>lualib.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> | 215 | <AdditionalDependencies>$(LUALIB);wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
119 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> | 216 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> |
120 | <AdditionalLibraryDirectories>..\bin\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 217 | <AdditionalLibraryDirectories>$(LUALIB_PATH)$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
121 | <GenerateDebugInformation>true</GenerateDebugInformation> | 218 | <GenerateDebugInformation>true</GenerateDebugInformation> |
122 | <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> | 219 | <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> |
123 | <SubSystem>Windows</SubSystem> | 220 | <SubSystem>Windows</SubSystem> |
@@ -125,12 +222,13 @@ | |||
125 | <DataExecutionPrevention /> | 222 | <DataExecutionPrevention /> |
126 | <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> | 223 | <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> |
127 | <TargetMachine>MachineX86</TargetMachine> | 224 | <TargetMachine>MachineX86</TargetMachine> |
225 | <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> | ||
128 | </Link> | 226 | </Link> |
129 | </ItemDefinitionGroup> | 227 | </ItemDefinitionGroup> |
130 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 228 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
131 | <ClCompile> | 229 | <ClCompile> |
132 | <Optimization>Disabled</Optimization> | 230 | <Optimization>Disabled</Optimization> |
133 | <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 231 | <AdditionalIncludeDirectories>$(LUAINC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
134 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;LUASOCKET_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 232 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;LUASOCKET_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
135 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 233 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
136 | <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> | 234 | <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> |
@@ -138,11 +236,12 @@ | |||
138 | </PrecompiledHeader> | 236 | </PrecompiledHeader> |
139 | <WarningLevel>Level3</WarningLevel> | 237 | <WarningLevel>Level3</WarningLevel> |
140 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 238 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
239 | <ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName> | ||
141 | </ClCompile> | 240 | </ClCompile> |
142 | <Link> | 241 | <Link> |
143 | <AdditionalDependencies>lualib.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> | 242 | <AdditionalDependencies>$(LUALIB);wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
144 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> | 243 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> |
145 | <AdditionalLibraryDirectories>..\bin\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 244 | <AdditionalLibraryDirectories>$(LUALIB_PATH)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
146 | <GenerateDebugInformation>true</GenerateDebugInformation> | 245 | <GenerateDebugInformation>true</GenerateDebugInformation> |
147 | <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> | 246 | <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> |
148 | <SubSystem>Windows</SubSystem> | 247 | <SubSystem>Windows</SubSystem> |
@@ -154,17 +253,18 @@ | |||
154 | </ItemDefinitionGroup> | 253 | </ItemDefinitionGroup> |
155 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 254 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
156 | <ClCompile> | 255 | <ClCompile> |
157 | <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 256 | <AdditionalIncludeDirectories>$(LUAINC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
158 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 257 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
159 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> | 258 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> |
160 | <PrecompiledHeader /> | 259 | <PrecompiledHeader /> |
161 | <WarningLevel>Level4</WarningLevel> | 260 | <WarningLevel>Level4</WarningLevel> |
162 | <DebugInformationFormat /> | 261 | <DebugInformationFormat /> |
262 | <ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName> | ||
163 | </ClCompile> | 263 | </ClCompile> |
164 | <Link> | 264 | <Link> |
165 | <AdditionalDependencies>lualib.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> | 265 | <AdditionalDependencies>$(LUALIB);wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
166 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> | 266 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> |
167 | <AdditionalLibraryDirectories>..\bin\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 267 | <AdditionalLibraryDirectories>$(LUALIB_PATH)$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
168 | <GenerateDebugInformation>true</GenerateDebugInformation> | 268 | <GenerateDebugInformation>true</GenerateDebugInformation> |
169 | <SubSystem>Windows</SubSystem> | 269 | <SubSystem>Windows</SubSystem> |
170 | <OptimizeReferences>true</OptimizeReferences> | 270 | <OptimizeReferences>true</OptimizeReferences> |
@@ -177,7 +277,7 @@ | |||
177 | </ItemDefinitionGroup> | 277 | </ItemDefinitionGroup> |
178 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 278 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
179 | <ClCompile> | 279 | <ClCompile> |
180 | <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 280 | <AdditionalIncludeDirectories>$(LUAINC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
181 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 281 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
182 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> | 282 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> |
183 | <PrecompiledHeader> | 283 | <PrecompiledHeader> |
@@ -185,11 +285,12 @@ | |||
185 | <WarningLevel>Level4</WarningLevel> | 285 | <WarningLevel>Level4</WarningLevel> |
186 | <DebugInformationFormat> | 286 | <DebugInformationFormat> |
187 | </DebugInformationFormat> | 287 | </DebugInformationFormat> |
288 | <ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName> | ||
188 | </ClCompile> | 289 | </ClCompile> |
189 | <Link> | 290 | <Link> |
190 | <AdditionalDependencies>lualib.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> | 291 | <AdditionalDependencies>$(LUALIB);wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
191 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> | 292 | <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> |
192 | <AdditionalLibraryDirectories>..\bin\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 293 | <AdditionalLibraryDirectories>$(LUALIB_PATH)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
193 | <GenerateDebugInformation>true</GenerateDebugInformation> | 294 | <GenerateDebugInformation>true</GenerateDebugInformation> |
194 | <SubSystem>Windows</SubSystem> | 295 | <SubSystem>Windows</SubSystem> |
195 | <OptimizeReferences>true</OptimizeReferences> | 296 | <OptimizeReferences>true</OptimizeReferences> |
diff --git a/socket.vcxproj.filters b/socket.vcxproj.filters new file mode 100644 index 0000000..38f2f07 --- /dev/null +++ b/socket.vcxproj.filters | |||
@@ -0,0 +1,51 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | <ItemGroup> | ||
4 | <ClCompile Include="src\auxiliar.c" /> | ||
5 | <ClCompile Include="src\buffer.c" /> | ||
6 | <ClCompile Include="src\except.c" /> | ||
7 | <ClCompile Include="src\inet.c" /> | ||
8 | <ClCompile Include="src\io.c" /> | ||
9 | <ClCompile Include="src\luasocket.c" /> | ||
10 | <ClCompile Include="src\options.c" /> | ||
11 | <ClCompile Include="src\select.c" /> | ||
12 | <ClCompile Include="src\tcp.c" /> | ||
13 | <ClCompile Include="src\timeout.c" /> | ||
14 | <ClCompile Include="src\udp.c" /> | ||
15 | <ClCompile Include="src\wsocket.c" /> | ||
16 | </ItemGroup> | ||
17 | <ItemGroup> | ||
18 | <CustomBuild Include="src\ltn12.lua"> | ||
19 | <Filter>cdir</Filter> | ||
20 | </CustomBuild> | ||
21 | <CustomBuild Include="src\socket.lua"> | ||
22 | <Filter>cdir</Filter> | ||
23 | </CustomBuild> | ||
24 | <CustomBuild Include="src\ftp.lua"> | ||
25 | <Filter>ldir</Filter> | ||
26 | </CustomBuild> | ||
27 | <CustomBuild Include="src\headers.lua"> | ||
28 | <Filter>ldir</Filter> | ||
29 | </CustomBuild> | ||
30 | <CustomBuild Include="src\http.lua"> | ||
31 | <Filter>ldir</Filter> | ||
32 | </CustomBuild> | ||
33 | <CustomBuild Include="src\smtp.lua"> | ||
34 | <Filter>ldir</Filter> | ||
35 | </CustomBuild> | ||
36 | <CustomBuild Include="src\tp.lua"> | ||
37 | <Filter>ldir</Filter> | ||
38 | </CustomBuild> | ||
39 | <CustomBuild Include="src\url.lua"> | ||
40 | <Filter>ldir</Filter> | ||
41 | </CustomBuild> | ||
42 | </ItemGroup> | ||
43 | <ItemGroup> | ||
44 | <Filter Include="cdir"> | ||
45 | <UniqueIdentifier>{b053460d-5439-4e3a-a2eb-c31a95b5691f}</UniqueIdentifier> | ||
46 | </Filter> | ||
47 | <Filter Include="ldir"> | ||
48 | <UniqueIdentifier>{b301b82c-37cb-4e05-9333-194e92ed7a62}</UniqueIdentifier> | ||
49 | </Filter> | ||
50 | </ItemGroup> | ||
51 | </Project> \ No newline at end of file | ||
@@ -502,7 +502,7 @@ const char *inet_trybind(p_socket ps, const char *address, const char *serv, | |||
502 | * Some systems do not provide this so that we provide our own. It's not | 502 | * Some systems do not provide this so that we provide our own. It's not |
503 | * marvelously fast, but it works just fine. | 503 | * marvelously fast, but it works just fine. |
504 | \*-------------------------------------------------------------------------*/ | 504 | \*-------------------------------------------------------------------------*/ |
505 | #ifdef INET_ATON | 505 | #ifdef LUASOCKET_INET_ATON |
506 | int inet_aton(const char *cp, struct in_addr *inp) | 506 | int inet_aton(const char *cp, struct in_addr *inp) |
507 | { | 507 | { |
508 | unsigned int a = 0, b = 0, c = 0, d = 0; | 508 | unsigned int a = 0, b = 0, c = 0, d = 0; |
@@ -529,7 +529,7 @@ int inet_aton(const char *cp, struct in_addr *inp) | |||
529 | * http://mingw-users.1079350.n2.nabble.com/IPv6-getaddrinfo-amp-inet-ntop-td5891996.html | 529 | * http://mingw-users.1079350.n2.nabble.com/IPv6-getaddrinfo-amp-inet-ntop-td5891996.html |
530 | \*-------------------------------------------------------------------------*/ | 530 | \*-------------------------------------------------------------------------*/ |
531 | 531 | ||
532 | #ifdef INET_PTON | 532 | #ifdef LUASOCKET_INET_PTON |
533 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt) | 533 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt) |
534 | { | 534 | { |
535 | if (af == AF_INET) { | 535 | if (af == AF_INET) { |
@@ -19,8 +19,7 @@ | |||
19 | #include "timeout.h" | 19 | #include "timeout.h" |
20 | 20 | ||
21 | #ifdef _WIN32 | 21 | #ifdef _WIN32 |
22 | #define INET_ATON | 22 | #define LUASOCKET_INET_ATON |
23 | #define INET_PTON | ||
24 | #endif | 23 | #endif |
25 | 24 | ||
26 | int inet_open(lua_State *L); | 25 | int inet_open(lua_State *L); |
@@ -39,11 +38,11 @@ int inet_meth_getsockname(lua_State *L, p_socket ps, int family); | |||
39 | int inet_optfamily(lua_State* L, int narg, const char* def); | 38 | int inet_optfamily(lua_State* L, int narg, const char* def); |
40 | int inet_optsocktype(lua_State* L, int narg, const char* def); | 39 | int inet_optsocktype(lua_State* L, int narg, const char* def); |
41 | 40 | ||
42 | #ifdef INET_ATON | 41 | #ifdef LUASOCKET_INET_ATON |
43 | int inet_aton(const char *cp, struct in_addr *inp); | 42 | int inet_aton(const char *cp, struct in_addr *inp); |
44 | #endif | 43 | #endif |
45 | 44 | ||
46 | #ifdef INET_PTON | 45 | #ifdef LUASOCKET_INET_PTON |
47 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); | 46 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); |
48 | int inet_pton(int af, const char *src, void *dst); | 47 | int inet_pton(int af, const char *src, void *dst); |
49 | #endif | 48 | #endif |
diff --git a/src/makefile b/src/makefile index fbb26a0..c44f4ef 100644 --- a/src/makefile +++ b/src/makefile | |||
@@ -63,12 +63,13 @@ LDIR_mingw?=lua/$(LUAV)/lua | |||
63 | # LUAINC_win32: | 63 | # LUAINC_win32: |
64 | # LUALIB_win32: | 64 | # LUALIB_win32: |
65 | # where lua headers and libraries are found for win32 builds | 65 | # where lua headers and libraries are found for win32 builds |
66 | LUAINC_win32?="../../lua-5.1.3/src" | 66 | LUAINC_win32_base?= |
67 | LUALIB_win32?=/LIBPATH:"../../lua-5.1.3" lua$(LUAV).lib | 67 | LUAINC_win32?=$(LUAINC_win32_base)/lua/$(LUAV) |
68 | 68 | PLATFORM_win32?=Release | |
69 | LUAPREFIX_win32?= | 69 | LUAPREFIX_win32?= |
70 | CDIR_win32?=lua/$(LUAV) | 70 | CDIR_win32?=lua/$(LUAV)/$(PLATFORM_win32) |
71 | LDIR_win32?=lua/$(LUAV)/lua | 71 | LDIR_win32?=lua/$(LUAV)/$(PLATFORM_win32)/lua |
72 | LUALIB_win32?=$(LUAPREFIX_win32)/lua/$(LUAV)/$(PLATFORM_win32) | ||
72 | 73 | ||
73 | # prefix: /usr/local /usr /opt/local /sw | 74 | # prefix: /usr/local /usr /opt/local /sw |
74 | # the top of the default install tree | 75 | # the top of the default install tree |
@@ -154,8 +155,8 @@ SOCKET_linux=usocket.o | |||
154 | SO_mingw=dll | 155 | SO_mingw=dll |
155 | O_mingw=o | 156 | O_mingw=o |
156 | CC_mingw=gcc | 157 | CC_mingw=gcc |
157 | DEF_mingw= -DLUASOCKET_$(DEBUG) -DLUA_COMPAT_MODULE -DWINVER=0x0501 \ | 158 | DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) -DLUA_COMPAT_MODULE \ |
158 | -DLUASOCKET_API='__declspec(dllexport)' \ | 159 | -DWINVER=0x0501 -DLUASOCKET_API='__declspec(dllexport)' \ |
159 | -DMIME_API='__declspec(dllexport)' | 160 | -DMIME_API='__declspec(dllexport)' |
160 | CFLAGS_mingw= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ | 161 | CFLAGS_mingw= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ |
161 | -fvisibility=hidden | 162 | -fvisibility=hidden |
@@ -170,23 +171,25 @@ SOCKET_mingw=wsocket.o | |||
170 | SO_win32=dll | 171 | SO_win32=dll |
171 | O_win32=obj | 172 | O_win32=obj |
172 | CC_win32=cl | 173 | CC_win32=cl |
173 | DEF_win32= /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" \ | 174 | DEF_win32= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \ |
174 | /D "LUASOCKET_API=__declspec(dllexport)" /D "_CRT_SECURE_NO_WARNINGS" \ | 175 | //D "LUASOCKET_API=__declspec(dllexport)" //D "_CRT_SECURE_NO_WARNINGS" \ |
175 | /D "_WINDLL" /D "LUA_COMPAT_MODULE" /D "MIME_API=__declspec(dllexport)" \ | 176 | //D "_WINDLL" //D "LUA_COMPAT_MODULE" \ |
176 | /D "LUASOCKET_$(DEBUG)" | 177 | //D "MIME_API=__declspec(dllexport)" \ |
177 | CFLAGS_win32=/I "$(LUAINC)" $(DEF) /O2 /Ot /MD /W3 /nologo | 178 | //D "LUASOCKET_$(DEBUG)" |
178 | LDFLAGS_win32= /nologo /link /NOLOGO /DLL /INCREMENTAL:NO \ | 179 | CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo |
179 | /MANIFEST /MANIFESTFILE:"intermediate.manifest" \ | 180 | LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \ |
180 | /MANIFESTUAC:"level='asInvoker' uiAccess='false'" \ | 181 | //MANIFEST //MANIFESTFILE:"intermediate.manifest" \ |
181 | /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /DYNAMICBASE:NO \ | 182 | //MANIFESTUAC:"level='asInvoker' uiAccess='false'" \ |
182 | /MACHINE:X86 $(LUALIB) ws2_32.lib /OUT: | 183 | //SUBSYSTEM:WINDOWS //OPT:REF //OPT:ICF //DYNAMICBASE:NO \ |
184 | //MACHINE:X86 /LIBPATH:"$(shell cmd //c echo $(LUALIB))" lua$(subst .,,$(LUAV)).lib \ | ||
185 | wsock32.lib ws2_32.lib //OUT: | ||
183 | LD_win32=cl | 186 | LD_win32=cl |
184 | SOCKET_win32=wsocket.obj | 187 | SOCKET_win32=wsocket.obj |
185 | 188 | ||
186 | .SUFFIXES: .obj | 189 | .SUFFIXES: .obj |
187 | 190 | ||
188 | .c.obj: | 191 | .c.obj: |
189 | $(CC) $(CFLAGS) /Fo"$@" /c $< | 192 | $(CC) $(CFLAGS) //Fo"$@" //c $< |
190 | 193 | ||
191 | #------ | 194 | #------ |
192 | # Output file names | 195 | # Output file names |