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/c_glib/Makefile.am b/lib/c_glib/Makefile.am
index 2f03e3d..d89b22c 100644
--- a/lib/c_glib/Makefile.am
+++ b/lib/c_glib/Makefile.am
@@ -24,7 +24,7 @@
 lib_LTLIBRARIES = libthrift_c_glib.la
 pkgconfig_DATA = thrift_c_glib.pc
 
-common_cflags = -g -Wall -W -Werror -Isrc $(GLIB_CFLAGS)
+common_cflags = -g -Wall -W -Werror -Isrc -I src/thrift $(GLIB_CFLAGS)
 common_ldflags = -g -Wall -W $(GLIB_LDFLAGS) @GCOV_LDFLAGS@
 
 # this removes optimizations and adds coverage flags
@@ -32,56 +32,56 @@
 
 # Define the source files for the module
 
-libthrift_c_glib_la_SOURCES = src/thrift.c \
-                              src/thrift_struct.c \
-                              src/thrift_application_exception.c \
-                              src/processor/thrift_processor.c \
-                              src/protocol/thrift_protocol.c \
-                              src/protocol/thrift_protocol_factory.c \
-                              src/protocol/thrift_binary_protocol.c \
-                              src/protocol/thrift_binary_protocol_factory.c \
-                              src/transport/thrift_transport.c \
-                              src/transport/thrift_transport_factory.c \
-                              src/transport/thrift_socket.c \
-                              src/transport/thrift_server_transport.c \
-                              src/transport/thrift_server_socket.c \
-                              src/transport/thrift_buffered_transport.c \
-                              src/transport/thrift_framed_transport.c \
-                              src/transport/thrift_memory_buffer.c \
-                              src/server/thrift_server.c \
-                              src/server/thrift_simple_server.c
+libthrift_c_glib_la_SOURCES = src/thrift/thrift.c \
+                              src/thrift/thrift_struct.c \
+                              src/thrift/thrift_application_exception.c \
+                              src/thrift/processor/thrift_processor.c \
+                              src/thrift/protocol/thrift_protocol.c \
+                              src/thrift/protocol/thrift_protocol_factory.c \
+                              src/thrift/protocol/thrift_binary_protocol.c \
+                              src/thrift/protocol/thrift_binary_protocol_factory.c \
+                              src/thrift/transport/thrift_transport.c \
+                              src/thrift/transport/thrift_transport_factory.c \
+                              src/thrift/transport/thrift_socket.c \
+                              src/thrift/transport/thrift_server_transport.c \
+                              src/thrift/transport/thrift_server_socket.c \
+                              src/thrift/transport/thrift_buffered_transport.c \
+                              src/thrift/transport/thrift_framed_transport.c \
+                              src/thrift/transport/thrift_memory_buffer.c \
+                              src/thrift/server/thrift_server.c \
+                              src/thrift/server/thrift_simple_server.c
 
 libthrift_c_glib_la_CFLAGS = $(common_cflags)
 
 include_thriftdir = $(includedir)/thrift/c_glib
 include_thrift_HEADERS = \
                          $(top_builddir)/config.h \
-                         src/thrift.h \
-                         src/thrift_application_exception.h \
-                         src/thrift_struct.h
+                         src/thrift/thrift.h \
+                         src/thrift/thrift_application_exception.h \
+                         src/thrift/thrift_struct.h
 
 include_protocoldir = $(include_thriftdir)/protocol
-include_protocol_HEADERS = src/protocol/thrift_protocol.h \
-                           src/protocol/thrift_protocol_factory.h \
-                           src/protocol/thrift_binary_protocol.h \
-                           src/protocol/thrift_binary_protocol_factory.h
+include_protocol_HEADERS = src/thrift/protocol/thrift_protocol.h \
+                           src/thrift/protocol/thrift_protocol_factory.h \
+                           src/thrift/protocol/thrift_binary_protocol.h \
+                           src/thrift/protocol/thrift_binary_protocol_factory.h
 
 include_transportdir = $(include_thriftdir)/transport
-include_transport_HEADERS = src/transport/thrift_buffered_transport.h \
-                            src/transport/thrift_framed_transport.h \
-                            src/transport/thrift_memory_buffer.h \
-                            src/transport/thrift_server_socket.h \
-                            src/transport/thrift_server_transport.h \
-                            src/transport/thrift_socket.h \
-                            src/transport/thrift_transport.h \
-                            src/transport/thrift_transport_factory.h
+include_transport_HEADERS = src/thrift/transport/thrift_buffered_transport.h \
+                            src/thrift/transport/thrift_framed_transport.h \
+                            src/thrift/transport/thrift_memory_buffer.h \
+                            src/thrift/transport/thrift_server_socket.h \
+                            src/thrift/transport/thrift_server_transport.h \
+                            src/thrift/transport/thrift_socket.h \
+                            src/thrift/transport/thrift_transport.h \
+                            src/thrift/transport/thrift_transport_factory.h
 
 include_serverdir = $(include_thriftdir)/server
