Merge branch 'trunk' of https://github.com/benoitdion/thrift into trunk

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1326086 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/.gitignore b/.gitignore
index b97e312..6b0462f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -241,3 +241,13 @@
 *.user
 *.ipch
 *.sdf
+
+*_ReSharper*
+lib/cpp/Debug/
+lib/cpp/Release/
+*.opensdf
+lib/cpp/x64/Debug/
+lib/cpp/x64/Release
+compiler/cpp/src/thrifty.h
+compiler/cpp/src/thrifty.cc
+compiler/cpp/src/thriftl.cc
\ No newline at end of file
diff --git a/compiler/cpp/compiler.vcxproj b/compiler/cpp/compiler.vcxproj
index 16ea2c0..04e108d 100644
--- a/compiler/cpp/compiler.vcxproj
+++ b/compiler/cpp/compiler.vcxproj
@@ -19,66 +19,65 @@
     </ProjectConfiguration>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="src\thrift\generate\t_generator.h" />
-    <ClInclude Include="src\thrift\generate\t_generator_registry.h" />
-    <ClInclude Include="src\thrift\generate\t_oop_generator.h" />
-    <ClInclude Include="src\thrift\globals.h" />
-    <ClInclude Include="src\thrift\main.h" />
-    <ClInclude Include="src\thrift\md5.h" />
-    <ClInclude Include="src\thrift\parse\t_base_type.h" />
-    <ClInclude Include="src\thrift\parse\t_const.h" />
-    <ClInclude Include="src\thrift\parse\t_const_value.h" />
-    <ClInclude Include="src\thrift\parse\t_container.h" />
-    <ClInclude Include="src\thrift\parse\t_doc.h" />
-    <ClInclude Include="src\thrift\parse\t_enum.h" />
-    <ClInclude Include="src\thrift\parse\t_enum_value.h" />
-    <ClInclude Include="src\thrift\parse\t_field.h" />
-    <ClInclude Include="src\thrift\parse\t_function.h" />
-    <ClInclude Include="src\thrift\parse\t_list.h" />
-    <ClInclude Include="src\thrift\parse\t_map.h" />
-    <ClInclude Include="src\thrift\parse\t_program.h" />
-    <ClInclude Include="src\thrift\parse\t_scope.h" />
-    <ClInclude Include="src\thrift\parse\t_service.h" />
-    <ClInclude Include="src\thrift\parse\t_set.h" />
-    <ClInclude Include="src\thrift\parse\t_struct.h" />
-    <ClInclude Include="src\thrift\parse\t_type.h" />
-    <ClInclude Include="src\thrift\parse\t_typedef.h" />
-    <ClInclude Include="src\thrift\platform.h" />
-    <ClInclude Include="src\thrift\thrifty.h" />
-    <ClInclude Include="src\thrift\windows\config.h" />
-    <ClInclude Include="src\thrift\windows\version.h" />
+    <ClInclude Include="src\generate\t_generator.h" />
+    <ClInclude Include="src\generate\t_generator_registry.h" />
+    <ClInclude Include="src\generate\t_oop_generator.h" />
+    <ClInclude Include="src\globals.h" />
+    <ClInclude Include="src\main.h" />
+    <ClInclude Include="src\md5.h" />
+    <ClInclude Include="src\parse\t_base_type.h" />
+    <ClInclude Include="src\parse\t_const.h" />
+    <ClInclude Include="src\parse\t_const_value.h" />
+    <ClInclude Include="src\parse\t_container.h" />
+    <ClInclude Include="src\parse\t_doc.h" />
+    <ClInclude Include="src\parse\t_enum.h" />
+    <ClInclude Include="src\parse\t_enum_value.h" />
+    <ClInclude Include="src\parse\t_field.h" />
+    <ClInclude Include="src\parse\t_function.h" />
+    <ClInclude Include="src\parse\t_list.h" />
+    <ClInclude Include="src\parse\t_map.h" />
+    <ClInclude Include="src\parse\t_program.h" />
+    <ClInclude Include="src\parse\t_scope.h" />
+    <ClInclude Include="src\parse\t_service.h" />
+    <ClInclude Include="src\parse\t_set.h" />
+    <ClInclude Include="src\parse\t_struct.h" />
+    <ClInclude Include="src\parse\t_type.h" />
+    <ClInclude Include="src\parse\t_typedef.h" />
+    <ClInclude Include="src\platform.h" />
+    <ClInclude Include="src\thrifty.h" />
+    <ClInclude Include="src\windows\config.h" />
+    <ClInclude Include="src\windows\version.h" />
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="src\thrift\generate\t_as3_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_cocoa_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_cpp_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_csharp_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_c_glib_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_erl_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_go_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_hs_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_html_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_javame_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_java_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_js_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_ocaml_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_perl_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_php_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_py_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_rb_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_st_generator.cc" />
-    <ClCompile Include="src\thrift\generate\t_xsd_generator.cc" />
-    <ClCompile Include="src\thrift\main.cc" />
-    <ClCompile Include="src\thrift\md5.c" />
-    <ClCompile Include="src\thrift\parse\parse.cc" />
-    <ClCompile Include="src\thrift\thriftl.cc" />
-    <ClCompile Include="src\thrift\thrifty.cc" />
+    <ClCompile Include="src\generate\t_as3_generator.cc" />
+    <ClCompile Include="src\generate\t_cocoa_generator.cc" />
+    <ClCompile Include="src\generate\t_cpp_generator.cc" />
+    <ClCompile Include="src\generate\t_csharp_generator.cc" />
+    <ClCompile Include="src\generate\t_c_glib_generator.cc" />
+    <ClCompile Include="src\generate\t_erl_generator.cc" />
+    <ClCompile Include="src\generate\t_generator.cc" />
+    <ClCompile Include="src\generate\t_go_generator.cc" />
+    <ClCompile Include="src\generate\t_hs_generator.cc" />
+    <ClCompile Include="src\generate\t_html_generator.cc" />
+    <ClCompile Include="src\generate\t_javame_generator.cc" />
+    <ClCompile Include="src\generate\t_java_generator.cc" />
+    <ClCompile Include="src\generate\t_js_generator.cc" />
+    <ClCompile Include="src\generate\t_ocaml_generator.cc" />
+    <ClCompile Include="src\generate\t_perl_generator.cc" />
+    <ClCompile Include="src\generate\t_php_generator.cc" />
+    <ClCompile Include="src\generate\t_py_generator.cc" />
+    <ClCompile Include="src\generate\t_rb_generator.cc" />
+    <ClCompile Include="src\generate\t_st_generator.cc" />
+    <ClCompile Include="src\generate\t_xsd_generator.cc" />
+    <ClCompile Include="src\main.cc" />
+    <ClCompile Include="src\md5.c" />
+    <ClCompile Include="src\parse\parse.cc" />
+    <ClCompile Include="src\thriftl.cc" />
+    <ClCompile Include="src\thrifty.cc" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="README_WINDOWS" />
-    <None Include="src\thrift\thriftl.ll" />
-    <None Include="src\thrift\thrifty.yy" />
+    <None Include="src\thriftl.ll" />
+    <None Include="src\thrifty.yy" />
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{89975A1A-F799-4556-98B8-64E30AB39A90}</ProjectGuid>
@@ -126,25 +125,25 @@
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <LinkIncremental>true</LinkIncremental>
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
     <TargetName>thrift</TargetName>
     <ExecutablePath>$(ExecutablePath);C:\Program Files (x86)\Git\bin</ExecutablePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <LinkIncremental>true</LinkIncremental>
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
     <TargetName>thrift</TargetName>
     <ExecutablePath>$(ExecutablePath);C:\Program Files (x86)\Git\bin</ExecutablePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <LinkIncremental>false</LinkIncremental>
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
     <TargetName>thrift</TargetName>
     <ExecutablePath>$(ExecutablePath);C:\Program Files (x86)\Git\bin</ExecutablePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LinkIncremental>false</LinkIncremental>
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
     <TargetName>thrift</TargetName>
     <ExecutablePath>$(ExecutablePath);C:\Program Files (x86)\Git\bin</ExecutablePath>
   </PropertyGroup>
