Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Autotools build, bulk write, don't bundle snappy

  • Loading branch information...
commit eaf43b230bdfc875812460dc92955ed786d1cb88 1 parent b0a5804
Aaron Miller apage43 authored
Showing with 946 additions and 29,357 deletions.
  1. +54 −1 .gitignore
  2. +0 −30 CMakeLists.txt
  3. +202 −0 LICENSE
  4. +56 −0 Makefile.am
  5. +7 −3 README.md
  6. +102 −0 config/autorun.sh
  7. +52 −0 config/version.pl
  8. +110 −0 configure.ac
  9. +13 −6 {src → include/libcouchstore}/couch_common.h
  10. +10 −1 {src → include/libcouchstore}/couch_db.h
  11. +11 −0 libcouchstore.pc.in
  12. +181 −0 m4/couchbase.m4
  13. +0 −1  src/btree_read.c
  14. +15 −15 src/couch_btree.h
  15. +82 −14 src/couch_db.c
  16. +5 −6 src/couch_file_write.c
  17. +10 −4 src/dbdump.c
  18. +13 −0 src/fatbuf.h
  19. +1 −1  src/reduces.h
  20. +0 −1  src/snappy/AUTHORS
  21. +0 −28 src/snappy/COPYING
  22. +0 −801 src/snappy/ChangeLog
  23. +0 −23 src/snappy/Makefile.am
  24. +0 −927 src/snappy/Makefile.in
  25. +0 −58 src/snappy/NEWS
  26. +0 −135 src/snappy/README
  27. +0 −8,895 src/snappy/aclocal.m4
  28. +0 −7 src/snappy/autogen.sh
  29. +0 −1,533 src/snappy/config.guess
  30. +0 −126 src/snappy/config.h
  31. +0 −105 src/snappy/config.h.in
  32. +0 −1,693 src/snappy/config.sub
  33. +0 −126 src/snappy/configure.ac
  34. +0 −630 src/snappy/depcomp
  35. +0 −110 src/snappy/format_description.txt
  36. +0 −520 src/snappy/install-sh
  37. +0 −8,412 src/snappy/ltmain.sh
  38. +0 −376 src/snappy/missing
  39. +0 −90 src/snappy/snappy-c.cc
  40. +0 −138 src/snappy/snappy-c.h
  41. +0 −150 src/snappy/snappy-internal.h
  42. +0 −72 src/snappy/snappy-sinksource.cc
  43. +0 −136 src/snappy/snappy-sinksource.h
  44. +0 −42 src/snappy/snappy-stubs-internal.cc
  45. +0 −515 src/snappy/snappy-stubs-internal.h
  46. +0 −85 src/snappy/snappy-stubs-public.h
  47. +0 −85 src/snappy/snappy-stubs-public.h.in
  48. +0 −596 src/snappy/snappy-test.cc
  49. +0 −505 src/snappy/snappy-test.h
  50. +0 −1,029 src/snappy/snappy.cc
  51. +0 −155 src/snappy/snappy.h
  52. +0 −1,153 src/snappy/snappy_unittest.cc
  53. +0 −1  src/snappy/stamp-h2
  54. +4 −3 src/util.c
  55. +5 −11 src/util.h
  56. +13 −3 src/writetest.c