-include_server_HEADERS = src/server/thrift_server.h \
-                         src/server/thrift_simple_server.h
+include_server_HEADERS = src/thrift/server/thrift_server.h \
+                         src/thrift/server/thrift_simple_server.h
 
 include_processordir = $(include_thriftdir)/processor
-include_processor_HEADERS = src/processor/thrift_processor.h
+include_processor_HEADERS = src/thrift/processor/thrift_processor.h
 
 
 EXTRA_DIST = \
diff --git a/lib/c_glib/src/processor/thrift_processor.c b/lib/c_glib/src/thrift/processor/thrift_processor.c
similarity index 94%
rename from lib/c_glib/src/processor/thrift_processor.c
rename to lib/c_glib/src/thrift/processor/thrift_processor.c
index 6e9f454..a993a62 100644
--- a/lib/c_glib/src/processor/thrift_processor.c
+++ b/lib/c_glib/src/thrift/processor/thrift_processor.c
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-#include "thrift.h"
-#include "processor/thrift_processor.h"
+#include <thrift/thrift.h>
+#include <thrift/processor/thrift_processor.h>
 
 G_DEFINE_ABSTRACT_TYPE(ThriftProcessor, thrift_processor, G_TYPE_OBJECT)
 
diff --git a/lib/c_glib/src/processor/thrift_processor.h b/lib/c_glib/src/thrift/processor/thrift_processor.h
similarity index 97%
rename from lib/c_glib/src/processor/thrift_processor.h
rename to lib/c_glib/src/thrift/processor/thrift_processor.h
index 390e31b..90af7e9 100644
--- a/lib/c_glib/src/processor/thrift_processor.h
+++ b/lib/c_glib/src/thrift/processor/thrift_processor.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include "protocol/thrift_protocol.h"
+#include <thrift/protocol/thrift_protocol.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/protocol/thrift_binary_protocol.c b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol.c
similarity index 99%
rename from lib/c_glib/src/protocol/thrift_binary_protocol.c
rename to lib/c_glib/src/thrift/protocol/thrift_binary_protocol.c
index 7ee28e8..4e3ee1e 100644
--- a/lib/c_glib/src/protocol/thrift_binary_protocol.c
+++ b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol.c
@@ -20,9 +20,9 @@
 #include <string.h>
 #include <stdio.h>
 
-#include "thrift.h"
-#include "protocol/thrift_protocol.h"
-#include "protocol/thrift_binary_protocol.h"
+#include <thrift/thrift.h>
+#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/protocol/thrift_binary_protocol.h>
 
 G_DEFINE_TYPE(ThriftBinaryProtocol, thrift_binary_protocol, THRIFT_TYPE_PROTOCOL)
 
diff --git a/lib/c_glib/src/protocol/thrift_binary_protocol.h b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol.h
similarity index 96%
rename from lib/c_glib/src/protocol/thrift_binary_protocol.h
rename to lib/c_glib/src/thrift/protocol/thrift_binary_protocol.h
index 95dced9..782d469 100644
--- a/lib/c_glib/src/protocol/thrift_binary_protocol.h
+++ b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol.h
@@ -22,8 +22,8 @@
 
 #include <glib-object.h>
 
-#include "protocol/thrift_protocol.h"
-#include "transport/thrift_transport.h"
+#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/transport/thrift_transport.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/protocol/thrift_binary_protocol_factory.c b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.c
similarity index 92%
rename from lib/c_glib/src/protocol/thrift_binary_protocol_factory.c
rename to lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.c
index 3c9f522..1e36b37 100644
--- a/lib/c_glib/src/protocol/thrift_binary_protocol_factory.c
+++ b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.c
@@ -17,9 +17,9 @@
  * under the License.
  */
 
-#include "thrift.h"
-#include "protocol/thrift_binary_protocol.h"
-#include "protocol/thrift_binary_protocol_factory.h"
+#include <thrift/thrift.h>
+#include <thrift/protocol/thrift_binary_protocol.h>
+#include <thrift/protocol/thrift_binary_protocol_factory.h>
 
 G_DEFINE_TYPE(ThriftBinaryProtocolFactory, thrift_binary_protocol_factory, THRIFT_TYPE_PROTOCOL_FACTORY)
 
