THRIFT-1552 Include paths for c/c++ should be prefixed with 'thrift/'

To ensure there are no include path collisions the C and C++ header
include paths should include 'thrift' as the root leaf. This will
prevent having to place /usr/include/thrift into the compilers include
header search path, which might otherwise result in the compiler
accidentally picking up headers that it shouldn't.

e.g. #include <foo/bar.h> should be #include <thrift/foo/bar.h>

Change-Id: I48f2b0f549bda0fc81e85506ac857adc800b98a1

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325674 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/test/AllProtocolTests.cpp b/lib/cpp/test/AllProtocolTests.cpp
index 8fec7f5..65d1927 100644
--- a/lib/cpp/test/AllProtocolTests.cpp
+++ b/lib/cpp/test/AllProtocolTests.cpp
@@ -19,9 +19,9 @@
 
 #include <stdio.h>
 
-#include <protocol/TBinaryProtocol.h>
-#include <protocol/TCompactProtocol.h>
-#include <transport/TBufferTransports.h>
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/protocol/TCompactProtocol.h>
+#include <thrift/transport/TBufferTransports.h>
 #include "AllProtocolTests.tcc"
 
 using namespace apache::thrift;
diff --git a/lib/cpp/test/AllProtocolTests.tcc b/lib/cpp/test/AllProtocolTests.tcc
index a5a3115..82f8738 100644
--- a/lib/cpp/test/AllProtocolTests.tcc
+++ b/lib/cpp/test/AllProtocolTests.tcc
@@ -20,11 +20,11 @@
 #ifndef _THRIFT_TEST_GENERICPROTOCOLTEST_TCC_
 #define _THRIFT_TEST_GENERICPROTOCOLTEST_TCC_ 1
 
-#include <limits>
+#include <thrift/limits>
 
-#include <protocol/TBinaryProtocol.h>
-#include <transport/TBufferTransports.h>
-#include <Thrift.h>
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/transport/TBufferTransports.h>
+#include <thrift/Thrift.h>
 
 #include "GenericHelpers.h"
 
diff --git a/lib/cpp/test/Benchmark.cpp b/lib/cpp/test/Benchmark.cpp
index 413802d..9ee2586 100755
--- a/lib/cpp/test/Benchmark.cpp
+++ b/lib/cpp/test/Benchmark.cpp
@@ -22,8 +22,8 @@
 #endif
 #include <iostream>
 #include <cmath>
-#include "transport/TBufferTransports.h"
-#include "protocol/TBinaryProtocol.h"
+#include "thrift/transport/TBufferTransports.h"
+#include "thrift/protocol/TBinaryProtocol.h"
 #include "gen-cpp/DebugProtoTest_types.h"
 #include <time.h>
 #ifdef HAVE_SYS_TIME_H
diff --git a/lib/cpp/test/DebugProtoTest.cpp b/lib/cpp/test/DebugProtoTest.cpp
index 4f456f3..26cc1ea 100644
--- a/lib/cpp/test/DebugProtoTest.cpp
+++ b/lib/cpp/test/DebugProtoTest.cpp
@@ -20,7 +20,7 @@
 #include <iostream>
 #include <cmath>
 #include "gen-cpp/DebugProtoTest_types.h"
