From d87b20e1ae765cb65281c5bd7c12fc41e8a86780 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 2 Mar 2016 16:55:26 -0800 Subject: Rename png_ functions conflicting with chrome. Part of the work required to ship XFA with chrome. BUG=pdfium:396 R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1763493002 . --- third_party/libpng16/README.pdfium | 1 + third_party/libpng16/pngprefix.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 third_party/libpng16/pngprefix.h (limited to 'third_party/libpng16') diff --git a/third_party/libpng16/README.pdfium b/third_party/libpng16/README.pdfium index d60bc6f428..b0e6805537 100644 --- a/third_party/libpng16/README.pdfium +++ b/third_party/libpng16/README.pdfium @@ -10,6 +10,7 @@ PNG library. Local Modifications: pnglibconf.h: a copy of libpng's scripts/pnglibconf.h.prebuilt. +pngprefix.h: manually-created redefinitions to avoid conflicts with chome. 0000-build-config.patch: Local build configuration changes. 0001-disable-arm-neon.diff: Disable ARM NEON optimizations. 0002-static-png-gt.patch: Unconditionally use static png_gt() in png.c to avoid compilation warning. diff --git a/third_party/libpng16/pngprefix.h b/third_party/libpng16/pngprefix.h new file mode 100644 index 0000000000..8eab668297 --- /dev/null +++ b/third_party/libpng16/pngprefix.h @@ -0,0 +1,17 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PNGPREFIX_H +#define PNGPREFIX_H + +// The purpose of this file is to rename conflicting functions +// when this version of libpng and chromium's version of it are +// both simultaneously present. + +#define png_get_uint_32 PDFIUM_png_get_uint_32 +#define png_get_uint_16 PDFIUM_png_get_uint_16 +#define png_get_int_32 PDFIUM_png_get_int_32 +#define png_get_int_16 PDFIUM_png_get_int_16 + +#endif // PNGPREFIX_H -- cgit v1.2.3