diff --git a/lib/c_glib/src/protocol/thrift_binary_protocol_factory.h b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.h
similarity index 97%
rename from lib/c_glib/src/protocol/thrift_binary_protocol_factory.h
rename to lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.h
index 3b7fcc2..48e48f9 100644
--- a/lib/c_glib/src/protocol/thrift_binary_protocol_factory.h
+++ b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include "protocol/thrift_protocol_factory.h"
+#include <thrift/protocol/thrift_protocol_factory.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/protocol/thrift_protocol.c b/lib/c_glib/src/thrift/protocol/thrift_protocol.c
similarity index 99%
rename from lib/c_glib/src/protocol/thrift_protocol.c
rename to lib/c_glib/src/thrift/protocol/thrift_protocol.c
index d951031..a322fef 100644
--- a/lib/c_glib/src/protocol/thrift_protocol.c
+++ b/lib/c_glib/src/thrift/protocol/thrift_protocol.c
@@ -17,9 +17,9 @@
  * under the License.
  */
 
-#include "thrift.h"
-#include "protocol/thrift_protocol.h"
-#include "transport/thrift_transport.h"
+#include <thrift/thrift.h>
+#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/transport/thrift_transport.h>
 
 /* define the GError domain string */
 #define THRIFT_PROTOCOL_ERROR_DOMAIN "thrift-protocol-error-quark"
diff --git a/lib/c_glib/src/protocol/thrift_protocol.h b/lib/c_glib/src/thrift/protocol/thrift_protocol.h
similarity index 99%
rename from lib/c_glib/src/protocol/thrift_protocol.h
rename to lib/c_glib/src/thrift/protocol/thrift_protocol.h
index 1aeaed9..5dd562d 100644
--- a/lib/c_glib/src/protocol/thrift_protocol.h
+++ b/lib/c_glib/src/thrift/protocol/thrift_protocol.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include "transport/thrift_transport.h"
+#include <thrift/transport/thrift_transport.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/protocol/thrift_protocol_factory.c b/lib/c_glib/src/thrift/protocol/thrift_protocol_factory.c
similarity index 94%
rename from lib/c_glib/src/protocol/thrift_protocol_factory.c
rename to lib/c_glib/src/thrift/protocol/thrift_protocol_factory.c
index 073b33c..e4c7c12 100644
--- a/lib/c_glib/src/protocol/thrift_protocol_factory.c
+++ b/lib/c_glib/src/thrift/protocol/thrift_protocol_factory.c
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-#include "thrift.h"
-#include "protocol/thrift_protocol_factory.h"
+#include <thrift/thrift.h>
+#include <thrift/protocol/thrift_protocol_factory.h>
 
 G_DEFINE_ABSTRACT_TYPE(ThriftProtocolFactory, thrift_protocol_factory, G_TYPE_OBJECT)
 
diff --git a/lib/c_glib/src/protocol/thrift_protocol_factory.h b/lib/c_glib/src/thrift/protocol/thrift_protocol_factory.h
similarity index 96%
rename from lib/c_glib/src/protocol/thrift_protocol_factory.h
rename to lib/c_glib/src/thrift/protocol/thrift_protocol_factory.h
index b9aeb1b..5975e31 100644
--- a/lib/c_glib/src/protocol/thrift_protocol_factory.h
+++ b/lib/c_glib/src/thrift/protocol/thrift_protocol_factory.h
@@ -22,8 +22,8 @@
 
 #include <glib-object.h>
 
-#include "transport/thrift_transport.h"
-#include "protocol/thrift_protocol.h"
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/protocol/thrift_protocol.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/server/thrift_server.c b/lib/c_glib/src/thrift/server/thrift_server.c
similarity index 99%
rename from lib/c_glib/src/server/thrift_server.c
rename to lib/c_glib/src/thrift/server/thrift_server.c
index 6199576..cef5a01 100644
--- a/lib/c_glib/src/server/thrift_server.c
+++ b/lib/c_glib/src/thrift/server/thrift_server.c
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-#include "thrift.h"
+#include <thrift/thrift.h>
 #include "thrift_server.h"
 
 /* object properties */
diff --git a/lib/c_glib/src/server/thrift_server.h b/lib/c_glib/src/thrift/server/thrift_server.h
similarity index 92%
rename from lib/c_glib/src/server/thrift_server.h
rename to lib/c_glib/src/thrift/server/thrift_server.h
index b1113f8..a091a20 100644
--- a/lib/c_glib/src/server/thrift_server.h
+++ b/lib/c_glib/src/thrift/server/thrift_server.h
@@ -22,10 +22,10 @@
 
 #include <glib-object.h>
 
-#include "processor/thrift_processor.h"
-#include "transport/thrift_server_transport.h"
-#include "transport/thrift_transport_factory.h"
-#include "protocol/thrift_protocol_factory.h"
+#include <thrift/processor/thrift_processor.h>
+#include <thrift/transport/thrift_server_transport.h>
+#include <thrift/transport/thrift_transport_factory.h>
+#include <thrift/protocol/thrift_protocol_factory.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/server/thrift_simple_server.c b/lib/c_glib/src/thrift/server/thrift_simple_server.c
similarity index 94%
rename from lib/c_glib/src/server/thrift_simple_server.c
rename to lib/c_glib/src/thrift/server/thrift_simple_server.c
index fe3067a..c39a58d 100644
--- a/lib/c_glib/src/server/thrift_simple_server.c
+++ b/lib/c_glib/src/thrift/server/thrift_simple_server.c
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-#include "server/thrift_simple_server.h"
-#include "transport/thrift_transport_factory.h"
-#include "protocol/thrift_protocol_factory.h"
-#include "protocol/thrift_binary_protocol_factory.h"
+#include <thrift/server/thrift_simple_server.h>
+#include <thrift/transport/thrift_transport_factory.h>
+#include <thrift/protocol/thrift_protocol_factory.h>
+#include <thrift/protocol/thrift_binary_protocol_factory.h>
 
 G_DEFINE_TYPE(ThriftSimpleServer, thrift_simple_server, THRIFT_TYPE_SERVER)
 
diff --git a/lib/c_glib/src/server/thrift_simple_server.h b/lib/c_glib/src/thrift/server/thrift_simple_server.h
similarity index 97%
rename from lib/c_glib/src/server/thrift_simple_server.h
rename to lib/c_glib/src/thrift/server/thrift_simple_server.h
index 235500c..3547982 100644
--- a/lib/c_glib/src/server/thrift_simple_server.h
+++ b/lib/c_glib/src/thrift/server/thrift_simple_server.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include "server/thrift_server.h"
+#include <thrift/server/thrift_server.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/thrift.c b/lib/c_glib/src/thrift/thrift.c
similarity index 97%
rename from lib/c_glib/src/thrift.c
rename to lib/c_glib/src/thrift/thrift.c
index 886e5c3..34cadd4 100644
--- a/lib/c_glib/src/thrift.c
+++ b/lib/c_glib/src/thrift/thrift.c
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-#include "thrift.h"
+#include <thrift/thrift.h>
 
 /**
  * GHashTable callback to add keys to a GList.
diff --git a/lib/c_glib/src/thrift.h b/lib/c_glib/src/thrift/thrift.h
similarity index 100%
rename from lib/c_glib/src/thrift.h
rename to lib/c_glib/src/thrift/thrift.h
diff --git a/lib/c_glib/src/thrift_application_exception.c b/lib/c_glib/src/thrift/thrift_application_exception.c
similarity index 98%
rename from lib/c_glib/src/thrift_application_exception.c
rename to lib/c_glib/src/thrift/thrift_application_exception.c
index f1bee3c..c10a95e 100644
--- a/lib/c_glib/src/thrift_application_exception.c
+++ b/lib/c_glib/src/thrift/thrift_application_exception.c
@@ -18,7 +18,7 @@
  */
 
 #include "thrift_application_exception.h"
-#include "protocol/thrift_protocol.h"
+#include <thrift/protocol/thrift_protocol.h>
 
 G_DEFINE_TYPE(ThriftApplicationException, thrift_application_exception, THRIFT_TYPE_STRUCT)
 
diff --git a/lib/c_glib/src/thrift_application_exception.h b/lib/c_glib/src/thrift/thrift_application_exception.h
similarity index 100%
rename from lib/c_glib/src/thrift_application_exception.h
rename to lib/c_glib/src/thrift/thrift_application_exception.h
diff --git a/lib/c_glib/src/thrift_struct.c b/lib/c_glib/src/thrift/thrift_struct.c
similarity index 98%
rename from lib/c_glib/src/thrift_struct.c
rename to lib/c_glib/src/thrift/thrift_struct.c
index 8a0928a..233d622 100644
--- a/lib/c_glib/src/thrift_struct.c
+++ b/lib/c_glib/src/thrift/thrift_struct.c
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-#include "thrift.h"
+#include <thrift/thrift.h>
 #include "thrift_struct.h"
 
 G_DEFINE_ABSTRACT_TYPE(ThriftStruct, thrift_struct, G_TYPE_OBJECT)
diff --git a/lib/c_glib/src/thrift_struct.h b/lib/c_glib/src/thrift/thrift_struct.h
similarity index 97%
rename from lib/c_glib/src/thrift_struct.h
rename to lib/c_glib/src/thrift/thrift_struct.h
index edf9984..7542c05 100644
--- a/lib/c_glib/src/thrift_struct.h
+++ b/lib/c_glib/src/thrift/thrift_struct.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include "protocol/thrift_protocol.h"
+#include <thrift/protocol/thrift_protocol.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/transport/thrift_buffered_transport.c b/lib/c_glib/src/thrift/transport/thrift_buffered_transport.c
similarity index 98%
rename from lib/c_glib/src/transport/thrift_buffered_transport.c
rename to lib/c_glib/src/thrift/transport/thrift_buffered_transport.c
index 53c14b1..a3d7c21 100644
--- a/lib/c_glib/src/transport/thrift_buffered_transport.c
+++ b/lib/c_glib/src/thrift/transport/thrift_buffered_transport.c
@@ -24,9 +24,9 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "thrift.h"
-#include "transport/thrift_transport.h"
-#include "transport/thrift_buffered_transport.h"
+#include <thrift/thrift.h>
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_buffered_transport.h>
 
 /* object properties */
 enum _ThriftBufferedTransportProperties
diff --git a/lib/c_glib/src/transport/thrift_buffered_transport.h b/lib/c_glib/src/thrift/transport/thrift_buffered_transport.h
similarity index 97%
rename from lib/c_glib/src/transport/thrift_buffered_transport.h
rename to lib/c_glib/src/thrift/transport/thrift_buffered_transport.h
index aaa5183..5082cea 100644
--- a/lib/c_glib/src/transport/thrift_buffered_transport.h
+++ b/lib/c_glib/src/thrift/transport/thrift_buffered_transport.h
@@ -23,7 +23,7 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#include "transport/thrift_transport.h"
+#include <thrift/transport/thrift_transport.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/transport/thrift_framed_transport.c b/lib/c_glib/src/thrift/transport/thrift_framed_transport.c
similarity index 98%
rename from lib/c_glib/src/transport/thrift_framed_transport.c
rename to lib/c_glib/src/thrift/transport/thrift_framed_transport.c
index 2bed0a1..d764d48 100644
--- a/lib/c_glib/src/transport/thrift_framed_transport.c
+++ b/lib/c_glib/src/thrift/transport/thrift_framed_transport.c
@@ -24,9 +24,9 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "thrift.h"
-#include "transport/thrift_transport.h"
-#include "transport/thrift_framed_transport.h"
+#include <thrift/thrift.h>
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_framed_transport.h>
 
 /* object properties */
 enum _ThriftFramedTransportProperties
diff --git a/lib/c_glib/src/transport/thrift_framed_transport.h b/lib/c_glib/src/thrift/transport/thrift_framed_transport.h
similarity index 97%
rename from lib/c_glib/src/transport/thrift_framed_transport.h
rename to lib/c_glib/src/thrift/transport/thrift_framed_transport.h
index 5e14e35..da2e42e 100644
--- a/lib/c_glib/src/transport/thrift_framed_transport.h
+++ b/lib/c_glib/src/thrift/transport/thrift_framed_transport.h
@@ -23,7 +23,7 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#include "transport/thrift_transport.h"
+#include <thrift/transport/thrift_transport.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/transport/thrift_memory_buffer.c b/lib/c_glib/src/thrift/transport/thrift_memory_buffer.c
similarity index 97%
rename from lib/c_glib/src/transport/thrift_memory_buffer.c
rename to lib/c_glib/src/thrift/transport/thrift_memory_buffer.c
index cc6717d..b32d4a5 100644
--- a/lib/c_glib/src/transport/thrift_memory_buffer.c
+++ b/lib/c_glib/src/thrift/transport/thrift_memory_buffer.c
@@ -24,9 +24,9 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "thrift.h"
-#include "transport/thrift_transport.h"
-#include "transport/thrift_memory_buffer.h"
+#include <thrift/thrift.h>
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_memory_buffer.h>
 
 /* object properties */
 enum _ThriftMemoryBufferProperties
diff --git a/lib/c_glib/src/transport/thrift_memory_buffer.h b/lib/c_glib/src/thrift/transport/thrift_memory_buffer.h
similarity index 97%
rename from lib/c_glib/src/transport/thrift_memory_buffer.h
rename to lib/c_glib/src/thrift/transport/thrift_memory_buffer.h
index a207929..8ee697e 100644
--- a/lib/c_glib/src/transport/thrift_memory_buffer.h
+++ b/lib/c_glib/src/thrift/transport/thrift_memory_buffer.h
@@ -23,7 +23,7 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#include "transport/thrift_transport.h"
+#include <thrift/transport/thrift_transport.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/transport/thrift_server_socket.c b/lib/c_glib/src/thrift/transport/thrift_server_socket.c
similarity index 96%
rename from lib/c_glib/src/transport/thrift_server_socket.c
rename to lib/c_glib/src/thrift/transport/thrift_server_socket.c
index 2ebc01c..88093f2 100644
--- a/lib/c_glib/src/transport/thrift_server_socket.c
+++ b/lib/c_glib/src/thrift/transport/thrift_server_socket.c
@@ -23,11 +23,11 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-#include "thrift.h"
-#include "transport/thrift_socket.h"
-#include "transport/thrift_transport.h"
-#include "transport/thrift_server_transport.h"
-#include "transport/thrift_server_socket.h"
+#include <thrift/thrift.h>
+#include <thrift/transport/thrift_socket.h>
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_server_transport.h>
+#include <thrift/transport/thrift_server_socket.h>
 
 /* object properties */
 enum _ThriftServerSocketProperties
diff --git a/lib/c_glib/src/transport/thrift_server_socket.h b/lib/c_glib/src/thrift/transport/thrift_server_socket.h
similarity index 100%
rename from lib/c_glib/src/transport/thrift_server_socket.h
rename to lib/c_glib/src/thrift/transport/thrift_server_socket.h
diff --git a/lib/c_glib/src/transport/thrift_server_transport.c b/lib/c_glib/src/thrift/transport/thrift_server_transport.c
similarity index 93%
rename from lib/c_glib/src/transport/thrift_server_transport.c
rename to lib/c_glib/src/thrift/transport/thrift_server_transport.c
index 87ce8e0..d0a46c3 100644
--- a/lib/c_glib/src/transport/thrift_server_transport.c
+++ b/lib/c_glib/src/thrift/transport/thrift_server_transport.c
@@ -17,9 +17,9 @@
  * under the License.
  */
 
-#include "thrift.h"
-#include "transport/thrift_transport.h"
-#include "transport/thrift_server_transport.h"
+#include <thrift/thrift.h>
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_server_transport.h>
 
 G_DEFINE_ABSTRACT_TYPE(ThriftServerTransport, thrift_server_transport, G_TYPE_OBJECT)
 
diff --git a/lib/c_glib/src/transport/thrift_server_transport.h b/lib/c_glib/src/thrift/transport/thrift_server_transport.h
similarity index 100%
rename from lib/c_glib/src/transport/thrift_server_transport.h
rename to lib/c_glib/src/thrift/transport/thrift_server_transport.h
diff --git a/lib/c_glib/src/transport/thrift_socket.c b/lib/c_glib/src/thrift/transport/thrift_socket.c
similarity index 98%
rename from lib/c_glib/src/transport/thrift_socket.c
rename to lib/c_glib/src/thrift/transport/thrift_socket.c
index d231bc6..c258898 100644
--- a/lib/c_glib/src/transport/thrift_socket.c
+++ b/lib/c_glib/src/thrift/transport/thrift_socket.c
@@ -23,9 +23,9 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "thrift.h"
-#include "transport/thrift_transport.h"
-#include "transport/thrift_socket.h"
+#include <thrift/thrift.h>
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_socket.h>
 
 /* object properties */
 enum _ThriftSocketProperties
diff --git a/lib/c_glib/src/transport/thrift_socket.h b/lib/c_glib/src/thrift/transport/thrift_socket.h
similarity index 97%
rename from lib/c_glib/src/transport/thrift_socket.h
rename to lib/c_glib/src/thrift/transport/thrift_socket.h
index b3dd357..dde269c 100644
--- a/lib/c_glib/src/transport/thrift_socket.h
+++ b/lib/c_glib/src/thrift/transport/thrift_socket.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include "transport/thrift_transport.h"
+#include <thrift/transport/thrift_transport.h>
 
 G_BEGIN_DECLS
 
diff --git a/lib/c_glib/src/transport/thrift_transport.c b/lib/c_glib/src/thrift/transport/thrift_transport.c
similarity index 97%
rename from lib/c_glib/src/transport/thrift_transport.c
rename to lib/c_glib/src/thrift/transport/thrift_transport.c
index a37787d..890bcad 100644
--- a/lib/c_glib/src/transport/thrift_transport.c
+++ b/lib/c_glib/src/thrift/transport/thrift_transport.c
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-#include "thrift.h"
-#include "transport/thrift_transport.h"
+#include <thrift/thrift.h>
+#include <thrift/transport/thrift_transport.h>
 
 /* define the GError domain string */
 #define THRIFT_TRANSPORT_ERROR_DOMAIN "thrift-transport-error-quark"
diff --git a/lib/c_glib/src/transport/thrift_transport.h b/lib/c_glib/src/thrift/transport/thrift_transport.h
similarity index 100%
rename from lib/c_glib/src/transport/thrift_transport.h
rename to lib/c_glib/src/thrift/transport/thrift_transport.h
diff --git a/lib/c_glib/src/transport/thrift_transport_factory.c b/lib/c_glib/src/thrift/transport/thrift_transport_factory.c
similarity index 94%
rename from lib/c_glib/src/transport/thrift_transport_factory.c
rename to lib/c_glib/src/thrift/transport/thrift_transport_factory.c
index 8f9a1f2..e1125a3 100644
--- a/lib/c_glib/src/transport/thrift_transport_factory.c
+++ b/lib/c_glib/src/thrift/transport/thrift_transport_factory.c
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-#include "thrift.h"
-#include "transport/thrift_transport_factory.h"
+#include <thrift/thrift.h>
+#include <thrift/transport/thrift_transport_factory.h>
 
 G_DEFINE_TYPE(ThriftTransportFactory, thrift_transport_factory, G_TYPE_OBJECT)
 
diff --git a/lib/c_glib/src/transport/thrift_transport_factory.h b/lib/c_glib/src/thrift/transport/thrift_transport_factory.h
similarity index 100%
rename from lib/c_glib/src/transport/thrift_transport_factory.h
rename to lib/c_glib/src/thrift/transport/thrift_transport_factory.h
diff --git a/lib/c_glib/test/testbinaryprotocol.c b/lib/c_glib/test/testbinaryprotocol.c
index 34846c6..7545fb9 100644
--- a/lib/c_glib/test/testbinaryprotocol.c
+++ b/lib/c_glib/test/testbinaryprotocol.c
@@ -24,9 +24,9 @@
 #include <netdb.h>
 #include <string.h>
 
-#include "protocol/thrift_protocol.h"
-#include "transport/thrift_socket.h"
-#include "transport/thrift_server_socket.h"
+#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/transport/thrift_socket.h>
+#include <thrift/transport/thrift_server_socket.h>
 
 #define TEST_BOOL TRUE
 #define TEST_BYTE 123
diff --git a/lib/c_glib/test/testbufferedtransport.c b/lib/c_glib/test/testbufferedtransport.c
index fb49c8f..64dbdd1 100644
--- a/lib/c_glib/test/testbufferedtransport.c
+++ b/lib/c_glib/test/testbufferedtransport.c
@@ -20,10 +20,10 @@
 #include <assert.h>
 #include <netdb.h>
 
-#include "transport/thrift_transport.h"
-#include "transport/thrift_socket.h"
-#include "transport/thrift_server_transport.h"
-#include "transport/thrift_server_socket.h"
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_socket.h>
+#include <thrift/transport/thrift_server_transport.h>
+#include <thrift/transport/thrift_server_socket.h>
 
 #define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
 
diff --git a/lib/c_glib/test/testframedtransport.c b/lib/c_glib/test/testframedtransport.c
index 3269bf5..3587711 100644
--- a/lib/c_glib/test/testframedtransport.c
+++ b/lib/c_glib/test/testframedtransport.c
@@ -20,10 +20,10 @@
 #include <assert.h>
 #include <netdb.h>
 
-#include "transport/thrift_transport.h"
-#include "transport/thrift_socket.h"
-#include "transport/thrift_server_transport.h"
-#include "transport/thrift_server_socket.h"
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_socket.h>
+#include <thrift/transport/thrift_server_transport.h>
+#include <thrift/transport/thrift_server_socket.h>
 
 #define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
 
diff --git a/lib/c_glib/test/testmemorybuffer.c b/lib/c_glib/test/testmemorybuffer.c
index 65901bf..b716f5f 100644
--- a/lib/c_glib/test/testmemorybuffer.c
+++ b/lib/c_glib/test/testmemorybuffer.c
@@ -20,10 +20,10 @@
 #include <assert.h>
 #include <netdb.h>
 