@@ -163,8 +162,8 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </Link>
     <PreBuildEvent>
-      <Command>flex -o "src\thrift\thriftl.cc" src/thriftl.ll
-bison -y -o "src\thrift\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
+      <Command>flex -o "src\\thriftl.cc" src/thriftl.ll
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -182,8 +181,8 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </Link>
     <PreBuildEvent>
-      <Command>flex -o "src\thrift\thriftl.cc" src/thriftl.ll
-bison -y -o "src\thrift\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
+      <Command>flex -o "src\thriftl.cc" src/thriftl.ll
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -205,8 +204,8 @@
       <OptimizeReferences>true</OptimizeReferences>
     </Link>
     <PreBuildEvent>
-      <Command>flex -o "src\thrift\thriftl.cc" src/thriftl.ll
-bison -y -o "src\thrift\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
+      <Command>flex -o "src\thriftl.cc" src/thriftl.ll
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -228,8 +227,8 @@
       <OptimizeReferences>true</OptimizeReferences>
     </Link>
     <PreBuildEvent>
-      <Command>flex -o "src\thrift\thriftl.cc" src/thriftl.ll
-bison -y -o "src\thrift\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
+      <Command>flex -o "src\thriftl.cc" src/thriftl.ll
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/compiler/cpp/compiler.vcxproj.filters b/compiler/cpp/compiler.vcxproj.filters
index 16a690f..0720b87 100644
--- a/compiler/cpp/compiler.vcxproj.filters
+++ b/compiler/cpp/compiler.vcxproj.filters
@@ -1,13 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
+    <ClInclude Include="src\generate\t_generator.h">
+      <Filter>generate</Filter>
+    </ClInclude>
+    <ClInclude Include="src\generate\t_generator_registry.h">
+      <Filter>generate</Filter>
+    </ClInclude>
+    <ClInclude Include="src\generate\t_oop_generator.h">
+      <Filter>generate</Filter>
+    </ClInclude>
+    <ClInclude Include="src\globals.h" />
     <ClInclude Include="src\main.h" />
-    <ClInclude Include="src\windows\version.h">
-      <Filter>windows</Filter>
-    </ClInclude>
-    <ClInclude Include="src\windows\config.h">
-      <Filter>windows</Filter>
-    </ClInclude>
+    <ClInclude Include="src\md5.h" />
     <ClInclude Include="src\parse\t_base_type.h">
       <Filter>parse</Filter>
     </ClInclude>
@@ -62,32 +67,19 @@
     <ClInclude Include="src\parse\t_typedef.h">
       <Filter>parse</Filter>
     </ClInclude>
-    <ClInclude Include="src\generate\t_generator.h">
-      <Filter>generate</Filter>
-    </ClInclude>
-    <ClInclude Include="src\generate\t_generator_registry.h">
-      <Filter>generate</Filter>
-    </ClInclude>
-    <ClInclude Include="src\generate\t_oop_generator.h">
-      <Filter>generate</Filter>
-    </ClInclude>
-    <ClInclude Include="src\globals.h" />
-    <ClInclude Include="src\md5.h" />
     <ClInclude Include="src\platform.h" />
-    <ClInclude Include="src\thrifty.h">
-      <Filter>generated</Filter>
+    <ClInclude Include="src\thrifty.h" />
+    <ClInclude Include="src\windows\config.h">
+      <Filter>windows</Filter>
+    </ClInclude>
+    <ClInclude Include="src\windows\version.h">
+      <Filter>windows</Filter>
     </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Filter Include="windows">
       <UniqueIdentifier>{ae9d0a15-57ae-4f01-87a4-81f790249b83}</UniqueIdentifier>
     </Filter>
-    <Filter Include="resources">
-      <UniqueIdentifier>{c9be9380-57bb-438a-a647-4a6943326d6b}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="generated">
-      <UniqueIdentifier>{79697fe7-fdf0-4ed4-bb4f-3128632c3446}</UniqueIdentifier>
-    </Filter>
     <Filter Include="parse">
       <UniqueIdentifier>{5df016bb-591b-420a-a535-4330d9187fbf}</UniqueIdentifier>
     </Filter>
@@ -96,16 +88,9 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="src\main.cc" />
-    <ClCompile Include="src\parse\parse.cc">
-      <Filter>parse</Filter>
-    </ClCompile>
     <ClCompile Include="src\generate\t_as3_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
-    <ClCompile Include="src\generate\t_c_glib_generator.cc">
-      <Filter>generate</Filter>
-    </ClCompile>
     <ClCompile Include="src\generate\t_cocoa_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
@@ -115,22 +100,28 @@
     <ClCompile Include="src\generate\t_csharp_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
+    <ClCompile Include="src\generate\t_c_glib_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
     <ClCompile Include="src\generate\t_erl_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
     <ClCompile Include="src\generate\t_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
+    <ClCompile Include="src\generate\t_go_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
     <ClCompile Include="src\generate\t_hs_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
     <ClCompile Include="src\generate\t_html_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
-    <ClCompile Include="src\generate\t_java_generator.cc">
+    <ClCompile Include="src\generate\t_javame_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
-    <ClCompile Include="src\generate\t_javame_generator.cc">
+    <ClCompile Include="src\generate\t_java_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
     <ClCompile Include="src\generate\t_js_generator.cc">
@@ -145,6 +136,9 @@
     <ClCompile Include="src\generate\t_php_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
+    <ClCompile Include="src\generate\t_py_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
     <ClCompile Include="src\generate\t_rb_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
@@ -154,27 +148,16 @@
     <ClCompile Include="src\generate\t_xsd_generator.cc">
       <Filter>generate</Filter>
     </ClCompile>
+    <ClCompile Include="src\main.cc" />
     <ClCompile Include="src\md5.c" />
-    <ClCompile Include="src\thriftl.cc">
-      <Filter>generated</Filter>
+    <ClCompile Include="src\parse\parse.cc">
+      <Filter>parse</Filter>
     </ClCompile>
