From 78d470c7a50d3788bf3f819eba99597aea43674f Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Fri, 12 Jun 2015 15:49:21 -0700 Subject: Make the code independent of config.h Now the Build tool needs to define -DHAVE_ZLIB and -DHAVE-PTHREAD rather than providing a config.h - Make pbconfig.h a manually written file to handle hash conditions according to platform related macros. - Remove #include "config.h" from source code. - Changed the configure.ac and Makefile.am to pass down the macros. - Change cmake to pass down the the macros. Change-Id: I537249d5df8fdeba189706aec436d1ab1104a4dc --- src/google/protobuf/io/gzip_stream.cc | 2 -- src/google/protobuf/io/zero_copy_stream_unittest.cc | 2 -- src/google/protobuf/stubs/common.cc | 2 -- src/google/protobuf/stubs/common_unittest.cc | 2 -- src/google/protobuf/testing/zcgunzip.cc | 2 -- src/google/protobuf/testing/zcgzip.cc | 2 -- 6 files changed, 12 deletions(-) (limited to 'src/google') diff --git a/src/google/protobuf/io/gzip_stream.cc b/src/google/protobuf/io/gzip_stream.cc index c9f4ca7f..dd7c036e 100644 --- a/src/google/protobuf/io/gzip_stream.cc +++ b/src/google/protobuf/io/gzip_stream.cc @@ -33,8 +33,6 @@ // This file contains the implementation of classes GzipInputStream and // GzipOutputStream. -#include "config.h" - #if HAVE_ZLIB #include diff --git a/src/google/protobuf/io/zero_copy_stream_unittest.cc b/src/google/protobuf/io/zero_copy_stream_unittest.cc index dd3d1285..f2e5b629 100644 --- a/src/google/protobuf/io/zero_copy_stream_unittest.cc +++ b/src/google/protobuf/io/zero_copy_stream_unittest.cc @@ -46,8 +46,6 @@ // "parametized tests" so that one set of tests can be used on all the // implementations. -#include "config.h" - #ifdef _MSC_VER #include #else diff --git a/src/google/protobuf/stubs/common.cc b/src/google/protobuf/stubs/common.cc index 54e00ccb..22cc5aa1 100644 --- a/src/google/protobuf/stubs/common.cc +++ b/src/google/protobuf/stubs/common.cc @@ -36,8 +36,6 @@ #include #include -#include "config.h" - #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN // We only need minimal includes #include diff --git a/src/google/protobuf/stubs/common_unittest.cc b/src/google/protobuf/stubs/common_unittest.cc index 5f458e98..f9e2cfd4 100644 --- a/src/google/protobuf/stubs/common_unittest.cc +++ b/src/google/protobuf/stubs/common_unittest.cc @@ -39,8 +39,6 @@ #include #include -#include "config.h" - namespace google { namespace protobuf { namespace { diff --git a/src/google/protobuf/testing/zcgunzip.cc b/src/google/protobuf/testing/zcgunzip.cc index daf74ff1..c9d085c8 100644 --- a/src/google/protobuf/testing/zcgunzip.cc +++ b/src/google/protobuf/testing/zcgunzip.cc @@ -38,8 +38,6 @@ // Reads gzip stream on standard input and writes decompressed data to standard // output. -#include "config.h" - #include #include #include diff --git a/src/google/protobuf/testing/zcgzip.cc b/src/google/protobuf/testing/zcgzip.cc index a4101999..e910f321 100644 --- a/src/google/protobuf/testing/zcgzip.cc +++ b/src/google/protobuf/testing/zcgzip.cc @@ -38,8 +38,6 @@ // Reads data on standard input and writes compressed gzip stream to standard // output. -#include "config.h" - #include #include #include -- cgit v1.2.3