summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordeanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-30 17:47:30 +0000
committerdeanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-30 17:47:30 +0000
commit459e14ca05d601d334532bf4bd96e3a7c753faa9 (patch)
tree3ff556cee54243f4a3e1f8265d70416325d5042b
parent085ae9601431b16db2d143ac0acea8dc6d4801e7 (diff)
downloadchromium_src-459e14ca05d601d334532bf4bd96e3a7c753faa9.zip
chromium_src-459e14ca05d601d334532bf4bd96e3a7c753faa9.tar.gz
chromium_src-459e14ca05d601d334532bf4bd96e3a7c753faa9.tar.bz2
Use own our bzip2 error handler instead of the default which prints error messages to STDERR and calls exit(1). This is better, since we will now crash instead of exiting. This also removes some unnecessary code and error strings from bzip2.
BUG=1289861 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/bzip2_error_handler.cc1
-rw-r--r--third_party/bzip2/SConscript1
-rw-r--r--third_party/bzip2/bzip2.vcproj2
3 files changed, 4 insertions, 0 deletions
diff --git a/base/bzip2_error_handler.cc b/base/bzip2_error_handler.cc
index 2774627..7556cb9 100644
--- a/base/bzip2_error_handler.cc
+++ b/base/bzip2_error_handler.cc
@@ -31,6 +31,7 @@
// 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.
+extern "C"
void bz_internal_error(int errcode) {
CHECK(false) << "bzip2 internal error: " << errcode;
}
diff --git a/third_party/bzip2/SConscript b/third_party/bzip2/SConscript
index d0d814da..6f2157e 100644
--- a/third_party/bzip2/SConscript
+++ b/third_party/bzip2/SConscript
@@ -33,6 +33,7 @@ env = env.Clone()
env.Append(
CCFLAGS = [
+ '/DBZ_NO_STDIO',
'/TC',
'/wd4996',
diff --git a/third_party/bzip2/bzip2.vcproj b/third_party/bzip2/bzip2.vcproj
index c60c1c1..b33f293 100644
--- a/third_party/bzip2/bzip2.vcproj
+++ b/third_party/bzip2/bzip2.vcproj
@@ -18,6 +18,7 @@
>
<Tool
Name="VCCLCompilerTool"
+ PreprocessorDefinitions="BZ_NO_STDIO"
DisableSpecificWarnings="4996"
/>
<Tool
@@ -31,6 +32,7 @@
>
<Tool
Name="VCCLCompilerTool"
+ PreprocessorDefinitions="BZ_NO_STDIO"
DisableSpecificWarnings="4996"
/>
<Tool