-    <ClCompile Include="src\thrifty.cc">
-      <Filter>generated</Filter>
-    </ClCompile>
-    <ClCompile Include="src\generate\t_go_generator.cc">
-      <Filter>generate</Filter>
-    </ClCompile>
-    <ClCompile Include="src\generate\t_py_generator.cc">
-      <Filter>generate</Filter>
-    </ClCompile>
+    <ClCompile Include="src\thriftl.cc" />
+    <ClCompile Include="src\thrifty.cc" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="src\thriftl.ll">
-      <Filter>resources</Filter>
-    </None>
-    <None Include="src\thrifty.yy">
-      <Filter>resources</Filter>
-    </None>
-    <None Include="README_WINDOWS" />
+    <None Include="src\thriftl.ll" />
+    <None Include="src\thrifty.yy" />
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/lib/cpp/libthrift.vcxproj b/lib/cpp/libthrift.vcxproj
index 4a28573..bc5f0be 100644
--- a/lib/cpp/libthrift.vcxproj
+++ b/lib/cpp/libthrift.vcxproj
@@ -19,192 +19,192 @@
     </ProjectConfiguration>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="src\thrift\thrift\async\TAsyncChannel.cpp">
+    <ClCompile Include="src\thrift\async\TAsyncChannel.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\concurrency\BoostMonitor.cpp" />
-    <ClCompile Include="src\thrift\thrift\concurrency\BoostMutex.cpp" />
-    <ClCompile Include="src\thrift\thrift\concurrency\BoostThreadFactory.cpp" />
-    <ClCompile Include="src\thrift\thrift\concurrency\ThreadManager.cpp">
+    <ClCompile Include="src\thrift\concurrency\BoostMonitor.cpp" />
+    <ClCompile Include="src\thrift\concurrency\BoostMutex.cpp" />
+    <ClCompile Include="src\thrift\concurrency\BoostThreadFactory.cpp" />
+    <ClCompile Include="src\thrift\concurrency\ThreadManager.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\concurrency\TimerManager.cpp">
+    <ClCompile Include="src\thrift\concurrency\TimerManager.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\concurrency\Util.cpp">
+    <ClCompile Include="src\thrift\concurrency\Util.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\processor\PeekProcessor.cpp">
+    <ClCompile Include="src\thrift\processor\PeekProcessor.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\protocol\TBase64Utils.cpp" />
-    <ClCompile Include="src\thrift\thrift\protocol\TDebugProtocol.cpp">
+    <ClCompile Include="src\thrift\protocol\TBase64Utils.cpp" />
+    <ClCompile Include="src\thrift\protocol\TDebugProtocol.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\protocol\TDenseProtocol.cpp">
+    <ClCompile Include="src\thrift\protocol\TDenseProtocol.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\protocol\TJSONProtocol.cpp">
+    <ClCompile Include="src\thrift\protocol\TJSONProtocol.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\server\TSimpleServer.cpp">
+    <ClCompile Include="src\thrift\server\TSimpleServer.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\server\TThreadPoolServer.cpp">
+    <ClCompile Include="src\thrift\server\TThreadPoolServer.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\TApplicationException.cpp">
+    <ClCompile Include="src\thrift\TApplicationException.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\Thrift.cpp">
+    <ClCompile Include="src\thrift\Thrift.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\transport\TBufferTransports.cpp">
+    <ClCompile Include="src\thrift\transport\TBufferTransports.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\transport\TFDTransport.cpp" />
-    <ClCompile Include="src\thrift\thrift\transport\TFileTransport.cpp">
+    <ClCompile Include="src\thrift\transport\TFDTransport.cpp" />
+    <ClCompile Include="src\thrift\transport\TFileTransport.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\transport\THttpClient.cpp" />
-    <ClCompile Include="src\thrift\thrift\transport\THttpServer.cpp" />
-    <ClCompile Include="src\thrift\thrift\transport\THttpTransport.cpp">
+    <ClCompile Include="src\thrift\transport\THttpClient.cpp" />
+    <ClCompile Include="src\thrift\transport\THttpServer.cpp" />
+    <ClCompile Include="src\thrift\transport\THttpTransport.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\transport\TPipe.cpp" />
-    <ClCompile Include="src\thrift\thrift\transport\TPipeServer.cpp" />
-    <ClCompile Include="src\thrift\thrift\transport\TServerSocket.cpp">
+    <ClCompile Include="src\thrift\transport\TPipe.cpp" />
+    <ClCompile Include="src\thrift\transport\TPipeServer.cpp" />
+    <ClCompile Include="src\thrift\transport\TServerSocket.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\transport\TSimpleFileTransport.cpp" />
-    <ClCompile Include="src\thrift\thrift\transport\TSocket.cpp">
+    <ClCompile Include="src\thrift\transport\TSimpleFileTransport.cpp" />
+    <ClCompile Include="src\thrift\transport\TSocket.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\transport\TSSLSocket.cpp">
+    <ClCompile Include="src\thrift\transport\TSSLSocket.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\transport\TTransportException.cpp">
+    <ClCompile Include="src\thrift\transport\TTransportException.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\transport\TTransportUtils.cpp">
+    <ClCompile Include="src\thrift\transport\TTransportUtils.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\windows\GetTimeOfDay.cpp" />
-    <ClCompile Include="src\thrift\thrift\windows\SocketPair.cpp" />
-    <ClCompile Include="src\thrift\thrift\windows\StdAfx.cpp">
+    <ClCompile Include="src\thrift\windows\GetTimeOfDay.cpp" />
+    <ClCompile Include="src\thrift\windows\SocketPair.cpp" />
+    <ClCompile Include="src\thrift\windows\StdAfx.cpp">
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\windows\TWinsockSingleton.cpp" />
-    <ClCompile Include="src\thrift\thrift\windows\WinFcntl.cpp" />
+    <ClCompile Include="src\thrift\windows\TWinsockSingleton.cpp" />
+    <ClCompile Include="src\thrift\windows\WinFcntl.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="src\thrift\thrift\async\TAsyncChannel.h" />
-    <ClInclude Include="src\thrift\thrift\concurrency\BoostThreadFactory.h" />
-    <ClInclude Include="src\thrift\thrift\concurrency\Exception.h" />
-    <ClInclude Include="src\thrift\thrift\concurrency\PlatformThreadFactory.h" />
-    <ClInclude Include="src\thrift\thrift\processor\PeekProcessor.h" />
-    <ClInclude Include="src\thrift\thrift\protocol\TBinaryProtocol.h" />
-    <ClInclude Include="src\thrift\thrift\protocol\TDebugProtocol.h" />
-    <ClInclude Include="src\thrift\thrift\protocol\TDenseProtocol.h" />
-    <ClInclude Include="src\thrift\thrift\protocol\TJSONProtocol.h" />
-    <ClInclude Include="src\thrift\thrift\protocol\TProtocol.h" />
-    <ClInclude Include="src\thrift\thrift\protocol\TVirtualProtocol.h" />
-    <ClInclude Include="src\thrift\thrift\server\TServer.h" />
-    <ClInclude Include="src\thrift\thrift\server\TSimpleServer.h" />
-    <ClInclude Include="src\thrift\thrift\server\TThreadPoolServer.h" />
-    <ClInclude Include="src\thrift\thrift\TApplicationException.h" />
-    <ClInclude Include="src\thrift\thrift\Thrift.h" />
-    <ClInclude Include="src\thrift\thrift\TProcessor.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TBufferTransports.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TFDTransport.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TFileTransport.h" />
-    <ClInclude Include="src\thrift\thrift\transport\THttpClient.h" />
-    <ClInclude Include="src\thrift\thrift\transport\THttpServer.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TPipe.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TPipeServer.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TServerSocket.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TServerTransport.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TSimpleFileTransport.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TSocket.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TSSLSocket.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TTransport.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TTransportException.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TTransportUtils.h" />
-    <ClInclude Include="src\thrift\thrift\transport\TVirtualTransport.h" />
-    <ClInclude Include="src\thrift\thrift\windows\config.h" />
-    <ClInclude Include="src\thrift\thrift\windows\force_inc.h" />
-    <ClInclude Include="src\thrift\thrift\windows\GetTimeOfDay.h" />
-    <ClInclude Include="src\thrift\thrift\windows\Operators.h" />
-    <ClInclude Include="src\thrift\thrift\windows\SocketPair.h" />
-    <ClInclude Include="src\thrift\thrift\windows\StdAfx.h" />
-    <ClInclude Include="src\thrift\thrift\windows\TargetVersion.h" />
-    <ClInclude Include="src\thrift\thrift\windows\TWinsockSingleton.h" />
-    <ClInclude Include="src\thrift\thrift\windows\WinFcntl.h" />
+    <ClInclude Include="src\thrift\async\TAsyncChannel.h" />
+    <ClInclude Include="src\thrift\concurrency\BoostThreadFactory.h" />
+    <ClInclude Include="src\thrift\concurrency\Exception.h" />
+    <ClInclude Include="src\thrift\concurrency\PlatformThreadFactory.h" />
+    <ClInclude Include="src\thrift\processor\PeekProcessor.h" />
+    <ClInclude Include="src\thrift\protocol\TBinaryProtocol.h" />
+    <ClInclude Include="src\thrift\protocol\TDebugProtocol.h" />
+    <ClInclude Include="src\thrift\protocol\TDenseProtocol.h" />
+    <ClInclude Include="src\thrift\protocol\TJSONProtocol.h" />
+    <ClInclude Include="src\thrift\protocol\TProtocol.h" />
+    <ClInclude Include="src\thrift\protocol\TVirtualProtocol.h" />
+    <ClInclude Include="src\thrift\server\TServer.h" />
+    <ClInclude Include="src\thrift\server\TSimpleServer.h" />
+    <ClInclude Include="src\thrift\server\TThreadPoolServer.h" />
+    <ClInclude Include="src\thrift\TApplicationException.h" />
+    <ClInclude Include="src\thrift\Thrift.h" />
+    <ClInclude Include="src\thrift\TProcessor.h" />
+    <ClInclude Include="src\thrift\transport\TBufferTransports.h" />
+    <ClInclude Include="src\thrift\transport\TFDTransport.h" />
+    <ClInclude Include="src\thrift\transport\TFileTransport.h" />
+    <ClInclude Include="src\thrift\transport\THttpClient.h" />
+    <ClInclude Include="src\thrift\transport\THttpServer.h" />
+    <ClInclude Include="src\thrift\transport\TPipe.h" />
+    <ClInclude Include="src\thrift\transport\TPipeServer.h" />
+    <ClInclude Include="src\thrift\transport\TServerSocket.h" />
+    <ClInclude Include="src\thrift\transport\TServerTransport.h" />
+    <ClInclude Include="src\thrift\transport\TSimpleFileTransport.h" />
+    <ClInclude Include="src\thrift\transport\TSocket.h" />
+    <ClInclude Include="src\thrift\transport\TSSLSocket.h" />
+    <ClInclude Include="src\thrift\transport\TTransport.h" />
+    <ClInclude Include="src\thrift\transport\TTransportException.h" />
+    <ClInclude Include="src\thrift\transport\TTransportUtils.h" />
+    <ClInclude Include="src\thrift\transport\TVirtualTransport.h" />
+    <ClInclude Include="src\thrift\windows\config.h" />
+    <ClInclude Include="src\thrift\windows\force_inc.h" />
+    <ClInclude Include="src\thrift\windows\GetTimeOfDay.h" />
+    <ClInclude Include="src\thrift\windows\Operators.h" />
+    <ClInclude Include="src\thrift\windows\SocketPair.h" />
+    <ClInclude Include="src\thrift\windows\StdAfx.h" />
+    <ClInclude Include="src\thrift\windows\TargetVersion.h" />
+    <ClInclude Include="src\thrift\windows\TWinsockSingleton.h" />
+    <ClInclude Include="src\thrift\windows\WinFcntl.h" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="src\thrift\thrift\protocol\TBinaryProtocol.tcc" />
-    <None Include="src\thrift\thrift\windows\tr1\functional" />
+    <None Include="src\thrift\protocol\TBinaryProtocol.tcc" />
+    <None Include="src\thrift\windows\tr1\functional" />
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{DD26F57E-60F2-4F37-A616-D219A9BF338F}</ProjectGuid>
@@ -252,16 +252,16 @@
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;..\..\..\..\boost;..\..\..\..\boost\boost;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;..\..\..\..\boost;..\..\..\..\boost\boost;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
@@ -269,7 +269,7 @@
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ForcedIncludeFiles>force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <ForcedIncludeFiles>thrift\windows\force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
       <ProgramDataBaseFileName>$(IntDir)libthrift.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