55 .gitignore
View
@@ -1 +1,54 @@
-build/
+# Keep the entries sorted to reduce the risk for a merge conflict
+*.[ao]
+*.dirstamp
+*.exe
+*.l[ao]
+*.obj
+*~
+.deps/
+.libs/
+.pc
+/INSTALL
+/Makefile
+/Makefile.in
+/a.out*
+/aclocal.m4
+/autom4te.cache
+/build
+/config.cache
+/config.h
+/config.h.in
+/config.log
+/config.status
+/config/compile
+/config/config.guess
+/config/config.sub
+/config/depcomp
+/config/install-sh
+/config/ltmain.sh
+/config/missing
+/config/mkinstalldirs
+/config/plugin.ac
+/configure
+/couch_dbdump
+/docs/doxy
+/libcouchstore*.changes
+/libcouchstore*.deb
+/libcouchstore*.dsc
+/libcouchstore*.rpm
+/libcouchstore*.tar.gz
+/libcouchstore.dll
+/libcouchstore.exp
+/libcouchstore.lib
+/libcouchstore.pc
+/libtool
+/m4/libtool.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
+/m4/lt~obsolete.m4
+/m4/version.m4
+/regression
+/stamp-h1
+/testapp
+/writetest
30 CMakeLists.txt
View
@@ -1,30 +0,0 @@
-cmake_minimum_required (VERSION 2.8)
-
-project (COUCHSTORE)
-
-include_directories(${EI_INCLUDE_DIR} ${COUCHSTORE_SOURCE_DIR}/src/snappy)
-link_directories(${EI_LIBPATH})
-
-add_library (couchstore
- src/couch_db.c
- src/reduces.c
- src/couch_file_read.c
- src/couch_file_write.c
- src/util.c
- src/btree_modify.c
- src/btree_read.c
- src/rfc1321/md5c.c
- src/snappy/snappy-sinksource.cc
- src/snappy/snappy-stubs-internal.cc
- src/snappy/snappy-c.cc
- src/snappy/snappy.cc)
-
-add_executable (dbdump
- src/dbdump.c)
-
-add_executable (writetest
- src/writetest.c)
-
-target_link_libraries (couchstore ei)
-target_link_libraries (dbdump couchstore)
-target_link_libraries (writetest couchstore)
202 LICENSE
View
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
56 Makefile.am
View
@@ -0,0 +1,56 @@
+# libcouchbase
+# Copyright (C) 2010, 2011 Couchbase, Inc
+# All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+ACLOCAL_AMFLAGS = -I m4 --force
+
+bin_PROGRAMS = couch_dbdump
+EXTRA_DIST = LICENSE README.md src/rfc1321
+
+pkginclude_HEADERS = \
+ include/libcouchstore/couch_db.h \
+ include/libcouchstore/couch_common.h
+
+lib_LTLIBRARIES = libcouchstore.la
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libcouchstore.pc
+
+libcouchstore_la_SOURCES = \
+ src/btree_modify.c \
+ src/btree_read.c \
+ src/couch_btree.h \
+ src/couch_common.h \
+ src/couch_db.c \
+ src/couch_db.h \
+ src/couch_file_read.c \
+ src/couch_file_write.c \
+ src/reduces.c \
+ src/reduces.h \
+ src/rfc1321/md5c.c \
+ src/rfc1321/md5.h \
+ src/rfc1321/global.h \
+ src/util.c \
+ src/util.h
+
+libcouchstore_la_LDFLAGS = -version-info $(LIBCOUCHSTORE_API_CURRENT):$(LIBCOUCHSTORE_API_REVISION):$(LIBCOUCHSTORE_API_AGE) -no-undefined $(ERL_INTERFACE_DIR_LIB) -lei -lsnappy
+libcouchstore_la_CFLAGS = $(ERL_INTERFACE_DIR_INCLUDE)
+
+couch_dbdump_SOURCES = src/dbdump.c
+couch_dbdump_DEPENDENCIES = libcouchstore.la
+couch_dbdump_LDADD = libcouchstore.la
+
+writetest_SOURCES = src/writetest.c
+writetest_DEPENDENCIES = libcouchstore.la
+writetest_LDADD = libcouchstore.la
10 README.md
View
@@ -1,5 +1,9 @@
# Couchbase (.couch) storage file C library
-### Not finished. Only read ops are currently implemented.
-Can be built with cmake, needs to know where EI lives
- cmake -DEI_INCLUDE_DIR=/path/to/erl_interface/include -DEI_LIBPATH=/path/to/erl_interface/lib
+Todo:
+ * Local docs support
+ * CRC32 checksum checking/writing
+
+Dependencies:
+ * libei, from the `erl_interface` OTP library. Will be detected if erlang is installed.
+ * snappy
102 config/autorun.sh
View
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+LIBTOOLIZE_FLAGS="--automake --copy --force"
+AUTOMAKE_FLAGS="--add-missing --copy --force --foreign --warning=portability"
+ACLOCAL_FLAGS="-I m4"
+AUTOHEADER_FLAGS="--warnings=error"
+AUTOCONF_CLAGS="--warnings=error --force"
+
+
+ARGV0=$0
+ARGS="$@"
+
+die() { echo "$@"; exit 1; }
+
+run() {
+ echo "$ARGV0: running \`$@' $ARGS"
+ $@ $ARGS
+}
+
+# Try to locate a program by using which, and verify that the file is an
+# executable
+locate_binary() {
+ for f in $@
+ do
+ file=`which $f 2>/dev/null | grep -v '^no '`
+ if test -n "$file" -a -x "$file"; then
+ echo $file
+ return 0
+ fi
+ done
+
+ echo ""
+ return 1
+}
+
+if test -f config/pre_hook.sh
+then
+ . config/pre_hook.sh
+fi
+
+if [ -d .git ]
+then
+ mkdir -p m4
+ perl config/version.pl || die "Failed to run config/version.pl"
+fi
+
+# Try to detect the supported binaries if the user didn't
+# override that by pushing the environment variable
+if test x$LIBTOOLIZE = x; then
+ LIBTOOLIZE=`locate_binary libtoolize glibtoolize`
+ if test x$LIBTOOLIZE = x; then
+ die "Did not find a supported libtoolize"
+ fi
+fi
+
+if test x$ACLOCAL = x; then
+ ACLOCAL=`locate_binary aclocal-1.11 aclocal-1.10 aclocal`
+ if test x$ACLOCAL = x; then
+ die "Did not find a supported aclocal"
+ fi
+fi
+
+if test x$AUTOMAKE = x; then
+ AUTOMAKE=`locate_binary automake-1.11 automake-1.10 automake`
+ if test x$AUTOMAKE = x; then
+ die "Did not find a supported automake"
+ fi
+fi
+
+if test x$AUTOCONF = x; then
+ AUTOCONF=`locate_binary autoconf`
+ if test x$AUTOCONF = x; then
+ die "Did not find a supported autoconf"
+ fi
+fi
+
+if test x$AUTOHEADER = x; then
+ AUTOHEADER=`locate_binary autoheader`
+ if test x$AUTOHEADER = x; then
+ die "Did not find a supported autoheader"
+ fi
+fi
+
+run $LIBTOOLIZE $LIBTOOLIZE_FLAGS || die "Can't execute libtoolize"
+run $ACLOCAL $ACLOCAL_FLAGS || die "Can't execute aclocal"
+run $AUTOHEADER $AUTOHEADER_FLAGS || die "Can't execute autoheader"
+run $AUTOMAKE $AUTOMAKE_FLAGS || die "Can't execute automake"
+run $AUTOCONF $AUTOCONF_FLAGS || die "Can't execute autoconf"
+
+if test -f config/post_hook.sh
+then
+ . config/post_hook.sh
+fi
+
+echo "---"
+echo "Configured with the following tools:"
+echo " * `$LIBTOOLIZE --version | head -1`"
+echo " * `$ACLOCAL --version | head -1`"
+echo " * `$AUTOHEADER --version | head -1`"
+echo " * `$AUTOMAKE --version | head -1`"
+echo " * `$AUTOCONF --version | head -1`"
+echo "---"
52 config/version.pl
View
@@ -0,0 +1,52 @@
+#!/usr/bin/perl
+# If you think this is stupid/overkill, blame dormando
+
+use warnings;
+use strict;
+
+my $version = `git describe`;
+chomp $version;
+# Test the various versions.
+#my $version = 'foob';
+#my $version = '1.4.2-30-gf966dba';
+#my $version = '1.4.3-rc1';
+#my $version = '1.4.3';
+unless ($version =~ m/^\d+\.\d+\.\d+/) {
+ write_file('m4/version.m4', "m4_define([VERSION_NUMBER], [UNKNOWN])\n");
+ exit;
+}
+
+$version =~ s/-/_/g;
+write_file('m4/version.m4', "m4_define([VERSION_NUMBER], [$version])\n");
+my ($VERSION, $FULLVERSION, $RELEASE);
+
+if ($version =~ m/^(\d+\.\d+\.\d+)_rc(\d+)$/) {
+ $VERSION = $1;
+ $FULLVERSION = $version;
+ $RELEASE = '0.1.rc' . $2;
+} elsif ($version =~ m/^(\d+\.\d+\.\d+)_(.+)$/) {
+ $VERSION = $1;
+ $FULLVERSION = $version;
+ $RELEASE = '1.' . $2;
+} elsif ($version =~ m/^(\d+\.\d+\.\d+)$/) {
+ $VERSION = $1;
+ $FULLVERSION = $version;
+ $RELEASE = '1';
+}
+
+sub write_file {
+ my $file = shift;
+ my $data = shift;
+ open(my $fh, "> $file") or die "Can't open $file: $!";
+ print $fh $data;
+ close($fh);
+}
+
+sub read_file {
+ my $file = shift;
+ local $/ = undef;
+ open(my $fh, "< $file") or die "Can't open $file: $!";
+ my $data = <$fh>;
+ close($fh);
+ return $data;
+}
110 configure.ac
View
@@ -0,0 +1,110 @@
+# libcouchstore
+# Copyright (C) 2010, 2011 Couchbase, Inc
+# All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+AC_PREREQ(2.59)
+m4_include([m4/version.m4])
+AC_INIT(libcouchstore, VERSION_NUMBER, support@couchbase.com)
+AC_CONFIG_SRCDIR([src/couch_db.c])
+AC_CONFIG_AUX_DIR(config)
+AC_USE_SYSTEM_EXTENSIONS
+AM_INIT_AUTOMAKE(subdir-objects)
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+AM_CONFIG_HEADER([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+# the malloc tests seems to be broken for cross compilation.. ignore them
+ac_cv_func_malloc_0_nonnull=yes
+ac_cv_func_realloc_0_nonnull=yes
+
+COUCHBASE_GENERIC_COMPILER(c99)
+
+AC_SEARCH_LIBS(floor, m)
+AC_SEARCH_LIBS(pow, m)
+AC_SEARCH_LIBS(fabs, m)
+
+AC_PATH_PROG([ERL], [erl])
+AS_IF([test x${ERL} = x], [
+ AC_MSG_ERROR([Could not find the erl executable. Is Erlang installed?])
+ ])
+
+ERL_INTERFACE_DIR_INCLUDE="-I`${ERL} -eval 'io:put_chars(code:lib_dir(erl_interface) ++ "/include"), erlang:halt().' -noshell -noinput`"
+AC_SUBST(ERL_INTERFACE_DIR_INCLUDE)
+ERL_INTERFACE_DIR_LIB="-L`${ERL} -eval 'io:put_chars(code:lib_dir(erl_interface) ++ "/lib"), erlang:halt().' -noshell -noinput`"
+AC_SUBST(ERL_INTERFACE_DIR_LIB)
+
+
+AC_ARG_WITH([docs],
+ [AS_HELP_STRING([--with-docs],
+ [Generate documentation (yes|no) @<:@default=yes@:>@])],
+ [with_docs=$withval],
+ [with_docs=yes])
+
+AC_PATH_PROG(POD2MAN, pod2man, missing)
+AS_IF([test "$with_docs" = "yes" -a "$POD2MAN" = "missing" ],
+ [ AC_MSG_ERROR([pod2man is required for building docs])])
+AM_CONDITIONAL(BUILD_DOCS, test "$with_docs" = "yes")
+
+AC_CHECK_HEADERS_ONCE([snappy-c.h])
+
+dnl Check that we're able to find a usable libsnappy
+AC_CACHE_CHECK([for libsnappy], [ac_cv_have_libsnappy],
+ [ saved_libs="$LIBS"
+ LIBS=-lsnappy
+ AC_TRY_LINK([
+ #include <snappy-c.h>
+ #include <stddef.h>
+ ],[
+ size_t sizetest = snappy_max_compressed_length(10);
+ ],[
+ ac_cv_have_libsnappy="yes"
+ ], [
+ ac_cv_have_libsnappy="no"
+ ])
+ LIBS="$saved_libs"
+ ])
+
+AS_IF([test "x$ac_cv_header_snappy_c_h" != "xyes"],
+ [AC_MSG_ERROR(Failed to locate snappy-c.h)])
+AS_IF([test "x${ac_cv_have_libsnappy}" != "xyes"],
+ [AC_MSG_ERROR(Failed to locate libsnappy)])
+#
+# To ensure that we don't break applications in mysterious ways we need
+# to version our library. For a detailed description, check out:
+# http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
+#
+LIBCOUCHSTORE_API_CURRENT=1
+LIBCOUCHSTORE_API_REVISION=0
+LIBCOUCHSTORE_API_AGE=0
+AC_SUBST(LIBCOUCHSTORE_API_CURRENT)
+AC_SUBST(LIBCOUCHSTORE_API_REVISION)
+AC_SUBST(LIBCOUCHSTORE_API_AGE)
+dnl ----------------------------------------------------------------------------
+
+AC_CONFIG_FILES(Makefile libcouchstore.pc)
+AC_OUTPUT
+AS_IF(test "$with_docs" = "no",
+ [
+ echo "*****"
+ echo "*"
+ echo "* WARNING: You are not generating any documentation."
+ echo "* Please don't ship libcouchstore to an end user"
+ echo "* without documentation..."
+ echo "*"
+ echo "*****"
+ ])
19 src/couch_common.h → include/libcouchstore/couch_common.h
View
@@ -3,9 +3,9 @@
#include <unistd.h>
#include <stdint.h>
-#define SIZE_BLOCK 4096
-#define LATEST_DISK_VERSION 7
-#define SNAPPY_THRESHOLD 64
+#define COUCH_BLOCK_SIZE 4096
+#define COUCH_DISK_VERSION 8
+#define COUCH_SNAPPY_THRESHOLD 64
typedef struct _sized_buf {
char* buf;
@@ -35,6 +35,12 @@ typedef struct _docinfo {
size_t size;
} DocInfo;
+typedef struct _local_doc {
+ sized_buf id;
+ sized_buf json;
+ int deleted;
+} LocalDoc;
+
typedef struct _db_header
{
unsigned long disk_version;
@@ -52,11 +58,11 @@ typedef struct _db {
db_header header;
} Db;
-//File ops
+/* File ops
//Read a chunk from file, remove block prefixes, and decompress.
//Don't forget to free when done with the returned value.
-//(If it returns -1 it will not have set ret_ptr, no need to free.)
+//(If it returns -1 it will not have set ret_ptr, no need to free.) */
int pread_bin(int fd, off_t pos, char **ret_ptr);
int pread_header(int fd, off_t pos, char **ret_ptr);
@@ -66,7 +72,7 @@ ssize_t total_read_len(off_t blockoffset, ssize_t finallen);
int db_write_header(Db* db, sized_buf* buf);
int db_write_buf(Db* db, sized_buf* buf, off_t *pos);
-//Errors
+/* Errors */
const char* describe_error(int errcode);
#define ERROR_OPEN_FILE -1
@@ -76,5 +82,6 @@ const char* describe_error(int errcode);
#define DOC_NOT_FOUND -5
#define ERROR_NO_HEADER -6
#define ERROR_WRITE -7
+#define ERROR_HEADER_VERSION -8
#endif
11 src/couch_db.h → include/libcouchstore/couch_db.h
View
@@ -1,3 +1,6 @@
+#ifndef COUCHSTORE_COUCH_DB_H
+#define COUCHSTORE_COUCH_DB_H
+
#include "couch_common.h"
//Open a database, should be closed with close_db
@@ -27,7 +30,7 @@ int docinfo_by_id(Db* db, uint8_t* id, size_t idlen, DocInfo** pInfo);
/* Retrieve a doc from the db.
* doc.id.buf will be the same buffer as id
* Should be freed with free_doc. */
-int open_doc(Db* db, uint8_t* id, size_t idlen, Doc** pDoc, uint64_t options);
+int open_doc(Db* db, uint8_t* id, size_t idlen, Doc** pDoc, uint64_t options);
/* Retrieve a doc from the using a docinfo.
* Do not free the docinfo before freeing the doc.
@@ -49,3 +52,9 @@ int changes_since(Db* db, uint64_t since, uint64_t options,
int(*f)(Db* db, DocInfo* docinfo, void *ctx), void *ctx);
#define NO_FREE_DOCINFO 1
+/* Local docs stuff, unimplemented */
+int open_local_doc(Db *db, uint8_t* id, size_t idlen, LocalDoc** lDoc);
+int save_local_doc(Db* db, LocalDoc* lDoc);
+void free_local_doc(LocalDoc* lDoc);
+
+#endif
11 libcouchstore.pc.in
View
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libcouchstore
+Description: Library for handling Couchbase .couch files
+Version: @VERSION@
+Requires.private: libsnappy
+Libs: -L${libdir} -lcouchstore
+Cflags: -I${includedir}/libcouchstore
181 m4/couchbase.m4
View
@@ -0,0 +1,181 @@
+dnl Copyright (C) 2011 Couchbase, Inc
+dnl This file is free software; Couchbase, Inc
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([COUCHBASE_GENERIC_COMPILER], [
+ AC_ARG_ENABLE([warnings],
+ [AS_HELP_STRING([--enable-warnings],
+ [Enable more compiler warnings. @<:@default=off@:>@])],
+ [ac_cv_enable_warnings="yes"],
+ [ac_cv_enable_warnings="no"])
+
+ AC_ARG_ENABLE([werror],
+ [AS_HELP_STRING([--enable-werror],
+ [Treat warnings as errors. @<:@default=off@:>@])],
+ [ac_cv_enable_werror="yes"],
+ [ac_cv_enable_werror="no"])
+
+ AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [Enable debug build (non-optimized). @<:@default=off@:>@])],
+ [ac_cv_enable_debug="yes"],
+ [ac_cv_enable_debug="no"])
+
+ C_LANGUAGE_SPEC=c99
+ m4_foreach([arg], [$*],
+ [
+ m4_case(arg, [c89], [C_LANGUAGE_SPEC=c89],
+ [c99], [C_LANGUAGE_SPEC=c99],
+ [cxx], [NEED_CPP=yes])
+ ])
+
+ GCC_NO_WERROR="-Wno-error"
+ GCC_WERROR="-Werror"
+ GCC_C_OPTIMIZE="-O3"
+ GCC_CXX_OPTIMIZE="-O3"
+ GCC_C_DEBUG="-g"
+ GCC_CXX_DEBUG="-g"
+ GCC_VISIBILITY=-fvisibility=hidden
+ GCC_CPPFLAGS="-pipe -D_THREAD_SAFE -D_GNU_SOURCE"
+ GCC_CFLAGS="-std=gnu99"
+ GCC_CXXFLAGS=""
+ GCC_C89=-std=c89
+ GCC_C99=-std=gnu99
+ GCC_LDFLAGS=""
+ GCC_CPP_WARNINGS="-Wall -pedantic -Wundef -Wshadow -fdiagnostics-show-option -Wformat -fno-strict-aliasing -Wno-strict-aliasing -Wextra"
+ GCC_C_COMPILER_WARNINGS="-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align"
+ GCC_CXX_COMPILER_WARNINGS="-std=gnu++98 -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long -Wno-redundant-decls"
+
+ SPRO_NO_WERROR="-errwarn=%none"
+ SPRO_WERROR="-errwarn=%all"
+ SPRO_C_OPTIMIZE="-O -xbuiltin=%default"
+ SPRO_CXX_OPTIMIZE="-O -xbuiltin=%default"
+ SPRO_C_DEBUG="-g3 -traceback=common -xcheck=%all"
+ SPRO_CXX_DEBUG="-g3 -traceback=common -xcheck=%all"
+ SPRO_VISIBILITY="-xldscope=hidden"
+ SPRO_CPPFLAGS="-mt=yes -D_THREAD_SAFE"
+ SPRO_CXXFLAGS="-xlang=c99 -compat=5 -library=stlport4 -template=no%extdef"
+ SPRO_C89="-Xt -xc99=none"
+ SPRO_C99="-D_XOPEN_SOURCE=600 -xc99=all"
+ SPRO_CFLAGS=""
+ SPRO_CPP_WARNINGS="-errhdr=%user -errfmt=error -errshort=full -errtags -v "
+ SPRO_C_COMPILER_WARNINGS=""
+ SPRO_CXX_COMPILER_WARNINGS="+w +w2"
+ SPRO_LDFLAGS="-mt=yes"
+
+ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+ AC_CHECK_DECL([__GNUC__], [GCC="yes"], [GCC="no"])
+
+ AS_IF([test "x$GCC" = "xyes"],
+ [
+ AM_CPPFLAGS="$AM_CPPFLAGS $GCC_CPPFLAGS"
+ AM_CFLAGS="$AM_CPPFLAGS $GCC_CFLAGS"
+ AM_CXXFLAGS="$AM_CPPFLAGS $GCC_CXXFLAGS"
+ AS_IF(test "$C_LANGUAGE_SPEC" = c89,
+ [AM_CFLAGS="$AM_CPPFLAGS $GCC_C89"],
+ AS_IF(test "$C_LANGUAGE_SPEC" = c99,
+ [AM_CFLAGS="$AM_CPPFLAGS $GCC_C99"])
+ )
+ AM_LDFLAGS="$AM_LDFLAGS $GCC_LDFLAGS"
+ NO_WERROR="$GCC_NO_WERROR"
+ WERROR="$GCC_WERROR"
+ C_OPTIMIZE="$GCC_C_OPTIMIZE"
+ CXX_OPTIMIZE="$GCC_CXX_OPTIMIZE"
+ C_DEBUG="$GCC_C_DEBUG"
+ CXX_DEBUG="$GCC_CXX_DEBUG"
+ VISIBILITY="$GCC_VISIBILITY"
+ CPP_WARNINGS="$GCC_CPP_WARNINGS"
+ C_COMPILER_WARNINGS="$GCC_C_COMPILER_WARNINGS"
+ CXX_COMPILER_WARNINGS="$GCC_CXX_COMPILER_WARNINGS"
+ ])
+
+ AS_IF([test "x$SUNCC" = "xyes"],
+ [
+ AM_CPPFLAGS="$AM_CPPFLAGS $SPRO_CPPFLAGS"
+ AM_CFLAGS="$AM_CPPFLAGS $SPRO_CFLAGS"
+ AM_CXXFLAGS="$AM_CPPFLAGS $SPRO_CXXFLAGS"
+ AS_IF(test "$C_LANGUAGE_SPEC" = c89,
+ [AM_CFLAGS="$AM_CPPFLAGS $SPRO_C89"],
+ AS_IF(test "$C_LANGUAGE_SPEC" = c99,
+ [AM_CFLAGS="$AM_CPPFLAGS $SPRO_C99"])
+ )
+ AM_LDFLAGS="$AM_LDFLAGS $SPRO_LDFLAGS"
+ NO_WERROR="$SPRO_NO_WERROR"
+ WERROR="$SPRO_WERROR"
+ C_OPTIMIZE="$SPRO_C_OPTIMIZE"
+ CXX_OPTIMIZE="$SPRO_CXX_OPTIMIZE"
+ C_DEBUG="$SPRO_C_DEBUG"
+ CXX_DEBUG="$SPRO_CXX_DEBUG"
+ VISIBILITY="$SPRO_VISIBILITY"
+ CPP_WARNINGS="$SPRO_CPP_WARNINGS"
+ C_COMPILER_WARNINGS="$SPRO_C_COMPILER_WARNINGS"
+ CXX_COMPILER_WARNINGS="$SPRO_CXX_COMPILER_WARNINGS"
+ ])
+
+ AM_CPPFLAGS="$AM_CPPFLAGS -I\${top_srcdir}/include"
+ AM_LDFLAGS="$AM_LDFLAGS $VISIBILITY"
+
+
+ AS_IF([test "$ac_cv_enable_warnings" = "yes"],
+ [AM_CPPFLAGS="$AM_CPPFLAGS $CPP_WARNINGS"
+ AM_CFLAGS="$AM_CFLAGS $C_COMPILER_WARNINGS"
+ AM_CXXFLAGS="$AM_CXXFLAGS $CXX_COMPILER_WARNINGS"])
+
+ AS_IF([test "$ac_cv_enable_werror" = "yes"],
+ [
+ AM_CPPFLAGS="$AM_CPPFLAGS $WERROR"
+ ])
+
+ AS_IF([test "$ac_cv_enable_debug" = "yes"],
+ [
+ AM_CFLAGS="$AM_CFLAGS $C_DEBUG"
+ AM_CXXFLAGS="$AM_CXXFLAGS $CXX_DEBUG"
+ ],
+ [
+ AM_CFLAGS="$AM_CFLAGS $C_OPTIMIZE"
+ AM_CXXFLAGS="$AM_CXXFLAGS $CXX_OPTIMIZE"
+ ])
+
+ dnl Export GCC variables
+ AC_SUBST(GCC_NO_WERROR)
+ AC_SUBST(GCC_WERROR)
+ AC_SUBST(GCC_C_OPTIMIZE)
+ AC_SUBST(GCC_CXX_OPTIMIZE)
+ AC_SUBST(GCC_C_DEBUG)
+ AC_SUBST(GCC_CXX_DEBUG)
+ AC_SUBST(GCC_VISIBILITY)
+ AC_SUBST(GCC_CPPFLAGS)
+ AC_SUBST(GCC_CPP_WARNINGS)
+ AC_SUBST(GCC_C_COMPILER_WARNINGS)
+ AC_SUBST(GCC_CXX_COMPILER_WARNINGS)
+
+ dnl Export Sun Studio variables
+ AC_SUBST(SPRO_NO_WERROR)
+ AC_SUBST(SPRO_WERROR)
+ AC_SUBST(SPRO_C_OPTIMIZE)
+ AC_SUBST(SPRO_CXX_OPTIMIZE)
+ AC_SUBST(SPRO_C_DEBUG)
+ AC_SUBST(SPRO_CXX_DEBUG)
+ AC_SUBST(SPRO_VISIBILITY)
+ AC_SUBST(SPRO_CPPFLAGS)
+ AC_SUBST(SPRO_CPP_WARNINGS)
+ AC_SUBST(SPRO_C_COMPILER_WARNINGS)
+ AC_SUBST(SPRO_CXX_COMPILER_WARNINGS)
+
+ dnl Export the ones we're using
+ AC_SUBST(NO_WERROR)
+ AC_SUBST(WERROR)
+ AC_SUBST(C_OPTIMIZE)
+ AC_SUBST(CXX_OPTIMIZE)
+ AC_SUBST(C_DEBUG)
+ AC_SUBST(CXX_DEBUG)
+ AC_SUBST(VISIBILITY)
+ AC_SUBST(CPP_WARNINGS)
+ AC_SUBST(C_COMPILER_WARNINGS)
+ AC_SUBST(CXX_COMPILER_WARNINGS)
+ AC_SUBST(AM_LDFLAGS)
+ AC_SUBST(AM_CPPFLAGS)
+ AC_SUBST(AM_CFLAGS)
+ AC_SUBST(AM_CXXFLAGS)
+])
1  src/btree_read.c
View
@@ -1,5 +1,4 @@
#include <stdlib.h>
-#include "couch_common.h"
#include "couch_btree.h"
#include "util.h"
30 src/couch_btree.h
View
@@ -1,31 +1,31 @@
-#include "couch_common.h"
#ifndef COUCH_BTREE_H
#define COUCH_BTREE_H
+#include <libcouchstore/couch_common.h>
typedef struct compare_info {
- //used by find_first_gteq
+ /* used by find_first_gteq */
int last_cmp_val;
void* last_cmp_key;
int list_pos;
- //Compare function
+ /* Compare function */
int (*compare)(void *k1, void *k2);
- //Given an erlang term, return a pointer accepted by the compare function
+ /* Given an erlang term, return a pointer accepted by the compare function */
void *(*from_ext)(struct compare_info* ci, char* buf, int pos);
- //Use to set up any context needed by from_ext
+ /* Use to set up any context needed by from_ext */
void *arg;
} compare_info;
-//Lookup
+/* Lookup */
typedef struct couchfile_lookup_request {
compare_info cmp;
int fd;
int num_keys;
- //If nonzero, calls fetch_callback for all keys between and including key 0 and key 1
- //in the keys array, or all keys after key 0 if it contains only one key.
- //GIVE KEYS SORTED.
+ /* If nonzero, calls fetch_callback for all keys between and including key 0 and key 1
+ in the keys array, or all keys after key 0 if it contains only one key.
+ GIVE KEYS SORTED. */
int fold;
- // v-- Flag used during lookup, do not set.
+ /* v-- Flag used during lookup, do not set. */
int in_fold;
void **keys;
void *callback_ctx;
@@ -35,7 +35,7 @@ typedef struct couchfile_lookup_request {
int btree_lookup(couchfile_lookup_request* rq, uint64_t root_pointer);
-//Modify
+/* Modify */
typedef struct nodelist {
union _nl_value {
@@ -68,7 +68,7 @@ typedef struct couchfile_modify_request {
int num_actions;
couchfile_modify_action* actions;
void (*fetch_callback) (struct couchfile_modify_request *rq, sized_buf* k, sized_buf* v, void *arg);
- //Put result term into the sized_buf.
+ /* Put result term into the sized_buf. */
void (*reduce) (sized_buf* dst, nodelist* leaflist, int count);
void (*rereduce) (sized_buf* dst, nodelist* ptrlist, int count);
node_pointer root;
@@ -77,7 +77,7 @@ typedef struct couchfile_modify_request {
#define KV_NODE 0
#define KP_NODE 1
-//Used to build and chunk modified nodes
+/* Used to build and chunk modified nodes */
typedef struct couchfile_modify_result {
couchfile_modify_request *rq;
nodelist* values;
@@ -88,9 +88,9 @@ typedef struct couchfile_modify_result {
nodelist* pointers;
nodelist* pointers_end;
- //If we run over a node and never set this, it can be left as-is on disk.
+ /* If we run over a node and never set this, it can be left as-is on disk. */
int modified;
- //0 - leaf, 1 - ptr
+ /* 0 - leaf, 1 - ptr */
int node_type;
int error_state;
} couchfile_modify_result;
96 src/couch_db.c
View
@@ -1,8 +1,8 @@
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
+#include <libcouchstore/couch_db.h>
-#include "couch_db.h"
#include "couch_btree.h"
#include "ei.h"
#include "snappy-c.h"
@@ -16,7 +16,7 @@ sized_buf nil_atom = {
int find_header(Db *db)
{
- int block = db->file_pos / SIZE_BLOCK;
+ int block = db->file_pos / COUCH_BLOCK_SIZE;
int errcode = 0;
int readsize;
char* header_buf = NULL;
@@ -24,11 +24,11 @@ int find_header(Db *db)
while(block >= 0)
{
- readsize = pread(db->fd, buf, 2, block * SIZE_BLOCK);
+ readsize = pread(db->fd, buf, 2, block * COUCH_BLOCK_SIZE);
if(readsize == 2 && buf[0] == 1)
{
//Found a header block.
- int header_len = pread_header(db->fd, block * SIZE_BLOCK, &header_buf);
+ int header_len = pread_header(db->fd, block * COUCH_BLOCK_SIZE, &header_buf);
int arity = 0;
int purged_docs_index = 0;
if(header_len > 0)
@@ -46,8 +46,8 @@ int find_header(Db *db)
}
ei_skip_term(header_buf, &index); //db_header
ei_decode_ulong(header_buf, &index, &db->header.disk_version);
+ error_unless(db->header.disk_version == COUCH_DISK_VERSION, ERROR_HEADER_VERSION)
ei_decode_ulonglong(header_buf, &index, &db->header.update_seq);
- ei_skip_term(header_buf, &index); //unused
db->header.by_id_root = read_root(header_buf, &index);
db->header.by_seq_root = read_root(header_buf, &index);
db->header.local_docs_root = read_root(header_buf, &index);
@@ -61,13 +61,12 @@ int find_header(Db *db)
db->header.purged_docs->size = index - purged_docs_index;
ei_skip_term(header_buf, &index); //security ptr
- ei_skip_term(header_buf, &index); //revs_limit
break;
}
}
block--;
}
-
+cleanup:
if(header_buf != NULL)
free(header_buf);
@@ -87,18 +86,16 @@ int write_header(Db* db)
int errcode = 0;
ei_x_new_with_version(&x_header);
- ei_x_encode_tuple_header(&x_header, 10);
+ ei_x_encode_tuple_header(&x_header, 8);
ei_x_encode_atom(&x_header, "db_header");
ei_x_encode_ulonglong(&x_header, db->header.disk_version);
ei_x_encode_ulonglong(&x_header, db->header.update_seq);
- ei_x_encode_ulonglong(&x_header, 0); //unused field
ei_x_encode_nodepointer(&x_header, db->header.by_id_root);
ei_x_encode_nodepointer(&x_header, db->header.by_seq_root);
ei_x_encode_nodepointer(&x_header, db->header.local_docs_root);
ei_x_encode_ulonglong(&x_header, db->header.purge_seq);
ei_x_append_buf(&x_header, db->header.purged_docs->buf, db->header.purged_docs->size);
ei_x_encode_atom(&x_header, "nil"); //security_ptr;
- ei_x_encode_ulonglong(&x_header, 1); //revs_limit
writebuf.buf = x_header.buff;
writebuf.size = x_header.index;
errcode = db_write_header(db, &writebuf);
@@ -129,7 +126,7 @@ int open_db(char* filename, uint64_t options, Db** pDb)
if(db->file_pos == 0)
{
//Our file is empty, create and write a new empty db header.
- db->header.disk_version = LATEST_DISK_VERSION;
+ db->header.disk_version = COUCH_DISK_VERSION;
db->header.update_seq = 0;
db->header.by_id_root = NULL;
db->header.by_seq_root = NULL;
@@ -420,7 +417,7 @@ int open_doc_with_docinfo(Db* db, DocInfo* docinfo, Doc** pDoc, uint64_t options
{
int errcode = 0;
*pDoc = NULL;
- if(docinfo->deleted == 1)
+ if(docinfo->bp == 0)
return DOC_NOT_FOUND;
try(bp_to_doc(pDoc, db->fd, docinfo->bp));
(*pDoc)->id.buf = docinfo->id.buf;
@@ -545,7 +542,7 @@ int write_doc(Db* db, Doc* doc, uint64_t* bp)
docbody.buf = malloc(max_size);
error_unless(docbody.buf, ERROR_ALLOC_FAIL);
- if(doc->json.size > SNAPPY_THRESHOLD)
+ if(doc->json.size > COUCH_SNAPPY_THRESHOLD)
{
int jbinpos = 0;
char* jbinbuf = malloc(doc->json.size + 6);
@@ -781,7 +778,7 @@ int add_doc_to_update_list(Db* db, Doc* doc, DocInfo* info, fatbuf* fb,
error_unless(seqterm->buf, ERROR_ALLOC_FAIL);
ei_encode_ulonglong(seqterm->buf, (int*) &seqterm->size, seq);
- if(doc && !info->deleted)
+ if(doc)
{
try(write_doc(db, doc, &new.bp));
}
@@ -863,3 +860,74 @@ int save_doc(Db* db, Doc* doc, DocInfo* info, uint64_t options)
return save_docs(db, doc, info, 1, options);
}
+int local_doc_fetch(couchfile_lookup_request *rq, void *k, sized_buf *v)
+{
+ int errcode = 0;
+ sized_buf *id = k;
+ LocalDoc** lDoc = rq->callback_ctx;
+ if(!v)
+ {
+ *lDoc = NULL;
+ return 0;
+ }
+ fatbuf* ldbuf = fatbuf_alloc(sizeof(LocalDoc) + id->size + v->size);
+ error_unless(ldbuf, ERROR_ALLOC_FAIL);
+ *lDoc = fatbuf_get(ldbuf, sizeof(LocalDoc));
+ (*lDoc)->id.buf = fatbuf_get(ldbuf, id->size);
+ (*lDoc)->json.buf = fatbuf_get(ldbuf, v->size);
+
+ memcpy((*lDoc)->id.buf, id->buf, id->size);
+ memcpy((*lDoc)->json.buf, v->buf, v->size);
+cleanup:
+ if(errcode < 0)
+ {
+ if(ldbuf)
+ fatbuf_free(ldbuf);
+ }
+ return errcode;
+}
+
+int open_local_doc(Db *db, uint8_t* id, size_t idlen, LocalDoc** pDoc)
+{
+ sized_buf key;
+ void *keylist = &key;
+ couchfile_lookup_request rq;
+ sized_buf cmptmp;
+ int errcode = 0;
+
+ if(db->header.local_docs_root == NULL)
+ return DOC_NOT_FOUND;
+
+ key.buf = (char*) id;
+ key.size = idlen;
+
+ rq.cmp.compare = ebin_cmp;
+ rq.cmp.from_ext = ebin_from_ext;
+ rq.cmp.arg = &cmptmp;
+ rq.fd = db->fd;
+ rq.num_keys = 1;
+ rq.keys = &keylist;
+ rq.callback_ctx = pDoc;
+ rq.fetch_callback = local_doc_fetch;
+ rq.fold = 0;
+
+ errcode = btree_lookup(&rq, db->header.local_docs_root->pointer);
+ if(errcode == 0)
+ {
+ if(*pDoc == NULL)
+ errcode = DOC_NOT_FOUND;
+ }
+ return errcode;
+}
+
+int save_local_doc(Db* db, LocalDoc* lDoc)
+{
+ return -99;
+}
+
+void free_local_doc(LocalDoc* lDoc)
+{
+ fatbuf* ldbuf = (fatbuf*) ((char*) lDoc) - sizeof(fatbuf);
+ fatbuf_free(ldbuf);
+}
+
11 src/couch_file_write.c
View
@@ -2,8 +2,7 @@
#include <stdint.h>
#include <sys/types.h>
#include <netinet/in.h>
-
-#include "couch_db.h"
+#include <libcouchstore/couch_db.h>
#include "rfc1321/global.h"
#include "rfc1321/md5.h"
@@ -17,11 +16,11 @@ ssize_t raw_write(int fd, sized_buf* buf, off_t pos)
size_t block_remain;
while(buf_pos < buf->size)
{
- block_remain = SIZE_BLOCK - (write_pos % SIZE_BLOCK);
+ block_remain = COUCH_BLOCK_SIZE - (write_pos % COUCH_BLOCK_SIZE);
if(block_remain > (buf->size - buf_pos))
block_remain = buf->size - buf_pos;
- if(write_pos % SIZE_BLOCK == 0)
+ if(write_pos % COUCH_BLOCK_SIZE == 0)
{
written = pwrite(fd, &blockprefix, 1, write_pos);
if(written < 0) return ERROR_WRITE;
@@ -49,8 +48,8 @@ int db_write_header(Db* db, sized_buf* buf)
char hash[16];
sized_buf hashbuf = { hash, 16 };
- if(write_pos % SIZE_BLOCK != 0)
- write_pos += SIZE_BLOCK - (write_pos % SIZE_BLOCK); //Move to next block boundary.
+ if(write_pos % COUCH_BLOCK_SIZE != 0)
+ write_pos += COUCH_BLOCK_SIZE - (write_pos % COUCH_BLOCK_SIZE); //Move to next block boundary.
written = pwrite(db->fd, &blockheader, 1, write_pos);
if(written < 0) return ERROR_WRITE;
14 src/dbdump.c
View
@@ -1,9 +1,16 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <libcouchstore/couch_db.h>
-#include "couch_db.h"
-#include "util.h"
+#ifndef DEBUG
+#define try(C) if((errcode = (C)) < 0) { goto cleanup; }
+#else
+#define try(C) if((errcode = (C)) < 0) { \
+ fprintf(stderr, "Couchstore error `%s' at %s:%d\r\n", \
+ describe_error(errcode), __FILE__, __LINE__); goto cleanup; }
+#endif
+#define error_unless(C, E) if(!(C)) { try(E); }
void printsb(sized_buf *sb)
{
@@ -23,7 +30,7 @@ int foldprint(Db* db, DocInfo* docinfo, void *ctx)
printf("Doc seq: %llu\n", docinfo->seq);
printf(" id: "); printsb(&docinfo->id);
if(docinfo->deleted)
- printf(" doc deleted, ");
+ printf(" doc deleted\n");
if(doc)
{
printf(" bin: "); printsb(&doc->binary);
@@ -51,7 +58,6 @@ int main(int argc, char **argv)
again:
try(open_db(argv[argpos], 0, &db));
try(changes_since(db, 0, 0, foldprint, &count));
-
cleanup:
if(db)
close_db(db);
13 src/fatbuf.h
View
@@ -0,0 +1,13 @@
+#ifndef COUCHSTORE_FATBUF_H
+#define COUCHSTORE_FATBUF_H
+
+typedef struct _fat_buffer {
+ size_t pos;
+ size_t size;
+ char buf[1];
+} fatbuf;
+
+fatbuf* fatbuf_alloc(size_t bytes);
+void* fatbuf_get(fatbuf* fb, size_t bytes);
+void fatbuf_free(fatbuf* fb);
+#endif
2  src/reduces.h
View
@@ -1,4 +1,4 @@
-#include "couch_common.h"
+#include <libcouchstore/couch_common.h>
#include "couch_btree.h"
void by_seq_reduce (sized_buf* dst, nodelist* leaflist, int count);
1  src/snappy/AUTHORS
View
@@ -1 +0,0 @@
-opensource@google.com
28 src/snappy/COPYING
View
@@ -1,28 +0,0 @@
-Copyright 2011, 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.
801 src/snappy/ChangeLog
View
@@ -1,801 +0,0 @@
-------------------------------------------------------------------------
-r49 | snappy.mirrorbot@gmail.com | 2011-09-15 11:50:05 +0200 (Thu, 15 Sep 2011) | 5 lines
-
-Fix public issue #50: Include generic byteswap macros.
-Also include Solaris 10 and FreeBSD versions.
-
-R=csilvers
-
-------------------------------------------------------------------------
-r48 | snappy.mirrorbot@gmail.com | 2011-08-10 20:57:27 +0200 (Wed, 10 Aug 2011) | 5 lines
-
-Partially fix public issue 50: Remove an extra comma from the end of some
-enum declarations, as it seems the Sun compiler does not like it.
-
-Based on patch by Travis Vitek.
-
-------------------------------------------------------------------------
-r47 | snappy.mirrorbot@gmail.com | 2011-08-10 20:44:16 +0200 (Wed, 10 Aug 2011) | 4 lines
-
-Use the right #ifdef test for sys/mman.h.
-
-Based on patch by Travis Vitek.
-
-------------------------------------------------------------------------
-r46 | snappy.mirrorbot@gmail.com | 2011-08-10 03:22:09 +0200 (Wed, 10 Aug 2011) | 6 lines
-
-Fix public issue #47: Small comment cleanups in the unit test.
-
-Originally based on a patch by Patrick Pelletier.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r45 | snappy.mirrorbot@gmail.com | 2011-08-10 03:14:43 +0200 (Wed, 10 Aug 2011) | 8 lines
-
-Fix public issue #46: Format description said "3-byte offset"
-instead of "4-byte offset" for the longest copies.
-
-Also fix an inconsistency in the heading for section 2.2.3.
-Both patches by Patrick Pelletier.
-
-R=csilvers
-
-------------------------------------------------------------------------
-r44 | snappy.mirrorbot@gmail.com | 2011-06-28 13:40:25 +0200 (Tue, 28 Jun 2011) | 8 lines
-
-Fix public issue #44: Make the definition and declaration of CompressFragment
-identical, even regarding cv-qualifiers.
-
-This is required to work around a bug in the Solaris Studio C++ compiler
-(it does not properly disregard cv-qualifiers when doing name mangling).
-
-R=sanjay
-
-------------------------------------------------------------------------
-r43 | snappy.mirrorbot@gmail.com | 2011-06-04 12:19:05 +0200 (Sat, 04 Jun 2011) | 7 lines
-
-Correct an inaccuracy in the Snappy format description.
-(I stumbled into this when changing the way we decompress literals.)
-
-R=csilvers
-
-Revision created by MOE tool push_codebase.
-
-------------------------------------------------------------------------
-r42 | snappy.mirrorbot@gmail.com | 2011-06-03 22:53:06 +0200 (Fri, 03 Jun 2011) | 50 lines
-
-Speed up decompression by removing a fast-path attempt.
-
-Whenever we try to enter a copy fast-path, there is a certain cost in checking
-that all the preconditions are in place, but it's normally offset by the fact
-that we can usually take the cheaper path. However, in a certain path we've
-already established that "avail < literal_length", which usually means that
-either the available space is small, or the literal is big. Both will disqualify
-us from taking the fast path, and thus we take the hit from the precondition
-checking without gaining much from having a fast path. Thus, simply don't try
-the fast path in this situation -- we're already on a slow path anyway
-(one where we need to refill more data from the reader).
-
-I'm a bit surprised at how much this gained; it could be that this path is
-more common than I thought, or that the simpler structure somehow makes the
-compiler happier. I haven't looked at the assembler, but it's a win across
-the board on both Core 2, Core i7 and Opteron, at least for the cases we
-typically care about. The gains seem to be the largest on Core i7, though.
-Results from my Core i7 workstation:
-
-
- Benchmark Time(ns) CPU(ns) Iterations
- ---------------------------------------------------
- BM_UFlat/0 73337 73091 190996 1.3GB/s html [ +1.7%]
- BM_UFlat/1 696379 693501 20173 965.5MB/s urls [ +2.7%]
- BM_UFlat/2 9765 9734 1472135 12.1GB/s jpg [ +0.7%]
- BM_UFlat/3 29720 29621 472973 3.0GB/s pdf [ +1.8%]
- BM_UFlat/4 294636 293834 47782 1.3GB/s html4 [ +2.3%]
- BM_UFlat/5 28399 28320 494700 828.5MB/s cp [ +3.5%]
- BM_UFlat/6 12795 12760 1000000 833.3MB/s c [ +1.2%]
- BM_UFlat/7 3984 3973 3526448 893.2MB/s lsp [ +5.7%]
- BM_UFlat/8 991996 989322 14141 992.6MB/s xls [ +3.3%]
- BM_UFlat/9 228620 227835 61404 636.6MB/s txt1 [ +4.0%]
- BM_UFlat/10 197114 196494 72165 607.5MB/s txt2 [ +3.5%]
- BM_UFlat/11 605240 603437 23217 674.4MB/s txt3 [ +3.7%]
- BM_UFlat/12 804157 802016 17456 573.0MB/s txt4 [ +3.9%]
- BM_UFlat/13 347860 346998 40346 1.4GB/s bin [ +1.2%]
- BM_UFlat/14 44684 44559 315315 818.4MB/s sum [ +2.3%]
- BM_UFlat/15 5120 5106 2739726 789.4MB/s man [ +3.3%]
- BM_UFlat/16 76591 76355 183486 1.4GB/s pb [ +2.8%]
- BM_UFlat/17 238564 237828 58824 739.1MB/s gaviota [ +1.6%]
- BM_UValidate/0 42194 42060 333333 2.3GB/s html [ -0.1%]
- BM_UValidate/1 433182 432005 32407 1.5GB/s urls [ -0.1%]
- BM_UValidate/2 197 196 71428571 603.3GB/s jpg [ +0.5%]
- BM_UValidate/3 14494 14462 972222 6.1GB/s pdf [ +0.5%]
- BM_UValidate/4 168444 167836 83832 2.3GB/s html4 [ +0.1%]
-
-R=jeff
-
-Revision created by MOE tool push_codebase.
-
-------------------------------------------------------------------------
-r41 | snappy.mirrorbot@gmail.com | 2011-06-03 22:47:14 +0200 (Fri, 03 Jun 2011) | 43 lines
-
-Speed up decompression by not needing a lookup table for literal items.
-
-Looking up into and decoding the values from char_table has long shown up as a
-hotspot in the decompressor. While it turns out that it's hard to make a more
-efficient decoder for the copy ops, the literals are simple enough that we can
-decode them without needing a table lookup. (This means that 1/4 of the table
-is now unused, although that in itself doesn't buy us anything.)
-
-The gains are small, but definitely present; some tests win as much as 10%,
-but 1-4% is more typical. These results are from Core i7, in 64-bit mode;
-Core 2 and Opteron show similar results. (I've run with more iterations
-than unusual to make sure the smaller gains don't drown entirely in noise.)
-
- Benchmark Time(ns) CPU(ns) Iterations
- ---------------------------------------------------
- BM_UFlat/0 74665 74428 182055 1.3GB/s html [ +3.1%]
- BM_UFlat/1 714106 711997 19663 940.4MB/s urls [ +4.4%]
- BM_UFlat/2 9820 9789 1427115 12.1GB/s jpg [ -1.2%]
- BM_UFlat/3 30461 30380 465116 2.9GB/s pdf [ +0.8%]
- BM_UFlat/4 301445 300568 46512 1.3GB/s html4 [ +2.2%]
- BM_UFlat/5 29338 29263 479452 801.8MB/s cp [ +1.6%]
- BM_UFlat/6 13004 12970 1000000 819.9MB/s c [ +2.1%]
- BM_UFlat/7 4180 4168 3349282 851.4MB/s lsp [ +1.3%]
- BM_UFlat/8 1026149 1024000 10000 959.0MB/s xls [+10.7%]
- BM_UFlat/9 237441 236830 59072 612.4MB/s txt1 [ +0.3%]
- BM_UFlat/10 203966 203298 69307 587.2MB/s txt2 [ +0.8%]
- BM_UFlat/11 627230 625000 22400 651.2MB/s txt3 [ +0.7%]
- BM_UFlat/12 836188 833979 16787 551.0MB/s txt4 [ +1.3%]
- BM_UFlat/13 351904 350750 39886 1.4GB/s bin [ +3.8%]
- BM_UFlat/14 45685 45562 308370 800.4MB/s sum [ +5.9%]
- BM_UFlat/15 5286 5270 2656546 764.9MB/s man [ +1.5%]
- BM_UFlat/16 78774 78544 178117 1.4GB/s pb [ +4.3%]
- BM_UFlat/17 242270 241345 58091 728.3MB/s gaviota [ +1.2%]
- BM_UValidate/0 42149 42000 333333 2.3GB/s html [ -3.0%]
- BM_UValidate/1 432741 431303 32483 1.5GB/s urls [ +7.8%]
- BM_UValidate/2 198 197 71428571 600.7GB/s jpg [+16.8%]
- BM_UValidate/3 14560 14521 965517 6.1GB/s pdf [ -4.1%]
- BM_UValidate/4 169065 168671 83832 2.3GB/s html4 [ -2.9%]
-
-R=jeff
-
-Revision created by MOE tool push_codebase.
-
-------------------------------------------------------------------------
-r40 | snappy.mirrorbot@gmail.com | 2011-06-03 00:57:41 +0200 (Fri, 03 Jun 2011) | 2 lines
-
-Release Snappy 1.0.3.
-
-------------------------------------------------------------------------
-r39 | snappy.mirrorbot@gmail.com | 2011-06-02 20:06:54 +0200 (Thu, 02 Jun 2011) | 11 lines
-
-Remove an unneeded goto in the decompressor; it turns out that the
-state of ip_ after decompression (or attempted decompresion) is
-completely irrelevant, so we don't need the trailer.
-
-Performance is, as expected, mostly flat -- there's a curious ~3–5%
-loss in the “lsp” test, but that test case is so short it is hard to say
-anything definitive about why (most likely, it's some sort of
-unrelated effect).
-
-R=jeff
-
-------------------------------------------------------------------------
-r38 | snappy.mirrorbot@gmail.com | 2011-06-02 19:59:40 +0200 (Thu, 02 Jun 2011) | 52 lines
-
-Speed up decompression by caching ip_.
-
-It is seemingly hard for the compiler to understand that ip_, the current input
-pointer into the compressed data stream, can not alias on anything else, and
-thus using it directly will incur memory traffic as it cannot be kept in a
-register. The code already knew about this and cached it into a local
-variable, but since Step() only decoded one tag, it had to move ip_ back into
-place between every tag. This seems to have cost us a significant amount of
-performance, so changing Step() into a function that decodes as much as it can
-before it saves ip_ back and returns. (Note that Step() was already inlined,
-so it is not the manual inlining that buys the performance here.)
-
-The wins are about 3–6% for Core 2, 6–13% on Core i7 and 5–12% on Opteron
-(for plain array-to-array decompression, in 64-bit opt mode).
-
-There is a tiny difference in the behavior here; if an invalid literal is
-encountered (ie., the writer refuses the Append() operation), ip_ will now
-point to the byte past the tag byte, instead of where the literal was
-originally thought to end. However, we don't use ip_ for anything after
-DecompressAllTags() has returned, so this should not change external behavior
-in any way.
-
-Microbenchmark results for Core i7, 64-bit (Opteron results are similar):
-
-Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------
-BM_UFlat/0 79134 79110 8835 1.2GB/s html [ +6.2%]
-BM_UFlat/1 786126 786096 891 851.8MB/s urls [+10.0%]
-BM_UFlat/2 9948 9948 69125 11.9GB/s jpg [ -1.3%]
-BM_UFlat/3 31999 31998 21898 2.7GB/s pdf [ +6.5%]
-BM_UFlat/4 318909 318829 2204 1.2GB/s html4 [ +6.5%]
-BM_UFlat/5 31384 31390 22363 747.5MB/s cp [ +9.2%]
-BM_UFlat/6 14037 14034 49858 757.7MB/s c [+10.6%]
-BM_UFlat/7 4612 4612 151395 769.5MB/s lsp [ +9.5%]
-BM_UFlat/8 1203174 1203007 582 816.3MB/s xls [+19.3%]
-BM_UFlat/9 253869 253955 2757 571.1MB/s txt1 [+11.4%]
-BM_UFlat/10 219292 219290 3194 544.4MB/s txt2 [+12.1%]
-BM_UFlat/11 672135 672131 1000 605.5MB/s txt3 [+11.2%]
-BM_UFlat/12 902512 902492 776 509.2MB/s txt4 [+12.5%]
-BM_UFlat/13 372110 371998 1881 1.3GB/s bin [ +5.8%]
-BM_UFlat/14 50407 50407 10000 723.5MB/s sum [+13.5%]
-BM_UFlat/15 5699 5701 100000 707.2MB/s man [+12.4%]
-BM_UFlat/16 83448 83424 8383 1.3GB/s pb [ +5.7%]
-BM_UFlat/17 256958 256963 2723 684.1MB/s gaviota [ +7.9%]
-BM_UValidate/0 42795 42796 16351 2.2GB/s html [+25.8%]
-BM_UValidate/1 490672 490622 1427 1.3GB/s urls [+22.7%]
-BM_UValidate/2 237 237 2950297 499.0GB/s jpg [+24.9%]
-BM_UValidate/3 14610 14611 47901 6.0GB/s pdf [+26.8%]
-BM_UValidate/4 171973 171990 4071 2.2GB/s html4 [+25.7%]
-
-
-
-------------------------------------------------------------------------
-r37 | snappy.mirrorbot@gmail.com | 2011-05-17 10:48:25 +0200 (Tue, 17 May 2011) | 10 lines
-
-
-Fix the numbering of the headlines in the Snappy format description.
-
-R=csilvers
-DELTA=4 (0 added, 0 deleted, 4 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1906
-
-------------------------------------------------------------------------
-r36 | snappy.mirrorbot@gmail.com | 2011-05-16 10:59:18 +0200 (Mon, 16 May 2011) | 12 lines
-
-
-Fix public issue #32: Add compressed format documentation for Snappy.
-This text is new, but an earlier version from Zeev Tarantov was used
-as reference.
-
-R=csilvers
-DELTA=112 (111 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1867
-
-------------------------------------------------------------------------
-r35 | snappy.mirrorbot@gmail.com | 2011-05-09 23:29:02 +0200 (Mon, 09 May 2011) | 12 lines
-
-
-Fix public issue #39: Pick out the median runs based on CPU time,
-not real time. Also, use nth_element instead of sort, since we
-only need one element.
-
-R=csilvers
-DELTA=5 (3 added, 0 deleted, 2 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1799
-
-------------------------------------------------------------------------
-r34 | snappy.mirrorbot@gmail.com | 2011-05-09 23:28:45 +0200 (Mon, 09 May 2011) | 19 lines
-
-
-Fix public issue #38: Make the microbenchmark framework handle
-properly cases where gettimeofday() can stand return the same
-result twice (as sometimes on GNU/Hurd) or go backwards
-(as when the user adjusts the clock). We avoid a division-by-zero,
-and put a lower bound on the number of iterations -- the same
-amount as we use to calibrate.
-
-We should probably use CLOCK_MONOTONIC for platforms that support
-it, to be robust against clock adjustments; we already use Windows'
-monotonic timers. However, that's for a later changelist.
-
-R=csilvers
-DELTA=7 (5 added, 0 deleted, 2 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1798
-
-------------------------------------------------------------------------
-r33 | snappy.mirrorbot@gmail.com | 2011-05-04 01:22:52 +0200 (Wed, 04 May 2011) | 11 lines
-
-
-Fix public issue #37: Only link snappy_unittest against -lz and other autodetected
-libraries, not libsnappy.so (which doesn't need any such dependency).
-
-R=csilvers
-DELTA=20 (14 added, 0 deleted, 6 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1710
-
-------------------------------------------------------------------------
-r32 | snappy.mirrorbot@gmail.com | 2011-05-04 01:22:33 +0200 (Wed, 04 May 2011) | 11 lines
-
-
-Release Snappy 1.0.2, to get the license change and various other fixes into
-a release.
-
-R=csilvers
-DELTA=239 (236 added, 0 deleted, 3 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1709
-
-------------------------------------------------------------------------
-r31 | snappy.mirrorbot@gmail.com | 2011-04-26 14:34:55 +0200 (Tue, 26 Apr 2011) | 15 lines
-
-
-Fix public issue #30: Stop using gettimeofday() altogether on Win32,
-as MSVC doesn't include it. Replace with QueryPerformanceCounter(),
-which is monotonic and probably reasonably high-resolution.
-(Some machines have traditionally had bugs in QPC, but they should
-be relatively rare these days, and there's really no much better
-alternative that I know of.)
-
-R=csilvers
-DELTA=74 (55 added, 19 deleted, 0 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1556
-
-------------------------------------------------------------------------
-r30 | snappy.mirrorbot@gmail.com | 2011-04-26 14:34:37 +0200 (Tue, 26 Apr 2011) | 11 lines
-
-
-Fix public issue #31: Don't reset PATH in autogen.sh; instead, do the trickery
-we need for our own build system internally.
-
-R=csilvers
-DELTA=16 (13 added, 1 deleted, 2 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1555
-
-------------------------------------------------------------------------
-r29 | snappy.mirrorbot@gmail.com | 2011-04-16 00:55:56 +0200 (Sat, 16 Apr 2011) | 12 lines
-
-
-When including <windows.h>, define WIN32_LEAN_AND_MEAN first,
-so we won't pull in macro definitions of things like min() and max(),
-which can conflict with <algorithm>.
-
-R=csilvers
-DELTA=1 (1 added, 0 deleted, 0 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1485
-
-------------------------------------------------------------------------
-r28 | snappy.mirrorbot@gmail.com | 2011-04-11 11:07:01 +0200 (Mon, 11 Apr 2011) | 15 lines
-
-
-Fix public issue #29: Write CPU timing code for Windows, based on GetProcessTimes()
-instead of getursage().
-
-I thought I'd already committed this patch, so that the 1.0.1 release already
-would have a Windows-compatible snappy_unittest, but I'd seemingly deleted it
-instead, so this is a reconstruction.
-
-R=csilvers
-DELTA=43 (39 added, 3 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1295
-
-------------------------------------------------------------------------
-r27 | snappy.mirrorbot@gmail.com | 2011-04-08 11:51:53 +0200 (Fri, 08 Apr 2011) | 22 lines
-
-
-Include C bindings of Snappy, contributed by Martin Gieseking.
-
-I've made a few changes since Martin's version; mostly style nits, but also
-a semantic change -- most functions that return bool in the C++ version now
-return an enum, to better match typical C (and zlib) semantics.
-
-I've kept the copyright notice, since Martin is obviously the author here;
-he has signed the contributor license agreement, though, so this should not
-hinder Google's use in the future.
-
-We'll need to update the libtool version number to match the added interface,
-but as of http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
-I'm going to wait until public release.
-
-R=csilvers
-DELTA=238 (233 added, 0 deleted, 5 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1294
-
-------------------------------------------------------------------------
-r26 | snappy.mirrorbot@gmail.com | 2011-04-07 18:36:43 +0200 (Thu, 07 Apr 2011) | 13 lines
-
-
-Replace geo.protodata with a newer version.
-
-The data compresses/decompresses slightly faster than the old data, and has
-similar density.
-
-R=lookingbill
-DELTA=1 (0 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1288
-
-------------------------------------------------------------------------
-r25 | snappy.mirrorbot@gmail.com | 2011-03-30 22:27:53 +0200 (Wed, 30 Mar 2011) | 12 lines
-
-
-Fix public issue #27: Add HAVE_CONFIG_H tests around the config.h
-inclusion in snappy-stubs-internal.h, which eases compiling outside the
-automake/autoconf framework.
-
-R=csilvers
-DELTA=5 (4 added, 1 deleted, 0 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1152
-
-------------------------------------------------------------------------
-r24 | snappy.mirrorbot@gmail.com | 2011-03-30 22:27:39 +0200 (Wed, 30 Mar 2011) | 13 lines
-
-
-Fix public issue #26: Take memory allocation and reallocation entirely out of the
-Measure() loop. This gives all algorithms a small speed boost, except Snappy which
-already didn't do reallocation (so the measurements were slightly biased in its
-favor).
-
-R=csilvers
-DELTA=92 (69 added, 9 deleted, 14 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1151
-
-------------------------------------------------------------------------
-r23 | snappy.mirrorbot@gmail.com | 2011-03-30 22:25:09 +0200 (Wed, 30 Mar 2011) | 18 lines
-
-
-Renamed "namespace zippy" to "namespace snappy" to reduce
-the differences from the opensource code. Will make it easier
-in the future to mix-and-match third-party code that uses
-snappy with google code.
-
-Currently, csearch shows that the only external user of
-"namespace zippy" is some bigtable code that accesses
-a TEST variable, which is temporarily kept in the zippy
-namespace.
-
-R=sesse
-DELTA=123 (18 added, 3 deleted, 102 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1150
-
-------------------------------------------------------------------------
-r22 | snappy.mirrorbot@gmail.com | 2011-03-29 00:17:04 +0200 (Tue, 29 Mar 2011) | 11 lines
-
-
-Put back the final few lines of what was truncated during the
-license header change.
-
-R=csilvers
-DELTA=5 (4 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1094
-
-------------------------------------------------------------------------
-r21 | snappy.mirrorbot@gmail.com | 2011-03-26 03:34:34 +0100 (Sat, 26 Mar 2011) | 20 lines
-
-
-Change on 2011-03-25 19:18:00-07:00 by sesse
-
- Replace the Apache 2.0 license header by the BSD-type license header;
- somehow a lot of the files were missed in the last round.
-
- R=dannyb,csilvers
- DELTA=147 (74 added, 2 deleted, 71 changed)
-
-Change on 2011-03-25 19:25:07-07:00 by sesse
-
- Unbreak the build; the relicensing removed a bit too much (only comments
- were intended, but I also accidentially removed some of the top lines of
- the actual source).
-
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1072
-
-------------------------------------------------------------------------
-r20 | snappy.mirrorbot@gmail.com | 2011-03-25 17:14:41 +0100 (Fri, 25 Mar 2011) | 10 lines
-
-
-Change Snappy from the Apache 2.0 to a BSD-type license.
-
-R=dannyb
-DELTA=328 (80 added, 184 deleted, 64 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1061
-
-------------------------------------------------------------------------
-r19 | snappy.mirrorbot@gmail.com | 2011-03-25 01:39:01 +0100 (Fri, 25 Mar 2011) | 11 lines
-
-
-Release Snappy 1.0.1, to soup up all the various small changes
-that have been made since release.
-
-R=csilvers
-DELTA=266 (260 added, 0 deleted, 6 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1057
-
-------------------------------------------------------------------------
-r18 | snappy.mirrorbot@gmail.com | 2011-03-24 20:15:54 +0100 (Thu, 24 Mar 2011) | 11 lines
-
-
-Fix a microbenchmark crash on mingw32; seemingly %lld is not universally
-supported on Windows, and %I64d is recommended instead.
-
-R=csilvers
-DELTA=6 (5 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1034
-
-------------------------------------------------------------------------
-r17 | snappy.mirrorbot@gmail.com | 2011-03-24 20:15:27 +0100 (Thu, 24 Mar 2011) | 13 lines
-
-
-Fix public issue #19: Fix unit test when Google Test is installed but the
-gflags package isn't (Google Test is not properly initialized).
-
-Patch by Martin Gieseking.
-
-R=csilvers
-DELTA=2 (1 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1033
-
-------------------------------------------------------------------------
-r16 | snappy.mirrorbot@gmail.com | 2011-03-24 20:13:57 +0100 (Thu, 24 Mar 2011) | 15 lines
-
-
-Make the unit test work on systems without mmap(). This is required for,
-among others, Windows support. For Windows in specific, we could have used
-CreateFileMapping/MapViewOfFile, but this should at least get us a bit closer
-to compiling, and is of course also relevant for embedded systems with no MMU.
-
-(Part 2/2)
-
-R=csilvers
-DELTA=15 (12 added, 3 deleted, 0 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1032
-
-------------------------------------------------------------------------
-r15 | snappy.mirrorbot@gmail.com | 2011-03-24 20:12:27 +0100 (Thu, 24 Mar 2011) | 15 lines
-
-
-Make the unit test work on systems without mmap(). This is required for,
-among others, Windows support. For Windows in specific, we could have used
-CreateFileMapping/MapViewOfFile, but this should at least get us a bit closer
-to compiling, and is of course also relevant for embedded systems with no MMU.
-
-(Part 1/2)
-
-R=csilvers
-DELTA=9 (8 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1031
-
-------------------------------------------------------------------------
-r14 | snappy.mirrorbot@gmail.com | 2011-03-24 00:17:36 +0100 (Thu, 24 Mar 2011) | 14 lines
-
-
-Fix public issue #12: Don't keep autogenerated auto* files in Subversion;
-it causes problems with others sending patches etc..
-
-We can't get this 100% hermetic anyhow, due to files like lt~obsolete.m4,
-so we can just as well go cleanly in the other direction.
-
-R=csilvers
-DELTA=21038 (0 added, 21036 deleted, 2 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1012
-
-------------------------------------------------------------------------
-r13 | snappy.mirrorbot@gmail.com | 2011-03-23 18:50:49 +0100 (Wed, 23 Mar 2011) | 11 lines
-
-
-Fix public issue tracker bug #3: Call AC_SUBST([LIBTOOL_DEPS]), or the rule
-to rebuild libtool in Makefile.am won't work.
-
-R=csilvers
-DELTA=1 (1 added, 0 deleted, 0 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=997
-
-------------------------------------------------------------------------
-r12 | snappy.mirrorbot@gmail.com | 2011-03-23 12:16:39 +0100 (Wed, 23 Mar 2011) | 11 lines
-
-
-Fix public issue #10: Don't add GTEST_CPPFLAGS to snappy_unittest_CXXFLAGS;
-it's not needed (CPPFLAGS are always included when compiling).
-
-R=csilvers
-DELTA=1 (0 added, 1 deleted, 0 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=994
-
-------------------------------------------------------------------------
-r11 | snappy.mirrorbot@gmail.com | 2011-03-23 12:16:18 +0100 (Wed, 23 Mar 2011) | 11 lines
-
-
-Fix public issue #9: Add -Wall -Werror to automake flags.
-(This concerns automake itself, not the C++ compiler.)
-
-R=csilvers
-DELTA=4 (3 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=993
-
-------------------------------------------------------------------------
-r10 | snappy.mirrorbot@gmail.com | 2011-03-23 12:13:37 +0100 (Wed, 23 Mar 2011) | 10 lines
-
-
-Fix a typo in the Snappy README file.
-
-R=csilvers
-DELTA=1 (0 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=992
-
-------------------------------------------------------------------------
-r9 | snappy.mirrorbot@gmail.com | 2011-03-23 12:13:13 +0100 (Wed, 23 Mar 2011) | 11 lines
-
-
-Fix public issue #6: Add a --with-gflags for disabling gflags autodetection
-and using a manually given setting (use/don't use) instead.
-
-R=csilvers
-DELTA=16 (13 added, 0 deleted, 3 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=991
-
-------------------------------------------------------------------------
-r8 | snappy.mirrorbot@gmail.com | 2011-03-23 12:12:44 +0100 (Wed, 23 Mar 2011) | 12 lines
-
-
-Fix public issue #5: Replace the EXTRA_LIBSNAPPY_LDFLAGS setup with something
-slightly more standard, that also doesn't leak libtool command-line into
-configure.ac.
-
-R=csilvers
-DELTA=7 (0 added, 4 deleted, 3 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=990
-
-------------------------------------------------------------------------
-r7 | snappy.mirrorbot@gmail.com | 2011-03-23 12:12:22 +0100 (Wed, 23 Mar 2011) | 10 lines
-
-
-Fix public issue #4: Properly quote all macro arguments in configure.ac.
-
-R=csilvers
-DELTA=16 (0 added, 0 deleted, 16 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=989
-
-------------------------------------------------------------------------
-r6 | snappy.mirrorbot@gmail.com | 2011-03-23 12:11:54 +0100 (Wed, 23 Mar 2011) | 11 lines
-
-
-Fix public issue #7: Don't use internal variables named ac_*, as those belong
-to autoconf's namespace.
-
-R=csilvers
-DELTA=6 (0 added, 0 deleted, 6 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=988
-
-------------------------------------------------------------------------
-r5 | snappy.mirrorbot@gmail.com | 2011-03-23 12:11:09 +0100 (Wed, 23 Mar 2011) | 10 lines
-
-
-Add missing licensing headers to a few files. (Part 2/2.)
-
-R=csilvers
-DELTA=12 (12 added, 0 deleted, 0 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=987
-
-------------------------------------------------------------------------
-r4 | snappy.mirrorbot@gmail.com | 2011-03-23 12:10:39 +0100 (Wed, 23 Mar 2011) | 10 lines
-
-
-Add mising licensing headers to a few files. (Part 1/2.)
-
-R=csilvers
-DELTA=24 (24 added, 0 deleted, 0 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=986
-
-------------------------------------------------------------------------
-r3 | snappy.mirrorbot@gmail.com | 2011-03-23 12:10:04 +0100 (Wed, 23 Mar 2011) | 11 lines
-
-
-Use the correct license file for the Apache 2.0 license;
-spotted by Florian Weimer.
-
-R=csilvers
-DELTA=202 (174 added, 0 deleted, 28 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=985
-
-------------------------------------------------------------------------
-r2 | snappy.mirrorbot@gmail.com | 2011-03-18 18:14:15 +0100 (Fri, 18 Mar 2011) | 6 lines
-
-
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=
-
-------------------------------------------------------------------------
-r1 | sesse@google.com | 2011-03-18 18:13:52 +0100 (Fri, 18 Mar 2011) | 2 lines
-
-Create trunk directory.
-
-------------------------------------------------------------------------
23 src/snappy/Makefile.am
View
@@ -1,23 +0,0 @@
-ACLOCAL_AMFLAGS = -I m4
-
-# Library.
-lib_LTLIBRARIES = libsnappy.la
-libsnappy_la_SOURCES = snappy.cc snappy-sinksource.cc snappy-stubs-internal.cc snappy-c.cc
-libsnappy_la_LDFLAGS = -version-info $(SNAPPY_LTVERSION)
-
-include_HEADERS = snappy.h snappy-sinksource.h snappy-stubs-public.h snappy-c.h
-noinst_HEADERS = snappy-internal.h snappy-stubs-internal.h snappy-test.h
-
-# Unit tests and benchmarks.
-snappy_unittest_CPPFLAGS = $(gflags_CFLAGS) $(GTEST_CPPFLAGS)
-snappy_unittest_SOURCES = snappy_unittest.cc snappy-test.cc
-snappy_unittest_LDFLAGS = $(GTEST_LDFLAGS)
-snappy_unittest_LDADD = libsnappy.la $(UNITTEST_LIBS) $(gflags_LIBS) $(GTEST_LIBS)
-TESTS = snappy_unittest
-noinst_PROGRAMS = $(TESTS)
-
-EXTRA_DIST = autogen.sh testdata/alice29.txt testdata/asyoulik.txt testdata/baddata1.snappy testdata/baddata2.snappy testdata/baddata3.snappy testdata/cp.html testdata/fields.c testdata/geo.protodata testdata/grammar.lsp testdata/house.jpg testdata/html testdata/html_x_4 testdata/kennedy.xls testdata/kppkn.gtb testdata/lcet10.txt testdata/mapreduce-osdi-1.pdf testdata/plrabn12.txt testdata/ptt5 testdata/sum testdata/urls.10K testdata/xargs.1
-dist_doc_DATA = ChangeLog COPYING INSTALL NEWS README format_description.txt
-
-libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
927 src/snappy/Makefile.in
View
@@ -1,927 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-TESTS = snappy_unittest$(EXEEXT)
-noinst_PROGRAMS = $(am__EXEEXT_1)
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
- $(include_HEADERS) $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(srcdir)/snappy-stubs-public.h.in $(top_srcdir)/configure \
- AUTHORS COPYING ChangeLog INSTALL NEWS config.guess config.sub \
- depcomp install-sh ltmain.sh missing
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/gtest.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = snappy-stubs-public.h
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \
- "$(DESTDIR)$(includedir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libsnappy_la_LIBADD =
-am_libsnappy_la_OBJECTS = snappy.lo snappy-sinksource.lo \
- snappy-stubs-internal.lo snappy-c.lo
-libsnappy_la_OBJECTS = $(am_libsnappy_la_OBJECTS)
-libsnappy_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(libsnappy_la_LDFLAGS) $(LDFLAGS) -o $@
-am__EXEEXT_1 = snappy_unittest$(EXEEXT)
-PROGRAMS = $(noinst_PROGRAMS)
-am_snappy_unittest_OBJECTS = \
- snappy_unittest-snappy_unittest.$(OBJEXT) \
- snappy_unittest-snappy-test.$(OBJEXT)
-snappy_unittest_OBJECTS = $(am_snappy_unittest_OBJECTS)
-am__DEPENDENCIES_1 =
-snappy_unittest_DEPENDENCIES = libsnappy.la $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-snappy_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(snappy_unittest_LDFLAGS) $(LDFLAGS) -o $@
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(libsnappy_la_SOURCES) $(snappy_unittest_SOURCES)
-DIST_SOURCES = $(libsnappy_la_SOURCES) $(snappy_unittest_SOURCES)
-DATA = $(dist_doc_DATA)
-HEADERS = $(include_HEADERS) $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
- { test ! -d "$(distdir)" \
- || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr "$(distdir)"; }; }
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
-GTEST_VERSION = @GTEST_VERSION@
-HAVE_GTEST = @HAVE_GTEST@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SNAPPY_LTVERSION = @SNAPPY_LTVERSION@
-SNAPPY_MAJOR = @SNAPPY_MAJOR@
-SNAPPY_MINOR = @SNAPPY_MINOR@
-SNAPPY_PATCHLEVEL = @SNAPPY_PATCHLEVEL@
-STRIP = @STRIP@
-UNITTEST_LIBS = @UNITTEST_LIBS@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_cv_have_stddef_h = @ac_cv_have_stddef_h@
-ac_cv_have_stdint_h = @ac_cv_have_stdint_h@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gflags_CFLAGS = @gflags_CFLAGS@
-gflags_LIBS = @gflags_LIBS@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-ACLOCAL_AMFLAGS = -I m4
-
-# Library.
-lib_LTLIBRARIES = libsnappy.la
-libsnappy_la_SOURCES = snappy.cc snappy-sinksource.cc snappy-stubs-internal.cc snappy-c.cc
-libsnappy_la_LDFLAGS = -version-info $(SNAPPY_LTVERSION)
-include_HEADERS = snappy.h snappy-sinksource.h snappy-stubs-public.h snappy-c.h
-noinst_HEADERS = snappy-internal.h snappy-stubs-internal.h snappy-test.h
-
-# Unit tests and benchmarks.
-snappy_unittest_CPPFLAGS = $(gflags_CFLAGS) $(GTEST_CPPFLAGS)
-snappy_unittest_SOURCES = snappy_unittest.cc snappy-test.cc
-snappy_unittest_LDFLAGS = $(GTEST_LDFLAGS)
-snappy_unittest_LDADD = libsnappy.la $(UNITTEST_LIBS) $(gflags_LIBS) $(GTEST_LIBS)
-EXTRA_DIST = autogen.sh testdata/alice29.txt testdata/asyoulik.txt testdata/baddata1.snappy testdata/baddata2.snappy testdata/baddata3.snappy testdata/cp.html testdata/fields.c testdata/geo.protodata testdata/grammar.lsp testdata/house.jpg testdata/html testdata/html_x_4 testdata/kennedy.xls testdata/kppkn.gtb testdata/lcet10.txt testdata/mapreduce-osdi-1.pdf testdata/plrabn12.txt testdata/ptt5 testdata/sum testdata/urls.10K testdata/xargs.1
-dist_doc_DATA = ChangeLog COPYING INSTALL NEWS README format_description.txt
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .cc .lo .o .obj
-am--refresh:
- @:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
- $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: $(am__configure_deps)
- $(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: $(am__configure_deps)
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f config.h stamp-h1
-snappy-stubs-public.h: $(top_builddir)/config.status $(srcdir)/snappy-stubs-public.h.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- list2=; for p in $$list; do \
- if test -f $$p; then \
- list2="$$list2 $$p"; \
- else :; fi; \
- done; \
- test -z "$$list2" || { \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
- }
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-libsnappy.la: $(libsnappy_la_OBJECTS) $(libsnappy_la_DEPENDENCIES)
- $(libsnappy_la_LINK) -rpath $(libdir) $(libsnappy_la_OBJECTS) $(libsnappy_la_LIBADD) $(LIBS)
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-snappy_unittest$(EXEEXT): $(snappy_unittest_OBJECTS) $(snappy_unittest_DEPENDENCIES)
- @rm -f snappy_unittest$(EXEEXT)
- $(snappy_unittest_LINK) $(snappy_unittest_OBJECTS) $(snappy_unittest_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snappy-c.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snappy-sinksource.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snappy-stubs-internal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snappy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snappy_unittest-snappy-test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snappy_unittest-snappy_unittest.Po@am__quote@
-
-.cc.o:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
-
-.cc.obj:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cc.lo:
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-
-snappy_unittest-snappy_unittest.o: snappy_unittest.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(snappy_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT snappy_unittest-snappy_unittest.o -MD -MP -MF $(DEPDIR)/snappy_unittest-snappy_unittest.Tpo -c -o snappy_unittest-snappy_unittest.o `test -f 'snappy_unittest.cc' || echo '$(srcdir)/'`snappy_unittest.cc
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/snappy_unittest-snappy_unittest.Tpo $(DEPDIR)/snappy_unittest-snappy_unittest.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='snappy_unittest.cc' object='snappy_unittest-snappy_unittest.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(snappy_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o snappy_unittest-snappy_unittest.o `test -f 'snappy_unittest.cc' || echo '$(srcdir)/'`snappy_unittest.cc
-
-snappy_unittest-snappy_unittest.obj: snappy_unittest.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(snappy_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT snappy_unittest-snappy_unittest.obj -MD -MP -MF $(DEPDIR)/snappy_unittest-snappy_unittest.Tpo -c -o snappy_unittest-snappy_unittest.obj `if test -f 'snappy_unittest.cc'; then $(CYGPATH_W) 'snappy_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/snappy_unittest.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/snappy_unittest-snappy_unittest.Tpo $(DEPDIR)/snappy_unittest-snappy_unittest.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='snappy_unittest.cc' object='snappy_unittest-snappy_unittest.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(snappy_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o snappy_unittest-snappy_unittest.obj `if test -f 'snappy_unittest.cc'; then $(CYGPATH_W) 'snappy_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/snappy_unittest.cc'; fi`
-
-snappy_unittest-snappy-test.o: snappy-test.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(snappy_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT snappy_unittest-snappy-test.o -MD -MP -MF $(DEPDIR)/snappy_unittest-snappy-test.Tpo -c -o snappy_unittest-snappy-test.o `test -f 'snappy-test.cc' || echo '$(srcdir)/'`snappy-test.cc
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/snappy_unittest-snappy-test.Tpo $(DEPDIR)/snappy_unittest-snappy-test.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='snappy-test.cc' object='snappy_unittest-snappy-test.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(snappy_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o snappy_unittest-snappy-test.o `test -f 'snappy-test.cc' || echo '$(srcdir)/'`snappy-test.cc
-
-snappy_unittest-snappy-test.obj: snappy-test.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(snappy_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT snappy_unittest-snappy-test.obj -MD -MP -MF $(DEPDIR)/snappy_unittest-snappy-test.Tpo -c -o snappy_unittest-snappy-test.obj `if test -f 'snappy-test.cc'; then $(CYGPATH_W) 'snappy-test.cc'; else $(CYGPATH_W) '$(srcdir)/snappy-test.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/snappy_unittest-snappy-test.Tpo $(DEPDIR)/snappy_unittest-snappy-test.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='snappy-test.cc' object='snappy_unittest-snappy-test.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(snappy_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o snappy_unittest-snappy-test.obj `if test -f 'snappy-test.cc'; then $(CYGPATH_W) 'snappy-test.cc'; else $(CYGPATH_W) '$(srcdir)/snappy-test.cc'; fi`
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool config.lt
-install-dist_docDATA: $(dist_doc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
- @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
- done
-
-uninstall-dist_docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(docdir)" && rm -f $$files
-install-includeHEADERS: $(include_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
- @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \