summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 18:02:43 +0000
committerjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 18:02:43 +0000
commit6425efe211c40641cc60eb5866c115ffb5ee94d6 (patch)
tree768f73ea36e9f6bfe38f800712cf6e2658667a2c
parent05703ff01613d128a7d06fa09f668acd99c092c7 (diff)
downloadchromium_src-6425efe211c40641cc60eb5866c115ffb5ee94d6.zip
chromium_src-6425efe211c40641cc60eb5866c115ffb5ee94d6.tar.gz
chromium_src-6425efe211c40641cc60eb5866c115ffb5ee94d6.tar.bz2
Roll snappy r37->r61 and enable snappy for leveldb
BUG=81384 Review URL: http://codereview.chromium.org/9866056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130967 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--DEPS2
-rw-r--r--third_party/leveldatabase/leveldatabase.gyp2
-rw-r--r--third_party/leveldatabase/port/port_chromium.cc3
-rw-r--r--third_party/snappy/README.chromium14
-rw-r--r--third_party/snappy/linux/config.h6
-rw-r--r--third_party/snappy/linux/snappy-stubs-public.h28
-rw-r--r--third_party/snappy/mac/config.h6
-rw-r--r--third_party/snappy/mac/snappy-stubs-public.h28
-rw-r--r--third_party/snappy/snappy.gyp5
-rw-r--r--third_party/snappy/win32/snappy-stubs-public.h85
10 files changed, 164 insertions, 15 deletions
diff --git a/DEPS b/DEPS
index 23a4206c..21a7beb 100644
--- a/DEPS
+++ b/DEPS
@@ -113,7 +113,7 @@ deps = {
(Var("googlecode_url") % "leveldb") + "/trunk@64",
"src/third_party/snappy/src":
- (Var("googlecode_url") % "snappy") + "/trunk@37",
+ (Var("googlecode_url") % "snappy") + "/trunk@61",
"src/tools/grit":
(Var("googlecode_url") % "grit-i18n") + "/trunk@23",
diff --git a/third_party/leveldatabase/leveldatabase.gyp b/third_party/leveldatabase/leveldatabase.gyp
index db59f77..938a3de 100644
--- a/third_party/leveldatabase/leveldatabase.gyp
+++ b/third_party/leveldatabase/leveldatabase.gyp
@@ -4,7 +4,7 @@
{
'variables': {
- 'use_snappy%': 0,
+ 'use_snappy%': 1,
},
'target_defaults': {
'defines': [
diff --git a/third_party/leveldatabase/port/port_chromium.cc b/third_party/leveldatabase/port/port_chromium.cc
index 7f6de92..28f0df4 100644
--- a/third_party/leveldatabase/port/port_chromium.cc
+++ b/third_party/leveldatabase/port/port_chromium.cc
@@ -62,7 +62,8 @@ bool Snappy_Compress(const char* input, size_t input_length,
#endif
}
-bool Snappy_GetUncompressedLength(const char* input, size_t length,
+bool Snappy_GetUncompressedLength(const char* input_data,
+ size_t input_length,
size_t* result) {
#if defined(USE_SNAPPY)
return snappy::GetUncompressedLength(input_data, input_length, result);
diff --git a/third_party/snappy/README.chromium b/third_party/snappy/README.chromium
new file mode 100644
index 0000000..95d904d
--- /dev/null
+++ b/third_party/snappy/README.chromium
@@ -0,0 +1,14 @@
+Name: Snappy: A fast compressor/decompressor
+Short Name: snappy
+URL: http://code.google.com/p/snappy/
+Version: r61
+License: New BSD
+Security Critical: yes
+
+Description:
+Compression library used by LevelDB.
+
+Local Additions:
+* gyp file for building in chromium
+* {mac,linux}/config.h autogenerated configuration script
+* {mac,linux,win}/snappy-stubs-public.h autogenerated public headers
diff --git a/third_party/snappy/linux/config.h b/third_party/snappy/linux/config.h
index 6b9cf2a..d993481 100644
--- a/third_party/snappy/linux/config.h
+++ b/third_party/snappy/linux/config.h
@@ -78,7 +78,7 @@
#define PACKAGE_NAME "snappy"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "snappy 1.0.0"
+#define PACKAGE_STRING "snappy 1.0.5"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "snappy"
@@ -87,13 +87,13 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.0.0"
+#define PACKAGE_VERSION "1.0.5"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "1.0.0"
+#define VERSION "1.0.5"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
diff --git a/third_party/snappy/linux/snappy-stubs-public.h b/third_party/snappy/linux/snappy-stubs-public.h
index 5c3442b..9ee4ca5 100644
--- a/third_party/snappy/linux/snappy-stubs-public.h
+++ b/third_party/snappy/linux/snappy-stubs-public.h
@@ -1,6 +1,32 @@
// Copyright 2011 Google Inc. All Rights Reserved.
// Author: sesse@google.com (Steinar H. Gunderson)
//
+// 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.
+//
// Various type stubs for the open-source version of Snappy.
//
// This file cannot include config.h, as it is included from snappy.h,
@@ -20,7 +46,7 @@
#define SNAPPY_MAJOR 1
#define SNAPPY_MINOR 0
-#define SNAPPY_PATCHLEVEL 0
+#define SNAPPY_PATCHLEVEL 5
#define SNAPPY_VERSION \
((SNAPPY_MAJOR << 16) | (SNAPPY_MINOR << 8) | SNAPPY_PATCHLEVEL)
diff --git a/third_party/snappy/mac/config.h b/third_party/snappy/mac/config.h
index 6b9cf2a..d993481 100644
--- a/third_party/snappy/mac/config.h
+++ b/third_party/snappy/mac/config.h
@@ -78,7 +78,7 @@
#define PACKAGE_NAME "snappy"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "snappy 1.0.0"
+#define PACKAGE_STRING "snappy 1.0.5"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "snappy"
@@ -87,13 +87,13 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.0.0"
+#define PACKAGE_VERSION "1.0.5"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "1.0.0"
+#define VERSION "1.0.5"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
diff --git a/third_party/snappy/mac/snappy-stubs-public.h b/third_party/snappy/mac/snappy-stubs-public.h
index 5c3442b..9ee4ca5 100644
--- a/third_party/snappy/mac/snappy-stubs-public.h
+++ b/third_party/snappy/mac/snappy-stubs-public.h
@@ -1,6 +1,32 @@
// Copyright 2011 Google Inc. All Rights Reserved.
// Author: sesse@google.com (Steinar H. Gunderson)
//
+// 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.
+//
// Various type stubs for the open-source version of Snappy.
//
// This file cannot include config.h, as it is included from snappy.h,
@@ -20,7 +46,7 @@
#define SNAPPY_MAJOR 1
#define SNAPPY_MINOR 0
-#define SNAPPY_PATCHLEVEL 0
+#define SNAPPY_PATCHLEVEL 5
#define SNAPPY_VERSION \
((SNAPPY_MAJOR << 16) | (SNAPPY_MINOR << 8) | SNAPPY_PATCHLEVEL)
diff --git a/third_party/snappy/snappy.gyp b/third_party/snappy/snappy.gyp
index 3cdbc26..f2e3547 100644
--- a/third_party/snappy/snappy.gyp
+++ b/third_party/snappy/snappy.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -42,9 +42,6 @@
{
'target_name': 'snappy_unittest',
'type': 'executable',
- 'dependencies': [
- 'leveldb_testutil',
- ],
'sources': [
'src/snappy-test.cc',
'src/snappy-test.h',
diff --git a/third_party/snappy/win32/snappy-stubs-public.h b/third_party/snappy/win32/snappy-stubs-public.h
new file mode 100644
index 0000000..5b169c1
--- /dev/null
+++ b/third_party/snappy/win32/snappy-stubs-public.h
@@ -0,0 +1,85 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+// Author: sesse@google.com (Steinar H. Gunderson)
+//
+// 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.
+//
+// Various type stubs for the open-source version of Snappy.
+//
+// This file cannot include config.h, as it is included from snappy.h,
+// which is a public header. Instead, snappy-stubs-public.h is generated by
+// from snappy-stubs-public.h.in at configure time.
+
+#ifndef UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_
+#define UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_
+
+#if 0
+#include <stdint.h>
+#endif
+
+#if 1
+#include <stddef.h>
+#endif
+
+#define SNAPPY_MAJOR 1
+#define SNAPPY_MINOR 0
+#define SNAPPY_PATCHLEVEL 5
+#define SNAPPY_VERSION \
+ ((SNAPPY_MAJOR << 16) | (SNAPPY_MINOR << 8) | SNAPPY_PATCHLEVEL)
+
+#include <string>
+
+namespace snappy {
+
+#if 0
+typedef int8_t int8;
+typedef uint8_t uint8;
+typedef int16_t int16;
+typedef uint16_t uint16;
+typedef int32_t int32;
+typedef uint32_t uint32;
+typedef int64_t int64;
+typedef uint64_t uint64;
+#else
+typedef signed char int8;
+typedef unsigned char uint8;
+typedef short int16;
+typedef unsigned short uint16;
+typedef int int32;
+typedef unsigned int uint32;
+typedef long long int64;
+typedef unsigned long long uint64;
+#endif
+
+typedef std::string string;
+
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
+
+} // namespace snappy
+
+#endif // UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_