@@ -283,7 +283,7 @@
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ForcedIncludeFiles>force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <ForcedIncludeFiles>thrift\windows\force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
@@ -298,7 +298,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ForcedIncludeFiles>force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <ForcedIncludeFiles>thrift\windows\force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
       <ProgramDataBaseFileName>$(IntDir)libthrift.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
@@ -316,7 +316,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ForcedIncludeFiles>force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <ForcedIncludeFiles>thrift\windows\force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
@@ -328,4 +328,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/lib/cpp/libthrift.vcxproj.filters b/lib/cpp/libthrift.vcxproj.filters
index 4025270..3922988 100644
--- a/lib/cpp/libthrift.vcxproj.filters
+++ b/lib/cpp/libthrift.vcxproj.filters
@@ -96,10 +96,10 @@
     <ClCompile Include="src\thrift\windows\WinFcntl.cpp">
       <Filter>windows</Filter>
     </ClCompile>
-    <ClCompile Include="src\transport\TPipeServer.cpp">
+    <ClCompile Include="src\thrift\transport\TPipe.cpp">
       <Filter>transport</Filter>
     </ClCompile>
-    <ClCompile Include="src\transport\TPipe.cpp">
+    <ClCompile Include="src\thrift\transport\TPipeServer.cpp">
       <Filter>transport</Filter>
     </ClCompile>
   </ItemGroup>
@@ -218,10 +218,10 @@
     <ClInclude Include="src\thrift\windows\WinFcntl.h">
       <Filter>windows</Filter>
     </ClInclude>
-    <ClInclude Include="src\transport\TPipe.h">
+    <ClInclude Include="src\thrift\transport\TPipe.h">
       <Filter>transport</Filter>
     </ClInclude>
-    <ClInclude Include="src\transport\TPipeServer.h">
+    <ClInclude Include="src\thrift\transport\TPipeServer.h">
       <Filter>transport</Filter>
     </ClInclude>
   </ItemGroup>
diff --git a/lib/cpp/libthriftnb.vcxproj b/lib/cpp/libthriftnb.vcxproj
index 640397c..7b9cc83 100644
--- a/lib/cpp/libthriftnb.vcxproj
+++ b/lib/cpp/libthriftnb.vcxproj
@@ -19,41 +19,41 @@
     </ProjectConfiguration>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="src\thrift\thrift\async\TAsyncProtocolProcessor.cpp">