-#include <protocol/TDebugProtocol.h>
+#include <thrift/protocol/TDebugProtocol.h>
 
 int main() {
   using std::cout;
diff --git a/lib/cpp/test/DenseProtoTest.cpp b/lib/cpp/test/DenseProtoTest.cpp
index 99f7865..f73579f 100644
--- a/lib/cpp/test/DenseProtoTest.cpp
+++ b/lib/cpp/test/DenseProtoTest.cpp
@@ -39,8 +39,8 @@
 #include <string>
 #include "gen-cpp/DebugProtoTest_types.h"
 #include "gen-cpp/OptionalRequiredTest_types.h"
-#include <protocol/TDenseProtocol.h>
-#include <transport/TBufferTransports.h>
+#include <thrift/protocol/TDenseProtocol.h>
+#include <thrift/transport/TBufferTransports.h>
 
 
 // Can't use memcmp here.  GCC is too smart.
diff --git a/lib/cpp/test/GenericHelpers.h b/lib/cpp/test/GenericHelpers.h
index d661d8b..1853a37 100644
--- a/lib/cpp/test/GenericHelpers.h
+++ b/lib/cpp/test/GenericHelpers.h
@@ -20,9 +20,9 @@
 #ifndef _THRIFT_TEST_GENERICHELPERS_H_
 #define _THRIFT_TEST_GENERICHELPERS_H_ 1
 
-#include <protocol/TBinaryProtocol.h>
-#include <transport/TBufferTransports.h>
-#include <Thrift.h>
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/transport/TBufferTransports.h>
+#include <thrift/Thrift.h>
 
 using boost::shared_ptr;
 using namespace apache::thrift::protocol;
diff --git a/lib/cpp/test/JSONProtoTest.cpp b/lib/cpp/test/JSONProtoTest.cpp
index a9268a2..dcb34d1 100644
--- a/lib/cpp/test/JSONProtoTest.cpp
+++ b/lib/cpp/test/JSONProtoTest.cpp
@@ -19,8 +19,8 @@
 
 #include <iostream>
 #include <cmath>
-#include <transport/TBufferTransports.h>
-#include <protocol/TJSONProtocol.h>
+#include <thrift/transport/TBufferTransports.h>
+#include <thrift/protocol/TJSONProtocol.h>
 #include "gen-cpp/DebugProtoTest_types.h"
 
 int main() {
diff --git a/lib/cpp/test/OptionalRequiredTest.cpp b/lib/cpp/test/OptionalRequiredTest.cpp
index 5d58f09..ddafa81 100644
--- a/lib/cpp/test/OptionalRequiredTest.cpp
+++ b/lib/cpp/test/OptionalRequiredTest.cpp
@@ -24,9 +24,9 @@
 #include <cassert>
 #include <map>
 #include <iostream>
-#include <protocol/TDebugProtocol.h>
-#include <protocol/TBinaryProtocol.h>
-#include <transport/TBufferTransports.h>
+#include <thrift/protocol/TDebugProtocol.h>
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/transport/TBufferTransports.h>
 #include "gen-cpp/OptionalRequiredTest_types.h"
 
 using std::cout;
diff --git a/lib/cpp/test/RWMutexStarveTest.cpp b/lib/cpp/test/RWMutexStarveTest.cpp
index 8042d49..e6cccf2 100644
--- a/lib/cpp/test/RWMutexStarveTest.cpp
+++ b/lib/cpp/test/RWMutexStarveTest.cpp
@@ -23,8 +23,8 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/test/unit_test.hpp>
 
-#include "concurrency/Mutex.h"
-#include "concurrency/PosixThreadFactory.h"
+#include "thrift/concurrency/Mutex.h"
+#include "thrift/concurrency/PosixThreadFactory.h"
 
 using boost::shared_ptr;
 using boost::unit_test::test_suite;
diff --git a/lib/cpp/test/SpecializationTest.cpp b/lib/cpp/test/SpecializationTest.cpp
index fae1d32..7a3d347 100644
--- a/lib/cpp/test/SpecializationTest.cpp
+++ b/lib/cpp/test/SpecializationTest.cpp
@@ -1,7 +1,7 @@
 #include <iostream>
 #include <cmath>
-#include <transport/TTransportUtils.h>
-#include <protocol/TBinaryProtocol.h>
+#include <thrift/transport/TTransportUtils.h>
+#include <thrift/protocol/TBinaryProtocol.h>
 #include <gen-cpp/DebugProtoTest_types.h>
 
 using std::cout;
diff --git a/lib/cpp/test/TBufferBaseTest.cpp b/lib/cpp/test/TBufferBaseTest.cpp
index 1a0552a..f88a019 100644
--- a/lib/cpp/test/TBufferBaseTest.cpp
+++ b/lib/cpp/test/TBufferBaseTest.cpp
@@ -19,8 +19,8 @@
 
 #include <algorithm>
 #include <boost/test/auto_unit_test.hpp>
-#include <transport/TBufferTransports.h>
-#include <transport/TShortReadTransport.h>
+#include <thrift/transport/TBufferTransports.h>
+#include <thrift/transport/TShortReadTransport.h>
 
 using std::string;
 using boost::shared_ptr;
diff --git a/lib/cpp/test/TFDTransportTest.cpp b/lib/cpp/test/TFDTransportTest.cpp
index 1ec538e..7ffca71 100644
--- a/lib/cpp/test/TFDTransportTest.cpp
+++ b/lib/cpp/test/TFDTransportTest.cpp
@@ -19,8 +19,8 @@
 
 #include <cstdlib>
 #include <stdexcept>
-#include <Thrift.h>
-#include <transport/TFDTransport.h>
+#include <thrift/Thrift.h>
+#include <thrift/transport/TFDTransport.h>
 using apache::thrift::transport::TTransportException;
 using apache::thrift::transport::TFDTransport;
 
diff --git a/lib/cpp/test/TFileTransportTest.cpp b/lib/cpp/test/TFileTransportTest.cpp
index 6ba71f3..984deda 100644
--- a/lib/cpp/test/TFileTransportTest.cpp
+++ b/lib/cpp/test/TFileTransportTest.cpp
@@ -29,7 +29,7 @@
 #include <getopt.h>
 #include <boost/test/unit_test.hpp>
 
-#include <transport/TFileTransport.h>
+#include <thrift/transport/TFileTransport.h>
 
 using namespace apache::thrift::transport;
 
diff --git a/lib/cpp/test/TMemoryBufferTest.cpp b/lib/cpp/test/TMemoryBufferTest.cpp
index 3711970..10b53f4 100644
--- a/lib/cpp/test/TMemoryBufferTest.cpp
+++ b/lib/cpp/test/TMemoryBufferTest.cpp
@@ -21,8 +21,8 @@
 #include <iostream>
 #include <climits>
 #include <cassert>
-#include <transport/TBufferTransports.h>
-#include <protocol/TBinaryProtocol.h>
+#include <thrift/transport/TBufferTransports.h>
+#include <thrift/protocol/TBinaryProtocol.h>
 #include "gen-cpp/ThriftTest_types.h"
 
 BOOST_AUTO_TEST_SUITE( TMemoryBufferTest )
diff --git a/lib/cpp/test/TPipedTransportTest.cpp b/lib/cpp/test/TPipedTransportTest.cpp
index e1e372c..7762f05 100644
--- a/lib/cpp/test/TPipedTransportTest.cpp
+++ b/lib/cpp/test/TPipedTransportTest.cpp
@@ -19,9 +19,9 @@
 
 #include <cstdlib>
 #include <stdexcept>
-#include <Thrift.h>
-#include <transport/TTransportUtils.h>
-#include <transport/TBufferTransports.h>
+#include <thrift/Thrift.h>
+#include <thrift/transport/TTransportUtils.h>
+#include <thrift/transport/TBufferTransports.h>
 using namespace std;
 using apache::thrift::transport::TTransportException;
 using apache::thrift::transport::TPipedTransport;
diff --git a/lib/cpp/test/ThriftTest_extras.cpp b/lib/cpp/test/ThriftTest_extras.cpp
index b78f276..33f681f 100644
--- a/lib/cpp/test/ThriftTest_extras.cpp
+++ b/lib/cpp/test/ThriftTest_extras.cpp
@@ -19,7 +19,7 @@
 
 // Extra functions required for ThriftTest_types to work
 
-#include <protocol/TDebugProtocol.h>
+#include <thrift/protocol/TDebugProtocol.h>
 #include "gen-cpp/ThriftTest_types.h"
 
 
diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp
index bc0529d..508d3e3 100644
--- a/lib/cpp/test/TransportTest.cpp
+++ b/lib/cpp/test/TransportTest.cpp
@@ -34,11 +34,11 @@
 #include <boost/type_traits.hpp>
 #include <boost/test/unit_test.hpp>
 
-#include <transport/TBufferTransports.h>
-#include <transport/TFDTransport.h>
-#include <transport/TFileTransport.h>
-#include <transport/TZlibTransport.h>
-#include <transport/TSocket.h>
+#include <thrift/transport/TBufferTransports.h>
+#include <thrift/transport/TFDTransport.h>
+#include <thrift/transport/TFileTransport.h>
+#include <thrift/transport/TZlibTransport.h>
+#include <thrift/transport/TSocket.h>
 
 using namespace apache::thrift::transport;
 
diff --git a/lib/cpp/test/ZlibTest.cpp b/lib/cpp/test/ZlibTest.cpp
index 605e9db..4d7966e 100644
--- a/lib/cpp/test/ZlibTest.cpp
+++ b/lib/cpp/test/ZlibTest.cpp
@@ -36,8 +36,8 @@
 #include <boost/shared_array.hpp>
 #include <boost/test/unit_test.hpp>
 
-#include <transport/TBufferTransports.h>
-#include <transport/TZlibTransport.h>
+#include <thrift/transport/TBufferTransports.h>
+#include <thrift/transport/TZlibTransport.h>
 
 using namespace std;
 using namespace boost;