diff --git a/lib/cpp/src/protocol/TBinaryProtocol.cc b/lib/cpp/src/protocol/TBinaryProtocol.cc
index 51c9306..9fb2ec3 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.cc
+++ b/lib/cpp/src/protocol/TBinaryProtocol.cc
@@ -116,7 +116,24 @@
   out->write((uint8_t*)&net, 8);
   return 8;
 }
+  
+uint32_t TBinaryProtocol::writeDouble(shared_ptr<TTransport> out,
+                                      const double dub) const {
+  uint8_t b[8];
+  uint8_t* d = (uint8_t*)&dub;
+  b[0] = d[7];
+  b[1] = d[6];
+  b[2] = d[5];
+  b[3] = d[4];
+  b[4] = d[3];
+  b[5] = d[2];
+  b[6] = d[1];
+  b[7] = d[0];
+  out->write((uint8_t*)b, 8);
+  return 8;
+}
 
+  
 uint32_t TBinaryProtocol::writeString(shared_ptr<TTransport> out,
                                       const string& str) const {
   uint32_t result = writeI32(out, str.size());
@@ -276,6 +293,23 @@
   return 8;
 }
 
+uint32_t TBinaryProtocol::readDouble(shared_ptr<TTransport> in,
+                                     double& dub) const {
+  uint8_t b[8];
+  uint8_t d[8];
+  in->readAll(b, 8);
+  d[0] = b[7];
+  d[1] = b[6];
+  d[2] = b[5];
+  d[3] = b[4];
+  d[4] = b[3];
+  d[5] = b[2];
+  d[6] = b[1];
+  d[7] = b[0];
+  dub = *(double*)d;
+  return 8;
+}
+
 uint32_t TBinaryProtocol::readString(shared_ptr<TTransport> in,
                                      string& str) const {
   uint32_t result;
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.h b/lib/cpp/src/protocol/TBinaryProtocol.h
index 5bca6dd..7f36a57 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.h
+++ b/lib/cpp/src/protocol/TBinaryProtocol.h
@@ -80,6 +80,10 @@
   uint32_t writeI64(shared_ptr<TTransport> out,
 		     const int64_t i64) const;
 
+  uint32_t writeDouble(shared_ptr<TTransport> out,
+                       const double dub) const;
+
+
   uint32_t writeString(shared_ptr<TTransport> out,
 			const std::string& str) const;
 
@@ -141,6 +145,9 @@
   uint32_t readI64(shared_ptr<TTransport> in,
 		    int64_t& i64) const;
 
+  uint32_t readDouble(shared_ptr<TTransport> in,
+                      double& dub) const;
+
   uint32_t readString(shared_ptr<TTransport> in,
 		       std::string& str) const;
 };
diff --git a/lib/cpp/src/protocol/TProtocol.h b/lib/cpp/src/protocol/TProtocol.h
index 65d6f3c..89c7f48 100644
--- a/lib/cpp/src/protocol/TProtocol.h
+++ b/lib/cpp/src/protocol/TProtocol.h
@@ -16,7 +16,7 @@
 
 using namespace facebook::thrift::transport;
 
-#define ntohll(x) (((uint64_t)(ntohl((int)((x << 32) >> 32))) << 32) | (uint32_t)ntohl(((int)(x >> 32))))
+#define ntohll(x) (((uint64_t)(ntohl((int)((x & 0x00000000FFFFFFFF)))) << 32) | (uint32_t)ntohl(((int)(x >> 32 & 0x00000000FFFFFFFF))))
 
 #define htonll(x) ntohll(x)
 
@@ -38,6 +38,7 @@
   T_I32        = 8,
   T_U64        = 9,
   T_I64        = 10,
+  T_DOUBLE     = 4,
   T_STRING     = 11,
   T_UTF7       = 11,
   T_STRUCT     = 12,
@@ -133,6 +134,9 @@
   virtual uint32_t writeI64(shared_ptr<TTransport> out,
 			    const int64_t i64) const = 0;
 
+  virtual uint32_t writeDouble(shared_ptr<TTransport> out,
+                               const double dub) const = 0;
+
   virtual uint32_t writeString(shared_ptr<TTransport> out,
 			       const std::string& str) const = 0;
 
@@ -193,6 +197,9 @@
   virtual uint32_t readI64(shared_ptr<TTransport> in,
 			   int64_t& i64) const = 0;
 
+  virtual uint32_t readDouble(shared_ptr<TTransport> in,
+			      double& dub) const = 0;
+
   virtual uint32_t readString(shared_ptr<TTransport> in,
 			      std::string& str) const = 0;
 
@@ -226,6 +233,11 @@
         int64_t i64;
         return readI64(in, i64);
       }
+    case T_DOUBLE:
+      {
+        double dub;
+        return readDouble(in, dub);
+      }
     case T_STRING:
       {
         std::string str;