+    <ClCompile Include="src\thrift\async\TAsyncProtocolProcessor.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\async\TEvhttpClientChannel.cpp">
+    <ClCompile Include="src\thrift\async\TEvhttpClientChannel.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\async\TEvhttpServer.cpp">
+    <ClCompile Include="src\thrift\async\TEvhttpServer.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\server\TNonblockingServer.cpp">
+    <ClCompile Include="src\thrift\server\TNonblockingServer.cpp">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="src\thrift\thrift\windows\StdAfx.cpp" />
+    <ClCompile Include="src\thrift\windows\StdAfx.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="src\thrift\thrift\async\TAsyncProtocolProcessor.h" />
-    <ClInclude Include="src\thrift\thrift\async\TEvhttpClientChannel.h" />
-    <ClInclude Include="src\thrift\thrift\async\TEvhttpServer.h" />
-    <ClInclude Include="src\thrift\thrift\server\TNonblockingServer.h" />
-    <ClInclude Include="src\thrift\thrift\windows\config.h" />
-    <ClInclude Include="src\thrift\thrift\windows\force_inc.h" />
-    <ClInclude Include="src\thrift\thrift\windows\StdAfx.h" />
-    <ClInclude Include="src\thrift\thrift\windows\TargetVersion.h" />
+    <ClInclude Include="src\thrift\async\TAsyncProtocolProcessor.h" />
+    <ClInclude Include="src\thrift\async\TEvhttpClientChannel.h" />
+    <ClInclude Include="src\thrift\async\TEvhttpServer.h" />
+    <ClInclude Include="src\thrift\server\TNonblockingServer.h" />
+    <ClInclude Include="src\thrift\windows\config.h" />
+    <ClInclude Include="src\thrift\windows\force_inc.h" />
+    <ClInclude Include="src\thrift\windows\StdAfx.h" />
+    <ClInclude Include="src\thrift\windows\TargetVersion.h" />
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{D8696CCE-7D46-4659-B432-91754A41DEB0}</ProjectGuid>
@@ -100,16 +100,16 @@
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <IncludePath>$(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)\src\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
@@ -118,7 +118,7 @@
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ForcedIncludeFiles>force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <ForcedIncludeFiles>thrift\windows\force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
       <ProgramDataBaseFileName>$(IntDir)libthriftnb.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
@@ -133,7 +133,7 @@
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ForcedIncludeFiles>force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <ForcedIncludeFiles>thrift\windows\force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
@@ -149,7 +149,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ForcedIncludeFiles>force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <ForcedIncludeFiles>thrift\windows\force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
       <ProgramDataBaseFileName>$(IntDir)libthriftnb.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
@@ -168,7 +168,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ForcedIncludeFiles>force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <ForcedIncludeFiles>thrift\windows\force_inc.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
diff --git a/lib/cpp/src/thrift/async/TAsyncChannel.cpp b/lib/cpp/src/thrift/async/TAsyncChannel.cpp
index bfde660..18dbb8c 100644
--- a/lib/cpp/src/thrift/async/TAsyncChannel.cpp
+++ b/lib/cpp/src/thrift/async/TAsyncChannel.cpp
@@ -18,7 +18,7 @@
  */
 
 #include <thrift/async/TAsyncChannel.h>
