diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-18 22:42:25 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-18 22:42:25 +0000 |
commit | 056a8485be5325304fc2c28ab0cecca98e19d687 (patch) | |
tree | 7cf3bb053f2f4fbd285b26d4c8dc578d0939a0f0 | |
parent | a849323e1e44905e48c646b29872995209a9e08a (diff) | |
download | chromium_src-056a8485be5325304fc2c28ab0cecca98e19d687.zip chromium_src-056a8485be5325304fc2c28ab0cecca98e19d687.tar.gz chromium_src-056a8485be5325304fc2c28ab0cecca98e19d687.tar.bz2 |
Use generated shim headers for zlib.
BUG=165264
Review URL: https://codereview.chromium.org/11632002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173801 0039d316-1c4b-4281-b951-d872f2087c98
22 files changed, 23 insertions, 106 deletions
diff --git a/build/shim_headers.gypi b/build/shim_headers.gypi index cf0914d..bb80797 100644 --- a/build/shim_headers.gypi +++ b/build/shim_headers.gypi @@ -10,10 +10,13 @@ { 'variables': { - 'shim_headers_path': '<(INTERMEDIATE_DIR)/shim_headers', + 'shim_headers_path': '<(SHARED_INTERMEDIATE_DIR)/shim_headers/<(_target_name)', }, + 'include_dirs+++': [ + '<(shim_headers_path)', + ], 'direct_dependent_settings': { - 'include_dirs+': [ + 'include_dirs++++': [ '<(shim_headers_path)', ], }, diff --git a/chrome/browser/ui/webui/options/chromeos/wallpaper_source.cc b/chrome/browser/ui/webui/options/chromeos/wallpaper_source.cc index fd8250b..3e77484 100644 --- a/chrome/browser/ui/webui/options/chromeos/wallpaper_source.cc +++ b/chrome/browser/ui/webui/options/chromeos/wallpaper_source.cc @@ -19,11 +19,7 @@ #include "ui/gfx/skia_util.h" extern "C" { -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif } namespace chromeos { diff --git a/content/browser/renderer_host/clipboard_message_filter.cc b/content/browser/renderer_host/clipboard_message_filter.cc index d447dc0..dc08dd5 100644 --- a/content/browser/renderer_host/clipboard_message_filter.cc +++ b/content/browser/renderer_host/clipboard_message_filter.cc @@ -4,12 +4,6 @@ #include "content/browser/renderer_host/clipboard_message_filter.h" -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else -#include "third_party/zlib/zlib.h" -#endif - #include "base/bind.h" #include "base/bind_helpers.h" #include "base/stl_util.h" @@ -17,6 +11,7 @@ #include "googleurl/src/gurl.h" #include "ipc/ipc_message_macros.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "third_party/zlib/zlib.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/size.h" diff --git a/net/base/crl_set.cc b/net/base/crl_set.cc index a6a1830..dd73c7e 100644 --- a/net/base/crl_set.cc +++ b/net/base/crl_set.cc @@ -13,12 +13,7 @@ #include "base/values.h" #include "crypto/sha2.h" #include "net/base/crl_set.h" - -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif namespace net { diff --git a/net/base/gzip_filter.cc b/net/base/gzip_filter.cc index d4d72c3..2d02bce 100644 --- a/net/base/gzip_filter.cc +++ b/net/base/gzip_filter.cc @@ -4,14 +4,9 @@ #include "net/base/gzip_filter.h" -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else -#include "third_party/zlib/zlib.h" -#endif - #include "base/logging.h" #include "net/base/gzip_header.h" +#include "third_party/zlib/zlib.h" namespace net { diff --git a/net/base/gzip_filter_unittest.cc b/net/base/gzip_filter_unittest.cc index 8b76e8c..c889143 100644 --- a/net/base/gzip_filter_unittest.cc +++ b/net/base/gzip_filter_unittest.cc @@ -5,12 +5,6 @@ #include <fstream> #include <ostream> -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else -#include "third_party/zlib/zlib.h" -#endif - #include "base/file_util.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" @@ -19,6 +13,7 @@ #include "net/base/io_buffer.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" +#include "third_party/zlib/zlib.h" namespace { diff --git a/net/base/gzip_header.cc b/net/base/gzip_header.cc index 23a3dd3..81cb1d8 100644 --- a/net/base/gzip_header.cc +++ b/net/base/gzip_header.cc @@ -4,13 +4,8 @@ #include "net/base/gzip_header.h" -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else -#include "third_party/zlib/zlib.h" // for Z_DEFAULT_COMPRESSION -#endif - #include "base/logging.h" +#include "third_party/zlib/zlib.h" namespace net { diff --git a/net/base/sdch_filter_unittest.cc b/net/base/sdch_filter_unittest.cc index 1f28de5..ca68c08 100644 --- a/net/base/sdch_filter_unittest.cc +++ b/net/base/sdch_filter_unittest.cc @@ -8,12 +8,6 @@ #include <string> #include <vector> -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else -#include "third_party/zlib/zlib.h" -#endif - #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "net/base/filter.h" @@ -22,6 +16,7 @@ #include "net/base/sdch_filter.h" #include "net/url_request/url_request_http_job.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/zlib/zlib.h" namespace net { diff --git a/net/http/infinite_cache.cc b/net/http/infinite_cache.cc index e73a9fd..70c72ab 100644 --- a/net/http/infinite_cache.cc +++ b/net/http/infinite_cache.cc @@ -28,12 +28,7 @@ #include "net/http/http_response_headers.h" #include "net/http/http_response_info.h" #include "net/http/http_util.h" - -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif using base::PlatformFile; using base::Time; diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc index 0d9049d..ad8cd48 100644 --- a/net/spdy/spdy_framer.cc +++ b/net/spdy/spdy_framer.cc @@ -15,12 +15,7 @@ #include "net/spdy/spdy_frame_builder.h" #include "net/spdy/spdy_frame_reader.h" #include "net/spdy/spdy_bitmasks.h" - -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif using std::vector; diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h index e09dd4b..a0cb64f 100644 --- a/skia/config/SkUserConfig.h +++ b/skia/config/SkUserConfig.h @@ -110,11 +110,7 @@ include path. */ //#define SK_ZLIB_INCLUDE <zlib.h> -#if defined(USE_SYSTEM_ZLIB) -#define SK_ZLIB_INCLUDE <zlib.h> -#else #define SK_ZLIB_INCLUDE "third_party/zlib/zlib.h" -#endif /* Define this to allow PDF scalars above 32k. The PDF/A spec doesn't allow them, but modern PDF interpreters should handle them just fine. diff --git a/third_party/zlib/contrib/minizip/ioapi.h b/third_party/zlib/contrib/minizip/ioapi.h index c466e97..dfa3b6c 100644 --- a/third_party/zlib/contrib/minizip/ioapi.h +++ b/third_party/zlib/contrib/minizip/ioapi.h @@ -42,11 +42,7 @@ #include <stdio.h> #include <stdlib.h> -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif #if defined(USE_FILE32API) #define fopen64 fopen diff --git a/third_party/zlib/contrib/minizip/mztools.c b/third_party/zlib/contrib/minizip/mztools.c index d5b8859..026bf28 100644 --- a/third_party/zlib/contrib/minizip/mztools.c +++ b/third_party/zlib/contrib/minizip/mztools.c @@ -8,11 +8,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif #include "unzip.h" #define READ_8(adr) ((unsigned char)*(adr)) diff --git a/third_party/zlib/contrib/minizip/mztools.h b/third_party/zlib/contrib/minizip/mztools.h index 9731f19..90c834d 100644 --- a/third_party/zlib/contrib/minizip/mztools.h +++ b/third_party/zlib/contrib/minizip/mztools.h @@ -12,12 +12,8 @@ extern "C" { #endif #ifndef _ZLIB_H -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" #endif -#endif #include "unzip.h" diff --git a/third_party/zlib/contrib/minizip/unzip.c b/third_party/zlib/contrib/minizip/unzip.c index 4289207..22481a2 100644 --- a/third_party/zlib/contrib/minizip/unzip.c +++ b/third_party/zlib/contrib/minizip/unzip.c @@ -72,11 +72,7 @@ #define NOUNCRYPT #endif -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif #include "unzip.h" #ifdef STDC diff --git a/third_party/zlib/contrib/minizip/unzip.h b/third_party/zlib/contrib/minizip/unzip.h index b757a224..80eb36e 100644 --- a/third_party/zlib/contrib/minizip/unzip.h +++ b/third_party/zlib/contrib/minizip/unzip.h @@ -48,12 +48,8 @@ extern "C" { #endif #ifndef _ZLIB_H -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" #endif -#endif #ifndef _ZLIBIOAPI_H #include "ioapi.h" diff --git a/third_party/zlib/contrib/minizip/zip.c b/third_party/zlib/contrib/minizip/zip.c index 04c6b25..5a82885 100644 --- a/third_party/zlib/contrib/minizip/zip.c +++ b/third_party/zlib/contrib/minizip/zip.c @@ -26,11 +26,7 @@ #include <stdlib.h> #include <string.h> #include <time.h> -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif #include "zip.h" #ifdef STDC diff --git a/third_party/zlib/contrib/minizip/zip.h b/third_party/zlib/contrib/minizip/zip.h index 8788c02..8c06c0a 100644 --- a/third_party/zlib/contrib/minizip/zip.h +++ b/third_party/zlib/contrib/minizip/zip.h @@ -47,12 +47,8 @@ extern "C" { //#define HAVE_BZIP2 #ifndef _ZLIB_H -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" #endif -#endif #ifndef _ZLIBIOAPI_H #include "ioapi.h" diff --git a/third_party/zlib/zlib.gyp b/third_party/zlib/zlib.gyp index e04acbd..8a651f6 100644 --- a/third_party/zlib/zlib.gyp +++ b/third_party/zlib/zlib.gyp @@ -63,14 +63,20 @@ }], ], }, { + 'variables': { + 'headers_root_path': '.', + 'header_filenames': [ + 'zlib.h', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], 'direct_dependent_settings': { 'defines': [ 'USE_SYSTEM_ZLIB', ], }, - 'defines': [ - 'USE_SYSTEM_ZLIB', - ], 'link_settings': { 'libraries': [ '-lz', @@ -94,6 +100,9 @@ 'contrib/minizip/zip.c', 'contrib/minizip/zip.h', ], + 'dependencies': [ + 'zlib', + ], 'include_dirs': [ '.', '../..', diff --git a/ui/gfx/codec/png_codec.cc b/ui/gfx/codec/png_codec.cc index e0dc4c6..4ac54c5 100644 --- a/ui/gfx/codec/png_codec.cc +++ b/ui/gfx/codec/png_codec.cc @@ -9,19 +9,11 @@ #include "base/string_util.h" #include "ui/gfx/size.h" #include "ui/gfx/skia_util.h" +#include "third_party/libpng/png.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkUnPreMultiply.h" #include "third_party/skia/include/core/SkColorPriv.h" - -extern "C" { -#include "third_party/libpng/png.h" - -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif -} namespace gfx { diff --git a/webkit/support/webkit_support_gfx.cc b/webkit/support/webkit_support_gfx.cc index 1da7a34..21954bd 100644 --- a/webkit/support/webkit_support_gfx.cc +++ b/webkit/support/webkit_support_gfx.cc @@ -8,15 +8,8 @@ #include <stdlib.h> #include <string.h> -extern "C" { #include "third_party/libpng/png.h" - -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif -} namespace webkit_support { diff --git a/webkit/tools/test_shell/simple_clipboard_impl.cc b/webkit/tools/test_shell/simple_clipboard_impl.cc index b018b71..995624d 100644 --- a/webkit/tools/test_shell/simple_clipboard_impl.cc +++ b/webkit/tools/test_shell/simple_clipboard_impl.cc @@ -11,11 +11,7 @@ #include "base/string16.h" #include "googleurl/src/gurl.h" #include "third_party/skia/include/core/SkBitmap.h" -#if defined(USE_SYSTEM_ZLIB) -#include <zlib.h> -#else #include "third_party/zlib/zlib.h" -#endif #include "ui/base/clipboard/clipboard.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/size.h" |