-#include "transport/thrift_transport.h"
-#include "transport/thrift_socket.h"
-#include "transport/thrift_server_transport.h"
-#include "transport/thrift_server_socket.h"
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_socket.h>
+#include <thrift/transport/thrift_server_transport.h>
+#include <thrift/transport/thrift_server_socket.h>
 
 #define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
 
diff --git a/lib/c_glib/test/testoptionalrequired.c b/lib/c_glib/test/testoptionalrequired.c
index 7165d93..fdd4c1a 100644
--- a/lib/c_glib/test/testoptionalrequired.c
+++ b/lib/c_glib/test/testoptionalrequired.c
@@ -21,9 +21,9 @@
 #include <glib.h>
 
 #include "thrift_struct.h"
-#include "protocol/thrift_protocol.h"
-#include "protocol/thrift_binary_protocol.h"
-#include "transport/thrift_memory_buffer.h"
+#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/protocol/thrift_binary_protocol.h>
+#include <thrift/transport/thrift_memory_buffer.h>
 #include "gen-c_glib/t_test_optional_required_test_types.h"
 
 #include "gen-c_glib/t_test_optional_required_test_types.c"
diff --git a/lib/c_glib/test/testsimpleserver.c b/lib/c_glib/test/testsimpleserver.c
index 282a6e8..6f7d3a4 100644
--- a/lib/c_glib/test/testsimpleserver.c
+++ b/lib/c_glib/test/testsimpleserver.c
@@ -24,13 +24,13 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-#include "thrift.h"
-#include "processor/thrift_processor.h"
-#include "transport/thrift_server_socket.h"
+#include <thrift/thrift.h>
+#include <thrift/processor/thrift_processor.h>
+#include <thrift/transport/thrift_server_socket.h>
 
 #define TEST_PORT 51199
 
-#include "server/thrift_simple_server.c"
+#include <thrift/server/thrift_simple_server.c>
 
 /* create a rudimentary processor */
 #define TEST_PROCESSOR_TYPE (test_processor_get_type ())
diff --git a/lib/c_glib/test/testthrifttest.c b/lib/c_glib/test/testthrifttest.c
index b14b606..806166e 100644
--- a/lib/c_glib/test/testthrifttest.c
+++ b/lib/c_glib/test/testthrifttest.c
@@ -1,8 +1,8 @@
 #include <assert.h>
 #include <netdb.h>
 
-#include "transport/thrift_server_transport.h"
-#include "transport/thrift_server_socket.h"
+#include <thrift/transport/thrift_server_transport.h>
+#include <thrift/transport/thrift_server_socket.h>
 
 static const char TEST_ADDRESS[] = "localhost";
 static const int TEST_PORT = 64444;
diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp
index 795e47f..fb6af0b 100644
--- a/lib/c_glib/test/testthrifttestclient.cpp
+++ b/lib/c_glib/test/testthrifttestclient.cpp
@@ -22,10 +22,10 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <protocol/TBinaryProtocol.h>
-#include <protocol/TDebugProtocol.h>
-#include <server/TSimpleServer.h>
-#include <transport/TServerSocket.h>
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/protocol/TDebugProtocol.h>
+#include <thrift/server/TSimpleServer.h>
+#include <thrift/transport/TServerSocket.h>
 #include "ThriftTest.h"
 #include "ThriftTest_types.h"
 
@@ -314,9 +314,9 @@
 
 #include "t_test_thrift_test.h"
 #include "t_test_thrift_test_types.h"
-#include "transport/thrift_socket.h"
-#include "protocol/thrift_protocol.h"
-#include "protocol/thrift_binary_protocol.h"
+#include <thrift/transport/thrift_socket.h>
+#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/protocol/thrift_binary_protocol.h>
 
 static void
 test_thrift_client (void)
diff --git a/lib/c_glib/test/testtransportsocket.c b/lib/c_glib/test/testtransportsocket.c
index 279da86..cc21d58 100644
--- a/lib/c_glib/test/testtransportsocket.c
+++ b/lib/c_glib/test/testtransportsocket.c
@@ -20,9 +20,9 @@
 #include <assert.h>
 #include <netdb.h>
 
-#include "transport/thrift_transport.h"
-#include "transport/thrift_server_transport.h"
-#include "transport/thrift_server_socket.h"
+#include <thrift/transport/thrift_transport.h>
+#include <thrift/transport/thrift_server_transport.h>
+#include <thrift/transport/thrift_server_socket.h>
 
 #define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }