|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59406 - in sandbox/SOC/2007/cgi/trunk/libs/cgi: build/msvc/9.0/Boost.CGI build/msvc/9.0/Boost.CGI/cgi_cookies build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game build/msvc/9.0/Boost.CGI/cgi_ctemplate_debug_server build/msvc/9.0/Boost.CGI/cgi_debug_server build/msvc/9.0/Boost.CGI/cgi_echo build/msvc/9.0/Boost.CGI/cgi_file_browser_debug build/msvc/9.0/Boost.CGI/cgi_hello_world build/msvc/9.0/Boost.CGI/fcgi_amortization build/msvc/9.0/Boost.CGI/fcgi_hello_world example/cgi/DebugServer example/cgi/DebugServer2 example/cgi/file_browser_debug example/fcgi/amortization example/fcgi/echo_threaded example/fcgi/file_browser
From: lists.drrngrvy_at_[hidden]
Date: 2010-01-31 21:50:44
Author: drrngrvy
Date: 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
New Revision: 59406
URL: http://svn.boost.org/trac/boost/changeset/59406
Log:
* Reorganising MSVC projects.
* A couple of bug fixes.
Added:
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_cookies/
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_cookies/cgi_cookies.vcproj (contents, props changed)
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/file_browser_debug/
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/file_browser_debug/main.cpp (contents, props changed)
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/Jamfile.v2 (contents, props changed)
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/doc.qbk (contents, props changed)
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/main.cpp (contents, props changed)
Text files modified:
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.sln | 12 ++++++------
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game/cgi_ctemplate_cookie_game.vcproj | 2 +-
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_debug_server/cgi_ctemplate_debug_server.vcproj | 2 +-
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_debug_server/cgi_debug_server.vcproj | 4 ++--
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_echo/cgi_echo.vcproj | 1 -
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_file_browser_debug/cgi_file_browser_debug.vcproj | 3 +--
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world/cgi_hello_world.vcproj | 2 --
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/fcgi_amortization/fcgi_amortization.vcproj | 4 ++--
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/fcgi_hello_world/fcgi_hello_world.vcproj | 2 --
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer/hello.cpp | 2 +-
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp | 1 -
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/amortization/main.cpp | 2 +-
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/file_browser/main.cpp | 1 +
13 files changed, 16 insertions(+), 22 deletions(-)
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.sln
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.sln (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.sln 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -27,8 +27,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcgi_speed_check", "fcgi_speed_check\fcgi_speed_check.vcproj", "{8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgi_cookie_game", "cgi_cookie_game\cgi_cookie_game.vcproj", "{10157442-F0A7-4D8D-8169-242F44FCF035}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgi_ctemplate_cookie_game", "cgi_ctemplate_cookie_game\cgi_ctemplate_cookie_game.vcproj", "{C18D47EA-742B-4256-8D9B-A3D2A1EB6E1C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgi_stencil", "cgi_stencil\cgi_stencil.vcproj", "{B08A2E6D-9973-42F3-9621-90F3BD4A1721}"
@@ -47,6 +45,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgi_images", "cgi_images\cgi_images.vcproj", "{B59C59FA-E4A0-498D-A8CF-9FAD68B4315C}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgi_cookies", "cgi_cookies\cgi_cookies.vcproj", "{C51C82EE-A1BB-4EA7-AD66-20929A7A6E24}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -104,10 +104,6 @@
{8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}.Debug|Win32.Build.0 = Debug|Win32
{8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}.Release|Win32.ActiveCfg = Release|Win32
{8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}.Release|Win32.Build.0 = Release|Win32
- {10157442-F0A7-4D8D-8169-242F44FCF035}.Debug|Win32.ActiveCfg = Debug|Win32
- {10157442-F0A7-4D8D-8169-242F44FCF035}.Debug|Win32.Build.0 = Debug|Win32
- {10157442-F0A7-4D8D-8169-242F44FCF035}.Release|Win32.ActiveCfg = Release|Win32
- {10157442-F0A7-4D8D-8169-242F44FCF035}.Release|Win32.Build.0 = Release|Win32
{C18D47EA-742B-4256-8D9B-A3D2A1EB6E1C}.Debug|Win32.ActiveCfg = Debug|Win32
{C18D47EA-742B-4256-8D9B-A3D2A1EB6E1C}.Debug|Win32.Build.0 = Debug|Win32
{C18D47EA-742B-4256-8D9B-A3D2A1EB6E1C}.Release|Win32.ActiveCfg = Release|Win32
@@ -144,6 +140,10 @@
{B59C59FA-E4A0-498D-A8CF-9FAD68B4315C}.Debug|Win32.Build.0 = Debug|Win32
{B59C59FA-E4A0-498D-A8CF-9FAD68B4315C}.Release|Win32.ActiveCfg = Release|Win32
{B59C59FA-E4A0-498D-A8CF-9FAD68B4315C}.Release|Win32.Build.0 = Release|Win32
+ {C51C82EE-A1BB-4EA7-AD66-20929A7A6E24}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C51C82EE-A1BB-4EA7-AD66-20929A7A6E24}.Debug|Win32.Build.0 = Debug|Win32
+ {C51C82EE-A1BB-4EA7-AD66-20929A7A6E24}.Release|Win32.ActiveCfg = Release|Win32
+ {C51C82EE-A1BB-4EA7-AD66-20929A7A6E24}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Added: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_cookies/cgi_cookies.vcproj
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_cookies/cgi_cookies.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="cgi_cookies"
+ ProjectGUID="{C51C82EE-A1BB-4EA7-AD66-20929A7A6E24}"
+ RootNamespace="acgi_cookie_game"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/D "_SCL_SECURE_NO_WARNINGS""
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="libctemplate-debug.lib"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy "$(TargetPath)" "c:\code\c++\boost.cgi\cgi-bin\$(TargetName)"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies\index.html" "c:\code\c++\boost.cgi\templates\index.html"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies\main.js" "c:\code\c++\boost.cgi\htdocs\js\main.js"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies\style.css" "c:\code\c++\boost.cgi\htdocs\css\style.css"
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="libctemplate.lib"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="C:\Boost\lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy "$(TargetPath)" "c:\code\c++\boost.cgi\cgi-bin\$(TargetName)"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies\index.html" "c:\code\c++\boost.cgi\templates\index.html"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies\main.js" "c:\code\c++\boost.cgi\htdocs\js\main.js"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies\style.css" "c:\code\c++\boost.cgi\htdocs\css\style.css"
"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="..\..\..\..\..\example\cgi\cookies\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game/cgi_ctemplate_cookie_game.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game/cgi_ctemplate_cookie_game.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game/cgi_ctemplate_cookie_game.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -136,7 +136,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libctemplate.lib
libboost_system-vc90-mt-1_38.lib"
+ AdditionalOptions="libctemplate.lib"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_debug_server/cgi_ctemplate_debug_server.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_debug_server/cgi_ctemplate_debug_server.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_debug_server/cgi_ctemplate_debug_server.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -61,7 +61,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-gd-1_38.lib
libctemplate-debug.lib"
+ AdditionalOptions="libctemplate-debug.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_debug_server/cgi_debug_server.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_debug_server/cgi_debug_server.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_debug_server/cgi_debug_server.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -61,7 +61,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-gd-1_38.lib"
+ AdditionalOptions="libctemplate-debug.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
@@ -137,7 +137,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-1_38.lib"
+ AdditionalOptions="libctemplate.lib"
LinkIncremental="1"
GenerateDebugInformation="false"
SubSystem="1"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_echo/cgi_echo.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_echo/cgi_echo.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_echo/cgi_echo.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -61,7 +61,6 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-gd-1_38.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib"
GenerateDebugInformation="true"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_file_browser_debug/cgi_file_browser_debug.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_file_browser_debug/cgi_file_browser_debug.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_file_browser_debug/cgi_file_browser_debug.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -61,7 +61,6 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-gd-1_38.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib"
GenerateDebugInformation="true"
@@ -176,7 +175,7 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath="..\..\..\..\..\example\cgi\file_browser_debug\main.cpp"
+ RelativePath="..\..\..\..\..\example\cgi\file_browser\main.cpp"
>
</File>
</Filter>
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world/cgi_hello_world.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world/cgi_hello_world.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world/cgi_hello_world.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -61,7 +61,6 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-gd-1_38.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib"
GenerateDebugInformation="true"
@@ -136,7 +135,6 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-1_38.lib"
LinkIncremental="1"
GenerateDebugInformation="false"
SubSystem="1"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/fcgi_amortization/fcgi_amortization.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/fcgi_amortization/fcgi_amortization.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/fcgi_amortization/fcgi_amortization.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -62,7 +62,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-gd-1_38.lib
libctemplate-debug.lib"
+ AdditionalOptions="libctemplate-debug.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
@@ -138,7 +138,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-1_38.lib
libctemplate.lib"
+ AdditionalOptions="libctemplate.lib"
LinkIncremental="1"
GenerateDebugInformation="false"
SubSystem="1"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/fcgi_hello_world/fcgi_hello_world.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/fcgi_hello_world/fcgi_hello_world.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/fcgi_hello_world/fcgi_hello_world.vcproj 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -60,7 +60,6 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-gd-1_38.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
@@ -133,7 +132,6 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="libboost_system-vc90-mt-1_38.lib"
LinkIncremental="1"
GenerateDebugInformation="false"
SubSystem="1"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer/hello.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer/hello.cpp (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer/hello.cpp 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -51,7 +51,7 @@
"</body>"
"</html>";
if (req.get["badger"] == "bait!") throw std::runtime_error("You asked for an error, you got one.");
- else if (has_key(req.get, "spam")) return 33;
+ else if (req.get.count("spam")) return 33;
return 0;
}
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -6,7 +6,6 @@
#include "TracebackServer.hpp"
#include <cmath>
-using boost::cgi::form;
using boost::cgi::request;
using boost::cgi::response;
using boost::cgi::header;
Added: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/file_browser_debug/main.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/file_browser_debug/main.cpp 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -0,0 +1,359 @@
+// -- main.hpp --
+//
+// Copyright (c) Darren Garvey 2009.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+////////////////////////////////////////////////////////////////
+//
+//[cgi_file_browser
+//
+// This example is a simple browser-based file browser.
+//
+///////////////////////////////////////////////////////////
+#include <fstream>
+#include <boost/filesystem.hpp>
+#include <boost/algorithm/string/find.hpp>
+#include <boost/algorithm/string/case_conv.hpp>
+///////////////////////////////////////////////////////////
+#include "boost/cgi/cgi.hpp"
+
+using std::cerr;
+using std::endl;
+using std::ifstream;
+using namespace boost::cgi;
+namespace fs = boost::filesystem;
+namespace algo = boost::algorithm;
+
+
+std::size_t process_id()
+{
+#if defined(BOOST_WINDOWS)
+ return _getpid();
+#else
+ return getpid();
+#endif
+}
+
+/// Get the MIME type of the file.
+/**
+ * @returns The MIME type as a string. Returns an empty string if the
+ * file type isn't recognised / supported.
+ */
+std::string get_mime_type(fs::path const& file)
+{
+ std::string filetype (file.filename());
+ // Note: we want the string after the '.'
+ std::size_t pos (filetype.rfind(".")+1);
+ if (pos == std::string::npos)
+ return "";
+
+ filetype = filetype.substr(pos);
+ algo::to_lower(filetype);
+
+ /// Ordinary text files.
+ if (filetype == "ini" || filetype == "txt" || filetype == "conf")
+ return "text/plain";
+ else
+ if (filetype == "js")
+ return "application/javascript";
+ else
+ if (filetype == "json")
+ return "application/json";
+ else
+ if (filetype == "css")
+ return "text/css";
+ else
+ /// Structured text files.
+ if (filetype == "html" || filetype == "htm")
+ return "text/html";
+ else
+ if (filetype == "xml")
+ return "text/xml";
+ else
+ if (filetype == "csv")
+ return "text/csv";
+ else
+ if (filetype == "rtf")
+ return "text/rtf";
+ else
+ /// Image files.
+ if (filetype == "jpg" || filetype == "jpeg")
+ return "image/jpeg";
+ else
+ if (filetype == "gif")
+ return "image/gif";
+ else
+ if (filetype == "bmp")
+ return "image/x-ms-bmp";
+ else
+ if (filetype == "png")
+ return "image/png";
+ else
+ if (filetype == "tiff")
+ return "image/tiff";
+ else
+ /// Audio files.
+ if (filetype == "ogg")
+ return "audio/ogg";
+ else
+ if (filetype == "flac")
+ return "audio/flac";
+ else
+ if (filetype == "mp3")
+ return "audio/mpeg";
+ else
+ /// Video files.
+ if (filetype == "avi")
+ return "video/x-msvideo";
+ else
+ if (filetype == "wmv")
+ return "video/x-ms-wmv";
+ else
+ /// Rich media files.
+ if (filetype == "pdf")
+ return "application/pdf";
+ else
+ if (filetype == "doc")
+ return "application/msword";
+ else
+ if (filetype == "swf")
+ return "application/x-shockwave-flash";
+ else
+ if (filetype == "xls")
+ return "application/vnd.ms-excel";
+ /// Compressed files.
+ else
+ if (filetype == "zip")
+ return "application/zip";
+ else
+ if (filetype == "tar")
+ return "application/x-tar";
+ /// Other files.
+ else
+ if (filetype == "pl")
+ return "application/x-perl";
+ else
+ if (filetype == "py")
+ return "application/x-python";
+ else
+ if (filetype == "exe" || filetype == "dll" || filetype == "sys" ||
+ filetype == "chm" || filetype == "lib" || filetype == "pdb" ||
+ filetype == "obj" || filetype == "dep" || filetype == "idb" ||
+ filetype == "pyd" || filetype == "sqm" || filetype == "idb" ||
+ filetype == "asm" || filetype == "suo" || filetype == "sbr")
+ return ""; // Not allowed to download these file types.
+
+ return "text/plain";
+}
+
+template<typename Response, typename Client>
+boost::system::error_code& show_file(
+ Response& resp, Client& client, fs::path const& file
+ , boost::system::error_code& ec)
+{
+ if (!fs::exists(file))
+ resp<< content_type("text/plain")
+ << "File not found.";
+ else
+ {
+ boost::uintmax_t size (fs::file_size(file));
+ cerr<< "size: " << size << endl;
+ if (size > 750000000L) // Files must be < 750MB (this is arbitrary).
+ resp<< "File too large.";
+ else
+ {
+ /// Check the file type is allowed.
+ std::string mime_type (get_mime_type(file));
+ if (!mime_type.empty())
+ {
+ // Write unbuffered (ie. not using a response). This makes sense
+ // for large files, which would take up too much memory to
+ // buffer.
+ // First, some debugging to the console.
+ cerr<< "MIME-type: " << mime_type << '\n';
+ cerr<< "File size: " << size << '\n';
+ /// Open the file and read it as binary data.
+ ifstream ifs (file.string().c_str(), std::ios::binary);
+ if (ifs.is_open())
+ {
+ // Write out the response headers.
+ std::string ctype (content_type(mime_type));
+ std::string clen (content_length<char>(size));
+ clen += "\r\n\r\n";
+
+ // Create an output buffer. This will only hold references
+ // to the data so we need to ensure the data stays in memory
+ // until the write completes.
+ //
+ // The purpose of this buffer is so efficient I/O operations
+ // (eg. scatter-gather) can be used under the hood. This vector
+ // is light-weight so it can be copied cheaply.
+ std::vector<boost::asio::const_buffer> output(2);
+ output.push_back(boost::asio::buffer(ctype));
+ output.push_back(boost::asio::buffer(clen));
+
+ // Read then write up to 1MB at a time.
+ boost::uintmax_t bufsize = 1000000;
+ boost::uintmax_t read_bytes;
+ char buf[10000];
+ ifs.seekg(0, std::ios::beg);
+ cerr<< "Writing file contents now." << endl;
+ while (!ifs.eof() && size > 0 && !ec)
+ {
+ std::streamsize num = (std::streamsize)(size < bufsize ? size : bufsize);
+ cerr<< "num = " << num << endl;
+ ifs.read(buf, num);
+ read_bytes = ifs.gcount();
+ cerr<< "Read " << read_bytes << " bytes (buf size: " << strlen(buf) << "." << endl;
+ size -= read_bytes;
+
+ output.push_back(boost::asio::buffer(buf, read_bytes));
+ // Write unbuffered (ie. not using a response).
+ write(client, output
+ , boost::asio::transfer_all(), ec);
+
+ cerr<< "Written (got: " << ec.message() << ")." << endl;
+ // This needs to go at the end, so the Content-type, etc.
+ // headers are sent the first time around.
+ output.clear();
+ }
+ }
+ else
+ {
+ resp<< content_type("text/plain")
+ << "File cannot be opened. Please try again later.";
+ }
+ }
+ else
+ {
+ resp<< content_type("text/plain")
+ << "File type not allowed.";
+ }
+ }
+ }
+ return ec;
+}
+
+template<typename Response>
+void show_paths(Response& resp, fs::path const& parent, bool recursive = true)
+{
+ if (!fs::exists(parent))
+ {
+ resp<< "File does not exist\n";
+ return;
+ }
+
+ resp<< "<ul>";
+ if (fs::is_directory(parent))
+ {
+ resp<< parent << "\n";
+ resp<< "<li class=\"directory\"><a href=\"?dir="
+ << parent.string() << "\">.</a></li>\n";
+ if (fs::is_directory(parent.parent_path()))
+ resp<< "<li class=\"directory\"><a href=\"?dir="
+ << parent.parent_path().string() << "\">..</a></li>\n";
+ for (fs::directory_iterator iter(parent), end; iter != end; ++iter)
+ {
+ if (fs::is_directory(*iter))
+ {
+ resp<< "<li class=\"directory\"><a href=\"?dir="
+ << iter->string() << "\">" << iter->path() << "</a></li>\n";
+ if (recursive)
+ show_paths(resp, iter->path(), recursive);
+ }
+ else
+ {
+ // Display only the filename.
+ resp<< "<li class=\"file\"><a href=\"?file="
+ << iter->string() << "\">" << iter->path().filename()
+ << "</a>";
+ resp<< "</li>\n";
+ }
+ }
+ }
+ else
+ {
+ resp<< "<li class=\"file\">" << "<a href=\"?file="
+ << parent.string() << "\">" << parent << "</li>\n";
+ }
+ resp<< "</ul>";
+}
+
+/// This function accepts and handles a single request.
+template<typename Request>
+int handle_request(Request& req)
+{
+ boost::system::error_code ec;
+
+ //
+ // Load in the request data so we can access it easily.
+ //
+ req.load(parse_get); // Read and parse STDIN (ie. POST) data.
+
+ //
+ // Construct a `response` object (makes writing/sending responses easier).
+ //
+ response resp;
+
+ if (req.get.count("file"))
+ {
+ boost::system::error_code ec;
+ show_file(resp, req.client(), req.get["file"], ec);
+ if (ec)
+ {
+ cerr<< "Writing file finished unexpectedly!\n"
+ " Error " << ec << ": " << ec.message() << '\n';
+ // Carry on processing other requests.
+ return req.close(http::request_timeout, -1, ec);
+ }
+ }
+ else
+ if (req.get.count("dir"))
+ {
+ //
+ // Responses in CGI programs require at least a 'Content-type' header.
+ // The library provides helpers for several common headers:
+ //
+ resp<< content_type("text/html");
+
+ // You can also stream text to a response.
+ // All of this just prints out the form
+ resp<< "<html>"
+ "<head><title>CGI File Browser Example</title><head>"
+ "<body>";
+
+ show_paths(resp, req.get["dir"], req.get["recurse"] == "1");
+
+ resp<< "</body></html>";
+ }
+ else
+ resp<< content_type("text/plain")
+ << "No path specified.\n";
+
+ resp<< header("FastCGI-client", "fcgi_file_browser");
+ return commit(req, resp);
+}
+
+int main()
+{
+try {
+
+ request req;
+ return handle_request(req);
+
+}catch(boost::system::system_error const& se){
+ // This is the type of error thrown by the library.
+ cerr<< "[cgi] System error: " << se.what() << endl;
+ return -1;
+}catch(std::exception const& e){
+ // Catch any other exceptions
+ cerr<< "[cgi] Exception: " << e.what() << endl;
+ return -1;
+}catch(...){
+ cerr<< "[cgi] Uncaught exception!" << endl;
+ return -1;
+}
+}
+//]
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/amortization/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/amortization/main.cpp (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/amortization/main.cpp 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -40,7 +40,7 @@
void fill_amortization_dictionary(
ctemplate::TemplateDictionary& dict, Request& req)
{
- dict.SetValue("LoanAmt", has_key(req.post, "LoanAmt")
+ dict.SetValue("LoanAmt", req.post.count("LoanAmt")
? "$250,000" : req.post["LoanAmt"]);
dict.SetIntValue("YearlyIntRate", req.post.as("YearlyIntRate", 6.000));
Added: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/Jamfile.v2 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -0,0 +1,14 @@
+
+project boost/cgi/example/fcgi/echo_threaded ;
+
+exe fcgi_echo_threaded : main.cpp ;
+
+install install
+ :
+ fcgi_echo_threaded
+ :
+ <location>$(fcgi-bin)
+ ;
+
+explicit install ;
+
Added: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/doc.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/doc.qbk 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -0,0 +1,11 @@
+
+[section:echo_threaded Echo (threaded)]
+
+[import main.cpp]
+
+[fcgi_echo_threaded]
+
+See the [@../../example/fcgi/echo_threaded/main.cpp full source listing].
+
+[endsect][/ echo_threaded]
+
Added: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/main.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/echo_threaded/main.cpp 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -0,0 +1,242 @@
+// -- main.hpp --
+//
+// Copyright (c) Darren Garvey 2007.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+////////////////////////////////////////////////////////////////
+//
+//[fcgi_echo_threaded
+//
+// This example simply echoes all variables back to the user. ie.
+// the environment and the parsed GET, POST and cookie variables.
+// Note that GET and cookie variables come from the environment
+// variables QUERY_STRING and HTTP_COOKIE respectively.
+//
+///////////////////////////////////////////////////////////
+#include <boost/thread.hpp>
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/program_options/environment_iterator.hpp>
+///////////////////////////////////////////////////////////
+#include "boost/cgi/fcgi.hpp"
+#include "boost/cgi/common/commit.hpp"
+
+//using namespace std;
+using namespace boost::fcgi;
+
+// The styling information for the page, just to make things look nicer.
+static const char* gCSS_text =
+"body { padding: 0; margin: 3%; border-color: #efe; }"
+".var_map_title"
+ "{ font-weight: bold; font-size: large; }"
+".var_map"
+ "{ border: 1px dotted; padding: 2px 3px 2px 3px; margin-bottom: 3%; }"
+".var_pair"
+ "{ border-top: 1px dotted; overflow: auto; padding: 0; margin: 0; }"
+".var_name"
+ "{ position: relative; float: left; width: 30%; font-weight: bold; }"
+".var_value"
+ "{ position: relative; float: left; width: 65%; left: 1%;"
+ " border-left: 1px solid; padding: 0 5px 0 5px;"
+ " overflow: auto; white-space: pre; }"
+;
+
+//
+// This function writes the title and map contents to the ostream in an
+// HTML-encoded format (to make them easier on the eye).
+//
+template<typename OStreamT, typename MapT>
+void format_map(OStreamT& os, MapT& m, const std::string& title)
+{
+ os<< "<ul class=\"var_map\">"
+ "<div class=\"var_map_title\">"
+ << title
+ << "</div>";
+
+ if (m.empty())
+ os<< "<li class=\"var_pair\">EMPTY</li>";
+ else
+ for (typename MapT::const_iterator i = m.begin(); i != m.end(); ++i)
+ {
+ os<< "<li class=\"var_pair\">"
+ "<div class=\"var_name\">"
+ << i->first
+ << "</div>"
+ "<div class=\"var_value\">"
+ << i->second
+ << "</div>"
+ "</li>";
+ }
+ os<< "</ul>";
+}
+
+std::size_t process_id()
+{
+#if defined(BOOST_WINDOWS)
+ return _getpid();
+#else
+ return getpid();
+#endif
+}
+
+
+/// This function accepts and handles a single request.
+template<typename Acceptor, typename Request>
+int handle_request(Acceptor& a, Request& req, boost::system::error_code ec)
+{
+ //
+ // Load in the request data so we can access it easily.
+ //
+ req.load(parse_all); // Read and parse STDIN (ie. POST) data.
+
+ //
+ // Construct a `response` object (makes writing/sending responses easier).
+ //
+ response resp;
+
+ //
+ // Responses in CGI programs require at least a 'Content-type' header. The
+ // library provides helpers for several common headers:
+ //
+ resp<< content_type("text/html");
+
+ // You can also stream text to a response.
+ // All of this just prints out the form
+ resp<< "<html>"
+ "<head>"
+ "<title>FastCGI Echo Example</title>"
+ "<style type=\"text/css\">"
+ << gCSS_text <<
+ "</style>"
+ "<head>"
+ "<body>"
+ "Request ID = " << req.id() << "<br />"
+ "Process ID = " << process_id() << "<br />"
+ "<form method=post>" // enctype=\"multipart/form-data\">"
+ "<input type=text name=name value='"
+ << req.post["name"] << "' />"
+ "<br />"
+ "<input type=text name=hello value='"
+ << req.post["hello"] << "' />"
+ "<br />"
+ "<input type=file name=user_file />"
+ "<input type=hidden name=cmd value=multipart_test />"
+ "<br />"
+ "<input type=submit value=submit />"
+ "</form><p />";
+
+ //
+ // Use the function defined above to show some of the request data.
+ // (this function isn't part of the library)
+ //
+ format_map(resp, req.env, "Environment Variables");
+ format_map(resp, req.form, req.request_method() + " Variables");
+ format_map(resp, req.cookies, "Cookie Variables");
+
+ // Print the complete buffer containing the POST data and the FastCGI params.
+ resp<< "<pre>";
+ BOOST_FOREACH(char& ch, req.post_buffer())
+ {
+ resp<< ch;
+ }
+ // << req.get_buffer()
+ resp<< "</pre>";
+
+ //
+ // Response headers can be added at any time before send/flushing it:
+ //
+ resp<< "Response content-length == "
+ << resp.content_length() // the content-length (returns std::size_t)
+ ;//<< content_length(resp); // a content-length header
+
+ // This function finishes up:
+ int ret = commit(req, resp, 0);
+
+ //a.async_accept(req, boost::bind(&handle_request, boost::ref(a), boost::ref(req), _1));
+ a.async_accept(req,
+ boost::bind(
+ &handle_request<
+ boost::fcgi::acceptor
+ , boost::fcgi::request
+ >
+ , boost::ref(a)
+ , boost::ref(req)
+ , _1));
+
+ return ret;
+ //a->async_accept(req, boost::bind(&handle_request<boost::fcgi::acceptor*,boost::fcgi::request&>, a, _1));
+ //a.async_accept(boost::bind(&handle_request<acceptor,request>, boost::ref(a), boost::ref(req)));
+ //
+ // It is equivalent to the below, where the third argument is represented by
+ // `program_status`:
+ //
+ // resp.send(req.client());
+ // req.close(resp.status(), program_status);
+ // return program_status;
+ //
+ // Note: in this case `program_status == 0`.
+ //
+}
+
+int main()
+{
+try {
+
+ // Make a `service` (more about this in other examples).
+ service s;
+
+ using boost::asio::ip::tcp;
+
+ // Make an `acceptor` for accepting requests through.
+ acceptor a(s, 8019); // The acceptor is for accepting requests.
+
+ //
+ // After the initial setup, we can enter a loop to handle several requests
+ // at a time until there's an error of some sort.
+ //
+ typedef std::vector<boost::shared_ptr<request> > request_queue;
+ request_queue requests;
+
+ // Handle 50 requests at a time.
+ for (int i(0); i < 50; ++i)
+ {
+ requests.push_back(request::create(s));
+ //
+ // Now we asychronously accept a request. This will return immediately.
+ //
+ // The second argument is the handler that is called when a request is
+ // accepted.
+ //
+ a.async_accept(*requests[i],
+ boost::bind(
+ &handle_request<
+ boost::fcgi::acceptor
+ , boost::fcgi::request
+ >
+ , boost::ref(a)
+ , boost::ref(*requests[i])
+ , _1));
+ }
+
+ boost::thread_group threads;
+ for (int i(50); i; --i) {
+ threads.create_thread(boost::bind(&service::run, boost::ref(s)));
+ }
+ threads.join_all();
+ return 0;
+
+}catch(boost::system::system_error const& se){
+ // This is the type of error thrown by the library.
+ //cerr<< "[fcgi] System error: " << se.what() << endl;
+ return 1313;
+}catch(std::exception const& e){
+ // Catch any other exceptions
+ //cerr<< "[fcgi] Exception: " << e.what() << endl;
+ return 666;
+}catch(...){
+ //cerr<< "[fcgi] Uncaught exception!" << endl;
+ return 667;
+}
+}
+//]
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/file_browser/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/file_browser/main.cpp (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/file_browser/main.cpp 2010-01-31 21:50:40 EST (Sun, 31 Jan 2010)
@@ -15,6 +15,7 @@
#include <fstream>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string/find.hpp>
+#include <boost/algorithm/string/case_conv.hpp>
///////////////////////////////////////////////////////////
#include "boost/cgi/fcgi.hpp"
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk