Crazy byteswapping thrift patches from david reiss

Reviewed By: ninjitsu

Test Plan: bswap64, holla holla


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665098 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/TLogging.h b/lib/cpp/src/TLogging.h
index e814e41..15c9c06 100644
--- a/lib/cpp/src/TLogging.h
+++ b/lib/cpp/src/TLogging.h
@@ -7,14 +7,25 @@
 #ifndef _THRIFT_LOGGING_H
 #define _THRIFT_LOGGING_H 1
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 /**
  * Contains utility macros for debugging and logging.
  *
  * @author Aditya Agarwal
  */
 
+#ifndef HAVE_CLOCK_GETTIME
 #include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#endif
 
 /**
  * T_GLOBAL_DEBUGGING_LEVEL = 0: all debugging turned off, debug macros undefined