Build fixes and clock_get_time copy from paul querna

Reviewed By: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665085 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
new file mode 100644
index 0000000..cd5901f
--- /dev/null
+++ b/CONTRIBUTORS
@@ -0,0 +1,10 @@
+----------------
+Release 20070401
+----------------
+
+Kevin Ko <kevin.s.ko@gmail.com>
+-Fix for unnecessary std::string copy construction in Protocol/Exception
+
+Paul Querna <pquerna@apache.org>
+-Autoconf error message fix for libevent detection
+-clock_gettime implementation for OSX
diff --git a/lib/cpp/bootstrap.sh b/lib/cpp/bootstrap.sh
index 34df69d..431e35a 100755
--- a/lib/cpp/bootstrap.sh
+++ b/lib/cpp/bootstrap.sh
@@ -4,7 +4,11 @@
 autoscan
 autoheader
 aclocal -I ./aclocal
-libtoolize --automake
+if glibtoolize --version 1 >/dev/null 2>/dev/null; then
+  libtoolize --automake
+elif glibtoolize --version 1 >/dev/null 2>/dev/null; then
+  glibtoolize --automake
+fi
 touch NEWS README AUTHORS ChangeLog
 autoconf
 automake -ac
diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp
index 001783f..3b18d0e 100644
--- a/lib/cpp/src/transport/TFileTransport.cpp
+++ b/lib/cpp/src/transport/TFileTransport.cpp
@@ -8,7 +8,11 @@
 #include "TTransportUtils.h"
 
 #include <pthread.h>
+#ifndef HAVE_CLOCK_GETTIME
+#include <time.h>
+#else
 #include <sys/time.h>
+#endif
 #include <fcntl.h>
 #include <errno.h>
 #include <unistd.h>
@@ -21,6 +25,26 @@
 using namespace std;
 using namespace facebook::thrift::protocol;
 
+#ifndef HAVE_CLOCK_GETTIME
+/**
+ * Fake clock_gettime for systems like darwin
+ *
+ * @author Paul Querna <pquerna@apache.org>
+ */
+#define CLOCK_REALTIME 0 
+static int clock_gettime(int clk_id /*ignored*/, struct timespec *tp) {
+  struct timeval now;
+    
+  int rv = gettimeofday(&now, NULL);
+  if (rv != 0) {
+    return rv;
+  }
+    
+  tp->tv_sec = now.tv_sec;
+  tp->tv_nsec = now.tv_usec * 1000;
+  return 0;
+}
+#endif
 
 TFileTransport::TFileTransport(string path)
   : readState_()