summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/SConscript1
-rw-r--r--base/build/base.vcproj4
-rw-r--r--base/bzip2_error_handler.cc36
3 files changed, 41 insertions, 0 deletions
diff --git a/base/SConscript b/base/SConscript
index 2b7a7cc..0679437 100644
--- a/base/SConscript
+++ b/base/SConscript
@@ -58,6 +58,7 @@ input_files = [
'base_drop_target.cc',
'base_paths.cc',
'base_switches.cc',
+ 'bzip2_error_handler.cc',
'clipboard.cc',
'clipboard_util.cc',
'command_line.cc',
diff --git a/base/build/base.vcproj b/base/build/base.vcproj
index 0847bbc..dd129a5 100644
--- a/base/build/base.vcproj
+++ b/base/build/base.vcproj
@@ -162,6 +162,10 @@
>
</File>
<File
+ RelativePath="..\bzip2_error_handler.cc"
+ >
+ </File>
+ <File
RelativePath="..\third_party\nss\blapi.h"
>
</File>
diff --git a/base/bzip2_error_handler.cc b/base/bzip2_error_handler.cc
new file mode 100644
index 0000000..2774627
--- /dev/null
+++ b/base/bzip2_error_handler.cc
@@ -0,0 +1,36 @@
+// Copyright 2008, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "base/logging.h"
+
+// We define BZ_NO_STDIO in third_party/bzip2 to remove its internal STDERR
+// error reporting. This requires us to export our own error handler.
+void bz_internal_error(int errcode) {
+ CHECK(false) << "bzip2 internal error: " << errcode;
+}