-#include <tr1/functional>
+#include <thrift/windows/tr1/functional>
 
 namespace apache { namespace thrift { namespace async {
 
diff --git a/lib/cpp/src/thrift/async/TAsyncChannel.h b/lib/cpp/src/thrift/async/TAsyncChannel.h
index 634b6a4..beec003 100644
--- a/lib/cpp/src/thrift/async/TAsyncChannel.h
+++ b/lib/cpp/src/thrift/async/TAsyncChannel.h
@@ -20,7 +20,7 @@
 #ifndef _THRIFT_ASYNC_TASYNCCHANNEL_H_
 #define _THRIFT_ASYNC_TASYNCCHANNEL_H_ 1
 
-#include <tr1/functional>
+#include <thrift/windows/tr1/functional>
 #include <thrift/Thrift.h>
 
 namespace apache { namespace thrift { namespace transport {
diff --git a/lib/cpp/src/thrift/concurrency/ThreadManager.h b/lib/cpp/src/thrift/concurrency/ThreadManager.h
index 6d7b0ef..08a0b1d 100644
--- a/lib/cpp/src/thrift/concurrency/ThreadManager.h
+++ b/lib/cpp/src/thrift/concurrency/ThreadManager.h
@@ -21,7 +21,7 @@
 #define _THRIFT_CONCURRENCY_THREADMANAGER_H_ 1
 
 #include <boost/shared_ptr.hpp>
-#include <tr1/functional>
+#include <thrift/windows/tr1/functional>
 #include <sys/types.h>
 #include "Thread.h"
 
diff --git a/lib/cpp/src/thrift/processor/PeekProcessor.h b/lib/cpp/src/thrift/processor/PeekProcessor.h
index 60e1559..9cfb35a 100644
--- a/lib/cpp/src/thrift/processor/PeekProcessor.h
+++ b/lib/cpp/src/thrift/processor/PeekProcessor.h
@@ -21,7 +21,7 @@
 #define PEEKPROCESSOR_H
 
 #include <string>
-#include <TProcessor.h>
+#include <thrift/TProcessor.h>
 #include <thrift/transport/TTransport.h>
 #include <thrift/transport/TTransportUtils.h>
 #include <thrift/transport/TBufferTransports.h>
diff --git a/lib/cpp/src/thrift/protocol/TDenseProtocol.cpp b/lib/cpp/src/thrift/protocol/TDenseProtocol.cpp
index 86e5e28..f60e7ff 100644
--- a/lib/cpp/src/thrift/protocol/TDenseProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TDenseProtocol.cpp
@@ -90,7 +90,7 @@
 #define __STDC_LIMIT_MACROS
 #include <stdint.h>
 #include "TDenseProtocol.h"
-#include "TReflectionLocal.h"
+#include "thrift/TReflectionLocal.h"
 
 // Leaving this on for now.  Disabling it will turn off asserts, which should
 // give a performance boost.  When we have *really* thorough test cases,
diff --git a/lib/cpp/src/thrift/transport/TPipe.cpp b/lib/cpp/src/thrift/transport/TPipe.cpp
new file mode 100644
index 0000000..2c7cf56
--- /dev/null
+++ b/lib/cpp/src/thrift/transport/TPipe.cpp
@@ -0,0 +1,209 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#ifdef _WIN32
+
+#include "TTransportException.h"
+#include "TPipe.h"
+
+namespace apache { namespace thrift { namespace transport {
+
+using namespace std;
+
+/**
+* TPipe implementation.
+*/
+
+//---- Constructors ----
+TPipe::TPipe(HANDLE hpipe) :
+  pipename_(""),
+  hPipe_(hpipe),
+  TimeoutSeconds_(3),
+  isAnonymous(false)
+{}
+
+TPipe::TPipe(string pipename) :
+  pipename_(pipename),
+  hPipe_(INVALID_HANDLE_VALUE),
+  TimeoutSeconds_(3),
+  isAnonymous(false)
+{}
+
+TPipe::TPipe(HANDLE hPipeRd, HANDLE hPipeWrt) :
+  pipename_(""),
+  hPipe_(hPipeRd),
+  hPipeWrt_(hPipeWrt),
+  TimeoutSeconds_(3),
+  isAnonymous(true)
+{}
+
+  TPipe::TPipe() :
+  pipename_(""),
+  hPipe_(INVALID_HANDLE_VALUE),
+  TimeoutSeconds_(3)
+{}
+
+//---- Destructor ----
+TPipe::~TPipe() {
+  close();
+}
+
+
+bool TPipe::isOpen() {
+  return (hPipe_ != INVALID_HANDLE_VALUE);
+}
+
+//---------------------------------------------------------
+// Transport callbacks
+//---------------------------------------------------------
+
+bool TPipe::peek() {
+  if (!isOpen()) {
+    return false;
+  }
+  DWORD bytesavail = 0;
+  int  PeekRet = 0;
+  PeekRet = PeekNamedPipe(hPipe_, NULL, 0, NULL, &bytesavail, NULL); 
+  return (PeekRet != 0 && bytesavail > 0);
+}
+
+void TPipe::open() {
+  if (isOpen()) {
+    return;
+  }
+
+  int SleepInterval = 500; //ms
+  int retries = TimeoutSeconds_ * 1000 / SleepInterval;
+  for(int i=0; i<retries; i++)
+  {
+    hPipe_ = CreateFile( 
+              pipename_.c_str(),
+              GENERIC_READ | GENERIC_WRITE, 
+              0,              // no sharing 
+              NULL,           // default security attributes
+              OPEN_EXISTING,  // opens existing pipe 
+              0,              // default attributes 
+              NULL);          // no template file 
+
+    if (hPipe_ == INVALID_HANDLE_VALUE) 
+      sleep(SleepInterval);
+    else
+      break;
+  }
+  if (hPipe_ == INVALID_HANDLE_VALUE) 
+    throw TTransportException(TTransportException::NOT_OPEN, "Unable to open pipe");
+
+  // The pipe connected; change to message-read mode. 
+  DWORD dwMode = PIPE_READMODE_MESSAGE; 
+  int fSuccess = SetNamedPipeHandleState( 
+              hPipe_,   // pipe handle 
+              &dwMode,  // new pipe mode 
+              NULL,     // don't set maximum bytes 
+              NULL);    // don't set maximum time 
+  if (fSuccess == 0)
+  {
+    throw TTransportException(TTransportException::NOT_OPEN, "SetNamedPipeHandleState failed");
+    close();
+  }
+}
+
+
+void TPipe::close() {
+  if (isOpen())
+  {
+    CloseHandle(hPipe_);
+    hPipe_ = INVALID_HANDLE_VALUE;
+  }
+}
+
+uint32_t TPipe::read(uint8_t* buf, uint32_t len) {
+  if (!isOpen())
+    throw TTransportException(TTransportException::NOT_OPEN, "Called read on non-open pipe");
+
+  DWORD  cbRead; 
+  int fSuccess = ReadFile( 
+              hPipe_,   // pipe handle 
+              buf,      // buffer to receive reply 
+              len,      // size of buffer 
+              &cbRead,  // number of bytes read 
+              NULL);    // not overlapped 
+
+  if ( !fSuccess && GetLastError() != ERROR_MORE_DATA )
+    return 0; // No more data, possibly because client disconnected.
+
+  return cbRead;
+}
+
+void TPipe::write(const uint8_t* buf, uint32_t len) {
+  if (!isOpen())
+    throw TTransportException(TTransportException::NOT_OPEN, "Called write on non-open pipe");
+
+  HANDLE WritePipe = isAnonymous? hPipeWrt_: hPipe_;
+  DWORD  cbWritten; 
+  int fSuccess = WriteFile( 
+              WritePipe,     // pipe handle 
+              buf,        // message 
+              len,        // message length 
+              &cbWritten, // bytes written 
+              NULL);      // not overlapped 
+
+  if ( !fSuccess) 
+    throw TTransportException(TTransportException::NOT_OPEN, "Write to pipe failed");
+}
+
+
+//---------------------------------------------------------
+// Accessors
+//---------------------------------------------------------
+
+string TPipe::getPipename() {
+  return pipename_;
+}
+
+void TPipe::setPipename(std::string pipename) {
+  pipename_ = pipename;
+}
+
+HANDLE TPipe::getPipeHandle() {
+  return hPipe_;
+}
+
+void TPipe::setPipeHandle(HANDLE pipehandle) {
+  hPipe_ = pipehandle;
+}
+
+HANDLE TPipe::getWrtPipeHandle() {
+  return hPipeWrt_;
+}
+
+void TPipe::setWrtPipeHandle(HANDLE pipehandle) {
+  hPipeWrt_ = pipehandle;
+}
+
+long TPipe::getConnectTimeout() {
+  return TimeoutSeconds_;
+}
+
+void TPipe::setConnectTimeout(long seconds) {
+  TimeoutSeconds_ = seconds;
+}
+
+}}} // apache::thrift::transport
+
+#endif //_WIN32
diff --git a/lib/cpp/src/thrift/transport/TPipe.h b/lib/cpp/src/thrift/transport/TPipe.h
new file mode 100644
index 0000000..bca3e27
--- /dev/null
+++ b/lib/cpp/src/thrift/transport/TPipe.h
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _THRIFT_TRANSPORT_TPIPE_H_
+#define _THRIFT_TRANSPORT_TPIPE_H_ 1
+#ifdef _WIN32
+
+#include "TTransport.h"
+#include "TVirtualTransport.h"
+
+namespace apache { namespace thrift { namespace transport {
+
+/**
+ * Windows Pipes implementation of the TTransport interface.
+ *
+ */
+class TPipe : public TVirtualTransport<TPipe> {
+ public:
+
+  // Constructs a new pipe object.
+  TPipe();
+  // Named pipe constructors -
+  TPipe(HANDLE hPipe);
+  TPipe(std::string path);
+  // Anonymous pipe -
+  TPipe(HANDLE hPipeRd, HANDLE hPipeWrt);
+
+  // Destroys the pipe object, closing it if necessary.
+  virtual ~TPipe();
+
+  // Returns whether the pipe is open & valid.
+  virtual bool isOpen();
+
+  // Checks whether more data is available in the pipe.
+  virtual bool peek();
+
+  // Creates and opens the named/anonymous pipe.
+  virtual void open();
+
+  // Shuts down communications on the pipe.
+  virtual void close();
+
+  // Reads from the pipe.
+  virtual uint32_t read(uint8_t* buf, uint32_t len);
+
+  // Writes to the pipe.
+  virtual void write(const uint8_t* buf, uint32_t len);
+
+
+  //Accessors
+  std::string getPipename();
+  void setPipename(std::string pipename);
+  HANDLE getPipeHandle(); //doubles as the read handle for anon pipe
+  void setPipeHandle(HANDLE pipehandle);
+  HANDLE getWrtPipeHandle();
+  void setWrtPipeHandle(HANDLE pipehandle);
+  long getConnectTimeout();
+  void setConnectTimeout(long seconds);
+
+ private:
+  std::string pipename_;
+  //Named pipe handles are R/W, while anonymous pipes are one or the other (half duplex).
+  HANDLE hPipe_, hPipeWrt_;
+  long TimeoutSeconds_;
+  bool isAnonymous;
+
+};
+
+}}} // apache::thrift::transport
+
+#endif //_WIN32
+#endif // #ifndef _THRIFT_TRANSPORT_TPIPE_H_
+
diff --git a/lib/cpp/src/thrift/transport/TPipeServer.cpp b/lib/cpp/src/thrift/transport/TPipeServer.cpp
new file mode 100644
index 0000000..6f2f73d
--- /dev/null
+++ b/lib/cpp/src/thrift/transport/TPipeServer.cpp
@@ -0,0 +1,313 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifdef _WIN32
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <cstring>
+
+#include "TPipe.h"
+#include "TPipeServer.h"
+#include <boost/shared_ptr.hpp>
+#include <AccCtrl.h>
+#include <Aclapi.h>
+
+namespace apache { namespace thrift { namespace transport {
+
+using namespace std;
+using boost::shared_ptr;
+
+//---- Constructors ----
+TPipeServer::TPipeServer(string pipename, uint32_t bufsize) :
+  pipename_(pipename),
+  bufsize_(bufsize),
+  hPipe_(INVALID_HANDLE_VALUE),
+  isAnonymous(false),
+  maxconns_(TPIPE_SERVER_MAX_CONNS_DEFAULT)
+ {}
+
+TPipeServer::TPipeServer(string pipename, uint32_t bufsize, uint32_t maxconnections) :
+  pipename_(pipename),
+  bufsize_(bufsize),
+  hPipe_(INVALID_HANDLE_VALUE),
+  isAnonymous(false)
+ {  //Restrict maxconns_ to 1-255
+    if(maxconnections == 0)
+      maxconns_ = 1;
+    else if (maxconnections > 255)
+      maxconns_ = 255;
+	else
+      maxconns_ = maxconnections;
+ }
+
+TPipeServer::TPipeServer(string pipename) :
+  pipename_(pipename),
+  bufsize_(1024),
+  hPipe_(INVALID_HANDLE_VALUE),
+  isAnonymous(false),
+  maxconns_(TPIPE_SERVER_MAX_CONNS_DEFAULT)
+ {}
+
+TPipeServer::TPipeServer(int bufsize) : 
+  pipename_(""),
+  bufsize_(bufsize),
+  hPipe_(INVALID_HANDLE_VALUE),
+  isAnonymous(true),
+  maxconns_(1)
+ {
+  //The anonymous pipe needs to be created first so that the server can
+  //pass the handles on to the client before the serve (acceptImpl)
+  //blocking call.
+  if (!TCreateAnonPipe()) {
+    GlobalOutput.perror("TPipeServer Create(Anon)Pipe failed, GLE=", GetLastError());
+    throw TTransportException(TTransportException::NOT_OPEN, " TPipeServer Create(Anon)Pipe failed");
+  }
+}
+
+TPipeServer::TPipeServer() : 
+  pipename_(""),
+  bufsize_(1024),
+  hPipe_(INVALID_HANDLE_VALUE),
+  isAnonymous(true),
+  maxconns_(1)
+{
+  if (!TCreateAnonPipe()) {
+    GlobalOutput.perror("TPipeServer Create(Anon)Pipe failed, GLE=", GetLastError());
+    throw TTransportException(TTransportException::NOT_OPEN, " TPipeServer Create(Anon)Pipe failed");
+  }
+}
+
+//---- Destructor ----
+TPipeServer::~TPipeServer() {
+  close();
+}
+
+//---------------------------------------------------------
+// Transport callbacks
+//---------------------------------------------------------
+
+shared_ptr<TTransport> TPipeServer::acceptImpl() {
+  shared_ptr<TPipe> client;
+
+  if(isAnonymous)
+  { //Anonymous Pipe
+    //This 0-byte read serves merely as a blocking call.
+    byte buf;
+    DWORD br;
+    int fSuccess = ReadFile( 
+          hPipe_, // pipe handle 
+          &buf,   // buffer to receive reply 
+          0,      // size of buffer 
+          &br,    // number of bytes read 
+          NULL);  // not overlapped
+
+    if ( !fSuccess && GetLastError() != ERROR_MORE_DATA ) {
+      GlobalOutput.perror("TPipeServer unable to initiate pipe comms, GLE=", GetLastError());
+      throw TTransportException(TTransportException::NOT_OPEN, " TPipeServer unable to initiate pipe comms");
+    }
+	client.reset(new TPipe(hPipe_, hPipeW_));
+  }
+  else
+  { //Named Pipe
+    int ConnectRet;
+    while (true)
+    {
+      if (!TCreateNamedPipe()) {
+        GlobalOutput.perror("TPipeServer CreateNamedPipe failed, GLE=", GetLastError());
+        throw TTransportException(TTransportException::NOT_OPEN, " TPipeServer CreateNamedPipe failed");
+      }
+
+      // Wait for the client to connect; if it succeeds, the
+      // function returns a nonzero value. If the function returns 
+      // zero, GetLastError should return ERROR_PIPE_CONNECTED. 
+      ConnectRet = ConnectNamedPipe(hPipe_, NULL) ? 
+                    TRUE : (GetLastError() == ERROR_PIPE_CONNECTED);
+
+      if (ConnectRet == TRUE)
+      {
+        GlobalOutput.printf("Client connected.");
+        break;
+      }
+      else
+      {
+        close();
+        GlobalOutput.perror("TPipeServer ConnectNamedPipe GLE=", GetLastError());
+        throw TTransportException(TTransportException::NOT_OPEN, "TPipeServer: client connection failed");
+      }
+    }
+	client.reset(new TPipe(hPipe_));
+  }
+
+  return client;
+}
+
+void TPipeServer::interrupt() {
+  if(hPipe_ != INVALID_HANDLE_VALUE) {
+    CancelIo(hPipe_);
+  }
+}
+
+void TPipeServer::close() {
+  if(!isAnonymous)
+  {
+    if(hPipe_ != INVALID_HANDLE_VALUE) {
+      DisconnectNamedPipe(hPipe_);
+      CloseHandle(hPipe_);
+      hPipe_ = INVALID_HANDLE_VALUE;
+    }
+  }
+  else
+  {
+    try {
+      CloseHandle(hPipe_);
+      CloseHandle(hPipeW_);
+      CloseHandle(ClientAnonRead);
+      CloseHandle(ClientAnonWrite);
+    }
+    catch(...) {
+        GlobalOutput.perror("TPipeServer anon close GLE=", GetLastError());
+    }
+  }
+}
+
+
+bool TPipeServer::TCreateNamedPipe() {
+
+  //Windows - set security to allow non-elevated apps
+  //to access pipes created by elevated apps.
+  SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
+  PSID everyone_sid = NULL;
+  AllocateAndInitializeSid(&SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &everyone_sid);
+
+  EXPLICIT_ACCESS ea;
+  ZeroMemory(&ea, sizeof(EXPLICIT_ACCESS));
+  ea.grfAccessPermissions = SPECIFIC_RIGHTS_ALL | STANDARD_RIGHTS_ALL;
+  ea.grfAccessMode = SET_ACCESS;
+  ea.grfInheritance = NO_INHERITANCE;
+  ea.Trustee.TrusteeForm = TRUSTEE_IS_SID;
+  ea.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
+  ea.Trustee.ptstrName  = (LPSTR)everyone_sid;
+
+  PACL acl = NULL;
+  SetEntriesInAcl(1, &ea, NULL, &acl);
+
+  PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)LocalAlloc(LPTR,SECURITY_DESCRIPTOR_MIN_LENGTH);
+  InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION);
+  SetSecurityDescriptorDacl(sd, TRUE, acl, FALSE);
+
+  SECURITY_ATTRIBUTES sa;
+  sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+  sa.lpSecurityDescriptor = sd;
+  sa.bInheritHandle = FALSE;
+
+  // Create an instance of the named pipe
+  hPipe_ = CreateNamedPipe( 
+        pipename_.c_str(),        // pipe name 
+        PIPE_ACCESS_DUPLEX,       // read/write access 
+        PIPE_TYPE_MESSAGE |       // message type pipe 
+        PIPE_READMODE_MESSAGE,    // message-read mode 
+        maxconns_,                // max. instances  
+        bufsize_,                 // output buffer size 
+        bufsize_,                 // input buffer size 
+        0,                        // client time-out 
+        &sa);                     // default security attribute 
+
+  return (hPipe_ != INVALID_HANDLE_VALUE);
+}
+
+bool TPipeServer::TCreateAnonPipe() {
+  SECURITY_ATTRIBUTES sa;
+  SECURITY_DESCRIPTOR sd; //security information for pipes
+
+  InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
+  SetSecurityDescriptorDacl(&sd, true, NULL, false);
+  sa.lpSecurityDescriptor = &sd;
+  sa.lpSecurityDescriptor = NULL;
+  sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+  sa.bInheritHandle = true; //allow passing handle to child
+
+  if (!CreatePipe(&ClientAnonRead,&hPipeW_,&sa,0))   //create stdin pipe
+  {
+    GlobalOutput.perror("TPipeServer CreatePipe (anon) failed, GLE=", GetLastError());
+    return false;
+  }
+  if (!CreatePipe(&hPipe_,&ClientAnonWrite,&sa,0))  //create stdout pipe
+  {
+    GlobalOutput.perror("TPipeServer CreatePipe (anon) failed, GLE=", GetLastError());
+    CloseHandle(ClientAnonRead);
+    CloseHandle(hPipeW_);
+    return false;
+  }
+
+  return true;
+}
+
+
+//---------------------------------------------------------
+// Accessors
+//---------------------------------------------------------
+
+string TPipeServer::getPipename() {
+  return pipename_;
+}
+
+void TPipeServer::setPipename(std::string pipename) {
+  pipename_ = pipename;
+}
+
+int  TPipeServer::getBufferSize() {
+  return bufsize_;
+}
+
+void TPipeServer::setBufferSize(int bufsize) {
+  bufsize_ = bufsize;
+}
+
+HANDLE TPipeServer::getPipeHandle() {
+  return hPipe_;
+}
+
+HANDLE TPipeServer::getWrtPipeHandle()
+{
+  return hPipeW_;
+}
+
+HANDLE TPipeServer::getClientRdPipeHandle()
+{
+  return ClientAnonRead;
+}
+
+HANDLE TPipeServer::getClientWrtPipeHandle()
+{
+  return ClientAnonWrite;
+}
+
+bool TPipeServer::getAnonymous() {
+  return isAnonymous;
+}
+
+void TPipeServer::setAnonymous(bool anon) {
+  isAnonymous = anon;
+}
+
+}}} // apache::thrift::transport
+
+#endif //_WIN32
diff --git a/lib/cpp/src/thrift/transport/TPipeServer.h b/lib/cpp/src/thrift/transport/TPipeServer.h
new file mode 100644
index 0000000..1732546
--- /dev/null
+++ b/lib/cpp/src/thrift/transport/TPipeServer.h
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _THRIFT_TRANSPORT_TSERVERWINPIPES_H_
+#define _THRIFT_TRANSPORT_TSERVERWINPIPES_H_ 1
+#ifdef _WIN32
+
+#include "TServerTransport.h"
+#include <boost/shared_ptr.hpp>
+
+#define TPIPE_SERVER_MAX_CONNS_DEFAULT 10
+
+namespace apache { namespace thrift { namespace transport {
+
+/**
+ * Windows Pipes implementation of TServerTransport.
+ */
+class TPipeServer : public TServerTransport {
+ public:
+  //Constructors
+  // Named Pipe -
+  TPipeServer(std::string pipename, uint32_t bufsize);
+  TPipeServer(std::string pipename, uint32_t bufsize, uint32_t maxconnections);
+  TPipeServer(std::string pipename);
+  // Anonymous pipe -
+  TPipeServer(int bufsize);
+  TPipeServer();
+
+  //Destructor
+  ~TPipeServer();
+
+  //Standard transport callbacks
+  //void listen(); //Unnecessary for Windows pipes
+  void interrupt();
+  void close();
+ protected:
+  boost::shared_ptr<TTransport> acceptImpl();
+
+  bool TCreateNamedPipe();
+  bool TCreateAnonPipe();
+
+ public:
+  //Accessors
+  std::string getPipename();
+  void setPipename(std::string pipename);
+  int  getBufferSize();
+  void setBufferSize(int bufsize);
+  HANDLE getPipeHandle();  //Named Pipe R/W -or- Anonymous pipe Read handle
+  HANDLE getWrtPipeHandle();
+  HANDLE getClientRdPipeHandle();
+  HANDLE getClientWrtPipeHandle();
+  bool getAnonymous();
+  void setAnonymous(bool anon);
+
+ private:
+  std::string pipename_;
+  uint32_t bufsize_;
+  uint32_t maxconns_;
+  HANDLE hPipe_;  //Named Pipe (R/W) or Anonymous Pipe (R)
+  HANDLE hPipeW_; //Anonymous Pipe (W)
+  HANDLE ClientAnonRead, ClientAnonWrite; //Client side anonymous pipe handles
+  //? Do we need duplicates to send to client?
+  bool isAnonymous;
+};
+
+}}} // apache::thrift::transport
+
+#endif //_WIN32
+#endif // #ifndef _THRIFT_TRANSPORT_TSERVERWINPIPES_H_
diff --git a/lib/cpp/src/thrift/transport/TTransportException.cpp b/lib/cpp/src/thrift/transport/TTransportException.cpp
index e24198a..f474e7d 100644
--- a/lib/cpp/src/thrift/transport/TTransportException.cpp
+++ b/lib/cpp/src/thrift/transport/TTransportException.cpp
@@ -20,7 +20,7 @@
 #include <thrift/transport/TTransportException.h>
 #include <boost/lexical_cast.hpp>
 #include <cstring>
-#include <config.h>
+#include <thrift/windows/config.h>
 
 using std::string;
 using boost::lexical_cast;
diff --git a/lib/cpp/src/thrift/windows/force_inc.h b/lib/cpp/src/thrift/windows/force_inc.h
index f9af312..beca406 100644
--- a/lib/cpp/src/thrift/windows/force_inc.h
+++ b/lib/cpp/src/thrift/windows/force_inc.h
@@ -42,7 +42,7 @@
 #  define _WIN32_WINNT 0x0601
 #endif
 
-#include <thrift/windows/config.h>
+#include "config.h"
 
 #undef gai_strerror
 #define gai_strerror gai_strerrorA