THRIFT-1320 Consistency of configure generated config.h
authorRoger Meier <roger@apache.org>
Mon, 5 Sep 2011 19:15:53 +0000 (19:15 +0000)
committerRoger Meier <roger@apache.org>
Mon, 5 Sep 2011 19:15:53 +0000 (19:15 +0000)
Patch: Alexandre Parenteau

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1165400 13f79535-47bb-0310-9956-ffa450edef68

17 files changed:
configure.ac
lib/cpp/src/Thrift.h
lib/cpp/src/concurrency/Mutex.cpp
lib/cpp/src/concurrency/Util.cpp
lib/cpp/src/concurrency/Util.h
lib/cpp/src/protocol/TProtocol.h
lib/cpp/src/server/TNonblockingServer.cpp
lib/cpp/src/server/TServer.cpp
lib/cpp/src/transport/TFDTransport.h
lib/cpp/src/transport/TFileTransport.cpp
lib/cpp/src/transport/TSSLSocket.cpp
lib/cpp/src/transport/TServerSocket.cpp
lib/cpp/src/transport/TSimpleFileTransport.cpp
lib/cpp/src/transport/TSocket.cpp
lib/cpp/src/transport/TSocket.h
lib/cpp/test/Benchmark.cpp
lib/cpp/test/TFileTransportTest.cpp

index 1817606..16ced7a 100644 (file)
@@ -298,6 +298,9 @@ AC_CHECK_HEADERS([stddef.h])
 AC_CHECK_HEADERS([stdlib.h])
 AC_CHECK_HEADERS([sys/socket.h])
 AC_CHECK_HEADERS([sys/time.h])
+AC_CHECK_HEADERS([sys/un.h])
+AC_CHECK_HEADERS([sys/poll.h])
+AC_CHECK_HEADERS([sys/resource.h])
 AC_CHECK_HEADERS([unistd.h])
 AC_CHECK_HEADERS([libintl.h])
 AC_CHECK_HEADERS([malloc.h])
index df52dab..97f7987 100644 (file)
@@ -27,7 +27,9 @@
 #include <assert.h>
 
 #include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
 #ifdef HAVE_INTTYPES_H
 #include <inttypes.h>
 #endif
index 8d52452..0cfa0ad 100644 (file)
  * under the License.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include "Mutex.h"
 #include "Util.h"
 
 #include <assert.h>
+#ifdef HAVE_PTHREAD_H
 #include <pthread.h>
+#endif
 #include <signal.h>
 
 using boost::shared_ptr;
index af23449..73b0c05 100644 (file)
  * under the License.
  */
 
-#include "Util.h"
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+#include "Util.h"
+
 #if defined(HAVE_CLOCK_GETTIME)
 #include <time.h>
-#elif defined(HAVE_GETTIMEOFDAY)
+#elif defined(HAVE_SYS_TIME_H)
 #include <sys/time.h>
 #endif // defined(HAVE_CLOCK_GETTIME)
 
index c6bd25e..8ef07ef 100644 (file)
 #include <stddef.h>
 #include <stdint.h>
 #include <time.h>
+
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 
 namespace apache { namespace thrift { namespace concurrency {
 
index 2656e5e..6c0a2d0 100644 (file)
@@ -26,7 +26,9 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/static_assert.hpp>
 
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
 #include <sys/types.h>
 #include <string>
 #include <map>
index cb1e27b..c331eda 100644 (file)
  * under the License.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "TNonblockingServer.h"
 #include <concurrency/Exception.h>
 #include <transport/TSocket.h>
@@ -30,6 +34,9 @@
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #include <netinet/tcp.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
 
 #include <netdb.h>
 #endif
 
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif
+
 #include <errno.h>
 #include <assert.h>
 
index 6b692ab..f6714a9 100644 (file)
  * under the License.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 namespace apache { namespace thrift { namespace server {
 
index 1d1a3e6..3ebad5c 100644 (file)
@@ -21,7 +21,9 @@
 #define _THRIFT_TRANSPORT_TFDTRANSPORT_H_ 1
 
 #include <string>
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 
 #include "TTransport.h"
 #include "TVirtualTransport.h"
index 76ef5bd..c6c3155 100644 (file)
@@ -24,7 +24,9 @@
 #include "TFileTransport.h"
 #include "TTransportUtils.h"
 
+#ifdef HAVE_PTHREAD_H
 #include <pthread.h>
+#endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #else
 #endif
 #include <fcntl.h>
 #include <errno.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
 #include <cstdlib>
 #include <cstring>
 #include <iostream>
+#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
+#endif
 
 namespace apache { namespace thrift { namespace transport {
 
index 913c258..7865be0 100755 (executable)
  * under the License.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <errno.h>
 #include <string>
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 #include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
 #include <boost/lexical_cast.hpp>
 #include <boost/shared_array.hpp>
 #include <openssl/err.h>
index 25d33e0..82516ff 100644 (file)
  * under the License.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <cstring>
 #include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
+#endif
+#ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
-#include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #include <netinet/tcp.h>
+#endif
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif
 #include <fcntl.h>
 #include <errno.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #include "TSocket.h"
 #include "TServerSocket.h"
index e58a574..b9a74aa 100644 (file)
  * under the License.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include "TSimpleFileTransport.h"
 
 #include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
+#endif
 #include <fcntl.h>
 
 namespace apache { namespace thrift { namespace transport {
index b5ed829..bee9d80 100644 (file)
  * under the License.
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 #include <cstring>
 #include <sstream>
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
+#endif
+#ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
+#endif
 #include <sys/types.h>
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #include <netinet/tcp.h>
+#endif
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <errno.h>
 #include <fcntl.h>
 
index 5521491..9d07522 100644 (file)
 #define _THRIFT_TRANSPORT_TSOCKET_H_ 1
 
 #include <string>
+
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif
 
 #include "TTransport.h"
 #include "TVirtualTransport.h"
index f4cd392..36da0bd 100644 (file)
  * under the License.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <iostream>
 #include <cmath>
 #include "transport/TBufferTransports.h"
 #include "protocol/TBinaryProtocol.h"
 #include "gen-cpp/DebugProtoTest_types.h"
 #include <time.h>
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 
 class Timer {
 public:
index 6dbe7c8..6ba71f3 100644 (file)
 #define _GNU_SOURCE // needed for getopt_long
 #endif
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 #include <getopt.h>
 #include <boost/test/unit_test.hpp>